LArSoft  v07_13_02
Liquid Argon Software toolkit - http://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 
64  void SetRandomGenerator(TRandom* gen, bool isOwned);
65 
66  protected:
67 
68  TRandom* fRndmGen;
69  bool fIsOwned;
70 
71  };
72 
73 } // namespace evgb
74 
75 #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
virtual void PrintConfig(bool verbose=true)=0
provide a means of printing the configuration
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