CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
HcalDigiCollections.h
Go to the documentation of this file.
1 #ifndef DIGIHCAL_HCALDIGICOLLECTION_H
2 #define DIGIHCAL_HCALDIGICOLLECTION_H
3 
17 
20 
34 
36 
37 template <class Digi>
39 public:
41  static const size_type MAXSAMPLES = 10;
42  HcalDataFrameContainer(int nsamples_per_digi=MAXSAMPLES, int isubdet=0) :
43  edm::DataFrameContainer(nsamples_per_digi*Digi::WORDS_PER_SAMPLE+Digi::HEADER_WORDS+Digi::FLAG_WORDS, isubdet) { }
44  void swap(DataFrameContainer& other) {this->DataFrameContainer::swap(other);}
45 
46  //helpful accessors
48  Digi backDataFrame() { return Digi(this->back()); }
49  int samples() const { return int((stride()-Digi::HEADER_WORDS-Digi::FLAG_WORDS)/Digi::WORDS_PER_SAMPLE); }
50  void addDataFrame(DetId detid, const uint16_t* data) { push_back(detid.rawId(),data); }
51  void push_back(const Digi& digi){ push_back(digi.id(), digi.begin()); }
52 };
53 
56 
57 
58 #endif
void swap(ora::Record &rh, ora::Record &lh)
Definition: Record.h:70
edm::DataFrameContainer::size_type size_type
edm::SortedCollection< HcalTriggerPrimitiveDigi > HcalTrigPrimDigiCollection
void addDataFrame(DetId detid, const uint16_t *data)
size_type stride() const
edm::SortedCollection< HOTriggerPrimitiveDigi > HOTrigPrimDigiCollection
std::tuple< unsigned int, int, int, DigiType, int, int, int, float > Digi
Definition: GenericDigi.h:30
edm::SortedCollection< ZDCDataFrame > ZDCDigiCollection
HcalDataFrameContainer< QIE10DataFrame > QIE10DigiCollection
uint32_t rawId() const
get the raw id
Definition: DetId.h:43
edm::SortedCollection< HODataFrame > HODigiCollection
static const size_type MAXSAMPLES
edm::SortedCollection< HcalUpgradeDataFrame > HFUpgradeDigiCollection
edm::SortedCollection< HcalUpgradeDataFrame > HBHEUpgradeDigiCollection
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)
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