00001 00002 #ifndef _Q_COINCIDENT_EVENT_HH_ 00003 #define _Q_COINCIDENT_EVENT_HH_ 00004 00005 #include "QTime.hh" 00006 00012 class QCoincidentEvent 00013 { 00014 public: 00016 QCoincidentEvent(); 00017 00023 QCoincidentEvent(const QCoincidentEvent& other); 00024 00026 virtual ~QCoincidentEvent(); 00027 00029 bool operator<(const QCoincidentEvent& other) const 00030 { return (this->GetQTime() < other.GetQTime()); } 00031 00033 bool operator==(const QCoincidentEvent& other) const 00034 { 00035 return ( (this->GetEventNumber() == other.GetEventNumber()) && 00036 (this->GetStartTime() == other.GetStartTime()) && 00037 (this->GetTime() == other.GetTime()) ); 00038 } 00039 00040 unsigned long long GetUniqueId() const { return fId;} 00041 00042 const Cuore::QTime& GetQTime() const { return fTime; } 00043 00045 unsigned long long GetTime() const { return fTime.GetFromStartRunNs(); } 00046 00048 time_t GetStartTime() const { return fTime.GetStartRunUnix(); } 00049 00051 int GetEventNumber() const { return fEventNumber; } 00052 00054 int GetChannel() const { return fLgChannel; } 00055 00057 double GetEnergy() const { return fEnergy; } 00058 00060 void SetTime(const Cuore::QTime& time) { fTime = time; } 00061 00063 void SetEventNumber(int evNumber) { fEventNumber = evNumber; } 00064 00066 void SetChannel(int channel) { fLgChannel = channel; } 00067 00069 void SetEnergy(double energy) { fEnergy = energy; } 00070 00071 protected: 00072 int fEventNumber; 00073 int fLgChannel; 00074 Cuore::QTime fTime; 00075 double fEnergy; 00076 unsigned long long fId; 00078 static unsigned long long fIdCounter; 00079 }; 00080 #endif