test
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 
11 
12 
14 
16 #include <string>
17 
18 using namespace edm;
19 using namespace std;
20 using namespace reco;
21 
22 
25  theConfig(par),
26  theInputTags(par.getParameter<std::vector<edm::InputTag> >("inputTags")),
27  theDepositNames(par.getParameter<std::vector<std::string> >("depositNames"))
28 
29 {
30  LogDebug("RecoMuon|MuonIsolation")<<" MuIsoDepositCopyProducer CTOR";
31  if (theInputTags.size() != theDepositNames.size()){
32  throw cms::Exception("MuIsoDepositCopyProducer constructor")<<"the sizes of input/output vectors don't match";
33  }
34 
35  for (unsigned int i = 0; i < theDepositNames.size(); ++i){
37  if (theDepositNames[i] != "") alias += "_" + theDepositNames[i];
38  produces<reco::IsoDepositMap>(theDepositNames[i]).setBranchAlias(alias);
39  }
40  for (unsigned int iDep = 0; iDep < theInputTags.size(); ++iDep)
41  theInputTokens.push_back(consumes<reco::IsoDepositMap>(theInputTags.at(iDep)));
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 < theInputTokens.size(); ++iDep){
61  event.getByToken(theInputTokens[iDep], inDep);
62 
63  std::unique_ptr<reco::IsoDepositMap> outDep(new reco::IsoDepositMap(*inDep));
64  event.put(std::move(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
std::vector< edm::EDGetTokenT< reco::IsoDepositMap > > theInputTokens
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
def move
Definition: eostools.py:510
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