CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Attributes
MuIsoDepositCopyProducer Class Reference

#include <MuIsoDepositCopyProducer.h>

Inheritance diagram for MuIsoDepositCopyProducer:
edm::EDProducer edm::ProducerBase edm::ProductRegistryHelper

Public Member Functions

 MuIsoDepositCopyProducer (const edm::ParameterSet &)
 constructor More...
 
virtual void produce (edm::Event &, const edm::EventSetup &)
 data making method More...
 
virtual ~MuIsoDepositCopyProducer ()
 destructor More...
 
- Public Member Functions inherited from edm::EDProducer
 EDProducer ()
 
virtual ~EDProducer ()
 
- Public Member Functions inherited from edm::ProducerBase
 ProducerBase ()
 
void registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &)
 
boost::function< void(const
BranchDescription &)> 
registrationCallback () const
 used by the fwk to register list of products More...
 
virtual ~ProducerBase ()
 

Private Attributes

edm::ParameterSet theConfig
 module configuration More...
 
std::vector< std::string > theDepositNames
 
std::vector< edm::InputTagtheInputTags
 for backward compatibility: take one input module and More...
 

Additional Inherited Members

- Public Types inherited from edm::EDProducer
typedef EDProducer ModuleType
 
typedef WorkerT< EDProducerWorkerType
 
- Public Types inherited from edm::ProducerBase
typedef
ProductRegistryHelper::TypeLabelList 
TypeLabelList
 
- Static Public Member Functions inherited from edm::EDProducer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
- Protected Member Functions inherited from edm::EDProducer
CurrentProcessingContext const * currentContext () const
 
- Protected Member Functions inherited from edm::ProducerBase
template<class TProducer , class TMethod >
void callWhenNewProductsRegistered (TProducer *iProd, TMethod iMethod)
 

Detailed Description

Definition at line 13 of file MuIsoDepositCopyProducer.h.

Constructor & Destructor Documentation

MuIsoDepositCopyProducer::MuIsoDepositCopyProducer ( const edm::ParameterSet par)

constructor

constructor with config

Definition at line 27 of file MuIsoDepositCopyProducer.cc.

References edm::hlt::Exception, edm::ParameterSet::getParameter(), i, LogDebug, theConfig, theDepositNames, and theInputTags.

27  :
28  theConfig(par),
29  theInputTags(par.getParameter<std::vector<edm::InputTag> >("inputTags")),
30  theDepositNames(par.getParameter<std::vector<std::string> >("depositNames"))
31 
32 {
33  LogDebug("RecoMuon|MuonIsolation")<<" MuIsoDepositCopyProducer CTOR";
34  if (theInputTags.size() != theDepositNames.size()){
35  throw cms::Exception("MuIsoDepositCopyProducer constructor")<<"the sizes of input/output vectors don't match";
36  }
37 
38  for (unsigned int i = 0; i < theDepositNames.size(); ++i){
39  std::string alias = theConfig.getParameter<std::string>("@module_label");
40  if (theDepositNames[i] != "") alias += "_" + theDepositNames[i];
41  produces<reco::IsoDepositMap>(theDepositNames[i]).setBranchAlias(alias);
42  }
43 }
#define LogDebug(id)
T getParameter(std::string const &) const
int i
Definition: DBlmapReader.cc:9
std::vector< std::string > theDepositNames
edm::ParameterSet theConfig
module configuration
std::vector< edm::InputTag > theInputTags
for backward compatibility: take one input module and
MuIsoDepositCopyProducer::~MuIsoDepositCopyProducer ( )
virtual

destructor

Definition at line 46 of file MuIsoDepositCopyProducer.cc.

References LogDebug.

46  {
47  LogDebug("RecoMuon/MuIsoDepositCopyProducer")<<" MuIsoDepositCopyProducer DTOR";
48 }
#define LogDebug(id)

Member Function Documentation

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.

51  {
52  std::string metname = "RecoMuon|MuonIsolationProducers|MuIsoDepositCopyProducer";
53 
54  LogDebug(metname)<<" Muon Deposit producing..."
55  <<" BEGINING OF EVENT " <<"================================";
56 
57  LogTrace(metname)<<" Taking the inputs: ";
58 
59  for (unsigned int iDep = 0; iDep < theInputTags.size(); ++iDep){
61  event.getByLabel(theInputTags[iDep], inDep);
62 
63  std::auto_ptr<reco::IsoDepositMap> outDep(new reco::IsoDepositMap(*inDep));
64  event.put(outDep, theDepositNames[iDep]);
65  }
66 
67  LogTrace(metname) <<" END OF EVENT " <<"================================";
68 }
#define LogDebug(id)
const std::string metname
std::vector< std::string > theDepositNames
#define LogTrace(id)
std::vector< edm::InputTag > theInputTags
for backward compatibility: take one input module and

Member Data Documentation

edm::ParameterSet MuIsoDepositCopyProducer::theConfig
private

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().