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<> edm::stream::EDProducerBase edm::ProducerBase edm::EDConsumerBase 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::stream::EDProducer<>
 EDProducer ()=default
 
- Public Member Functions inherited from edm::stream::EDProducerBase
 EDProducerBase ()
 
ModuleDescription const & moduleDescription () const
 
virtual ~EDProducerBase ()
 
- Public Member Functions inherited from edm::ProducerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
std::vector< edm::ProductResolverIndex > const & indiciesForPutProducts (BranchType iBranchType) const
 
 ProducerBase ()
 
void registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &)
 
std::function< void(BranchDescription const &)> registrationCallback () const
 used by the fwk to register list of products More...
 
void resolvePutIndicies (BranchType iBranchType, std::unordered_multimap< std::string, edm::ProductResolverIndex > const &iIndicies, std::string const &moduleLabel)
 
virtual ~ProducerBase () noexcept(false)
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
void convertCurrentProcessAlias (std::string const &processName)
 Convert "@currentProcess" in InputTag process names to the actual current process name. More...
 
 EDConsumerBase ()
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
 EDConsumerBase (EDConsumerBase &&)=default
 
ProductResolverIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
std::vector< ProductResolverIndexAndSkipBit > const & itemsToGetFrom (BranchType iType) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
virtual ~EDConsumerBase () noexcept(false)
 

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
 
- Public Types inherited from edm::stream::EDProducerBase
typedef EDProducerAdaptorBase ModuleType
 
- Public Types inherited from edm::ProducerBase
typedef ProductRegistryHelper::TypeLabelList TypeLabelList
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Static Public Member Functions inherited from edm::stream::EDProducerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 

Detailed Description

Definition at line 16 of file MuIsoDepositCopyProducer.h.

Constructor & Destructor Documentation

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

constructor

constructor with config

Definition at line 24 of file MuIsoDepositCopyProducer.cc.

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

24  :
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 }
#define LogDebug(id)
T getParameter(std::string const &) const
std::vector< edm::EDGetTokenT< reco::IsoDepositMap > > theInputTokens
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

Definition at line 51 of file MuIsoDepositCopyProducer.cc.

References DEFINE_FWK_MODULE, LogDebug, LogTrace, metname, eostools::move(), AlCaHLTBitMon_QueryRunRegistry::string, theDepositNames, and theInputTokens.

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 < theInputTokens.size(); ++iDep){
61  event.getByToken(theInputTokens[iDep], inDep);
62 
63  event.put(std::move(std::make_unique<reco::IsoDepositMap>(*inDep)), theDepositNames[iDep]);
64  }
65 
66  LogTrace(metname) <<" END OF EVENT " <<"================================";
67 }
#define LogDebug(id)
std::vector< edm::EDGetTokenT< reco::IsoDepositMap > > theInputTokens
const std::string metname
std::vector< std::string > theDepositNames
#define LogTrace(id)
def move(src, dest)
Definition: eostools.py:510

Member Data Documentation

edm::ParameterSet MuIsoDepositCopyProducer::theConfig
private

module configuration

Definition at line 31 of file MuIsoDepositCopyProducer.h.

Referenced by MuIsoDepositCopyProducer().

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

Definition at line 36 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 34 of file MuIsoDepositCopyProducer.h.

Referenced by MuIsoDepositCopyProducer().

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

Definition at line 35 of file MuIsoDepositCopyProducer.h.

Referenced by MuIsoDepositCopyProducer(), and produce().