75 m_collection(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");
95 m_subdetvars[ps->getParameter<
unsigned int>(
"detSelection")] = ps->getParameter<std::string>(
"subDetVariable");
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
#define DEFINE_FWK_MODULE(type)
std::vector< std::string > m_clustsummvar
edm::InputTag m_collection
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
virtual void produce(edm::Event &, const edm::EventSetup &)
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
std::map< unsigned int, int > m_subdetenums
std::map< unsigned int, std::string > m_subdets
~FromClusterSummaryMultiplicityProducer()
FromClusterSummaryMultiplicityProducer(const edm::ParameterSet &)