CMS 3D CMS Logo

EcalDigiCollections.h
Go to the documentation of this file.
1 #ifndef DIGIECAL_ECALDIGICOLLECTION_H
2 #define DIGIECAL_ECALDIGICOLLECTION_H
3 
18 
23 
25 public:
28  explicit EcalDigiCollectionPh2(size_type istride = MAXSAMPLES, int isubdet = 0)
29  : edm::DataFrameContainer(istride, isubdet) {}
31 };
32 
34 public:
38 
41  void push_back(const Digi& digi) { DataFrameContainer::push_back(digi.id(), digi.frame().begin()); }
43  void push_back(id_type iid, data_type const* idata) { DataFrameContainer::push_back(iid, idata); }
44 };
45 
47 public:
49  static const size_type MAXSAMPLES = 10;
50  explicit EcalDigiCollection(size_type istride = MAXSAMPLES, int isubdet = 0)
51  : edm::DataFrameContainer(istride, isubdet) {}
53 };
54 
55 // make edm (and ecal client) happy
57 public:
59  typedef EBDataFrame Digi;
61 
64  void push_back(const Digi& digi) { DataFrameContainer::push_back(digi.id(), digi.frame().begin()); }
66  void push_back(id_type iid, data_type const* idata) { DataFrameContainer::push_back(iid, idata); }
67 };
68 
70 public:
72  typedef EEDataFrame Digi;
74 
77  void push_back(const Digi& digi) { edm::DataFrameContainer::push_back(digi.id(), digi.frame().begin()); }
79  void push_back(id_type iid, data_type const* idata) { DataFrameContainer::push_back(iid, idata); }
80 };
81 
83 public:
85  typedef ESDataFrame Digi;
87 
91 
92  void push_back(unsigned int i) { DataFrameContainer::push_back(i); }
93 
94  void push_back(const Digi& digi) {
95  uint16_t esdata[NSAMPLE];
96  for (unsigned int i(0); i != NSAMPLE; ++i) {
97  static const int offset(65536); // for int16 to uint16
98  const int16_t dshort(digi[i].raw());
99  const int dint((int)dshort + // add offset for uint16 conversion
100  ((int16_t)0 > dshort ? offset : (int)0));
101  esdata[i] = dint;
102  }
103  EcalDigiCollection::push_back(digi.id()(), esdata);
104  }
105 };
106 
107 // Free swap functions
108 inline void swap(EcalDigiCollection& lhs, EcalDigiCollection& rhs) { lhs.swap(rhs); }
109 
110 inline void swap(EBDigiCollection& lhs, EBDigiCollection& rhs) { lhs.swap(rhs); }
111 
112 inline void swap(EEDigiCollection& lhs, EEDigiCollection& rhs) { lhs.swap(rhs); }
113 
114 inline void swap(ESDigiCollection& lhs, ESDigiCollection& rhs) { lhs.swap(rhs); }
115 
116 inline void swap(EcalDigiCollectionPh2& lhs, EcalDigiCollectionPh2& rhs) { lhs.swap(rhs); }
117 
118 inline void swap(EBDigiCollectionPh2& lhs, EBDigiCollectionPh2& rhs) { lhs.swap(rhs); }
119 
123 
129 
130 #endif
void push_back(const Digi &digi)
const ESDetId & id() const
Definition: ESDataFrame.h:19
edm::DataFrameContainer::size_type size_type
void swap(EBDigiCollection &other)
edm::SortedCollection< EcalMatacqDigi > EcalMatacqDigiCollection
EcalDataFrame_Ph2 Digi
EBDigiCollectionPh2(size_type istride=MAXSAMPLES)
static const size_type NSAMPLE
void push_back(id_type iid)
edm::SortedCollection< EcalEBTriggerPrimitiveDigi > EcalEBTrigPrimDigiCollection
void push_back(id_type iid)
key_type id() const
Definition: EBDataFrame.h:28
key_type id() const
Definition: EEDataFrame.h:24
EcalDigiCollection(size_type istride=MAXSAMPLES, int isubdet=0)
EcalDigiCollectionPh2(size_type istride=MAXSAMPLES, int isubdet=0)
static const size_type MAXSAMPLES
edm::DataFrameContainer::size_type size_type
static constexpr unsigned int sampleSize
Definition: EcalConstants.h:27
edm::DataFrameContainer::size_type size_type
edm::SortedCollection< EBSrFlag > EBSrFlagCollection
void push_back(id_type iid, data_type const *idata)
ESDigiCollection(size_type istride=NSAMPLE)
edm::SortedCollection< EESrFlag > EESrFlagCollection
static const int MAXSAMPLES
Definition: ESDataFrame.h:30
edm::SortedCollection< EcalPnDiodeDigi > EcalPnDiodeDigiCollection
Digi::key_type DetId
edm::DataFrame const & frame() const
edm::SortedCollection< EcalTimeDigi > EcalTimeDigiCollection
void push_back(id_type iid)
edm::DataFrameContainer::size_type size_type
void push_back(id_type iid, data_type const *idata)
static const size_type MAXSAMPLES
edm::SortedCollection< EcalTriggerPrimitiveDigi > EcalTrigPrimDigiCollection
void swap(DataFrameContainer &other)
void swap(DataFrameContainer &other)
void push_back(const Digi &digi)
constexpr iterator begin()
Definition: DataFrame.h:33
void push_back(unsigned int i)
edm::DataFrame const & frame() const
Definition: EcalDataFrame.h:50
void push_back(id_type iid, data_type const *idata)
void push_back(id_type iid, data_type const *idata)
deadvectors [0] push_back({0.0175431, 0.538005, 6.80997, 13.29})
edm::SortedCollection< EcalPseudoStripInputDigi > EcalPSInputDigiCollection
void swap(EBDigiCollectionPh2 &other)
void push_back(const Digi &digi)
HLT enums.
void push_back(const Digi &digi)
edm::DataFrameContainer::size_type size_type
void swap(ESDigiCollection &other)
void swap(EEDigiCollection &other)
Digi::key_type DetId
EBDigiCollection(size_type istride=MAXSAMPLES)
edm::DataFrameContainer::size_type size_type
EEDigiCollection(size_type istride=MAXSAMPLES)
void swap(EcalDigiCollection &lhs, EcalDigiCollection &rhs)
Digi::key_type DetId