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()); }
42  void push_back(id_type iid) { DataFrameContainer::push_back(iid); }
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()); }
65  void push_back(id_type iid) { DataFrameContainer::push_back(iid); }
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()); }
78  void push_back(id_type iid) { DataFrameContainer::push_back(iid); }
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
EcalDigiCollectionPh2::swap
void swap(DataFrameContainer &other)
Definition: EcalDigiCollections.h:30
ESDigiCollection::ESDigiCollection
ESDigiCollection(size_type istride=NSAMPLE)
Definition: EcalDigiCollections.h:89
EcalDigiCollection::size_type
edm::DataFrameContainer::size_type size_type
Definition: EcalDigiCollections.h:48
mps_fire.i
i
Definition: mps_fire.py:428
EcalDigiCollectionPh2::MAXSAMPLES
static const size_type MAXSAMPLES
Definition: EcalDigiCollections.h:27
EcalDataFrame::frame
edm::DataFrame const & frame() const
Definition: EcalDataFrame.h:50
EEDigiCollection::push_back
void push_back(id_type iid)
Definition: EcalDigiCollections.h:78
EBDigiCollection::size_type
edm::DataFrameContainer::size_type size_type
Definition: EcalDigiCollections.h:58
EcalDataFrame_Ph2
Definition: EcalDataFrame_Ph2.h:12
EcalDigiCollection::swap
void swap(DataFrameContainer &other)
Definition: EcalDigiCollections.h:52
EcalEBTriggerPrimitiveDigi.h
EEDigiCollection::DetId
Digi::key_type DetId
Definition: EcalDigiCollections.h:73
EcalDigiCollection::EcalDigiCollection
EcalDigiCollection(size_type istride=MAXSAMPLES, int isubdet=0)
Definition: EcalDigiCollections.h:50
EBDetId
Definition: EBDetId.h:17
edm
HLT enums.
Definition: AlignableModifier.h:19
EBDataFrame
Definition: EBDataFrame.h:11
EcalEBTrigPrimDigiCollection
edm::SortedCollection< EcalEBTriggerPrimitiveDigi > EcalEBTrigPrimDigiCollection
Definition: EcalDigiCollections.h:122
EBDigiCollectionPh2::EBDigiCollectionPh2
EBDigiCollectionPh2(size_type istride=MAXSAMPLES)
Definition: EcalDigiCollections.h:39
EcalMatacqDigiCollection
edm::SortedCollection< EcalMatacqDigi > EcalMatacqDigiCollection
Definition: EcalDigiCollections.h:128
EBDigiCollection::push_back
void push_back(id_type iid, data_type const *idata)
Definition: EcalDigiCollections.h:66
EBDigiCollectionPh2::Digi
EcalDataFrame_Ph2 Digi
Definition: EcalDigiCollections.h:36
edm::SortedCollection
Definition: SortedCollection.h:49
EcalMatacqDigi.h
ESDetId
Definition: ESDetId.h:15
DataFrameContainer.h
ESDigiCollection::push_back
void push_back(unsigned int i)
Definition: EcalDigiCollections.h:92
EBDigiCollectionPh2::size_type
edm::DataFrameContainer::size_type size_type
Definition: EcalDigiCollections.h:35
EcalBarrel
Definition: EcalSubdetector.h:10
EBDataFrame::id
key_type id() const
Definition: EBDataFrame.h:28
EcalTriggerPrimitiveDigi.h
ESDataFrame
Definition: ESDataFrame.h:10
ESDigiCollection::swap
void swap(ESDigiCollection &other)
Definition: EcalDigiCollections.h:90
EcalDataFrame_Ph2::frame
edm::DataFrame const & frame() const
Definition: EcalDataFrame_Ph2.h:33
ESDataFrame.h
ESDigiCollection::push_back
void push_back(const Digi &digi)
Definition: EcalDigiCollections.h:94
EcalTimeDigi.h
EEDigiCollection::push_back
void push_back(const Digi &digi)
Definition: EcalDigiCollections.h:77
EBDigiCollection::DetId
Digi::key_type DetId
Definition: EcalDigiCollections.h:60
EcalDataFrame_Ph2.h
EBDigiCollectionPh2::swap
void swap(EBDigiCollectionPh2 &other)
Definition: EcalDigiCollections.h:40
EEDigiCollection::size_type
edm::DataFrameContainer::size_type size_type
Definition: EcalDigiCollections.h:71
ESDataFrame::MAXSAMPLES
static const int MAXSAMPLES
Definition: ESDataFrame.h:30
EEDataFrame::id
key_type id() const
Definition: EEDataFrame.h:24
trackingPlots.other
other
Definition: trackingPlots.py:1460
EBDigiCollection::push_back
void push_back(const Digi &digi)
Definition: EcalDigiCollections.h:64
ESDigiCollection::DetId
Digi::key_type DetId
Definition: EcalDigiCollections.h:86
EcalPnDiodeDigiCollection
edm::SortedCollection< EcalPnDiodeDigi > EcalPnDiodeDigiCollection
Definition: EcalDigiCollections.h:127
EBDigiCollection::EBDigiCollection
EBDigiCollection(size_type istride=MAXSAMPLES)
Definition: EcalDigiCollections.h:62
EEDigiCollection::swap
void swap(EEDigiCollection &other)
Definition: EcalDigiCollections.h:76
edm::DataFrameContainer::id_type
unsigned int id_type
Definition: DataFrameContainer.h:36
EEDetId
Definition: EEDetId.h:14
ESDigiCollection
Definition: EcalDigiCollections.h:82
EcalTrigPrimDigiCollection
edm::SortedCollection< EcalTriggerPrimitiveDigi > EcalTrigPrimDigiCollection
Definition: EcalDigiCollections.h:121
EcalSubdetector.h
EcalEndcap
Definition: EcalSubdetector.h:10
EEDigiCollection::EEDigiCollection
EEDigiCollection(size_type istride=MAXSAMPLES)
Definition: EcalDigiCollections.h:75
ecalPh2::sampleSize
static constexpr unsigned int sampleSize
Definition: EcalConstants.h:12
EcalDigiCollectionPh2::size_type
edm::DataFrameContainer::size_type size_type
Definition: EcalDigiCollections.h:26
EcalTrigPrimCompactColl.h
EcalPnDiodeDigi.h
EBSrFlagCollection
edm::SortedCollection< EBSrFlag > EBSrFlagCollection
Definition: EcalDigiCollections.h:125
EBDigiCollection
Definition: EcalDigiCollections.h:56
EBDigiCollectionPh2::push_back
void push_back(const Digi &digi)
Definition: EcalDigiCollections.h:41
EBSrFlag.h
EEDigiCollection
Definition: EcalDigiCollections.h:69
ESDigiCollection::size_type
edm::DataFrameContainer::size_type size_type
Definition: EcalDigiCollections.h:84
EBDigiCollection::push_back
void push_back(id_type iid)
Definition: EcalDigiCollections.h:65
EESrFlagCollection
edm::SortedCollection< EESrFlag > EESrFlagCollection
Definition: EcalDigiCollections.h:126
EBDigiCollection::swap
void swap(EBDigiCollection &other)
Definition: EcalDigiCollections.h:63
EcalConstants.h
EBDataFrame.h
EcalDigiCollectionPh2::EcalDigiCollectionPh2
EcalDigiCollectionPh2(size_type istride=MAXSAMPLES, int isubdet=0)
Definition: EcalDigiCollections.h:28
EcalTimeDigiCollection
edm::SortedCollection< EcalTimeDigi > EcalTimeDigiCollection
Definition: EcalDigiCollections.h:120
ESDigiCollection::NSAMPLE
static const size_type NSAMPLE
Definition: EcalDigiCollections.h:88
edm::DataFrameContainer::data_type
unsigned short data_type
Definition: DataFrameContainer.h:37
EcalPseudoStripInputDigi.h
EEDataFrame.h
EcalPSInputDigiCollection
edm::SortedCollection< EcalPseudoStripInputDigi > EcalPSInputDigiCollection
Definition: EcalDigiCollections.h:124
EcalPreshower
Definition: EcalSubdetector.h:10
edm::DataFrameContainer::DataFrameContainer
DataFrameContainer()
Definition: DataFrameContainer.h:63
EcalDigiCollection
Definition: EcalDigiCollections.h:46
EBDigiCollectionPh2::push_back
void push_back(id_type iid)
Definition: EcalDigiCollections.h:42
EESrFlag.h
DetId.h
SortedCollection.h
EBDigiCollection::Digi
EBDataFrame Digi
Definition: EcalDigiCollections.h:59
edm::DataFrameContainer::push_back
void push_back(id_type iid, data_type const *idata)
Definition: DataFrameContainer.h:99
swap
void swap(EcalDigiCollection &lhs, EcalDigiCollection &rhs)
Definition: EcalDigiCollections.h:108
EBDigiCollectionPh2
Definition: EcalDigiCollections.h:33
ESDigiCollection::Digi
ESDataFrame Digi
Definition: EcalDigiCollections.h:85
EcalDigiCollection::MAXSAMPLES
static const size_type MAXSAMPLES
Definition: EcalDigiCollections.h:49
edm::DataFrameContainer::size_type
unsigned int size_type
Definition: DataFrameContainer.h:35
edm::DataFrameContainer
Definition: DataFrameContainer.h:33
EBDigiCollectionPh2::DetId
Digi::key_type DetId
Definition: EcalDigiCollections.h:37
hltrates_dqm_sourceclient-live_cfg.offset
offset
Definition: hltrates_dqm_sourceclient-live_cfg.py:82
EEDataFrame
Definition: EEDataFrame.h:12
EcalDigiCollectionPh2
Definition: EcalDigiCollections.h:24
EcalDataFrame_Ph2::id
DetId id() const
Definition: EcalDataFrame_Ph2.h:18
ESDataFrame::id
const ESDetId & id() const
Definition: ESDataFrame.h:19
edm::DataFrame::begin
constexpr iterator begin()
Definition: DataFrame.h:33
EBDigiCollectionPh2::push_back
void push_back(id_type iid, data_type const *idata)
Definition: EcalDigiCollections.h:43
EEDigiCollection::push_back
void push_back(id_type iid, data_type const *idata)
Definition: EcalDigiCollections.h:79
EEDigiCollection::Digi
EEDataFrame Digi
Definition: EcalDigiCollections.h:72