Description: Unpack FED data to Trigger and Lumi Scalers "bank" These Scalers are in FED id ScalersRaw::SCALERS_FED_ID
Definition at line 40 of file ScalersRawToDigi.cc.
Take a reference to this FED's data
Definition at line 77 of file ScalersRawToDigi.cc.
References data, DEFINE_FWK_MODULE, FEDRawDataCollection::FEDData(), fedToken_, edm::Event::getByToken(), mps_fire::i, V0Monitor_cfi::lumiScalers, eostools::move(), ScalersRaw::N_BX_v2, ScalersRaw::N_BX_v6, edm::Event::put(), ScalersRaw::SCALERS_FED_ID, FEDRawData::size(), and ScalersEventRecordRaw_v6::version.
Referenced by JSONExport.JsonExport::export(), HTMLExport.HTMLExport::export(), and HTMLExport.HTMLExportStatic::export().
84 auto pLumi = std::make_unique<LumiScalersCollection>();
86 auto pOldTrigger = std::make_unique<L1TriggerScalersCollection>();
88 auto pTrigger = std::make_unique<Level1TriggerScalersCollection>();
90 auto pBunch = std::make_unique<L1AcceptBunchCrossingCollection>();
92 auto pBeamSpotOnline = std::make_unique<BeamSpotOnlineCollection>();
93 auto pDcsStatus = std::make_unique<DcsStatusCollection>();
97 unsigned short int length = fedData.
size();
99 int nWords = length / 8;
105 pOldTrigger->push_back(oldTriggerScalers);
107 }
else if (raw->
version >= 3) {
109 pTrigger->push_back(triggerScalers);
120 if ((nBytesExtra >= 8) && ((nBytesExtra % 8) == 0)) {
121 unsigned long long*
data = (
unsigned long long*)fedData.data();
123 int nWordsExtra = nBytesExtra / 8;
124 for (
int i = 0;
i < nWordsExtra;
i++) {
125 int index = nWords - (nWordsExtra + 1) +
i;
127 pBunch->push_back(bc);
133 pBeamSpotOnline->push_back(beamSpotOnline);
136 pDcsStatus->push_back(dcsStatus);
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
bool getByToken(EDGetToken token, Handle< PROD > &result) const
size_t size() const
Lenght of the data buffer in bytes.
const FEDRawData & FEDData(int fedid) const
retrieve data for fed
edm::EDGetTokenT< FEDRawDataCollection > fedToken_
char data[epos_bytes_allocation]