181 std::vector<HBHEDataFrame>
hbhe;
182 std::vector<HODataFrame>
ho;
183 std::vector<HFDataFrame>
hf;
184 std::vector<HcalTriggerPrimitiveDigi> htp;
185 std::vector<HcalCalibDataFrame>
hc;
186 std::vector<ZDCDataFrame>
zdc;
187 std::vector<HcalTTPDigi> ttp;
188 std::vector<HOTriggerPrimitiveDigi> hotp;
190 auto report = std::make_unique<HcalUnpackerReport>();
232 }
else if (fed.
size()<8*3) {
268 std::unordered_set<uint32_t> cacheForHFdup;
269 unsigned int cntHFdup = 0;
270 for(
auto & hf_digi : hf ){
271 if( ! cacheForHFdup.insert(hf_digi.id().rawId()).
second ) cntHFdup++;
273 if( cntHFdup )
edm::LogError(
"HcalRawToDigi") <<
"Duplicated HF digis found for "<<cntHFdup<<
" times"<<std::endl;
278 if( addtl.second->samples() == colls.
qie10->
samples() ) {
280 edm::LogWarning(
"HcalRawToDigi") <<
"QIE10 data requested to be stored in tag " 281 << tag <<
" is already stored in the default QIE10 collection. " 282 <<
"To avoid duplicating, remove the tag " << tag
283 <<
" from the saveQIE10DataTags and the value of " 284 << addtl.second->samples() <<
" from the saveQIE10DataNSamples " 285 <<
"configurables to HcalRawToDigi" << std::endl;
289 if( addtl.second->samples() == colls.
qie11->
samples() ) {
290 std::string tag = saveQIE11Info_[addtl.second->samples()];
291 edm::LogWarning(
"HcalRawToDigi") <<
"QIE11 data requested to be stored in tag " 292 << tag <<
" is already stored in the default QIE11 collection. " 293 <<
"To avoid duplicating, remove the tag " << tag
294 <<
" from the saveQIE11DataTags and the value of " 295 << addtl.second->samples() <<
" from the saveQIE11DataNSamples " 296 <<
"configurables to HcalRawToDigi" << std::endl;
301 auto hbhe_prod = std::make_unique<HBHEDigiCollection>();
302 auto hf_prod = std::make_unique<HFDigiCollection>();
303 auto ho_prod = std::make_unique<HODigiCollection>();
304 auto htp_prod = std::make_unique<HcalTrigPrimDigiCollection>();
305 auto hotp_prod = std::make_unique<HOTrigPrimDigiCollection>();
307 if (colls.
qie10 ==
nullptr) {
310 std::unique_ptr<QIE10DigiCollection> qie10_prod(colls.
qie10);
316 std::unique_ptr<QIE10DigiCollection> qie10ZDC_prod(colls.
qie10ZDC);
322 std::unique_ptr<QIE10DigiCollection> qie10Lasermon_prod(colls.
qie10Lasermon);
324 if (colls.
qie11 ==
nullptr) {
327 std::unique_ptr<QIE11DigiCollection> qie11_prod(colls.
qie11);
332 std::unordered_map<int, std::unique_ptr<QIE10DigiCollection> > qie10_prodAddtl;
333 std::unordered_map<int, std::unique_ptr<QIE11DigiCollection> > qie11_prodAddtl;
335 qie10_prodAddtl[orig.first] = std::unique_ptr<QIE10DigiCollection>(orig.second);
338 qie11_prodAddtl[orig.first] = std::unique_ptr<QIE11DigiCollection>(orig.second);
341 hbhe_prod->swap_contents(hbhe);
342 if( !cntHFdup ) hf_prod->swap_contents(hf);
343 ho_prod->swap_contents(ho);
344 htp_prod->swap_contents(htp);
345 hotp_prod->swap_contents(hotp);
355 hbhe_prod->
swap(filtered_hbhe);
356 ho_prod->swap(filtered_ho);
357 hf_prod->swap(filtered_hf);
358 qie10_prod->swap(filtered_qie10);
359 qie11_prod->swap(filtered_qie11);
362 for(
auto &
prod : qie10_prodAddtl ) {
364 prod.second->swap(filtered_qie10);
367 for(
auto &
prod : qie11_prodAddtl ) {
369 prod.second->swap(filtered_qie11);
383 qie10ZDC_prod->sort();
384 qie10Lasermon_prod->sort();
388 for(
auto &
prod : qie10_prodAddtl ) {
391 for(
auto &
prod : qie11_prodAddtl ) {
402 e.put(
std::move(qie10Lasermon_prod),
"LASERMON");
406 for(
auto &
prod : qie10_prodAddtl ) {
411 for(
auto &
prod : qie11_prodAddtl ) {
418 auto hc_prod = std::make_unique<HcalCalibDigiCollection>();
419 hc_prod->swap_contents(hc);
423 hc_prod->
swap(filtered_calib);
432 auto prod = std::make_unique<ZDCDigiCollection>();
433 prod->swap_contents(zdc);
437 prod->swap(filtered_zdc);
445 auto prod = std::make_unique<HcalTTPDigiCollection>();
446 prod->swap_contents(ttp);
454 if(colls.
umnio !=
nullptr) {
455 e.put(std::make_unique<HcalUMNioDigi>(umnio));
HcalDataFrameFilter filter_
std::vector< HcalTTPDigi > * ttp
std::vector< HFDataFrame > * hfCont
bool getByToken(EDGetToken token, Handle< PROD > &result) const
std::unordered_map< int, std::string > saveQIE11Info_
void swap(SortedCollection &other)
QIE10DigiCollection * qie10Lasermon
std::vector< HBHEDataFrame > * hbheCont
char const * what() const override
std::vector< HOTriggerPrimitiveDigi > * tphoCont
std::unordered_map< int, QIE11DigiCollection * > qie11Addtl
size_t size() const
Lenght of the data buffer in bytes.
HcalDataFrameContainer< QIE10DataFrame > QIE10DigiCollection
U second(std::pair< T, U > const &p)
const FEDRawData & FEDData(int fedid) const
retrieve data for fed
std::unordered_map< int, QIE10DigiCollection * > qie10Addtl
QIE10DigiCollection * qie10ZDC
const bool complainEmptyData_
std::string electronicsMapLabel_
std::vector< HcalTriggerPrimitiveDigi > * tpCont
struct HcalRawToDigi::Statistics stats_
std::unordered_map< int, std::string > saveQIE10Info_
HcalDataFrameContainer< QIE11DataFrame > QIE11DigiCollection
void unpack(const FEDRawData &raw, const HcalElectronicsMap &emap, std::vector< HcalHistogramDigi > &histoDigis)
std::vector< HcalCalibDataFrame > * calibCont
std::vector< int > fedUnpackList_
bool active() const
whether any filters are on
std::vector< HODataFrame > * hoCont
QIE11DigiCollection * qie11
void setConditions(const HcalDbService *conditions)
get conditions
HBHEDigiCollection filter(const HBHEDigiCollection &incol, HcalUnpackerReport &r)
filter HB/HE data frames
QIE10DigiCollection * qie10
std::vector< ZDCDataFrame > * zdcCont
edm::EDGetTokenT< FEDRawDataCollection > tok_data_
T const * product() const