#include <MuIsoDepositCopyProducer.h>
Public Member Functions | |
MuIsoDepositCopyProducer (const edm::ParameterSet &) | |
constructor | |
virtual void | produce (edm::Event &, const edm::EventSetup &) |
data making method | |
virtual | ~MuIsoDepositCopyProducer () |
destructor | |
Private Attributes | |
edm::ParameterSet | theConfig |
module configuration | |
std::vector< std::string > | theDepositNames |
std::vector< edm::InputTag > | theInputTags |
for backward compatibility: take one input module and |
Definition at line 13 of file MuIsoDepositCopyProducer.h.
MuIsoDepositCopyProducer::MuIsoDepositCopyProducer | ( | const edm::ParameterSet & | par | ) |
constructor
constructor with config
Definition at line 27 of file MuIsoDepositCopyProducer.cc.
References ExpressReco_HICollisions_FallBack::alias, Exception, edm::ParameterSet::getParameter(), i, LogDebug, theConfig, theDepositNames, and theInputTags.
: theConfig(par), theInputTags(par.getParameter<std::vector<edm::InputTag> >("inputTags")), theDepositNames(par.getParameter<std::vector<std::string> >("depositNames")) { LogDebug("RecoMuon|MuonIsolation")<<" MuIsoDepositCopyProducer CTOR"; if (theInputTags.size() != theDepositNames.size()){ throw cms::Exception("MuIsoDepositCopyProducer constructor")<<"the sizes of input/output vectors don't match"; } for (unsigned int i = 0; i < theDepositNames.size(); ++i){ std::string alias = theConfig.getParameter<std::string>("@module_label"); if (theDepositNames[i] != "") alias += "_" + theDepositNames[i]; produces<reco::IsoDepositMap>(theDepositNames[i]).setBranchAlias(alias); } }
MuIsoDepositCopyProducer::~MuIsoDepositCopyProducer | ( | ) | [virtual] |
destructor
Definition at line 46 of file MuIsoDepositCopyProducer.cc.
References LogDebug.
{ LogDebug("RecoMuon/MuIsoDepositCopyProducer")<<" MuIsoDepositCopyProducer DTOR"; }
void MuIsoDepositCopyProducer::produce | ( | edm::Event & | event, |
const edm::EventSetup & | eventSetup | ||
) | [virtual] |
data making method
build deposits
end iDep
Implements edm::EDProducer.
Definition at line 51 of file MuIsoDepositCopyProducer.cc.
References LogDebug, LogTrace, metname, theDepositNames, and theInputTags.
{ std::string metname = "RecoMuon|MuonIsolationProducers|MuIsoDepositCopyProducer"; LogDebug(metname)<<" Muon Deposit producing..." <<" BEGINING OF EVENT " <<"================================"; LogTrace(metname)<<" Taking the inputs: "; for (unsigned int iDep = 0; iDep < theInputTags.size(); ++iDep){ Handle<reco::IsoDepositMap > inDep; event.getByLabel(theInputTags[iDep], inDep); std::auto_ptr<reco::IsoDepositMap> outDep(new reco::IsoDepositMap(*inDep)); event.put(outDep, theDepositNames[iDep]); } LogTrace(metname) <<" END OF EVENT " <<"================================"; }
module configuration
Definition at line 28 of file MuIsoDepositCopyProducer.h.
Referenced by MuIsoDepositCopyProducer().
std::vector<std::string> MuIsoDepositCopyProducer::theDepositNames [private] |
Definition at line 32 of file MuIsoDepositCopyProducer.h.
Referenced by MuIsoDepositCopyProducer(), and produce().
std::vector<edm::InputTag> MuIsoDepositCopyProducer::theInputTags [private] |
for backward compatibility: take one input module and
Definition at line 31 of file MuIsoDepositCopyProducer.h.
Referenced by MuIsoDepositCopyProducer(), and produce().