ATLAS Offline Software
LArCaliWave.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 //Dear emacs, this is -*-c++-*-
6 
27 #ifndef LARRAWCONDITIONS_LARCALIWAVE_H
28 #define LARRAWCONDITIONS_LARCALIWAVE_H
29 
39 #include <vector>
40 #include <iostream>
41 #include <stdint.h>
42 
43 
44 class LArCaliWave : public LArWaveCumul {
45 
46 public:
47 
49 
50  LArCaliWave();
51 
52  LArCaliWave(const std::vector<double>&
53  theVector,
54  double dt,
55  int DAC,
56  int isPulsed,
57  unsigned flag);
58 
59  LArCaliWave(unsigned nSamples,
60  double dt,
61  int DAC,
62  int isPulsed,
63  unsigned flag);
64 
65  LArCaliWave(const std::vector<double>& vAmpl,
66  const std::vector<double>& vErr,
67  const std::vector<int>& vTrig,
68  double dt,
69  int DAC,
70  int isPulsed,
71  unsigned flag);
72 
73  virtual ~LArCaliWave() = default;
75 
77 
78  int getDAC() const;
81  int getIsPulsedInt() const;
83 
84  protected:
85 
86  int m_DAC;
88 
89 };
90 // Need real class for CaliWave vector:
91 class LArCaliWaveVec : public std::vector<LArCaliWave> {
92  public:
94  bool isEmpty() const;
95 };
96 
97 
98 // INLINE FUNCTIONS
99 
100 
101 inline
103  return (this->size()==0);
104 }
105 
106 
107 inline
109  : LArWaveCumul(), m_DAC(0), m_isPulsed(false)
110 {}
111 
112 inline
113 LArCaliWave::LArCaliWave(const std::vector<double>& theVector,
114  double dt,
115  int DAC,
116  int isPulsed,
117  unsigned flag)
118  :
119  LArWaveCumul(theVector,dt,flag),
120  m_DAC(DAC),m_isPulsed(isPulsed)
121 {}
122 
123 inline
125  double dt,
126  int DAC,
127  int isPulsed,
128  unsigned flag)
129  :
131  m_DAC(DAC),m_isPulsed(isPulsed)
132 {}
133 
134 inline
135 LArCaliWave::LArCaliWave(const std::vector<double>& vAmpl,
136  const std::vector<double>& vErr,
137  const std::vector<int>& vTrig,
138  double dt,
139  int DAC,
140  int isPulsed,
141  unsigned flag)
142  :
143  LArWaveCumul(vAmpl,vErr,vTrig,dt,flag),
144  m_DAC(DAC),m_isPulsed(isPulsed)
145 {}
146 
147 /*old one*/
148 //inline
149 //int
150 //LArCaliWave::getDAC() const
151 //{ return m_DAC; }
152 
153 
154 inline
155 int
157 {
158  return m_DAC;
159 }
160 
161 inline
162 int
164 {
165  return m_isPulsed;
166 }
167 
168 
169 
170 
171 #endif // LARRAWCONDITIONS_LARCALIWAVE_H
LArWaveCumul
Definition: LArWaveCumul.h:30
LArCaliWave::getDAC
int getDAC() const
DAC value.
Definition: LArCaliWave.h:156
LArCaliWave::getIsPulsedInt
int getIsPulsedInt() const
isPulsed value
Definition: LArCaliWave.h:163
LArCaliWaveVec::isEmpty
bool isEmpty() const
Definition: LArCaliWave.h:102
LArCaliWave::m_isPulsed
int m_isPulsed
Definition: LArCaliWave.h:87
python.setupRTTAlg.size
int size
Definition: setupRTTAlg.py:39
LArCaliWave
Definition: LArCaliWave.h:44
CaloNoise_fillDB.dt
dt
Definition: CaloNoise_fillDB.py:58
master.flag
bool flag
Definition: master.py:29
LArCaliWave::m_DAC
int m_DAC
Definition: LArCaliWave.h:86
LArCaliWaveVec
Definition: LArCaliWave.h:91
LArCaliWave::~LArCaliWave
virtual ~LArCaliWave()=default
LArCaliWaveVec::LArCaliWaveVec
LArCaliWaveVec()
Definition: LArCaliWave.h:93
LArWaveCumul.h
LArCaliWave::LArCaliWave
LArCaliWave()
Definition: LArCaliWave.h:108
LArDigits2NtupleDumper.nSamples
nSamples
Definition: LArDigits2NtupleDumper.py:70
LArWave.h