CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 
14 class HcalTTPDigi {
15 public:
16  typedef int key_type; // Needed for the sorted collection
17  HcalTTPDigi();
18  HcalTTPDigi(int identifier, int samples, int presamples, unsigned int fwVersion, int algorithm, unsigned int lPipe);
19 
20  void setSample(int relativeSample,const uint16_t* triggerInputs, const uint32_t algodep, const uint8_t outputTrigger);
21 
25  std::vector<bool> inputPattern(int relativeSample=0) const;
29  uint8_t triggerOutput(int relativeSample=0) const;
31  uint32_t algorithmWord(int relativeSample=0) const;
32 
33  int id() const { return identifier_ ; }
34  int size() const { return samples_ ; }
35  int presamples() const { return presamples_ ; }
36  int algorithm() const { return algorithm_ ; }
37  unsigned int fwVersion() const { return fwVersion_ ; }
38  unsigned int pipelineLength() const { return lPipe_ ; }
39 
40  bool operator==(const HcalTTPDigi& digi) const ;
41  bool operator!=(const HcalTTPDigi& digi) const { return !(*this == digi) ; }
42 
43 private:
46  unsigned int fwVersion_ ;
47  int algorithm_ ;
48  unsigned int lPipe_ ;
49 
50  uint16_t triggerInputs_[5*8]; // length = 5*samples_
51  uint32_t algoDepend_[8]; // length = samples_
52  uint8_t triggerOutput_[8]; // length = samples_
53 };
54 
55 std::ostream& operator<<(std::ostream&, const HcalTTPDigi&);
56 
57 #endif
uint32_t algoDepend_[8]
Definition: HcalTTPDigi.h:51
int size() const
Definition: HcalTTPDigi.h:34
unsigned int pipelineLength() const
Definition: HcalTTPDigi.h:38
uint32_t algorithmWord(int relativeSample=0) const
Definition: HcalTTPDigi.cc:61
bool operator!=(const HcalTTPDigi &digi) const
Definition: HcalTTPDigi.h:41
std::ostream & operator<<(std::ostream &out, const ALILine &li)
Definition: ALILine.cc:187
unsigned int lPipe_
Definition: HcalTTPDigi.h:48
int presamples() const
Definition: HcalTTPDigi.h:35
int presamples_
Definition: HcalTTPDigi.h:45
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:37
std::vector< bool > inputPattern(int relativeSample=0) const
Definition: HcalTTPDigi.cc:42
int identifier_
Definition: HcalTTPDigi.h:44
uint8_t triggerOutput_[8]
Definition: HcalTTPDigi.h:52
int algorithm() const
Definition: HcalTTPDigi.h:36
uint16_t triggerInputs_[5 *8]
Definition: HcalTTPDigi.h:50
int algorithm_
Definition: HcalTTPDigi.h:47
int id() const
Definition: HcalTTPDigi.h:33
unsigned int fwVersion_
Definition: HcalTTPDigi.h:46