65 std::unique_ptr<EcalEBPhase2TrigPrimAlgo>
algo_;
96 : debug_(iConfig.getParameter<
bool>(
"Debug")),
97 famos_(iConfig.getParameter<
bool>(
"Famos")),
98 binOfMaximum_(iConfig.getParameter<
int>(
"binOfMaximum")) {
105 esConsumes<EcalLiteDTUPedestalsMap, EcalLiteDTUPedestalsRcd, edm::Transition::BeginRun>();
107 esConsumes<EcalEBPhase2TPGPedestalsMap, EcalEBPhase2TPGPedestalsRcd, edm::Transition::BeginRun>();
110 esConsumes<EcalTPGCrystalStatus, EcalTPGCrystalStatusRcd, edm::Transition::BeginRun>();
112 esConsumes<EcalEBPhase2TPGLinearizationConst, EcalEBPhase2TPGLinearizationConstRcd, edm::Transition::BeginRun>();
114 esConsumes<EcalEBPhase2TPGAmplWeightIdMap, EcalEBPhase2TPGAmplWeightIdMapRcd, edm::Transition::BeginRun>();
116 esConsumes<EcalEBPhase2TPGTimeWeightIdMap, EcalEBPhase2TPGTimeWeightIdMapRcd, edm::Transition::BeginRun>();
120 produces<EcalEBPhase2TrigPrimDigiCollection>();
137 desc.add<
bool>(
"Debug",
false);
138 desc.add<
bool>(
"Famos",
false);
139 desc.add<
int>(
"BinOfMaximum", 6);
175 algo_->setPointers(ecaltpPed, ecaltpLin, ecaltpgBadX, ecaltpgAmplWeightMap, ecaltpgTimeWeightMap, ecaltpgWeightGroup);
196 <<
labels.productInstance <<
"!!!";
198 const auto* ebdigi = barrelDigiHandle.
product();
201 LogDebug(
"EcalEBTrigPrimPhase2Producer")
203 <<
" =================> Treating event " <<
nEvent_ <<
", Number of EB digis " 204 << barrelDigiHandle.
product()->
size() << std::endl;
206 auto pOut = std::make_unique<EcalEBPhase2TrigPrimDigiCollection>();
209 algo_->run(ebdigi, *pOut);
212 LogDebug(
"EcalEBTrigPrimPhase2Producer")
214 <<
" For Barrel " << pOut->size() <<
" TP Digis were produced" << std::endl;
220 for (
unsigned int i = 0;
i < pOut->size(); ++
i) {
222 for (
int isam = 0; isam < (*pOut)[
i].size(); ++isam) {
223 if ((*pOut)[
i][isam].encodedEt() > 0) {
226 LogDebug(
"EcalEBTrigPrimPhase2Producer")
227 <<
" For xStal n " << nXstal <<
" xTsal Id " << (((*pOut)[
i])).id() <<
", TP is " << (*pOut)[
i]
228 <<
" (*pOut)[i][isam].raw() " << (*pOut)[
i][isam].raw() <<
" (*pOut)[i][isam].encodedEt() " 229 << (*pOut)[
i][isam].encodedEt() <<
" (*pOut)[i][isam].time() " << (*pOut)[
i][isam].time() << std::endl;
237 <<
"\n =================> For Barrel , " << pOut->size() <<
" TP Digis were produced (including zero ones)" 238 <<
" Non zero primitives were " << nonZeroTP << std::endl;
void beginRun(const edm::Run &run, const edm::EventSetup &es) override
T getParameter(std::string const &) const
static void fillDescriptions(edm::ConfigurationDescriptions &)
unsigned long long getRecords(edm::EventSetup const &setup)
edm::ESGetToken< EcalEBPhase2TPGPedestalsMap, EcalEBPhase2TPGPedestalsRcd > theEcalEBPhase2TPGPedestals_Token_
T const * product() const
bool fillBinOfMaximumFromHistory_
edm::ESGetToken< EcalLiteDTUPedestalsMap, EcalLiteDTUPedestalsRcd > theEcalTPGPedestals_Token_
edm::ESGetToken< EcalEBPhase2TPGAmplWeightIdMap, EcalEBPhase2TPGAmplWeightIdMapRcd > theEcalEBTPGAmplWeightIdMap_Token_
edm::ESGetToken< EcalTrigTowerConstituentsMap, IdealGeometryRecord > eTTmapToken_
T const * product() const
void produce(edm::Event &e, const edm::EventSetup &c) override
edm::EDGetTokenT< EBDigiCollectionPh2 > tokenEBdigi_
std::unique_ptr< EcalEBPhase2TrigPrimAlgo > algo_
edm::ESGetToken< EcalEBPhase2TPGTimeWeightIdMap, EcalEBPhase2TPGTimeWeightIdMapRcd > theEcalEBTPGTimeWeightIdMap_Token_
#define DEFINE_FWK_MODULE(type)
edm::ESGetToken< EcalEBPhase2TPGLinearizationConst, EcalEBPhase2TPGLinearizationConstRcd > theEcalEBPhase2TPGLinearization_Token_
edm::ESGetToken< EcalTPGSpike, EcalTPGSpikeRcd > theEcalTPGSpike_Token_
Log< level::Info, false > LogInfo
edm::ESGetToken< EcalTPGTowerStatus, EcalTPGTowerStatusRcd > theEcalTPGTowerStatus_Token_
edm::ESGetToken< CaloGeometry, CaloGeometryRecord > theGeometryToken_
edm::ESGetToken< EcalTPGWeightGroup, EcalTPGWeightGroupRcd > theEcalTPGWeightGroup_Token_
edm::ESGetToken< EcalTPGCrystalStatus, EcalTPGCrystalStatusRcd > theEcalTPGCrystalStatus_Token_
~EcalEBTrigPrimPhase2Producer() override
void endRun(const edm::Run &, const edm::EventSetup &) override
EcalEBTrigPrimPhase2Producer(const edm::ParameterSet &conf)
Log< level::Warning, false > LogWarning
unsigned long long cacheID_