#ifndef VEGA_VMetaData #define VEGA_VMetaData //*-- Author : Damir Buskulic 6/11/01 #include #include "VGPSTime.h" using namespace std; ////////////////////////////////////////////////////////////////////////// // // // VMetaData // // // // Meta data for one frame. Represents the meta data transfered between // // a Frame Channel and a Frame Info device // // // ////////////////////////////////////////////////////////////////////////// class VMetaData { private : unsigned int mRun; // Run number containing this frame unsigned int mFrame; // Absolute frame number VGPSTime mStartTime; // Start time of the frame VGPSTime mLocalStartTime; // Start time of the frame in local coordinates double mLength; // Length of the frame int mQuality; // Quality of data flags int mTrigger; // Trigger bits string mFileName; // Frames file name containing this frame string mDetector; // Name of the detector that generated this frame string mState; // Locked/not-locked state flag of the interferometer public : VMetaData(); VMetaData(char* fileName, int run, int frame, VGPSTime startTime, VGPSTime localStartTime, double length, char* detector="VIRGO", char* state="L", int quality=1, int trigger=1); VMetaData(VMetaData& meta); virtual ~VMetaData(); void Copy(VMetaData& meta); void Clear(); virtual unsigned int GetRun() {return mRun;} virtual unsigned int GetFrame() {return mFrame;} virtual VGPSTime GetStartTime() {return mStartTime;} virtual VGPSTime GetLocalStartTime() {return mLocalStartTime;} virtual double GetEndTime() {return mStartTime.GetTimeD()+mLength;} virtual double GetLength() {return mLength;} virtual int GetQuality() {return mQuality;} virtual int GetTrigger() {return mTrigger;} virtual const char* GetFileName() {return mFileName.c_str();} virtual const char* GetDetector() {return mDetector.c_str();} virtual const char* GetState() {return mState.c_str();} virtual int IsValid() {return (mStartTime.GetSec()>0);} virtual void SetRun(unsigned int run) {mRun = run;} virtual void SetFrame(unsigned int frame) {mFrame = frame;} virtual void SetStartTime(VGPSTime start) {mStartTime = start;} virtual void SetStartTime(double start) {mStartTime = start;} virtual void SetLocalStartTime(VGPSTime lstart) {mLocalStartTime = lstart;} virtual void SetLocalStartTime(double lstart) {mLocalStartTime = lstart;} virtual void SetLength(double length) {mLength = length;} virtual void SetQuality(int qual) {mQuality = qual;} virtual void SetTrigger(int trig) {mTrigger = trig;} virtual void SetFileName(const char* filename) {mFileName=filename;} virtual void SetDetector(const char* detector) {mDetector=detector;} virtual void SetState(const char* state) {mState=state;} friend int operator ==(VMetaData& a,VMetaData& b); friend int operator !=(VMetaData& a,VMetaData& b); virtual void Print(Option_t * opt="") {} ClassDef(VMetaData,0) // Generic meta data for one frame }; #endif