CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
MuIsoDepositCopyProducer.cc
Go to the documentation of this file.
2 
3 // Framework
8 
10 
14 
15 
17 
19 #include <string>
20 
21 using namespace edm;
22 using namespace std;
23 using namespace reco;
24 
25 
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 }
44 
47  LogDebug("RecoMuon/MuIsoDepositCopyProducer")<<" MuIsoDepositCopyProducer DTOR";
48 }
49 
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 }
69 
#define LogDebug(id)
T getParameter(std::string const &) const
int i
Definition: DBlmapReader.cc:9
const std::string metname
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:17
std::vector< std::string > theDepositNames
virtual void produce(edm::Event &, const edm::EventSetup &)
data making method
virtual ~MuIsoDepositCopyProducer()
destructor
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger but the state exists so we define the behavior If all triggers are the negative crieriion will lead to accepting the event(this again matches the behavior of"!*"before the partial wildcard feature was incorporated).The per-event"cost"of each negative criterion with multiple relevant triggers is about the same as!*was in the past
#define LogTrace(id)
edm::ParameterSet theConfig
module configuration
MuIsoDepositCopyProducer(const edm::ParameterSet &)
constructor
std::vector< edm::InputTag > theInputTags
for backward compatibility: take one input module and