#ifndef VEGA_VGroupInfo #define VEGA_VGroupInfo //*-- Author : Damir Buskulic 13/07/00 #include "TObject.h" ////////////////////////////////////////////////////////////////////////// // // // VGroupInfo // // // // Information on a group of frames. // // A group of frames is defined as a set of frames that follow // // each other in time, without any "holes" or spaces. It is much easier // // and faster to search for information in that case. // // // ////////////////////////////////////////////////////////////////////////// class VGroupInfo : public TObject { private : Int_t mFirstIndex; // Group : index of first metadata Int_t mLastIndex; // Group : index of last metadata Double_t mBeginTime; // Group : start time of first frame Double_t mEndTime; // Group : end time of last frame Double_t mAverageLength; // Group : Average frame length in the group public : VGroupInfo(); VGroupInfo(Int_t firstIndex, Int_t lastIndex, Double_t beginTime, Double_t endTime, Float_t averageLength); ~VGroupInfo() {} virtual void Copy(TObject& obj); virtual Int_t GetFirstIndex() {return mFirstIndex;} virtual Int_t GetLastIndex() {return mLastIndex;} virtual Double_t GetBeginTime() {return mBeginTime;} virtual Double_t GetEndTime() {return mEndTime;} virtual Double_t GetAverageLength() {return mAverageLength;} virtual void SetFirstIndex(Int_t index) {mFirstIndex = index;} virtual void SetLastIndex(Int_t index) {mLastIndex = index;} virtual void SetBeginTime(Double_t time) {mBeginTime = time;} virtual void SetEndTime(Double_t time) {mEndTime = time;} virtual void SetAverageLength(Double_t length) {mAverageLength = length;} virtual void Increment(Double_t endtime, Double_t length); virtual void Reset(); virtual Int_t ApproximateIndex(Double_t time); ClassDef(VGroupInfo,1) // Information for a group of successive frames }; inline Int_t VGroupInfo::ApproximateIndex(Double_t time) { return (time>=mBeginTime && time