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");
87 algo_ = std::make_unique<EcalEBTrigPrimTestAlgo>(
130 algo_->setPointers(ecaltpLin,
163 <<
" =================> Treating event " <<
nEvent_ <<
", Number of EB digis "
164 << barrelDigiHandle.
product()->size() << std::endl;
166 auto pOut = std::make_unique<EcalEBTrigPrimDigiCollection>();
167 auto pOutTcp = std::make_unique<EcalEBTrigPrimDigiCollection>();
176 ebdigi = barrelDigiHandle.
product();
177 algo_->run(ebdigi, *pOut, *pOutTcp);
181 <<
" For Barrel " << pOut->size() <<
" TP Digis were produced" << std::endl;
186 for (
unsigned int i = 0;
i < pOut->size(); ++
i) {
188 std::cout <<
"EcalTPG Printing only non zero TP "
189 <<
" For tower " << (((*pOut)[
i])).id() <<
", TP is " << (*pOut)[
i];
190 for (
int isam = 0; isam < (*pOut)[
i].size(); ++isam) {
191 if ((*pOut)[
i][isam].encodedEt() > 0) {
193 std::cout <<
" (*pOut)[i][isam].raw() " << (*pOut)[
i][isam].raw() <<
" (*pOut)[i][isam].encodedEt() "
194 << (*pOut)[
i][isam].encodedEt() << std::endl;
201 <<
"\n =================> For Barrel , " << pOut->size()
202 <<
" TP Digis were produced (including zero ones)"
203 <<
" Non zero primitives were " << nonZeroTP << std::endl;
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
edm::ESGetToken< EcalTPGPedestals, EcalTPGPedestalsRcd > theEcalTPGPedestals_Token_
void beginRun(const edm::Run &run, const edm::EventSetup &es) override
bool getByToken(EDGetToken token, Handle< PROD > &result) const
EcalEBTrigPrimProducer(const edm::ParameterSet &conf)
edm::ESGetToken< EcalTPGLutIdMap, EcalTPGLutIdMapRcd > theEcalTPGLutIdMap_Token_
edm::EDGetTokenT< EBDigiCollection > tokenEBdigi_
edm::ESGetToken< EcalTPGSpike, EcalTPGSpikeRcd > theEcalTPGSpike_Token_
unsigned long long getRecords(edm::EventSetup const &setup)
unsigned long long cacheID_
bool getData(T &iHolder) const
edm::ESGetToken< EcalTPGTowerStatus, EcalTPGTowerStatusRcd > theEcalTPGTowerStatus_Token_
std::unique_ptr< EcalEBTrigPrimTestAlgo > algo_
~EcalEBTrigPrimProducer() override
edm::ESGetToken< EcalTPGLutGroup, EcalTPGLutGroupRcd > theEcalTPGLutGroup_Token_
edm::ESGetToken< CaloGeometry, CaloGeometryRecord > theGeometryToken_
edm::ESGetToken< EcalTPGWeightGroup, EcalTPGWeightGroupRcd > theEcalTPGWEightGroup_Token_
void produce(edm::Event &e, const edm::EventSetup &c) override
edm::ESGetToken< EcalTrigTowerConstituentsMap, IdealGeometryRecord > eTTmapToken_
T const * product() const
edm::ESGetToken< EcalTPGWeightIdMap, EcalTPGWeightIdMapRcd > theEcalTPGWEightIdMap_Token_
T const * product() const
T getParameter(std::string const &) const
edm::ESGetToken< EcalTPGLinearizationConst, EcalTPGLinearizationConstRcd > theEcalTPGLinearization_Token_
edm::ESGetToken< EcalTPGCrystalStatus, EcalTPGCrystalStatusRcd > theEcalTPGCrystalStatus_Token_
char const * productInstance
void endRun(const edm::Run &, const edm::EventSetup &) override
ESHandle< T > getHandle(const ESGetToken< T, R > &iToken) const
Log< level::Warning, false > LogWarning
edm::ESGetToken< EcalTPGSlidingWindow, EcalTPGSlidingWindowRcd > theEcalTPGSlidingWindow_Token_