CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
HFQIE10Info.h
Go to the documentation of this file.
1 #ifndef DATAFORMATS_HCALRECHIT_HFQIE10INFO_H
2 #define DATAFORMATS_HCALRECHIT_HFQIE10INFO_H
3 
4 #include <limits>
5 
8 
16 {
17 public:
20 
21  static const unsigned N_RAW_MAX = 5;
23 
24  HFQIE10Info();
25 
26  // Argument "soi" provides the index of the sample of interest
27  // in the "rawData" array
28  HFQIE10Info(const HcalDetId& id, float charge, float energy,
29  float timeRising, float timeFalling,
30  const raw_type* rawData, unsigned nData, unsigned soi);
31 
32  inline HcalDetId id() const {return id_;}
33 
34  inline float charge() const {return charge_;}
35  inline float energy() const {return energy_;}
36  inline float timeRising() const {return timeRising_;}
37  inline float timeFalling() const {return timeFalling_;}
38  inline unsigned nRaw() const {return nRaw_;}
39  inline unsigned soi() const {return soi_;}
40  inline raw_type getRaw(const unsigned which) const
41  {return which >= nRaw_ ? INVALID_RAW : raw_[which];}
42 
43  // Check whether the "ok" flag is set in the dataframe.
44  //
45  // If "checkAllTimeSlices" is "true" or if the raw data
46  // does not contain the "sample of interest" time slice,
47  // we are going to check all time slices. Otherwise only
48  // the "sample of interest" time slice is checked.
49  //
50  bool isDataframeOK(bool checkAllTimeSlices = false) const;
51 
52 private:
54 
55  float charge_;
56  float energy_;
57  float timeRising_;
58  float timeFalling_;
60  uint8_t nRaw_;
61  uint8_t soi_;
62 };
63 
64 #endif // DATAFORMATS_HCALRECHIT_HFQIE10INFO_H
def which
Definition: eostools.py:335
float timeFalling_
Definition: HFQIE10Info.h:58
float timeRising() const
Definition: HFQIE10Info.h:36
bool isDataframeOK(bool checkAllTimeSlices=false) const
Definition: HFQIE10Info.cc:66
HcalDetId id_
Definition: HFQIE10Info.h:53
unsigned nRaw() const
Definition: HFQIE10Info.h:38
HcalDetId id() const
Definition: HFQIE10Info.h:32
float energy() const
Definition: HFQIE10Info.h:35
QIE10DataFrame::Sample::wide_type raw_type
Definition: HFQIE10Info.h:19
float timeRising_
Definition: HFQIE10Info.h:57
raw_type raw_[N_RAW_MAX]
Definition: HFQIE10Info.h:59
uint8_t soi_
Definition: HFQIE10Info.h:61
raw_type getRaw(const unsigned which) const
Definition: HFQIE10Info.h:40
unsigned soi() const
Definition: HFQIE10Info.h:39
float timeFalling() const
Definition: HFQIE10Info.h:37
static const unsigned N_RAW_MAX
Definition: HFQIE10Info.h:21
float charge_
Definition: HFQIE10Info.h:55
static const raw_type INVALID_RAW
Definition: HFQIE10Info.h:22
HcalDetId key_type
Definition: HFQIE10Info.h:18
uint8_t nRaw_
Definition: HFQIE10Info.h:60
float charge() const
Definition: HFQIE10Info.h:34
float energy_
Definition: HFQIE10Info.h:56