CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_6_1_2_SLHC4_patch1/src/DataFormats/HcalDigi/interface/HcalTTPDigi.h

Go to the documentation of this file.
00001 #ifndef DATAFORMATS_HCALDIGI_HCALTTPDIGI_H
00002 #define DATAFORMATS_HCALDIGI_HCALTTPDIGI_H 1
00003 
00004 #include <stdint.h>
00005 #include <vector>
00006 #include <ostream>
00007 
00014 class HcalTTPDigi {
00015 public:
00016     typedef int key_type; // Needed for the sorted collection
00017     HcalTTPDigi();
00018     HcalTTPDigi(int identifier, int samples, int presamples, unsigned int fwVersion, int algorithm, unsigned int lPipe);
00019     
00020     void setSample(int relativeSample,const uint16_t* triggerInputs, const uint32_t algodep, const uint8_t outputTrigger);
00021 
00025     std::vector<bool> inputPattern(int relativeSample=0) const;
00029     uint8_t triggerOutput(int relativeSample=0) const;
00031     uint32_t algorithmWord(int relativeSample=0) const;
00032     
00033     int id() const { return identifier_ ; } 
00034     int size() const { return samples_ ; } 
00035     int presamples() const { return presamples_ ; } 
00036     int algorithm() const { return algorithm_ ; }
00037     unsigned int fwVersion() const { return fwVersion_ ; }
00038     unsigned int pipelineLength() const { return lPipe_ ; } 
00039 
00040     bool operator==(const HcalTTPDigi& digi) const ;
00041     bool operator!=(const HcalTTPDigi& digi) const { return !(*this == digi) ; } 
00042 
00043 private:
00044     int identifier_;
00045     int samples_, presamples_; 
00046     unsigned int fwVersion_ ;
00047     int algorithm_ ;
00048     unsigned int lPipe_ ;
00049     
00050     uint16_t triggerInputs_[5*8]; // length = 5*samples_
00051     uint32_t algoDepend_[8]; // length = samples_
00052     uint8_t triggerOutput_[8]; // length = samples_
00053 };
00054 
00055 std::ostream& operator<<(std::ostream&, const HcalTTPDigi&);
00056 
00057 #endif