64 barrelOnly_(iConfig.getParameter<
bool>(
"BarrelOnly")),
65 tcpFormat_(iConfig.getParameter<
bool>(
"TcpOutput")),
66 debug_(iConfig.getParameter<
bool>(
"Debug")),
67 famos_(iConfig.getParameter<
bool>(
"Famos")),
70 binOfMaximum_(iConfig.getParameter<
int>(
"binOfMaximum")),
71 fillBinOfMaximumFromHistory_(-1==binOfMaximum_)
74 produces <EcalTrigPrimDigiCollection >();
75 if (
tcpFormat_) produces <EcalTrigPrimDigiCollection >(
"formatTCP");
84 if(not iFillFromHistory) {
85 binOfMaximum=iPSetValue;
90 const std::string kModuleName{
"ecalUnsuppressedDigis" };
91 for(
auto it = iHistory.
rbegin(), itEnd = iHistory.
rend();
97 if (not iFillFromHistory ) {
98 if ( psetBinOfMax!=binOfMaximum)
edm:: LogWarning(
"EcalTPG")<<
"binofMaximum given in configuration (="<<binOfMaximum<<
") is different from the one found in ProductRegistration(="<<psetBinOfMax<<
")!!!";
100 binOfMaximum=psetBinOfMax;
106 if (binOfMaximum==0) {
108 edm::LogWarning(
"EcalTPG")<<
"Could not find product registry of EBDigiCollection (label ecalUnsuppressedDigis), had to set the following parameters by Hand: binOfMaximum="<<
binOfMaximum;
161 algo_->setPointers(ecaltpLin,ecaltpPed,ecaltpgSlidW,ecaltpgWeightMap,ecaltpgWeightGroup,ecaltpgFgStripEE,ecaltpgBadX,ecaltpgStripStatus);
193 algo_->setPointers2(ecaltpgFgEBGroup,ecaltpgLutGroup,ecaltpgLut,ecaltpgFineGrainEB,ecaltpgFineGrainTowerEE,ecaltpgBadTT,ecaltpgSpike);
233 if (!barrel && !endcap) {
240 else LogDebug(
"EcalTPG") <<
" =================> Treating event "<<e.
id()<<
", Number of EBDataFrames "<<ebDigis.
product()->
size();
242 auto pOut = std::make_unique<EcalTrigPrimDigiCollection>();
243 auto pOutTcp = std::make_unique<EcalTrigPrimDigiCollection>();
252 algo_->run(iSetup,ebdc,*pOut,*pOutTcp);
257 algo_->run(iSetup,eedc,*pOut,*pOutTcp);
260 edm::LogInfo(
"produce") <<
"For Barrel + Endcap, "<<pOut->size()<<
" TP Digis were produced";
264 for (
unsigned int i=0;
i<pOut->size();++
i) {
266 for (
int isam=0;isam<(*pOut)[
i].size();++isam) {
267 if ((*pOut)[
i][isam].raw()) print=
true;
269 if (print)
LogDebug(
"EcalTPG") <<
" For tower "<<(((*pOut)[
i])).id()<<
", TP is "<<(*pOut)[
i];
271 if (
barrelOnly_)
LogDebug(
"EcalTPG") <<
"\n =================> For Barrel , "<<pOut->size()<<
" TP Digis were produced (including zero ones)";
272 else LogDebug(
"EcalTPG") <<
"\n =================> For Barrel + Endcap, "<<pOut->size()<<
" TP Digis were produced (including zero ones)";
284 desc.
add<
bool>(
"BarrelOnly",
false);
285 desc.
add<
bool>(
"TcpOutput",
false);
286 desc.
add<
bool>(
"Debug",
false);
287 desc.
add<
bool>(
"Famos",
false);
291 const std::string kComment(
"A value of -1 will make the module lookup the value of 'binOfMaximum' from the module 'ecalUnsuppressedDigis' from the process history. Allowed values are -1 and from 1-10.");
293 desc.
add<
int>(
"binOfMaximum",-1)->setComment(kComment);
const_reverse_iterator rbegin() const
unsigned long long cacheIdentifier() const
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
void endRun(const edm::Run &, const edm::EventSetup &) override
void beginRun(const edm::Run &run, const edm::EventSetup &es) override
bool getByToken(EDGetToken token, Handle< PROD > &result) const
static int findBinOfMaximum(bool iFillFromHistory, int iPSetValue, edm::ProcessHistory const &iHistory)
std::string print(const Track &, edm::Verbosity=edm::Concise)
Track print utility.
ParameterSet const & getParameterSet(ParameterSetID const &id)
def setup(process, global_tag, zero_tesla=False)
EcalTrigPrimProducer(const edm::ParameterSet &conf)
~EcalTrigPrimProducer() override
std::unique_ptr< EcalTrigPrimFunctionalAlgo > algo_
void produce(edm::Event &e, const edm::EventSetup &c) override
unsigned long long cacheID_
bool fillBinOfMaximumFromHistory_
void addDefault(ParameterSetDescription const &psetDescription)
const_reverse_iterator rend() const
unsigned long long getRecords(edm::EventSetup const &setup)
static const char *const kComment
ProcessHistory const & processHistory() const
ParameterDescriptionBase * add(U const &iLabel, T const &value)
edm::EDGetTokenT< EBDigiCollection > tokenEB_
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
T const * product() const
void labelsForToken(EDGetToken iToken, Labels &oLabels) const
char const * productInstance
edm::EDGetTokenT< EEDigiCollection > tokenEE_
T const * product() const
static std::string topLevelPSet(std::string const &iName, edm::ParameterSet const &iProcessConfig, std::string const &iProcessName)