get data, convert to digis attach againe to Event
Definition at line 148 of file SiPixelRawToDigi.cc.
149 const uint32_t dummydetid = 0xffffffff;
169 <<
" Configured to use SiPixelQuality, but SiPixelQuality not present" << endl;
177 auto collection = std::make_unique<edm::DetSetVector<PixelDigi>>();
179 auto errorcollection = std::make_unique<edm::DetSetVector<SiPixelRawDataError>>();
180 auto tkerror_detidcollection = std::make_unique<DetIdCollection>();
181 auto usererror_detidcollection = std::make_unique<DetIdCollection>();
182 auto disabled_channelcollection = std::make_unique<edmNew::DetSetVector<PixelFEDChannel>>();
193 bool errorsInEvent =
false;
204 for (
auto aFed =
fedIds.begin(); aFed !=
fedIds.end(); ++aFed) {
214 LogDebug(
"SiPixelRawToDigi") <<
" PRODUCE DIGI FOR FED: " <<
fedId << endl;
226 typedef PixelDataFormatter::Errors::iterator IE;
227 for (IE is =
errors.begin(); is !=
errors.end(); is++) {
228 uint32_t errordetid = is->first;
229 if (errordetid == dummydetid) {
230 nodeterrors.insert(nodeterrors.end(),
errors[errordetid].begin(),
errors[errordetid].end());
233 errorDetSet.
data.insert(errorDetSet.
data.end(), is->second.begin(), is->second.end());
239 std::vector<PixelFEDChannel> disabledChannelsDetSet;
241 for (
auto const& aPixelError : errorDetSet) {
244 if (
usePhase1 && aPixelError.getType() == 25) {
248 cms_uint32_t linkId = formatter.linkId(aPixelError.getWord32());
254 for (
unsigned int iRoc = 1; iRoc <=
link->numberOfROCs(); iRoc++) {
261 disabledChannelsDetSet.push_back(ch);
267 std::vector<int>::iterator it_find =
270 tkerror_detidcollection->push_back(errordetid);
277 std::vector<int>::iterator it_find =
280 usererror_detidcollection->push_back(errordetid);
286 if (!disabledChannelsDetSet.empty()) {
287 disabled_channelcollection->insert(
288 errordetid, disabledChannelsDetSet.data(), disabledChannelsDetSet.size());
297 errorDetSet.
data = nodeterrors;
300 LogDebug(
"SiPixelRawToDigi") <<
"Error words were stored in this event";
304 LogDebug(
"SiPixelRawToDigi") <<
"TIMING IS: (real)" <<
theTimer->realTime();
305 ndigis += formatter.nDigis();
306 nwords += formatter.nWords();
307 LogDebug(
"SiPixelRawToDigi") <<
" (Words/Digis) this ev: " << formatter.nWords() <<
"/" << formatter.nDigis()
310 hDigi->Fill(formatter.nDigis());
317 ev.put(
std::move(usererror_detidcollection),
"UserErrorModules");
References cms::cuda::assert(), badPixelInfo_, cabling_, cablingMapLabel, SiPixelFedCablingMap::cablingTree(), edm::ESWatcher< T >::check(), universalConfigTemplate::collection, edm::DetSet< T >::data, debug, edm::MessageDrop::debugEnabled, MessageLogger_cfi::errors, ev, FEDRawDataCollection::FEDData(), l1tstage2_dqm_sourceclient-live_cfg::fedId, SiPixelFedCablingMap::fedIds(), fedIds, l1t_dqm_sourceclient-live_cfg::fedRawData, spr::find(), edm::EventSetup::get(), get, hCPU, hDigi, includeErrors, edm::MessageDrop::instance(), MainPageGenerator::link, LogDebug, PixelUnpackingRegions::mayUnpackFED(), PixelUnpackingRegions::modulesToUnpack(), eostools::move(), PixelUnpackingRegions::nBarrelModules(), ndigis, PixelUnpackingRegions::nFEDs(), PixelUnpackingRegions::nForwardModules(), PixelUnpackingRegions::nModules(), nwords, edm::ESHandle< T >::product(), qualityWatcher, recordWatcher, regions_, PixelMapPlotter::roc, PixelFEDChannel::roc_first, PixelFEDChannel::roc_last, PixelUnpackingRegions::run(), PixelDataFormatter::setErrorStatus(), tFEDRawDataCollection, theTimer, tkerrorlist, usePhase1, usePilotBlade, useQuality, and usererrorlist.