63 barrelOnly_(iConfig.getParameter<bool>(
"BarrelOnly")),
64 tcpFormat_(iConfig.getParameter<bool>(
"TcpOutput")),
65 debug_(iConfig.getParameter<bool>(
"Debug")),
66 famos_(iConfig.getParameter<bool>(
"Famos")),
67 label_(iConfig.getParameter<std::
string>(
"Label")),
68 instanceNameEB_(iConfig.getParameter<std::
string>(
"InstanceEB")),
69 instanceNameEE_(iConfig.getParameter<std::
string>(
"InstanceEE")),
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);
229 if (!barrel && !endcap) {
233 if (!
barrelOnly_)
LogDebug(
"EcalTPG") <<
" =================> Treating event "<<e.
id()<<
", Number of EBDataFrames "<<ebDigis.
product()->size()<<
", Number of EEDataFrames "<<eeDigis.
product()->size() ;
234 else LogDebug(
"EcalTPG") <<
" =================> Treating event "<<e.
id()<<
", Number of EBDataFrames "<<ebDigis.
product()->size();
246 algo_->run(iSetup,ebdc,*pOut,*pOutTcp);
251 algo_->run(iSetup,eedc,*pOut,*pOutTcp);
254 edm::LogInfo(
"produce") <<
"For Barrel + Endcap, "<<pOut->size()<<
" TP Digis were produced";
258 for (
unsigned int i=0;
i<pOut->size();++
i) {
260 for (
int isam=0;isam<(*pOut)[
i].size();++isam) {
261 if ((*pOut)[
i][isam].raw()) print=
true;
263 if (print)
LogDebug(
"EcalTPG") <<
" For tower "<<(((*pOut)[
i])).id()<<
", TP is "<<(*pOut)[
i];
265 if (
barrelOnly_)
LogDebug(
"EcalTPG") <<
"\n =================> For Barrel , "<<pOut->size()<<
" TP Digis were produced (including zero ones)";
266 else LogDebug(
"EcalTPG") <<
"\n =================> For Barrel + Endcap, "<<pOut->size()<<
" TP Digis were produced (including zero ones)";
278 desc.
add<
bool>(
"BarrelOnly",
false);
279 desc.
add<
bool>(
"TcpOutput",
false);
280 desc.
add<
bool>(
"Debug",
false);
281 desc.
add<
bool>(
"Famos",
false);
285 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.");
287 desc.
add<
int>(
"binOfMaximum",-1)->setComment(kComment);
const_reverse_iterator rbegin() const
std::string instanceNameEE_
unsigned long long cacheIdentifier() const
void endRun(const edm::Run &, const edm::EventSetup &) override
void beginRun(const edm::Run &run, const edm::EventSetup &es) override
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)
EcalTrigPrimProducer(const edm::ParameterSet &conf)
std::string instanceNameEB_
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
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
virtual ~EcalTrigPrimProducer()
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)
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
T const * product() const
T const * product() const
void setup(std::vector< TH2F > &depth, std::string name, std::string units="")
static std::string topLevelPSet(std::string const &iName, edm::ParameterSet const &iProcessConfig, std::string const &iProcessName)