CbmRoot
CbmMCEventInfo.h
Go to the documentation of this file.
1 
6 #ifndef CBMMCEVENTINFO_H
7 #define CBMMCEVENTINFO_H 1
8 
9 #include <Rtypes.h> // for THashConsistencyHolder, ClassDef
10 #include <RtypesCore.h> // for Int_t, Double_t
11 
12 #include <string> // for string
13 
28 
29 public:
35  CbmMCEventInfo(Int_t fileId = -1, Int_t eventId = -1, Double_t time = 0.);
36 
37 
39  virtual ~CbmMCEventInfo();
40 
41 
45  Int_t GetFileId() const { return fFileId; }
46 
47 
51  Int_t GetEventId() const { return fEventId; }
52 
53 
57  Double_t GetTime() const { return fTime; }
58 
59 
61  std::string ToString() const;
62 
63 
65  bool operator<(const CbmMCEventInfo& other) const {
66  if (fFileId == other.fFileId) return (fEventId < other.fEventId);
67  return (fFileId < other.fFileId);
68  }
69 
70 
71 private:
72  Int_t fFileId;
73  Int_t fEventId;
74  Double_t fTime;
75 
77 };
78 
79 
80 #endif /* CBMMCEVENTINFO_H_ */
CbmMCEventInfo::CbmMCEventInfo
CbmMCEventInfo(Int_t fileId=-1, Int_t eventId=-1, Double_t time=0.)
Constructor.
Definition: CbmMCEventInfo.cxx:14
CbmMCEventInfo::ToString
std::string ToString() const
Definition: CbmMCEventInfo.cxx:25
CbmMCEventInfo::fEventId
Int_t fEventId
Definition: CbmMCEventInfo.h:73
CbmMCEventInfo
Allows to access an MC event in the source file.
Definition: CbmMCEventInfo.h:27
CbmMCEventInfo::fTime
Double_t fTime
Definition: CbmMCEventInfo.h:74
CbmMCEventInfo::~CbmMCEventInfo
virtual ~CbmMCEventInfo()
Destructor.
Definition: CbmMCEventInfo.cxx:20
CbmMCEventInfo::GetEventId
Int_t GetEventId() const
Event index @value Event index.
Definition: CbmMCEventInfo.h:51
CbmMCEventInfo::GetTime
Double_t GetTime() const
Event time @value Event time [ns].
Definition: CbmMCEventInfo.h:57
CbmMCEventInfo::fFileId
Int_t fFileId
Definition: CbmMCEventInfo.h:72
CbmMCEventInfo::operator<
bool operator<(const CbmMCEventInfo &other) const
Comparison operator.
Definition: CbmMCEventInfo.h:65
CbmMCEventInfo::GetFileId
Int_t GetFileId() const
File index @value File index.
Definition: CbmMCEventInfo.h:45
CbmMCEventInfo::ClassDef
ClassDef(CbmMCEventInfo, 1)