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 <stdint.h>
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_ ;
45  int algorithm_ ;
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
std::ostream & operator<<(std::ostream &, const HcalTTPDigi &)
Definition: HcalTTPDigi.cc:79
uint32_t algoDepend_[8]
Definition: HcalTTPDigi.h:49
int size() const
Definition: HcalTTPDigi.h:32
unsigned int pipelineLength() const
Definition: HcalTTPDigi.h:36
uint32_t algorithmWord(int relativeSample=0) const
Definition: HcalTTPDigi.cc:61
bool operator!=(const HcalTTPDigi &digi) const
Definition: HcalTTPDigi.h:39
unsigned int lPipe_
Definition: HcalTTPDigi.h:46
int presamples() const
Definition: HcalTTPDigi.h:33
int presamples_
Definition: HcalTTPDigi.h:43
bool operator==(const HcalTTPDigi &digi) const
Definition: HcalTTPDigi.cc:67
uint8_t triggerOutput(int relativeSample=0) const
Definition: HcalTTPDigi.cc:55
void setSample(int relativeSample, const uint16_t *triggerInputs, const uint32_t algodep, const uint8_t outputTrigger)
Definition: HcalTTPDigi.cc:24
unsigned int fwVersion() const
Definition: HcalTTPDigi.h:35
std::vector< bool > inputPattern(int relativeSample=0) const
Definition: HcalTTPDigi.cc:42
int identifier_
Definition: HcalTTPDigi.h:42
uint8_t triggerOutput_[8]
Definition: HcalTTPDigi.h:50
int algorithm() const
Definition: HcalTTPDigi.h:34
uint16_t triggerInputs_[5 *8]
Definition: HcalTTPDigi.h:48
int algorithm_
Definition: HcalTTPDigi.h:45
int id() const
Definition: HcalTTPDigi.h:31
unsigned int fwVersion_
Definition: HcalTTPDigi.h:44