CMS 3D CMS Logo

HcalTTPDigi.h
Go to the documentation of this file.
1 #ifndef DATAFORMATS_HCALDIGI_HCALTTPDIGI_H
2 #define DATAFORMATS_HCALDIGI_HCALTTPDIGI_H 1
3 
4 #include <cstdint>
5 #include <vector>
6 #include <ostream>
7 
12 class HcalTTPDigi {
13 public:
14  typedef int key_type; // Needed for the sorted collection
15  HcalTTPDigi();
16  HcalTTPDigi(int identifier, int samples, int presamples, unsigned int fwVersion, int algorithm, unsigned int lPipe);
17 
18  void setSample(int relativeSample, const uint16_t* triggerInputs, const uint32_t algodep, const uint8_t outputTrigger);
19 
23  std::vector<bool> inputPattern(int relativeSample = 0) const;
27  uint8_t triggerOutput(int relativeSample = 0) const;
29  uint32_t algorithmWord(int relativeSample = 0) const;
30 
31  int id() const { return identifier_; }
32  int size() const { return samples_; }
33  int presamples() const { return presamples_; }
34  int algorithm() const { return algorithm_; }
35  unsigned int fwVersion() const { return fwVersion_; }
36  unsigned int pipelineLength() const { return lPipe_; }
37 
38  bool operator==(const HcalTTPDigi& digi) const;
39  bool operator!=(const HcalTTPDigi& digi) const { return !(*this == digi); }
40 
41 private:
44  unsigned int fwVersion_;
46  unsigned int lPipe_;
47 
48  uint16_t triggerInputs_[5 * 8]; // length = 5*samples_
49  uint32_t algoDepend_[8]; // length = samples_
50  uint8_t triggerOutput_[8]; // length = samples_
51 };
52 
53 std::ostream& operator<<(std::ostream&, const HcalTTPDigi&);
54 
55 #endif
HcalTTPDigi::fwVersion
unsigned int fwVersion() const
Definition: HcalTTPDigi.h:35
HcalTTPDigi::fwVersion_
unsigned int fwVersion_
Definition: HcalTTPDigi.h:44
HcalTTPDigi::size
int size() const
Definition: HcalTTPDigi.h:32
HcalTTPDigi::key_type
int key_type
Definition: HcalTTPDigi.h:14
HcalTTPDigi::samples_
int samples_
Definition: HcalTTPDigi.h:43
HcalTTPDigi
Definition: HcalTTPDigi.h:12
HcalTTPDigi::operator==
bool operator==(const HcalTTPDigi &digi) const
Definition: HcalTTPDigi.cc:73
HcalTTPDigi::id
int id() const
Definition: HcalTTPDigi.h:31
HcalTTPDigi::lPipe_
unsigned int lPipe_
Definition: HcalTTPDigi.h:46
EgammaValidation_cff.samples
samples
Definition: EgammaValidation_cff.py:19
HcalTTPDigi::HcalTTPDigi
HcalTTPDigi()
Definition: HcalTTPDigi.cc:3
HcalTTPDigi::algorithm
int algorithm() const
Definition: HcalTTPDigi.h:34
HcalTTPDigi::presamples_
int presamples_
Definition: HcalTTPDigi.h:43
HcalTTPDigi::setSample
void setSample(int relativeSample, const uint16_t *triggerInputs, const uint32_t algodep, const uint8_t outputTrigger)
Definition: HcalTTPDigi.cc:28
HcalTTPDigi::identifier_
int identifier_
Definition: HcalTTPDigi.h:42
HcalTTPDigi::operator!=
bool operator!=(const HcalTTPDigi &digi) const
Definition: HcalTTPDigi.h:39
HcalTTPDigi::triggerOutput_
uint8_t triggerOutput_[8]
Definition: HcalTTPDigi.h:50
HcalTTPDigi::triggerOutput
uint8_t triggerOutput(int relativeSample=0) const
Definition: HcalTTPDigi.cc:57
HcalTTPDigi::algorithmWord
uint32_t algorithmWord(int relativeSample=0) const
Definition: HcalTTPDigi.cc:65
HcalTTPDigi::presamples
int presamples() const
Definition: HcalTTPDigi.h:33
operator<<
std::ostream & operator<<(std::ostream &, const HcalTTPDigi &)
Definition: HcalTTPDigi.cc:88
HcalTTPDigi::pipelineLength
unsigned int pipelineLength() const
Definition: HcalTTPDigi.h:36
HcalTTPDigi::triggerInputs_
uint16_t triggerInputs_[5 *8]
Definition: HcalTTPDigi.h:48
HcalTTPDigi::inputPattern
std::vector< bool > inputPattern(int relativeSample=0) const
Definition: HcalTTPDigi.cc:45
HcalTTPDigi::algoDepend_
uint32_t algoDepend_[8]
Definition: HcalTTPDigi.h:49
HcalTTPDigi::algorithm_
int algorithm_
Definition: HcalTTPDigi.h:45