LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
EvtTimeShiftI.h
Go to the documentation of this file.
1 
20 #ifndef SIMB_EVTTIMEDISTI_H
21 #define SIMB_EVTTIMEDISTI_H
22 
23 #include <string>
24 #include <vector>
25 #include "TRandom.h" // ROOT's random # base class
26 
27 namespace evgb {
28 
29  class EvtTimeShiftI {
30 
31  public:
32 
33  EvtTimeShiftI(const std::string& config);
34  virtual ~EvtTimeShiftI();
35 
36  //
37  // define the EvtTimeShiftI interface:
38  //
39 
43  virtual void Config(const std::string& config ) = 0;
44 
50  virtual double TimeOffset() = 0;
51  virtual double TimeOffset(std::vector<double> v) = 0;
52 
54  virtual void PrintConfig(bool verbose=true) = 0;
55 
56 
61  TRandom* GetRandomGenerator() const { return fRndmGen; }
62  bool IsRandomGeneratorOwned() const { return fIsOwned; }
63  bool IsRandomGeneratorSeeded() const { return fIsSeeded; }
64 
65  void SetRandomGenerator(TRandom* gen, bool isOwned);
66 
67  protected:
68 
69  std::vector<std::string> GetConfigTokens(const std::string& config);
70 
71  TRandom* fRndmGen;
72  bool fIsOwned;
73  bool fIsSeeded;
74 
75  };
76 
77 } // namespace evgb
78 
79 #endif //SIMB_EVTTIMEDISTI_H
void SetRandomGenerator(TRandom *gen, bool isOwned)
virtual void Config(const std::string &config)=0
interface for event time distribution
Definition: EvtTimeShiftI.h:29
std::vector< std::string > GetConfigTokens(const std::string &config)
virtual void PrintConfig(bool verbose=true)=0
provide a means of printing the configuration
bool IsRandomGeneratorSeeded() const
Definition: EvtTimeShiftI.h:63
TRandom * GetRandomGenerator() const
Definition: EvtTimeShiftI.h:61
EvtTimeShiftI(const std::string &config)
virtual double TimeOffset()=0
Physics generators for neutrinos, cosmic rays, and others.
Definition: CRYHelper.cxx:33
bool IsRandomGeneratorOwned() const
Definition: EvtTimeShiftI.h:62