CMS 3D CMS Logo

HcalDigiCollections.h
Go to the documentation of this file.
1 #ifndef DIGIHCAL_HCALDIGICOLLECTION_H
2 #define DIGIHCAL_HCALDIGICOLLECTION_H
3 
16 
19 
31 
33 
34 template <class Digi>
36 public:
38  static const size_type MAXSAMPLES = 10;
39  HcalDataFrameContainer(int nsamples_per_digi=MAXSAMPLES, int isubdet=0) :
40  edm::DataFrameContainer(nsamples_per_digi*Digi::WORDS_PER_SAMPLE+Digi::HEADER_WORDS+Digi::FLAG_WORDS, isubdet) { }
42 
43  //helpful accessors
45  Digi backDataFrame() { return Digi(this->back()); }
46  int samples() const { return int((stride()-Digi::HEADER_WORDS-Digi::FLAG_WORDS)/Digi::WORDS_PER_SAMPLE); }
47  void addDataFrame(DetId detid, const uint16_t* data) { push_back(detid.rawId(),data); }
48  void push_back(const Digi& digi){ push_back(digi.id(), digi.begin()); }
49 };
50 
53 
54 
55 #endif
edm::DataFrameContainer::size_type size_type
edm::SortedCollection< HcalTriggerPrimitiveDigi > HcalTrigPrimDigiCollection
void addDataFrame(DetId detid, const uint16_t *data)
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:47
size_type stride() const
edm::SortedCollection< HOTriggerPrimitiveDigi > HOTrigPrimDigiCollection
std::tuple< unsigned int, int, int, DigiType, int, int, int, float > Digi
Definition: GenericDigi.h:30
void swap(Association< C > &lhs, Association< C > &rhs)
Definition: Association.h:116
edm::SortedCollection< ZDCDataFrame > ZDCDigiCollection
HcalDataFrameContainer< QIE10DataFrame > QIE10DigiCollection
edm::SortedCollection< HODataFrame > HODigiCollection
static const size_type MAXSAMPLES
HcalDataFrameContainer< QIE11DataFrame > QIE11DigiCollection
Definition: DetId.h:18
void swap(DataFrameContainer &other)
edm::SortedCollection< HcalCalibDataFrame > HcalCalibDigiCollection
edm::SortedCollection< HcalHistogramDigi > HcalHistogramDigiCollection
void push_back(id_type iid, data_type const *idata)
HcalDataFrameContainer(int nsamples_per_digi=MAXSAMPLES, int isubdet=0)
HLT enums.
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:82
edm::SortedCollection< HcalTTPDigi > HcalTTPDigiCollection
edm::SortedCollection< HFDataFrame > HFDigiCollection
void push_back(const Digi &digi)
edm::SortedCollection< CastorDataFrame > CastorDigiCollection
edm::SortedCollection< CastorTriggerPrimitiveDigi > CastorTrigPrimDigiCollection
edm::SortedCollection< HBHEDataFrame > HBHEDigiCollection