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
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndRuns () const final
 

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<>
typedef CacheContexts< T... > CacheTypes
 
typedef CacheTypes::GlobalCache GlobalCache
 
typedef AbilityChecker< T... > HasAbility
 
typedef CacheTypes::LuminosityBlockCache LuminosityBlockCache
 
typedef LuminosityBlockContextT< LuminosityBlockCache, RunCache, GlobalCacheLuminosityBlockContext
 
typedef CacheTypes::LuminosityBlockSummaryCache LuminosityBlockSummaryCache
 
typedef CacheTypes::RunCache RunCache
 
typedef RunContextT< RunCache, GlobalCacheRunContext
 
typedef CacheTypes::RunSummaryCache 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 21 of file MuIsoDepositCopyProducer.cc.

22  : theConfig(par),
23  theInputTags(par.getParameter<std::vector<edm::InputTag> >("inputTags")),
24  theDepositNames(par.getParameter<std::vector<std::string> >("depositNames"))
25 
26 {
27  LogDebug("RecoMuon|MuonIsolation") << " MuIsoDepositCopyProducer CTOR";
28  if (theInputTags.size() != theDepositNames.size()) {
29  throw cms::Exception("MuIsoDepositCopyProducer constructor") << "the sizes of input/output vectors don't match";
30  }
31 
32  for (unsigned int i = 0; i < theDepositNames.size(); ++i) {
34  if (!theDepositNames[i].empty())
35  alias += "_" + theDepositNames[i];
36  produces<reco::IsoDepositMap>(theDepositNames[i]).setBranchAlias(alias);
37  }
38  for (unsigned int iDep = 0; iDep < theInputTags.size(); ++iDep)
39  theInputTokens.push_back(consumes<reco::IsoDepositMap>(theInputTags.at(iDep)));
40 }

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

◆ ~MuIsoDepositCopyProducer()

MuIsoDepositCopyProducer::~MuIsoDepositCopyProducer ( )
override

destructor

Definition at line 43 of file MuIsoDepositCopyProducer.cc.

43  {
44  LogDebug("RecoMuon/MuIsoDepositCopyProducer") << " MuIsoDepositCopyProducer DTOR";
45 }

References LogDebug.

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 48 of file MuIsoDepositCopyProducer.cc.

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

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

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

mps_fire.i
i
Definition: mps_fire.py:355
edm::Handle
Definition: AssociativeIterator.h:50
MuIsoDepositCopyProducer::theConfig
edm::ParameterSet theConfig
module configuration
Definition: MuIsoDepositCopyProducer.h:33
MuIsoDepositCopyProducer::theDepositNames
std::vector< std::string > theDepositNames
Definition: MuIsoDepositCopyProducer.h:38
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
LogDebug
#define LogDebug(id)
Definition: MessageLogger.h:670
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
SiStripOfflineCRack_cfg.alias
alias
Definition: SiStripOfflineCRack_cfg.py:129
relativeConstraints.empty
bool empty
Definition: relativeConstraints.py:46
Exception
Definition: hltDiff.cc:246
MuIsoDepositCopyProducer::theInputTokens
std::vector< edm::EDGetTokenT< reco::IsoDepositMap > > theInputTokens
Definition: MuIsoDepositCopyProducer.h:37
LogTrace
#define LogTrace(id)
Definition: MessageLogger.h:671
MuIsoDepositCopyProducer::theInputTags
std::vector< edm::InputTag > theInputTags
for backward compatibility: take one input module and
Definition: MuIsoDepositCopyProducer.h:36
metname
const std::string metname
Definition: MuonSeedOrcaPatternRecognition.cc:43