68 : barrelOnly_(iConfig.getParameter<
bool>(
"BarrelOnly")),
69 tcpFormat_(iConfig.getParameter<
bool>(
"TcpOutput")),
70 debug_(iConfig.getParameter<
bool>(
"Debug")),
71 famos_(iConfig.getParameter<
bool>(
"Famos")),
76 binOfMaximum_(iConfig.getParameter<
int>(
"binOfMaximum")),
77 fillBinOfMaximumFromHistory_(-1 == binOfMaximum_) {
79 produces<EcalTrigPrimDigiCollection>();
81 produces<EcalTrigPrimDigiCollection>(
"formatTCP");
89 if (not iFillFromHistory) {
95 const std::string kModuleName{
"ecalUnsuppressedDigis"};
96 for (
auto it = iHistory.
rbegin(), itEnd = iHistory.
rend(); it != itEnd; ++it) {
101 if (not iFillFromHistory) {
104 <<
") is different from the one found in ProductRegistration(=" << psetBinOfMax
108 edm::LogInfo(
"EcalTPG") <<
"EcalTrigPrimProducer is using binOfMaximum "
109 "found in ProductRegistry : "
117 edm::LogWarning(
"EcalTPG") <<
"Could not find product registry of EBDigiCollection (label "
118 "ecalUnsuppressedDigis), had to set the following parameters by "
119 "Hand: binOfMaximum="
169 algo_->setPointers(ecaltpLin,
208 algo_->setPointers2(ecaltpgFgEBGroup,
212 ecaltpgFineGrainTowerEE,
242 edm::LogWarning(
"EcalTPG") <<
" Couldnt find Barrel dataframes with producer " <<
labels.module <<
" and label "
243 <<
labels.productInstance <<
"!!!";
250 edm::LogWarning(
"EcalTPG") <<
" Couldnt find Endcap dataframes with producer " <<
labels.module <<
" and label "
251 <<
labels.productInstance <<
"!!!";
257 throw cms::Exception(
" ProductNotFound") <<
"No EBDataFrames(EEDataFrames) with producer " <<
labels.module
258 <<
" and label " <<
labels.productInstance <<
" found in input!!\n";
262 LogDebug(
"EcalTPG") <<
" =================> Treating event " <<
e.id() <<
", Number of EBDataFrames "
263 << ebDigis.
product()->
size() <<
", Number of EEDataFrames " <<
eeDigis.product()->size();
265 LogDebug(
"EcalTPG") <<
" =================> Treating event " <<
e.id() <<
", Number of EBDataFrames "
268 auto pOut = std::make_unique<EcalTrigPrimDigiCollection>();
269 auto pOutTcp = std::make_unique<EcalTrigPrimDigiCollection>();
277 algo_->run(iSetup, ebdc, *pOut, *pOutTcp);
282 algo_->run(iSetup, eedc, *pOut, *pOutTcp);
285 edm::LogInfo(
"produce") <<
"For Barrel + Endcap, " << pOut->size() <<
" TP Digis were produced";
289 for (
unsigned int i = 0;
i < pOut->size(); ++
i) {
291 for (
int isam = 0; isam < (*pOut)[
i].size(); ++isam) {
292 if ((*pOut)[
i][isam].raw())
296 LogDebug(
"EcalTPG") <<
" For tower " << (((*pOut)[
i])).id() <<
", TP is " << (*pOut)[
i];
299 LogDebug(
"EcalTPG") <<
"\n =================> For Barrel , " << pOut->size()
300 <<
" TP Digis were produced (including zero ones)";
302 LogDebug(
"EcalTPG") <<
"\n =================> For Barrel + Endcap, " << pOut->size()
303 <<
" TP Digis were produced (including zero ones)";
314 desc.add<
bool>(
"BarrelOnly",
false);
315 desc.add<
bool>(
"TcpOutput",
false);
316 desc.add<
bool>(
"Debug",
false);
317 desc.add<
bool>(
"Famos",
false);
322 "A value of -1 will make the module lookup the value of 'binOfMaximum' "
323 "from the module 'ecalUnsuppressedDigis' from the process history. "
324 "Allowed values are -1 and from 1-10.");
327 desc.add<
int>(
"binOfMaximum", -1)->setComment(
kComment);