CMS 3D CMS Logo

List of all members | Classes | Public Member Functions | Static Public Member Functions | Private Attributes
HcalRawToDigi Class Reference

#include <HcalRawToDigi.h>

Inheritance diagram for HcalRawToDigi:
edm::stream::EDProducer<>

Classes

struct  Statistics
 

Public Member Functions

 HcalRawToDigi (const edm::ParameterSet &ps)
 
void produce (edm::Event &, const edm::EventSetup &) override
 
 ~HcalRawToDigi () override
 
- Public Member Functions inherited from edm::stream::EDProducer<>
 EDProducer ()=default
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndRuns () const final
 

Static Public Member Functions

static void fillDescriptions (edm::ConfigurationDescriptions &descriptions)
 

Private Attributes

const bool complainEmptyData_
 
std::string electronicsMapLabel_
 
const int expectedOrbitMessageTime_
 
std::vector< int > fedUnpackList_
 
HcalDataFrameFilter filter_
 
const int firstFED_
 
std::vector< int > saveQIE10DataNSamples_
 
std::vector< std::string > saveQIE10DataTags_
 
std::unordered_map< int, std::string > saveQIE10Info_
 
std::vector< int > saveQIE11DataNSamples_
 
std::vector< std::string > saveQIE11DataTags_
 
std::unordered_map< int, std::string > saveQIE11Info_
 
const bool silent_
 
struct HcalRawToDigi::Statistics stats_
 
edm::EDGetTokenT< FEDRawDataCollectiontok_data_
 
const bool unpackCalib_
 
HcalUnpacker unpacker_
 
const int unpackerMode_
 
const bool unpackTTP_
 
bool unpackUMNio_
 
const bool unpackZDC_
 

Additional Inherited Members

- Public Types inherited from edm::stream::EDProducer<>
typedef CacheContexts< T... > CacheTypes
 
typedef CacheTypes::GlobalCache GlobalCache
 
typedef AbilityChecker< T... > HasAbility
 
typedef CacheTypes::LuminosityBlockCache LuminosityBlockCache
 
typedef LuminosityBlockContextT< LuminosityBlockCache, RunCache, GlobalCacheLuminosityBlockContext
 
typedef CacheTypes::LuminosityBlockSummaryCache LuminosityBlockSummaryCache
 
typedef CacheTypes::RunCache RunCache
 
typedef RunContextT< RunCache, GlobalCacheRunContext
 
typedef CacheTypes::RunSummaryCache RunSummaryCache
 

Detailed Description

HcalRawToDigi is the EDProducer subclass which runs the Hcal Unpack algorithm.

Author
Jeremiah Mans
Version
1st Version June 10, 2005

Definition at line 29 of file HcalRawToDigi.h.

Constructor & Destructor Documentation

◆ HcalRawToDigi()

HcalRawToDigi::HcalRawToDigi ( const edm::ParameterSet ps)
explicit

Definition at line 14 of file HcalRawToDigi.cc.

15  : unpacker_(conf.getUntrackedParameter<int>("HcalFirstFED", int(FEDNumbering::MINHCALFEDID)),
16  conf.getParameter<int>("firstSample"),
17  conf.getParameter<int>("lastSample")),
18  filter_(
19  conf.getParameter<bool>("FilterDataQuality"), conf.getParameter<bool>("FilterDataQuality"), false, 0, 0, -1),
20  fedUnpackList_(conf.getUntrackedParameter<std::vector<int>>("FEDs", std::vector<int>())),
21  firstFED_(conf.getUntrackedParameter<int>("HcalFirstFED", FEDNumbering::MINHCALFEDID)),
22  unpackCalib_(conf.getUntrackedParameter<bool>("UnpackCalib", false)),
23  unpackZDC_(conf.getUntrackedParameter<bool>("UnpackZDC", false)),
24  unpackTTP_(conf.getUntrackedParameter<bool>("UnpackTTP", false)),
25  unpackUMNio_(conf.getUntrackedParameter<bool>("UnpackUMNio", false)),
26  saveQIE10DataNSamples_(conf.getUntrackedParameter<std::vector<int>>("saveQIE10DataNSamples", std::vector<int>())),
28  conf.getUntrackedParameter<std::vector<std::string>>("saveQIE10DataTags", std::vector<std::string>())),
29  saveQIE11DataNSamples_(conf.getUntrackedParameter<std::vector<int>>("saveQIE11DataNSamples", std::vector<int>())),
31  conf.getUntrackedParameter<std::vector<std::string>>("saveQIE11DataTags", std::vector<std::string>())),
32  silent_(conf.getUntrackedParameter<bool>("silent", true)),
33  complainEmptyData_(conf.getUntrackedParameter<bool>("ComplainEmptyData", false)),
34  unpackerMode_(conf.getUntrackedParameter<int>("UnpackerMode", 0)),
35  expectedOrbitMessageTime_(conf.getUntrackedParameter<int>("ExpectedOrbitMessageTime", -1)) {
36  electronicsMapLabel_ = conf.getParameter<std::string>("ElectronicsMap");
37  tok_data_ = consumes<FEDRawDataCollection>(conf.getParameter<edm::InputTag>("InputLabel"));
38 
39  if (fedUnpackList_.empty()) {
40  // VME range for back-compatibility
42  fedUnpackList_.push_back(i);
43 
44  // uTCA range
46  fedUnpackList_.push_back(i);
47  }
48 
51  std::ostringstream ss;
52  for (unsigned int i = 0; i < fedUnpackList_.size(); i++)
53  ss << fedUnpackList_[i] << " ";
54  edm::LogInfo("HCAL") << "HcalRawToDigi will unpack FEDs ( " << ss.str() << ")";
55 
56  // products produced...
57  produces<HBHEDigiCollection>();
58  produces<HFDigiCollection>();
59  produces<HODigiCollection>();
60  produces<HcalTrigPrimDigiCollection>();
61  produces<HOTrigPrimDigiCollection>();
62  produces<HcalUnpackerReport>();
63  if (unpackCalib_)
64  produces<HcalCalibDigiCollection>();
65  if (unpackZDC_)
66  produces<ZDCDigiCollection>();
67  if (unpackTTP_)
68  produces<HcalTTPDigiCollection>();
69  if (unpackUMNio_)
70  produces<HcalUMNioDigi>();
71  produces<QIE10DigiCollection>();
72  produces<QIE11DigiCollection>();
73 
74  produces<QIE10DigiCollection>("ZDC");
75  produces<QIE10DigiCollection>("LASERMON");
76 
77  // Print a warning if an already
78  // used tag was requested
79  if (std::find(saveQIE10DataTags_.begin(), saveQIE10DataTags_.end(), "ZDC") != saveQIE10DataTags_.end()) {
80  edm::LogWarning("HcalRawToDigi")
81  << "Cannot create an additional QIE10 sample with name ZDC, it is already created! It must be removed along "
82  "with the corresponding entry in saveQIE10DataNSamples"
83  << std::endl;
84  saveQIE10DataTags_.clear();
85  saveQIE10DataNSamples_.clear();
86  }
87  // Print a warning if an already
88  // used tag was requested
89  if (std::find(saveQIE10DataTags_.begin(), saveQIE10DataTags_.end(), "LASERMON") != saveQIE10DataTags_.end()) {
90  edm::LogWarning("HcalRawToDigi")
91  << "Cannot create an additional QIE10 sample with name LASERMON, it is already created! It must be removed "
92  "along with the corresponding entry in saveQIE10DataNSamples"
93  << std::endl;
94  saveQIE10DataTags_.clear();
95  saveQIE10DataNSamples_.clear();
96  }
97 
98  // Print a warning if the two vectors
99  // for additional qie10 or qie11 data
100  // are not the same length
101  if (saveQIE10DataTags_.size() != saveQIE10DataNSamples_.size()) {
102  edm::LogWarning("HcalRawToDigi")
103  << "The saveQIE10DataTags and saveQIE10DataNSamples inputs must be the same length! These will be ignored"
104  << std::endl;
105  saveQIE10DataTags_.clear();
106  saveQIE10DataNSamples_.clear();
107  }
108  if (saveQIE11DataTags_.size() != saveQIE11DataNSamples_.size()) {
109  edm::LogWarning("HcalRawToDigi")
110  << "The saveQIE11DataTags and saveQIE11DataNSamples inputs must be the same length! These will be ignored"
111  << std::endl;
112  saveQIE11DataTags_.clear();
113  saveQIE11DataNSamples_.clear();
114  }
115 
116  // If additional qie10 samples were requested,
117  // declare that we will produce this collection
118  // with the given tag. Also store the map
119  // from nSamples to tag for later use
120  for (unsigned idx = 0; idx < saveQIE10DataNSamples_.size(); ++idx) {
121  int nsamples = saveQIE10DataNSamples_[idx];
123 
124  produces<QIE10DigiCollection>(tag);
125 
126  saveQIE10Info_[nsamples] = tag;
127  }
128 
129  // If additional qie11 samples were requested,
130  // declare that we will produce this collection
131  // with the given tag. Also store the map
132  // from nSamples to tag for later use
133  for (unsigned idx = 0; idx < saveQIE11DataNSamples_.size(); ++idx) {
134  int nsamples = saveQIE11DataNSamples_[idx];
136 
137  produces<QIE11DigiCollection>(tag);
138 
139  saveQIE11Info_[nsamples] = tag;
140  }
141 
142  memset(&stats_, 0, sizeof(stats_));
143 }

References electronicsMapLabel_, expectedOrbitMessageTime_, fedUnpackList_, spr::find(), edm::ParameterSet::getParameter(), mps_fire::i, charmTagsComputerCvsB_cfi::idx, FEDNumbering::MAXHCALFEDID, FEDNumbering::MAXHCALuTCAFEDID, FEDNumbering::MINHCALFEDID, FEDNumbering::MINHCALuTCAFEDID, saveQIE10DataNSamples_, saveQIE10DataTags_, saveQIE10Info_, saveQIE11DataNSamples_, saveQIE11DataTags_, saveQIE11Info_, HcalUnpacker::setExpectedOrbitMessageTime(), HcalUnpacker::setMode(), contentValuesCheck::ss, stats_, AlCaHLTBitMon_QueryRunRegistry::string, GlobalPosition_Frontier_DevDB_cff::tag, tok_data_, unpackCalib_, unpacker_, unpackerMode_, unpackTTP_, unpackUMNio_, and unpackZDC_.

◆ ~HcalRawToDigi()

HcalRawToDigi::~HcalRawToDigi ( )
override

Definition at line 146 of file HcalRawToDigi.cc.

146 {}

Member Function Documentation

◆ fillDescriptions()

void HcalRawToDigi::fillDescriptions ( edm::ConfigurationDescriptions descriptions)
static

Definition at line 148 of file HcalRawToDigi.cc.

148  {
150  desc.addUntracked<int>("HcalFirstFED", int(FEDNumbering::MINHCALFEDID));
151  desc.add<int>("firstSample", 0);
152  desc.add<int>("lastSample", 9);
153  desc.add<bool>("FilterDataQuality", true);
154  desc.addUntracked<std::vector<int>>("FEDs", std::vector<int>());
155  desc.addUntracked<bool>("UnpackZDC", true);
156  desc.addUntracked<bool>("UnpackCalib", true);
157  desc.addUntracked<bool>("UnpackUMNio", true);
158  desc.addUntracked<bool>("UnpackTTP", true);
159  desc.addUntracked<bool>("silent", true);
160  desc.addUntracked<std::vector<int>>("saveQIE10DataNSamples", std::vector<int>());
161  desc.addUntracked<std::vector<std::string>>("saveQIE10DataTags", std::vector<std::string>());
162  desc.addUntracked<std::vector<int>>("saveQIE11DataNSamples", std::vector<int>());
163  desc.addUntracked<std::vector<std::string>>("saveQIE11DataTags", std::vector<std::string>());
164  desc.addUntracked<bool>("ComplainEmptyData", false);
165  desc.addUntracked<int>("UnpackerMode", 0);
166  desc.addUntracked<int>("ExpectedOrbitMessageTime", -1);
167  desc.add<edm::InputTag>("InputLabel", edm::InputTag("rawDataCollector"));
168  desc.add<std::string>("ElectronicsMap", "");
169  descriptions.add("hcalRawToDigi", desc);
170 }

References edm::ConfigurationDescriptions::add(), edm::ParameterSetDescription::add(), edm::ParameterSetDescription::addUntracked(), HLT_2018_cff::InputTag, createfilelist::int, FEDNumbering::MINHCALFEDID, and AlCaHLTBitMon_QueryRunRegistry::string.

◆ produce()

void HcalRawToDigi::produce ( edm::Event e,
const edm::EventSetup es 
)
override

calib

zdc

umnio

Definition at line 173 of file HcalRawToDigi.cc.

173  {
174  // Step A: Get Inputs
176  e.getByToken(tok_data_, rawraw);
177  // get the mapping
179  es.get<HcalDbRecord>().get(pSetup);
182  const HcalElectronicsMap* readoutMap = item.product();
183  filter_.setConditions(pSetup.product());
184 
185  // Step B: Create empty output : three vectors for three classes...
186  std::vector<HBHEDataFrame> hbhe;
187  std::vector<HODataFrame> ho;
188  std::vector<HFDataFrame> hf;
189  std::vector<HcalTriggerPrimitiveDigi> htp;
190  std::vector<HcalCalibDataFrame> hc;
191  std::vector<ZDCDataFrame> zdc;
192  std::vector<HcalTTPDigi> ttp;
193  std::vector<HOTriggerPrimitiveDigi> hotp;
194  HcalUMNioDigi umnio;
195  auto report = std::make_unique<HcalUnpackerReport>();
196 
197  // Heuristics: use ave+(max-ave)/8
198  if (stats_.max_hbhe > 0)
199  hbhe.reserve(stats_.ave_hbhe + (stats_.max_hbhe - stats_.ave_hbhe) / 8);
200  if (stats_.max_ho > 0)
201  ho.reserve(stats_.ave_ho + (stats_.max_ho - stats_.ave_ho) / 8);
202  if (stats_.max_hf > 0)
203  hf.reserve(stats_.ave_hf + (stats_.max_hf - stats_.ave_hf) / 8);
204  if (stats_.max_calib > 0)
205  hc.reserve(stats_.ave_calib + (stats_.max_calib - stats_.ave_calib) / 8);
206  if (stats_.max_tp > 0)
207  htp.reserve(stats_.ave_tp + (stats_.max_tp - stats_.ave_tp) / 8);
208  if (stats_.max_tpho > 0)
209  hotp.reserve(stats_.ave_tpho + (stats_.max_tpho - stats_.ave_tpho) / 8);
210 
211  if (unpackZDC_)
212  zdc.reserve(24);
213 
215  colls.hbheCont = &hbhe;
216  colls.hoCont = &ho;
217  colls.hfCont = &hf;
218  colls.tpCont = &htp;
219  colls.tphoCont = &hotp;
220  colls.calibCont = &hc;
221  colls.zdcCont = &zdc;
222  colls.umnio = &umnio;
223  if (unpackTTP_)
224  colls.ttp = &ttp;
225 
226  // make an entry for each additional qie10 collection that is requested
227  for (const auto& info : saveQIE10Info_) {
228  colls.qie10Addtl[info.first] = new QIE10DigiCollection(info.first);
229  }
230 
231  // make an entry for each additional qie11 collection that is requested
232  for (const auto& info : saveQIE11Info_) {
233  colls.qie11Addtl[info.first] = new QIE11DigiCollection(info.first);
234  }
235 
236  // Step C: unpack all requested FEDs
237  for (std::vector<int>::const_iterator i = fedUnpackList_.begin(); i != fedUnpackList_.end(); i++) {
238  const FEDRawData& fed = rawraw->FEDData(*i);
239  if (fed.size() == 0) {
240  if (complainEmptyData_) {
241  if (!silent_)
242  edm::LogWarning("EmptyData") << "No data for FED " << *i;
243  report->addError(*i);
244  }
245  } else if (fed.size() < 8 * 3) {
246  if (!silent_)
247  edm::LogWarning("EmptyData") << "Tiny data " << fed.size() << " for FED " << *i;
248  report->addError(*i);
249  } else {
250  try {
251  unpacker_.unpack(fed, *readoutMap, colls, *report, silent_);
252  report->addUnpacked(*i);
253  } catch (cms::Exception& e) {
254  if (!silent_)
255  edm::LogWarning("Unpacking error") << e.what();
256  report->addError(*i);
257  } catch (...) {
258  if (!silent_)
259  edm::LogWarning("Unpacking exception");
260  report->addError(*i);
261  }
262  }
263  }
264 
265  // gather statistics
266  stats_.max_hbhe = std::max(stats_.max_hbhe, (int)hbhe.size());
267  stats_.ave_hbhe = (stats_.ave_hbhe * stats_.n + hbhe.size()) / (stats_.n + 1);
268  stats_.max_ho = std::max(stats_.max_ho, (int)ho.size());
269  stats_.ave_ho = (stats_.ave_ho * stats_.n + ho.size()) / (stats_.n + 1);
270  stats_.max_hf = std::max(stats_.max_hf, (int)hf.size());
271  stats_.ave_hf = (stats_.ave_hf * stats_.n + hf.size()) / (stats_.n + 1);
272  stats_.max_tp = std::max(stats_.max_tp, (int)htp.size());
273  stats_.ave_tp = (stats_.ave_tp * stats_.n + htp.size()) / (stats_.n + 1);
274  stats_.max_tpho = std::max(stats_.max_tpho, (int)hotp.size());
275  stats_.ave_tpho = (stats_.ave_tpho * stats_.n + hotp.size()) / (stats_.n + 1);
276  stats_.max_calib = std::max(stats_.max_calib, (int)hc.size());
277  stats_.ave_calib = (stats_.ave_calib * stats_.n + hc.size()) / (stats_.n + 1);
278 
279  stats_.n++;
280 
281  // check HF duplication
282  std::unordered_set<uint32_t> cacheForHFdup;
283  unsigned int cntHFdup = 0;
284  for (auto& hf_digi : hf) {
285  if (!cacheForHFdup.insert(hf_digi.id().rawId()).second)
286  cntHFdup++;
287  }
288  if (cntHFdup)
289  edm::LogError("HcalRawToDigi") << "Duplicated HF digis found for " << cntHFdup << " times" << std::endl;
290 
291  // Check that additional QIE10 and QIE11 collections
292  // do not duplicate the default collections
293  for (const auto& addtl : colls.qie10Addtl) {
294  if (addtl.second->samples() == colls.qie10->samples()) {
295  std::string tag = saveQIE10Info_[addtl.second->samples()];
296  edm::LogWarning("HcalRawToDigi") << "QIE10 data requested to be stored in tag " << tag
297  << " is already stored in the default QIE10 collection. "
298  << "To avoid duplicating, remove the tag " << tag
299  << " from the saveQIE10DataTags and the value of " << addtl.second->samples()
300  << " from the saveQIE10DataNSamples "
301  << "configurables to HcalRawToDigi" << std::endl;
302  }
303  }
304  for (const auto& addtl : colls.qie11Addtl) {
305  if (addtl.second->samples() == colls.qie11->samples()) {
306  std::string tag = saveQIE11Info_[addtl.second->samples()];
307  edm::LogWarning("HcalRawToDigi") << "QIE11 data requested to be stored in tag " << tag
308  << " is already stored in the default QIE11 collection. "
309  << "To avoid duplicating, remove the tag " << tag
310  << " from the saveQIE11DataTags and the value of " << addtl.second->samples()
311  << " from the saveQIE11DataNSamples "
312  << "configurables to HcalRawToDigi" << std::endl;
313  }
314  }
315 
316  // Step B: encapsulate vectors in actual collections
317  auto hbhe_prod = std::make_unique<HBHEDigiCollection>();
318  auto hf_prod = std::make_unique<HFDigiCollection>();
319  auto ho_prod = std::make_unique<HODigiCollection>();
320  auto htp_prod = std::make_unique<HcalTrigPrimDigiCollection>();
321  auto hotp_prod = std::make_unique<HOTrigPrimDigiCollection>();
322  // make qie10 collection if it wasn't made in theunpacker
323  if (colls.qie10 == nullptr) {
324  colls.qie10 = new QIE10DigiCollection();
325  }
326  std::unique_ptr<QIE10DigiCollection> qie10_prod(colls.qie10);
327 
328  // make qie10ZDC collection if it wasn't made in theunpacker
329  if (colls.qie10ZDC == nullptr) {
330  colls.qie10ZDC = new QIE10DigiCollection();
331  }
332  std::unique_ptr<QIE10DigiCollection> qie10ZDC_prod(colls.qie10ZDC);
333 
334  // make qie10Lasermon collection if it wasn't made in theunpacker
335  if (colls.qie10Lasermon == nullptr) {
336  colls.qie10Lasermon = new QIE10DigiCollection();
337  }
338  std::unique_ptr<QIE10DigiCollection> qie10Lasermon_prod(colls.qie10Lasermon);
339 
340  if (colls.qie11 == nullptr) {
341  colls.qie11 = new QIE11DigiCollection();
342  }
343  std::unique_ptr<QIE11DigiCollection> qie11_prod(colls.qie11);
344 
345  // follow the procedure for other collections. Copy the unpacked
346  // data so that it can be filtered and sorted
347  std::unordered_map<int, std::unique_ptr<QIE10DigiCollection>> qie10_prodAddtl;
348  std::unordered_map<int, std::unique_ptr<QIE11DigiCollection>> qie11_prodAddtl;
349  for (const auto& orig : colls.qie10Addtl) {
350  qie10_prodAddtl[orig.first] = std::unique_ptr<QIE10DigiCollection>(orig.second);
351  }
352  for (const auto& orig : colls.qie11Addtl) {
353  qie11_prodAddtl[orig.first] = std::unique_ptr<QIE11DigiCollection>(orig.second);
354  }
355 
356  hbhe_prod->swap_contents(hbhe);
357  if (!cntHFdup)
358  hf_prod->swap_contents(hf);
359  ho_prod->swap_contents(ho);
360  htp_prod->swap_contents(htp);
361  hotp_prod->swap_contents(hotp);
362 
363  // Step C2: filter FEDs, if required
364  if (filter_.active()) {
365  HBHEDigiCollection filtered_hbhe = filter_.filter(*hbhe_prod, *report);
366  HODigiCollection filtered_ho = filter_.filter(*ho_prod, *report);
367  HFDigiCollection filtered_hf = filter_.filter(*hf_prod, *report);
368  QIE10DigiCollection filtered_qie10 = filter_.filter(*qie10_prod, *report);
369  QIE11DigiCollection filtered_qie11 = filter_.filter(*qie11_prod, *report);
370 
371  hbhe_prod->swap(filtered_hbhe);
372  ho_prod->swap(filtered_ho);
373  hf_prod->swap(filtered_hf);
374  qie10_prod->swap(filtered_qie10);
375  qie11_prod->swap(filtered_qie11);
376 
377  // apply filter to additional collections
378  for (auto& prod : qie10_prodAddtl) {
379  QIE10DigiCollection filtered_qie10 = filter_.filter(*(prod.second), *report);
380  prod.second->swap(filtered_qie10);
381  }
382 
383  for (auto& prod : qie11_prodAddtl) {
384  QIE11DigiCollection filtered_qie11 = filter_.filter(*(prod.second), *report);
385  prod.second->swap(filtered_qie11);
386  }
387  }
388 
389  // Step D: Put outputs into event
390  // just until the sorting is proven
391  hbhe_prod->sort();
392  ho_prod->sort();
393  hf_prod->sort();
394  htp_prod->sort();
395  hotp_prod->sort();
396  qie10_prod->sort();
397  qie10ZDC_prod->sort();
398  qie10Lasermon_prod->sort();
399  qie11_prod->sort();
400 
401  // sort the additional collections
402  for (auto& prod : qie10_prodAddtl) {
403  prod.second->sort();
404  }
405  for (auto& prod : qie11_prodAddtl) {
406  prod.second->sort();
407  }
408 
409  e.put(std::move(hbhe_prod));
410  e.put(std::move(ho_prod));
411  e.put(std::move(hf_prod));
412  e.put(std::move(htp_prod));
413  e.put(std::move(hotp_prod));
414  e.put(std::move(qie10_prod));
415  e.put(std::move(qie10ZDC_prod), "ZDC");
416  e.put(std::move(qie10Lasermon_prod), "LASERMON");
417  e.put(std::move(qie11_prod));
418 
419  // put the qie10 and qie11 collections into the event
420  for (auto& prod : qie10_prodAddtl) {
422  e.put(std::move(prod.second), tag);
423  }
424 
425  for (auto& prod : qie11_prodAddtl) {
427  e.put(std::move(prod.second), tag);
428  }
429 
431  if (unpackCalib_) {
432  auto hc_prod = std::make_unique<HcalCalibDigiCollection>();
433  hc_prod->swap_contents(hc);
434 
435  if (filter_.active()) {
436  HcalCalibDigiCollection filtered_calib = filter_.filter(*hc_prod, *report);
437  hc_prod->swap(filtered_calib);
438  }
439 
440  hc_prod->sort();
441  e.put(std::move(hc_prod));
442  }
443 
445  if (unpackZDC_) {
446  auto prod = std::make_unique<ZDCDigiCollection>();
447  prod->swap_contents(zdc);
448 
449  if (filter_.active()) {
450  ZDCDigiCollection filtered_zdc = filter_.filter(*prod, *report);
451  prod->swap(filtered_zdc);
452  }
453 
454  prod->sort();
455  e.put(std::move(prod));
456  }
457 
458  if (unpackTTP_) {
459  auto prod = std::make_unique<HcalTTPDigiCollection>();
460  prod->swap_contents(ttp);
461 
462  prod->sort();
463  e.put(std::move(prod));
464  }
465  e.put(std::move(report));
467  if (unpackUMNio_) {
468  if (colls.umnio != nullptr) {
469  e.put(std::make_unique<HcalUMNioDigi>(umnio));
470  }
471  }
472 }

References HcalDataFrameFilter::active(), HcalRawToDigi::Statistics::ave_calib, HcalRawToDigi::Statistics::ave_hbhe, HcalRawToDigi::Statistics::ave_hf, HcalRawToDigi::Statistics::ave_ho, HcalRawToDigi::Statistics::ave_tp, HcalRawToDigi::Statistics::ave_tpho, HcalUnpacker::Collections::calibCont, complainEmptyData_, MillePedeFileConverter_cfg::e, electronicsMapLabel_, FEDRawDataCollection::FEDData(), fedUnpackList_, HcalDataFrameFilter::filter(), filter_, edm::EventSetup::get(), get, photonIsolationHIProducer_cfi::hbhe, HcalUnpacker::Collections::hbheCont, es_hardcode_cfi::hf, HcalUnpacker::Collections::hfCont, es_hardcode_cfi::ho, HcalUnpacker::Collections::hoCont, mps_fire::i, info(), B2GTnPMonitor_cfi::item, SiStripPI::max, HcalRawToDigi::Statistics::max_calib, HcalRawToDigi::Statistics::max_hbhe, HcalRawToDigi::Statistics::max_hf, HcalRawToDigi::Statistics::max_ho, HcalRawToDigi::Statistics::max_tp, HcalRawToDigi::Statistics::max_tpho, eostools::move(), HcalRawToDigi::Statistics::n, dumpMFGeometry_cfg::prod, edm::ESHandle< T >::product(), HcalUnpacker::Collections::qie10, HcalUnpacker::Collections::qie10Addtl, HcalUnpacker::Collections::qie10Lasermon, HcalUnpacker::Collections::qie10ZDC, HcalUnpacker::Collections::qie11, HcalUnpacker::Collections::qie11Addtl, edmIntegrityCheck::report, HcalDataFrameContainer< Digi >::samples(), saveQIE10Info_, saveQIE11Info_, edm::second(), HcalDataFrameFilter::setConditions(), silent_, FEDRawData::size(), stats_, AlCaHLTBitMon_QueryRunRegistry::string, edm::SortedCollection< T, SORT >::swap(), GlobalPosition_Frontier_DevDB_cff::tag, tok_data_, HcalUnpacker::Collections::tpCont, HcalUnpacker::Collections::tphoCont, HcalUnpacker::Collections::ttp, HcalUnpacker::Collections::umnio, HcalUnpacker::unpack(), unpackCalib_, unpacker_, unpackTTP_, unpackUMNio_, unpackZDC_, hcalSimParameters_cfi::zdc, and HcalUnpacker::Collections::zdcCont.

Member Data Documentation

◆ complainEmptyData_

const bool HcalRawToDigi::complainEmptyData_
private

Definition at line 53 of file HcalRawToDigi.h.

Referenced by produce().

◆ electronicsMapLabel_

std::string HcalRawToDigi::electronicsMapLabel_
private

Definition at line 55 of file HcalRawToDigi.h.

Referenced by HcalRawToDigi(), and produce().

◆ expectedOrbitMessageTime_

const int HcalRawToDigi::expectedOrbitMessageTime_
private

Definition at line 54 of file HcalRawToDigi.h.

Referenced by HcalRawToDigi().

◆ fedUnpackList_

std::vector<int> HcalRawToDigi::fedUnpackList_
private

Definition at line 40 of file HcalRawToDigi.h.

Referenced by HcalRawToDigi(), and produce().

◆ filter_

HcalDataFrameFilter HcalRawToDigi::filter_
private

Definition at line 39 of file HcalRawToDigi.h.

Referenced by produce().

◆ firstFED_

const int HcalRawToDigi::firstFED_
private

Definition at line 41 of file HcalRawToDigi.h.

◆ saveQIE10DataNSamples_

std::vector<int> HcalRawToDigi::saveQIE10DataNSamples_
private

Definition at line 46 of file HcalRawToDigi.h.

Referenced by HcalRawToDigi().

◆ saveQIE10DataTags_

std::vector<std::string> HcalRawToDigi::saveQIE10DataTags_
private

Definition at line 47 of file HcalRawToDigi.h.

Referenced by HcalRawToDigi().

◆ saveQIE10Info_

std::unordered_map<int, std::string> HcalRawToDigi::saveQIE10Info_
private

Definition at line 59 of file HcalRawToDigi.h.

Referenced by HcalRawToDigi(), and produce().

◆ saveQIE11DataNSamples_

std::vector<int> HcalRawToDigi::saveQIE11DataNSamples_
private

Definition at line 50 of file HcalRawToDigi.h.

Referenced by HcalRawToDigi().

◆ saveQIE11DataTags_

std::vector<std::string> HcalRawToDigi::saveQIE11DataTags_
private

Definition at line 51 of file HcalRawToDigi.h.

Referenced by HcalRawToDigi().

◆ saveQIE11Info_

std::unordered_map<int, std::string> HcalRawToDigi::saveQIE11Info_
private

Definition at line 60 of file HcalRawToDigi.h.

Referenced by HcalRawToDigi(), and produce().

◆ silent_

const bool HcalRawToDigi::silent_
private

Definition at line 53 of file HcalRawToDigi.h.

Referenced by produce().

◆ stats_

struct HcalRawToDigi::Statistics HcalRawToDigi::stats_
private

Referenced by HcalRawToDigi(), and produce().

◆ tok_data_

edm::EDGetTokenT<FEDRawDataCollection> HcalRawToDigi::tok_data_
private

Definition at line 37 of file HcalRawToDigi.h.

Referenced by HcalRawToDigi(), and produce().

◆ unpackCalib_

const bool HcalRawToDigi::unpackCalib_
private

Definition at line 42 of file HcalRawToDigi.h.

Referenced by HcalRawToDigi(), and produce().

◆ unpacker_

HcalUnpacker HcalRawToDigi::unpacker_
private

Definition at line 38 of file HcalRawToDigi.h.

Referenced by HcalRawToDigi(), and produce().

◆ unpackerMode_

const int HcalRawToDigi::unpackerMode_
private

Definition at line 54 of file HcalRawToDigi.h.

Referenced by HcalRawToDigi().

◆ unpackTTP_

const bool HcalRawToDigi::unpackTTP_
private

Definition at line 42 of file HcalRawToDigi.h.

Referenced by HcalRawToDigi(), and produce().

◆ unpackUMNio_

bool HcalRawToDigi::unpackUMNio_
private

Definition at line 43 of file HcalRawToDigi.h.

Referenced by HcalRawToDigi(), and produce().

◆ unpackZDC_

const bool HcalRawToDigi::unpackZDC_
private

Definition at line 42 of file HcalRawToDigi.h.

Referenced by HcalRawToDigi(), and produce().

HcalRawToDigi::Statistics::ave_calib
int ave_calib
Definition: HcalRawToDigi.h:68
edm::ESHandle::product
T const * product() const
Definition: ESHandle.h:86
mps_fire.i
i
Definition: mps_fire.py:355
edm::ParameterSetDescription::add
ParameterDescriptionBase * add(U const &iLabel, T const &value)
Definition: ParameterSetDescription.h:95
HcalRawToDigi::saveQIE10DataTags_
std::vector< std::string > saveQIE10DataTags_
Definition: HcalRawToDigi.h:47
HcalRawToDigi::unpackZDC_
const bool unpackZDC_
Definition: HcalRawToDigi.h:42
HcalElectronicsMapRcd
Definition: HcalElectronicsMapRcd.h:8
HcalDataFrameContainer
Definition: HcalDigiCollections.h:35
HcalRawToDigi::unpackCalib_
const bool unpackCalib_
Definition: HcalRawToDigi.h:42
HcalDataFrameFilter::active
bool active() const
whether any filters are on
Definition: HcalDataFrameFilter.cc:163
HcalUnpacker::Collections::qie10Lasermon
QIE10DigiCollection * qie10Lasermon
Definition: HcalUnpacker.h:35
es_hardcode_cfi.hf
hf
Definition: es_hardcode_cfi.py:161
edm::LogInfo
Definition: MessageLogger.h:254
edm::ParameterSetDescription
Definition: ParameterSetDescription.h:52
HcalRawToDigi::Statistics::n
uint64_t n
Definition: HcalRawToDigi.h:69
edm::SortedCollection
Definition: SortedCollection.h:49
charmTagsComputerCvsB_cfi.idx
idx
Definition: charmTagsComputerCvsB_cfi.py:108
edm::second
U second(std::pair< T, U > const &p)
Definition: ParameterSet.cc:215
info
static const TGPicture * info(bool iBackgroundIsBlack)
Definition: FWCollectionSummaryWidget.cc:152
HcalRawToDigi::Statistics::max_hf
int max_hf
Definition: HcalRawToDigi.h:65
HcalRawToDigi::saveQIE11Info_
std::unordered_map< int, std::string > saveQIE11Info_
Definition: HcalRawToDigi.h:60
spr::find
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:19
HcalRawToDigi::unpackTTP_
const bool unpackTTP_
Definition: HcalRawToDigi.h:42
HcalUnpacker::Collections::hbheCont
std::vector< HBHEDataFrame > * hbheCont
Definition: HcalUnpacker.h:25
edm::Handle
Definition: AssociativeIterator.h:50
HcalUnpacker::Collections::ttp
std::vector< HcalTTPDigi > * ttp
Definition: HcalUnpacker.h:32
HcalRawToDigi::Statistics::ave_tp
int ave_tp
Definition: HcalRawToDigi.h:66
HcalUnpacker::Collections::qie10ZDC
QIE10DigiCollection * qie10ZDC
Definition: HcalUnpacker.h:34
HcalRawToDigi::Statistics::max_ho
int max_ho
Definition: HcalRawToDigi.h:64
QIE10DigiCollection
HcalDataFrameContainer< QIE10DataFrame > QIE10DigiCollection
Definition: HcalDigiCollections.h:52
HcalUnpacker::Collections
Definition: HcalUnpacker.h:23
FEDRawData
Definition: FEDRawData.h:19
HcalUnpacker::Collections::umnio
HcalUMNioDigi * umnio
Definition: HcalUnpacker.h:40
contentValuesCheck.ss
ss
Definition: contentValuesCheck.py:33
HcalDataFrameContainer::samples
int samples() const
Definition: HcalDigiCollections.h:47
HcalRawToDigi::complainEmptyData_
const bool complainEmptyData_
Definition: HcalRawToDigi.h:53
edm::EventSetup::get
T get() const
Definition: EventSetup.h:73
edm::SortedCollection::swap
void swap(SortedCollection &other)
Definition: SortedCollection.h:193
HcalRawToDigi::saveQIE11DataNSamples_
std::vector< int > saveQIE11DataNSamples_
Definition: HcalRawToDigi.h:50
edm::ConfigurationDescriptions::add
void add(std::string const &label, ParameterSetDescription const &psetDescription)
Definition: ConfigurationDescriptions.cc:57
GlobalPosition_Frontier_DevDB_cff.tag
tag
Definition: GlobalPosition_Frontier_DevDB_cff.py:11
HcalRawToDigi::filter_
HcalDataFrameFilter filter_
Definition: HcalRawToDigi.h:39
HcalUnpacker::Collections::qie10Addtl
std::unordered_map< int, QIE10DigiCollection * > qie10Addtl
Definition: HcalUnpacker.h:38
HcalRawToDigi::Statistics::ave_ho
int ave_ho
Definition: HcalRawToDigi.h:64
dumpMFGeometry_cfg.prod
prod
Definition: dumpMFGeometry_cfg.py:24
HcalUnpacker::setExpectedOrbitMessageTime
void setExpectedOrbitMessageTime(int time)
Definition: HcalUnpacker.h:59
edm::ESHandle< HcalDbService >
HcalRawToDigi::silent_
const bool silent_
Definition: HcalRawToDigi.h:53
HcalUnpacker::unpack
void unpack(const FEDRawData &raw, const HcalElectronicsMap &emap, std::vector< HcalHistogramDigi > &histoDigis)
Definition: HcalUnpacker.cc:991
HcalUMNioDigi
Definition: HcalUMNioDigi.h:15
HcalRawToDigi::Statistics::ave_hf
int ave_hf
Definition: HcalRawToDigi.h:65
FEDRawDataCollection::FEDData
const FEDRawData & FEDData(int fedid) const
retrieve data for fed
Definition: FEDRawDataCollection.cc:19
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
HcalUnpacker::Collections::tpCont
std::vector< HcalTriggerPrimitiveDigi > * tpCont
Definition: HcalUnpacker.h:30
HcalUnpacker::Collections::tphoCont
std::vector< HOTriggerPrimitiveDigi > * tphoCont
Definition: HcalUnpacker.h:31
edm::LogWarning
Definition: MessageLogger.h:141
edm::ParameterSetDescription::addUntracked
ParameterDescriptionBase * addUntracked(U const &iLabel, T const &value)
Definition: ParameterSetDescription.h:100
HcalRawToDigi::Statistics::ave_tpho
int ave_tpho
Definition: HcalRawToDigi.h:67
HLT_2018_cff.InputTag
InputTag
Definition: HLT_2018_cff.py:79016
edm::LogError
Definition: MessageLogger.h:183
HcalRawToDigi::Statistics::ave_hbhe
int ave_hbhe
Definition: HcalRawToDigi.h:63
HcalRawToDigi::electronicsMapLabel_
std::string electronicsMapLabel_
Definition: HcalRawToDigi.h:55
SiStripPI::max
Definition: SiStripPayloadInspectorHelper.h:169
HcalUnpacker::Collections::qie11Addtl
std::unordered_map< int, QIE11DigiCollection * > qie11Addtl
Definition: HcalUnpacker.h:39
HcalUnpacker::Collections::zdcCont
std::vector< ZDCDataFrame > * zdcCont
Definition: HcalUnpacker.h:29
HcalRawToDigi::Statistics::max_tp
int max_tp
Definition: HcalRawToDigi.h:66
HcalRawToDigi::Statistics::max_tpho
int max_tpho
Definition: HcalRawToDigi.h:67
HcalRawToDigi::expectedOrbitMessageTime_
const int expectedOrbitMessageTime_
Definition: HcalRawToDigi.h:54
FEDNumbering::MAXHCALuTCAFEDID
Definition: FEDNumbering.h:104
createfilelist.int
int
Definition: createfilelist.py:10
HcalRawToDigi::saveQIE10DataNSamples_
std::vector< int > saveQIE10DataNSamples_
Definition: HcalRawToDigi.h:46
HcalRawToDigi::saveQIE10Info_
std::unordered_map< int, std::string > saveQIE10Info_
Definition: HcalRawToDigi.h:59
B2GTnPMonitor_cfi.item
item
Definition: B2GTnPMonitor_cfi.py:147
HcalUnpacker::Collections::qie11
QIE11DigiCollection * qie11
Definition: HcalUnpacker.h:36
get
#define get
HcalDataFrameFilter::setConditions
void setConditions(const HcalDbService *conditions)
get conditions
Definition: HcalDataFrameFilter.cc:80
QIE11DigiCollection
HcalDataFrameContainer< QIE11DataFrame > QIE11DigiCollection
Definition: HcalDigiCollections.h:53
FEDNumbering::MINHCALuTCAFEDID
Definition: FEDNumbering.h:103
FEDRawData::size
size_t size() const
Lenght of the data buffer in bytes.
Definition: FEDRawData.h:45
HcalDataFrameFilter::filter
HBHEDigiCollection filter(const HBHEDigiCollection &incol, HcalUnpackerReport &r)
filter HB/HE data frames
Definition: HcalDataFrameFilter.cc:82
edmIntegrityCheck.report
report
Definition: edmIntegrityCheck.py:349
HcalUnpacker::Collections::hoCont
std::vector< HODataFrame > * hoCont
Definition: HcalUnpacker.h:26
HcalElectronicsMap
Definition: HcalElectronicsMap.h:31
photonIsolationHIProducer_cfi.hbhe
hbhe
Definition: photonIsolationHIProducer_cfi.py:8
HcalRawToDigi::unpackUMNio_
bool unpackUMNio_
Definition: HcalRawToDigi.h:43
hcalSimParameters_cfi.zdc
zdc
Definition: hcalSimParameters_cfi.py:92
HcalRawToDigi::unpackerMode_
const int unpackerMode_
Definition: HcalRawToDigi.h:54
eostools.move
def move(src, dest)
Definition: eostools.py:511
HcalRawToDigi::stats_
struct HcalRawToDigi::Statistics stats_
HcalRawToDigi::Statistics::max_hbhe
int max_hbhe
Definition: HcalRawToDigi.h:63
HcalRawToDigi::firstFED_
const int firstFED_
Definition: HcalRawToDigi.h:41
FEDNumbering::MINHCALFEDID
Definition: FEDNumbering.h:47
HcalRawToDigi::unpacker_
HcalUnpacker unpacker_
Definition: HcalRawToDigi.h:38
HcalUnpacker::setMode
void setMode(int mode)
Definition: HcalUnpacker.h:66
HcalUnpacker::Collections::qie10
QIE10DigiCollection * qie10
Definition: HcalUnpacker.h:33
HcalUnpacker::Collections::hfCont
std::vector< HFDataFrame > * hfCont
Definition: HcalUnpacker.h:27
cms::Exception
Definition: Exception.h:70
es_hardcode_cfi.ho
ho
Definition: es_hardcode_cfi.py:191
HcalDbRecord
Definition: HcalDbRecord.h:30
FEDNumbering::MAXHCALFEDID
Definition: FEDNumbering.h:48
HcalUnpacker::Collections::calibCont
std::vector< HcalCalibDataFrame > * calibCont
Definition: HcalUnpacker.h:28
edm::InputTag
Definition: InputTag.h:15
HcalRawToDigi::tok_data_
edm::EDGetTokenT< FEDRawDataCollection > tok_data_
Definition: HcalRawToDigi.h:37
HcalRawToDigi::saveQIE11DataTags_
std::vector< std::string > saveQIE11DataTags_
Definition: HcalRawToDigi.h:51
HcalRawToDigi::fedUnpackList_
std::vector< int > fedUnpackList_
Definition: HcalRawToDigi.h:40
HcalRawToDigi::Statistics::max_calib
int max_calib
Definition: HcalRawToDigi.h:68
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37