CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
MuIsoDepositCopyProducer Class Reference

#include <MuIsoDepositCopyProducer.h>

Inheritance diagram for MuIsoDepositCopyProducer:
edm::stream::EDProducer<>

Public Member Functions

 MuIsoDepositCopyProducer (const edm::ParameterSet &)
 constructor More...
 
void produce (edm::Event &, const edm::EventSetup &) override
 data making method More...
 
 ~MuIsoDepositCopyProducer () override
 destructor More...
 
- Public Member Functions inherited from edm::stream::EDProducer<>
 EDProducer ()=default
 
 EDProducer (const EDProducer &)=delete
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginProcessBlocks () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndProcessBlocks () const final
 
bool hasAbilityToProduceInEndRuns () const final
 
const EDProduceroperator= (const EDProducer &)=delete
 

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...
 
std::vector< edm::EDGetTokenT< reco::IsoDepositMap > > theInputTokens
 

Additional Inherited Members

- Public Types inherited from edm::stream::EDProducer<>
using CacheTypes = CacheContexts< T... >
 
using GlobalCache = typename CacheTypes::GlobalCache
 
using HasAbility = AbilityChecker< T... >
 
using InputProcessBlockCache = typename CacheTypes::InputProcessBlockCache
 
using LuminosityBlockCache = typename CacheTypes::LuminosityBlockCache
 
using LuminosityBlockContext = LuminosityBlockContextT< LuminosityBlockCache, RunCache, GlobalCache >
 
using LuminosityBlockSummaryCache = typename CacheTypes::LuminosityBlockSummaryCache
 
using RunCache = typename CacheTypes::RunCache
 
using RunContext = RunContextT< RunCache, GlobalCache >
 
using RunSummaryCache = typename CacheTypes::RunSummaryCache
 

Detailed Description

Definition at line 20 of file MuIsoDepositCopyProducer.h.

Constructor & Destructor Documentation

◆ MuIsoDepositCopyProducer()

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

constructor

constructor with config

Definition at line 18 of file MuIsoDepositCopyProducer.cc.

References SiStripOfflineCRack_cfg::alias, relativeConstraints::empty, Exception, edm::ParameterSet::getParameter(), mps_fire::i, LogDebug, AlCaHLTBitMon_QueryRunRegistry::string, theConfig, theDepositNames, theInputTags, and theInputTokens.

19  : theConfig(par),
20  theInputTags(par.getParameter<std::vector<edm::InputTag> >("inputTags")),
21  theDepositNames(par.getParameter<std::vector<std::string> >("depositNames"))
22 
23 {
24  LogDebug("RecoMuon|MuonIsolation") << " MuIsoDepositCopyProducer CTOR";
25  if (theInputTags.size() != theDepositNames.size()) {
26  throw cms::Exception("MuIsoDepositCopyProducer constructor") << "the sizes of input/output vectors don't match";
27  }
28 
29  for (unsigned int i = 0; i < theDepositNames.size(); ++i) {
31  if (!theDepositNames[i].empty())
32  alias += "_" + theDepositNames[i];
33  produces<reco::IsoDepositMap>(theDepositNames[i]).setBranchAlias(alias);
34  }
35  for (unsigned int iDep = 0; iDep < theInputTags.size(); ++iDep)
36  theInputTokens.push_back(consumes<reco::IsoDepositMap>(theInputTags.at(iDep)));
37 }
std::vector< edm::EDGetTokenT< reco::IsoDepositMap > > theInputTokens
T getParameter(std::string const &) const
Definition: ParameterSet.h:307
std::vector< std::string > theDepositNames
edm::ParameterSet theConfig
module configuration
std::vector< edm::InputTag > theInputTags
for backward compatibility: take one input module and
#define LogDebug(id)

◆ ~MuIsoDepositCopyProducer()

MuIsoDepositCopyProducer::~MuIsoDepositCopyProducer ( )
override

destructor

Definition at line 40 of file MuIsoDepositCopyProducer.cc.

References LogDebug.

40  {
41  LogDebug("RecoMuon/MuIsoDepositCopyProducer") << " MuIsoDepositCopyProducer DTOR";
42 }
#define LogDebug(id)

Member Function Documentation

◆ produce()

void MuIsoDepositCopyProducer::produce ( edm::Event event,
const edm::EventSetup eventSetup 
)
override

data making method

build deposits

end iDep

Definition at line 45 of file MuIsoDepositCopyProducer.cc.

References LogDebug, LogTrace, metname, AlCaHLTBitMon_QueryRunRegistry::string, theDepositNames, and theInputTokens.

45  {
46  std::string metname = "RecoMuon|MuonIsolationProducers|MuIsoDepositCopyProducer";
47 
48  LogDebug(metname) << " Muon Deposit producing..."
49  << " BEGINING OF EVENT "
50  << "================================";
51 
52  LogTrace(metname) << " Taking the inputs: ";
53 
54  for (unsigned int iDep = 0; iDep < theInputTokens.size(); ++iDep) {
56  event.getByToken(theInputTokens[iDep], inDep);
57 
58  event.put(std::make_unique<reco::IsoDepositMap>(*inDep), theDepositNames[iDep]);
59  }
60 
61  LogTrace(metname) << " END OF EVENT "
62  << "================================";
63 }
std::vector< edm::EDGetTokenT< reco::IsoDepositMap > > theInputTokens
const std::string metname
std::vector< std::string > theDepositNames
#define LogTrace(id)
#define LogDebug(id)

Member Data Documentation

◆ theConfig

edm::ParameterSet MuIsoDepositCopyProducer::theConfig
private

module configuration

Definition at line 33 of file MuIsoDepositCopyProducer.h.

Referenced by MuIsoDepositCopyProducer().

◆ theDepositNames

std::vector<std::string> MuIsoDepositCopyProducer::theDepositNames
private

Definition at line 38 of file MuIsoDepositCopyProducer.h.

Referenced by MuIsoDepositCopyProducer(), and produce().

◆ theInputTags

std::vector<edm::InputTag> MuIsoDepositCopyProducer::theInputTags
private

for backward compatibility: take one input module and

Definition at line 36 of file MuIsoDepositCopyProducer.h.

Referenced by MuIsoDepositCopyProducer().

◆ theInputTokens

std::vector<edm::EDGetTokenT<reco::IsoDepositMap> > MuIsoDepositCopyProducer::theInputTokens
private

Definition at line 37 of file MuIsoDepositCopyProducer.h.

Referenced by MuIsoDepositCopyProducer(), and produce().