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

Ratpac-two: /home/docs/checkouts/readthedocs.org/user_builds/ratpac/checkouts/latest/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 void SetPMTInfo(const PMTInfo *_pmtinfo) {
47  if (pmtinfo.empty()) {
48  pmtinfo.resize(1);
49  }
50  pmtinfo[0] = *_pmtinfo;
51  }
52  virtual bool ExistPMTInfo() { return !pmtinfo.empty(); }
53  virtual void PrunePMTInfo() { pmtinfo.resize(0); }
54 
57  if (nestedtubeinfo.empty()) {
58  nestedtubeinfo.resize(1);
59  }
60  return &nestedtubeinfo[0];
61  }
62  virtual void SetNestedTubeInfo(const NestedTubeInfo *_nestedtubeinfo) {
63  if (nestedtubeinfo.empty()) {
64  nestedtubeinfo.resize(1);
65  }
66  nestedtubeinfo[0] = *_nestedtubeinfo;
67  }
68  virtual bool ExistNestedTubeInfo() { return !nestedtubeinfo.empty(); }
69  virtual void PruneNestedTubeInfo() { nestedtubeinfo.resize(0); }
70 
72  virtual ChannelStatus const *GetChannelStatus() const { return &ch_status; }
73  virtual void SetChannelStatus(const ChannelStatus &_ch_status) { ch_status = _ch_status; }
74 
75  ClassDef(Run, 3);
76 
77  protected:
78  Int_t id;
79  ULong64_t type;
80  TTimeStamp startTime;
81  std::vector<NestedTubeInfo> nestedtubeinfo;
82  std::vector<PMTInfo> pmtinfo; // ah.. why is this a vector?
83  ChannelStatus ch_status;
84 };
85 
86 } // namespace DS
87 } // namespace RAT
88 
89 #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:56
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:72
Definition: CCCrossSecMessenger.hh:29