50 virtual void endJob()
override ;
75 m_collectionToken(consumes<
ClusterSummary>(iConfig.getParameter<edm::InputTag>(
"clusterSummaryCollection"))),
76 m_subdets(),m_subdetenums(),m_subdetvars(),m_clustsummvar()
86 produces<std::map<unsigned int,int> >();
90 std::vector<edm::ParameterSet> wantedsubds(iConfig.
getParameter<std::vector<edm::ParameterSet> >(
"wantedSubDets"));
92 for(std::vector<edm::ParameterSet>::iterator ps=wantedsubds.begin();ps!=wantedsubds.end();++ps) {
93 m_subdets[ps->getParameter<
unsigned int>(
"detSelection")] = ps->getParameter<
std::string>(
"detLabel");
94 m_subdetenums[ps->getParameter<
unsigned int>(
"detSelection")] = ps->getParameter<
int >(
"subDetEnum");
117 LogDebug(
"Multiplicity") <<
" Ready to go";
121 std::auto_ptr<std::map<unsigned int,int> > mults(
new std::map<unsigned int,int> );
129 for(std::map<unsigned int,std::string>::const_iterator sdet=
m_subdets.begin();sdet!=
m_subdets.end();++sdet) { (*mults)[sdet->first]=0; }
134 (*mults)[detsel->first] = int(clustsumm->GetGenericVariable(
m_subdetvars[detsel->first],detsel->second));
135 LogDebug(
"Multiplicity") <<
"GetModuleLocation result: " << detsel->second <<
" " << clustsumm->GetModuleLocation(detsel->second);
140 for(std::map<unsigned int,int>::const_iterator it=mults->begin();it!=mults->end();++it) {
141 LogDebug(
"Multiplicity") <<
" Found " << it->second <<
" digis/clusters in " << it->first <<
" " <<
m_subdets[it->first];
std::map< unsigned int, std::string > m_subdetvars
T getParameter(std::string const &) const
edm::EDGetTokenT< ClusterSummary > m_collectionToken
bool getByToken(EDGetToken token, Handle< PROD > &result) const
#define DEFINE_FWK_MODULE(type)
std::vector< std::string > m_clustsummvar
virtual void endJob() override
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
std::map< unsigned int, int > m_subdetenums
std::map< unsigned int, std::string > m_subdets
~FromClusterSummaryMultiplicityProducer()
virtual void beginJob() override
virtual void produce(edm::Event &, const edm::EventSetup &) override
FromClusterSummaryMultiplicityProducer(const edm::ParameterSet &)