00001 #ifndef __PXXEventPayloadRecord__H__ 00002 #define __PXXEventPayloadRecord__H__ 00003 00028 00029 #include "payloads-unpacker/payloads/PXXVRecord.h" 00030 #include "payloads-unpacker/payloads/PXXSourceID4B.h" 00031 #include "payloads-unpacker/payloads/PXXUTCTime8B.h" 00032 #include <string> 00033 using namespace std; 00034 00035 class PXXIUTCTime; 00036 00037 class PXXEventPayloadRecord : public PXXVRecord 00038 { 00039 public: 00040 00041 SET_LOGGER("PXXEventPayloadRecord"); 00042 00047 PXXEventPayloadRecord(const string &type_name = "Unknown"); 00048 //------------------------------------------------------------------------------ 00049 00053 virtual ~PXXEventPayloadRecord() {} 00054 //------------------------------------------------------------------------------ 00055 00061 virtual Int32b_t GetEventUID() const; 00062 //------------------------------------------------------------------------------ 00063 00068 virtual const PXXISourceID &GetSourceID() { return fTSourceID_; } 00069 //------------------------------------------------------------------------------ 00070 00074 virtual const PXXIUTCTime& GetFirstTimeUTC() { return fTFirstTimeUTC_; } 00075 //------------------------------------------------------------------------------ 00076 00080 virtual const PXXIUTCTime& GetLastTimeUTC() { return fTLastTimeUTC_; } 00081 //------------------------------------------------------------------------------ 00082 00089 virtual Int32b_t GetEventType() const; 00090 //------------------------------------------------------------------------------ 00091 00099 virtual Int32b_t GetEventConfigID() const; 00100 //------------------------------------------------------------------------------ 00101 00109 virtual Int32b_t GetRunNumber() const; 00110 //------------------------------------------------------------------------------ 00111 00115 virtual void WriteProperties(); 00116 //------------------------------------------------------------------------------ 00117 00118 private: 00119 00137 virtual Int32b_t ReadData(); 00138 //------------------------------------------------------------------------------ 00139 00140 private: 00141 00142 Int32b_t fIEventUID_; // unique id of the event 00143 PXXSourceID4B fTSourceID_; // source id of the request 00144 PXXUTCTime8B fTFirstTimeUTC_; // start of the time window 00145 PXXUTCTime8B fTLastTimeUTC_; // last of the time window 00146 Int32b_t fIEventType_; // config type which produced event 00147 Int32b_t fIEventConfigID_; // primary key to parameters to this config type 00148 Int32b_t fIRunNumber_; // run number for this event 00149 00150 ClassDef(PXXEventPayloadRecord, 0) // interface of payloads 00151 00152 }; 00153 00154 #endif // __PXXEventPayloadRecord__H__