Diana Software
QSampleInfo.hh
Go to the documentation of this file.
1 
2 #ifndef _QSAMPLEDATA_HH_
3 #define _QSAMPLEDATA_HH_
4 
5 #include "QDiana.hh"
6 #include "QObject.hh"
7 #include <string>
23 class QSampleInfo : public Diana::QObject
24 {
25 public:
26 
30  virtual ~QSampleInfo() {};
31 
33  bool GetIsPulser() const { return (Pulser == fEventType); }
35  bool GetIsSignal() const { return (Signal == fEventType); }
37  bool GetIsReversed() const { return (Reversed == fEventType); }
39  bool GetIsLED() const { return (LED == fEventType); }
41  bool GetIsVeto() const {return (Veto == fEventType); }
43  bool GetIsNoise() const {return (Noise == fEventType); }
45  bool GetIsSide() const {return (Side == fEventType); }
47  Int_t GetTriggerNumber() const { return fTriggerNumber; }
49  Int_t GetPulserDelay() const {return fPulserDelay;}
51  Int_t GetSampleIndex() const { return fSampleIndex; }
53  Int_t GetOriginChannel() const{return fOriginChannel;}
55  Int_t GetEventNumber() const {return fEventNumber;}
56 
57 
65  void SetIsLED() { fEventType = LED;}
67  void SetIsVeto() { fEventType = Veto;}
71  void SetIsSide() { fEventType = Side;}
73  void SetOriginChannel(int ch){fOriginChannel=ch;}
75  void SetTriggerNumber(Int_t n) {fTriggerNumber = n;}
77  void SetPulserDelay(Int_t delay) { fPulserDelay = delay; }
79  void SetSampleIndex(Int_t index) { fSampleIndex = index; }
81  void SetEventNumber(Int_t eventNumber) {fEventNumber = eventNumber;}
82 
83  void Clear();
84 
85  void Dump(std::ostream& o) const;
86 
91  enum EventType {
92  Signal=1,
94  Noise=3,
95  Pulser=5,
96  Veto=7,
97  Side=9,
98  LED=11,
99  Unassigned=99
100  };
101 
104 private:
106  Int_t fPulserDelay;
107  Int_t fSampleIndex;
108  Int_t fEventNumber;
111 };
112 
113 
114 #endif
contains information on flagged samples
Definition: QSampleInfo.hh:24
Int_t fPulserDelay
Definition: QSampleInfo.hh:106
void SetPulserDelay(Int_t delay)
set pulser delay in ms
Definition: QSampleInfo.hh:77
Int_t fOriginChannel
Definition: QSampleInfo.hh:109
void SetOriginChannel(int ch)
Set Origin Channel.
Definition: QSampleInfo.hh:73
void SetIsLED()
Set event type to LED.
Definition: QSampleInfo.hh:65
virtual ~QSampleInfo()
default destructor
Definition: QSampleInfo.hh:30
bool GetIsPulser() const
Get IsPulser.
Definition: QSampleInfo.hh:33
Int_t GetEventNumber() const
Get EventNumber associated to this sample, or to the main event.
Definition: QSampleInfo.hh:55
Int_t fSampleIndex
Definition: QSampleInfo.hh:107
bool GetIsSide() const
Get IsSide.
Definition: QSampleInfo.hh:45
void Dump(std::ostream &o) const
Definition: QSampleInfo.cc:21
EventType fEventType
Definition: QSampleInfo.hh:102
QObjectDef(QSampleInfo, 8)
EventType
event type, for QSampleInfo internal use
Definition: QSampleInfo.hh:91
Int_t GetSampleIndex() const
Get SampleIndex from the beginning of the waveform.
Definition: QSampleInfo.hh:51
Int_t GetOriginChannel() const
Get Origin Channel inducing the special sample.
Definition: QSampleInfo.hh:53
QSampleInfo()
default constructor
Int_t fEventNumber
Definition: QSampleInfo.hh:108
void SetIsVeto()
Set event type to Muon.
Definition: QSampleInfo.hh:67
void SetIsReversed()
Set event type to Reversed.
Definition: QSampleInfo.hh:63
void SetIsNoise()
Set event type to Noise.
Definition: QSampleInfo.hh:69
bool GetIsSignal() const
Get IsSignal.
Definition: QSampleInfo.hh:35
void SetEventNumber(Int_t eventNumber)
Set EventNumber.
Definition: QSampleInfo.hh:81
void SetIsPulser()
Set event type to Pulser.
Definition: QSampleInfo.hh:59
Int_t fTriggerNumber
Definition: QSampleInfo.hh:105
bool GetIsVeto() const
Get IsMuon.
Definition: QSampleInfo.hh:41
void SetIsSide()
Set event type to Side.
Definition: QSampleInfo.hh:71
Int_t GetPulserDelay() const
Get pulser delay. Valid for IsPulser.
Definition: QSampleInfo.hh:49
void SetTriggerNumber(Int_t n)
Set trigger number (1 to 4)
Definition: QSampleInfo.hh:75
Int_t GetTriggerNumber() const
Get number of the trigger that fired. Valid for IsSignal()
Definition: QSampleInfo.hh:47
void SetSampleIndex(Int_t index)
Set SampleIndex.
Definition: QSampleInfo.hh:79
bool GetIsReversed() const
Get IsSignal.
Definition: QSampleInfo.hh:37
void SetIsSignal()
Set event type to Signal.
Definition: QSampleInfo.hh:61
void Clear()
Definition: QSampleInfo.cc:11
bool GetIsNoise() const
Get IsNoise.
Definition: QSampleInfo.hh:43
bool GetIsLED() const
Get IsLED.
Definition: QSampleInfo.hh:39