FairRoot
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
FairGetEventTime.h
Go to the documentation of this file.
1 #ifndef FairGetEventTime_H_
2 #define FairGetEventTime_H_
3 
15 #include "FairTask.h"
16 #include "TObject.h"
17 
18 #include <utility>
19 #include <vector>
20 
21 class FairGetEventTime : public TObject
22 {
23  public:
25  {
26  static FairGetEventTime instance;
27  return instance;
28  }
29 
33  InitStatus Init();
38  std::pair<int, double> GetEvent(double simTime) const;
39  std::vector<double> GetTimes() const { return fEventTime; }
40 
41  private:
42  FairGetEventTime() = default;
43  ~FairGetEventTime() = default;
44  FairGetEventTime(const FairGetEventTime&) = delete;
45  FairGetEventTime& operator=(const FairGetEventTime&) = delete;
46 
47  private:
48  std::vector<double> fEventTime;
49  bool fRunOnce{true};
50 
51  ClassDef(FairGetEventTime, 1);
52 };
53 
54 #endif /*PndGetEventTimeTask_H_*/
static FairGetEventTime & Instance()
InitStatus
Definition: FairTask.h:33
std::pair< int, double > GetEvent(double simTime) const
std::vector< double > GetTimes() const
Singleton which reads in the event times stored in the event headers of each event in the Init() and ...