65 : barrelOnly_(iConfig.getParameter<
bool>(
"BarrelOnly")),
66 tcpFormat_(iConfig.getParameter<
bool>(
"TcpOutput")),
67 debug_(iConfig.getParameter<
bool>(
"Debug")),
68 famos_(iConfig.getParameter<
bool>(
"Famos")),
73 binOfMaximum_(iConfig.getParameter<
int>(
"binOfMaximum")),
74 fillBinOfMaximumFromHistory_(-1 == binOfMaximum_) {
76 produces<EcalTrigPrimDigiCollection>();
78 produces<EcalTrigPrimDigiCollection>(
"formatTCP");
86 if (not iFillFromHistory) {
92 const std::string kModuleName{
"ecalUnsuppressedDigis"};
93 for (
auto it = iHistory.
rbegin(), itEnd = iHistory.
rend(); it != itEnd; ++it) {
98 if (not iFillFromHistory) {
101 <<
") is different from the one found in ProductRegistration(=" << psetBinOfMax
105 edm::LogInfo(
"EcalTPG") <<
"EcalTrigPrimProducer is using binOfMaximum "
106 "found in ProductRegistry : "
114 edm::LogWarning(
"EcalTPG") <<
"Could not find product registry of EBDigiCollection (label "
115 "ecalUnsuppressedDigis), had to set the following parameters by "
116 "Hand: binOfMaximum="
166 algo_->setPointers(ecaltpLin,
205 algo_->setPointers2(ecaltpgFgEBGroup,
209 ecaltpgFineGrainTowerEE,
239 edm::LogWarning(
"EcalTPG") <<
" Couldnt find Barrel dataframes with producer " <<
labels.module <<
" and label "
240 <<
labels.productInstance <<
"!!!";
247 edm::LogWarning(
"EcalTPG") <<
" Couldnt find Endcap dataframes with producer " <<
labels.module <<
" and label "
248 <<
labels.productInstance <<
"!!!";
254 throw cms::Exception(
" ProductNotFound") <<
"No EBDataFrames(EEDataFrames) with producer " <<
labels.module
255 <<
" and label " <<
labels.productInstance <<
" found in input!!\n";
259 LogDebug(
"EcalTPG") <<
" =================> Treating event " <<
e.id() <<
", Number of EBDataFrames "
260 << ebDigis.
product()->
size() <<
", Number of EEDataFrames " <<
eeDigis.product()->size();
262 LogDebug(
"EcalTPG") <<
" =================> Treating event " <<
e.id() <<
", Number of EBDataFrames "
265 auto pOut = std::make_unique<EcalTrigPrimDigiCollection>();
266 auto pOutTcp = std::make_unique<EcalTrigPrimDigiCollection>();
274 algo_->run(iSetup, ebdc, *pOut, *pOutTcp);
279 algo_->run(iSetup, eedc, *pOut, *pOutTcp);
282 edm::LogInfo(
"produce") <<
"For Barrel + Endcap, " << pOut->size() <<
" TP Digis were produced";
286 for (
unsigned int i = 0;
i < pOut->size(); ++
i) {
288 for (
int isam = 0; isam < (*pOut)[
i].size(); ++isam) {
289 if ((*pOut)[
i][isam].raw())
293 LogDebug(
"EcalTPG") <<
" For tower " << (((*pOut)[
i])).id() <<
", TP is " << (*pOut)[
i];
296 LogDebug(
"EcalTPG") <<
"\n =================> For Barrel , " << pOut->size()
297 <<
" TP Digis were produced (including zero ones)";
299 LogDebug(
"EcalTPG") <<
"\n =================> For Barrel + Endcap, " << pOut->size()
300 <<
" TP Digis were produced (including zero ones)";
311 desc.
add<
bool>(
"BarrelOnly",
false);
312 desc.
add<
bool>(
"TcpOutput",
false);
313 desc.
add<
bool>(
"Debug",
false);
314 desc.
add<
bool>(
"Famos",
false);
319 "A value of -1 will make the module lookup the value of 'binOfMaximum' "
320 "from the module 'ecalUnsuppressedDigis' from the process history. "
321 "Allowed values are -1 and from 1-10.");
324 desc.
add<
int>(
"binOfMaximum", -1)->setComment(
kComment);