/home/docs/checkouts/readthedocs.org/user_builds/ratpac/checkouts/stable/src/ds/include/RAT/DS/Run.hh Source File

Ratpac-two: /home/docs/checkouts/readthedocs.org/user_builds/ratpac/checkouts/stable/src/ds/include/RAT/DS/Run.hh Source File
Ratpac-two
Run.hh
1 
8 #ifndef __RAT_DS_Run__
9 #define __RAT_DS_Run__
10 
11 #include <TObject.h>
12 #include <TTimeStamp.h>
13 
14 #include <RAT/DS/ChannelStatus.hh>
15 #include <RAT/DS/NestedTubeInfo.hh>
16 #include <RAT/DS/PMTInfo.hh>
17 #include <vector>
18 
19 namespace RAT {
20 namespace DS {
21 
22 class Run : public TObject {
23  public:
24  Run() : TObject() {}
25  virtual ~Run() {}
26 
28  virtual Int_t GetID() const { return id; }
29  virtual void SetID(Int_t _id) { id = _id; }
30 
32  virtual ULong64_t GetType() const { return type; }
33  virtual void SetType(ULong64_t _type) { type = _type; }
34 
36  virtual TTimeStamp GetStartTime() const { return startTime; }
37  virtual void SetStartTime(const TTimeStamp &_startTime) { startTime = _startTime; }
38 
40  virtual PMTInfo *GetPMTInfo() {
41  if (pmtinfo.empty()) {
42  pmtinfo.resize(1);
43  }
44  return &pmtinfo[0];
45  }
46  virtual const PMTInfo *GetPMTInfo() const {
47  if (pmtinfo.empty()) {
48  return nullptr;
49  }
50  return &pmtinfo[0];
51  }
52  virtual void SetPMTInfo(const PMTInfo *_pmtinfo) {
53  if (pmtinfo.empty()) {
54  pmtinfo.resize(1);
55  }
56  pmtinfo[0] = *_pmtinfo;
57  }
58  virtual bool ExistPMTInfo() { return !pmtinfo.empty(); }
59  virtual void PrunePMTInfo() { pmtinfo.resize(0); }
60 
63  if (nestedtubeinfo.empty()) {
64  nestedtubeinfo.resize(1);
65  }
66  return &nestedtubeinfo[0];
67  }
68  virtual void SetNestedTubeInfo(const NestedTubeInfo *_nestedtubeinfo) {
69  if (nestedtubeinfo.empty()) {
70  nestedtubeinfo.resize(1);
71  }
72  nestedtubeinfo[0] = *_nestedtubeinfo;
73  }
74  virtual bool ExistNestedTubeInfo() { return !nestedtubeinfo.empty(); }
75  virtual void PruneNestedTubeInfo() { nestedtubeinfo.resize(0); }
76 
78  virtual ChannelStatus const *GetChannelStatus() const { return &ch_status; }
79  virtual void SetChannelStatus(const ChannelStatus &_ch_status) { ch_status = _ch_status; }
80 
81  ClassDef(Run, 3);
82 
83  protected:
84  Int_t id;
85  ULong64_t type;
86  TTimeStamp startTime;
87  std::vector<NestedTubeInfo> nestedtubeinfo;
88  std::vector<PMTInfo> pmtinfo; // ah.. why is this a vector?
89  ChannelStatus ch_status;
90 };
91 
92 } // namespace DS
93 } // namespace RAT
94 
95 #endif
Definition: ChannelStatus.hh:26
Definition: NestedTubeInfo.hh:19
Definition: PMTInfo.hh:19
Definition: Run.hh:22
virtual Int_t GetID() const
Definition: Run.hh:28
virtual PMTInfo * GetPMTInfo()
Definition: Run.hh:40
virtual NestedTubeInfo * GetNestedTubeInfo()
Definition: Run.hh:62
virtual TTimeStamp GetStartTime() const
Definition: Run.hh:36
virtual ULong64_t GetType() const
Definition: Run.hh:32
virtual ChannelStatus const * GetChannelStatus() const
Definition: Run.hh:78
Definition: CCCrossSecMessenger.hh:29