48 : barrelOnly_(iConfig.getParameter<
bool>(
"BarrelOnly")),
49 tcpFormat_(iConfig.getParameter<
bool>(
"TcpOutput")),
50 debug_(iConfig.getParameter<
bool>(
"Debug")),
51 famos_(iConfig.getParameter<
bool>(
"Famos")),
52 nSamples_(iConfig.getParameter<
int>(
"nOfSamples")),
53 binOfMaximum_(iConfig.getParameter<
int>(
"binOfMaximum")) {
56 esConsumes<EcalTPGLinearizationConst, EcalTPGLinearizationConstRcd, edm::Transition::BeginRun>();
59 esConsumes<EcalTPGCrystalStatus, EcalTPGCrystalStatusRcd, edm::Transition::BeginRun>();
63 esConsumes<EcalTPGSlidingWindow, EcalTPGSlidingWindowRcd, edm::Transition::BeginRun>();
69 produces<EcalEBTrigPrimDigiCollection>();
71 produces<EcalEBTrigPrimDigiCollection>(
"formatTCP");
78 algo_ = std::make_unique<EcalEBTrigPrimTestAlgo>(
120 algo_->setPointers(ecaltpLin,
148 <<
labels.productInstance <<
"!!!";
153 <<
" =================> Treating event " <<
nEvent_ <<
", Number of EB digis "
154 << barrelDigiHandle.
product()->
size() << std::endl;
156 auto pOut = std::make_unique<EcalEBTrigPrimDigiCollection>();
157 auto pOutTcp = std::make_unique<EcalEBTrigPrimDigiCollection>();
166 ebdigi = barrelDigiHandle.
product();
167 algo_->run(iSetup, ebdigi, *pOut, *pOutTcp);
171 <<
" For Barrel " << pOut->size() <<
" TP Digis were produced" << std::endl;
176 for (
unsigned int i = 0;
i < pOut->size(); ++
i) {
178 std::cout <<
"EcalTPG Printing only non zero TP "
179 <<
" For tower " << (((*pOut)[
i])).id() <<
", TP is " << (*pOut)[
i];
180 for (
int isam = 0; isam < (*pOut)[
i].size(); ++isam) {
181 if ((*pOut)[
i][isam].encodedEt() > 0) {
183 std::cout <<
" (*pOut)[i][isam].raw() " << (*pOut)[
i][isam].raw() <<
" (*pOut)[i][isam].encodedEt() "
184 << (*pOut)[
i][isam].encodedEt() << std::endl;
191 <<
"\n =================> For Barrel , " << pOut->size()
192 <<
" TP Digis were produced (including zero ones)"
193 <<
" Non zero primitives were " << nonZeroTP << std::endl;