CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
pat::helper::EfficiencyLoader Class Reference

#include <EfficiencyLoader.h>

Public Member Functions

 EfficiencyLoader ()
 Empty constructor. More...
 
 EfficiencyLoader (const edm::ParameterSet &iConfig, edm::ConsumesCollector &&iC)
 Constructor from a PSet. More...
 
bool enabled () const
 'true' if this there is at least one efficiency configured More...
 
void newEvent (const edm::Event &event)
 To be called for each new event, reads in the ValueMaps for efficiencies. More...
 
template<typename T , typename R >
void setEfficiencies (pat::PATObject< T > &obj, const R &originalRef) const
 Sets the efficiencies for this object, using the reference to the original objects. More...
 

Private Attributes

std::vector< edm::Handle< edm::ValueMap< pat::LookupTableRecord > > > handles_
 
std::vector< std::string > names_
 
std::vector< edm::EDGetTokenT< edm::ValueMap< pat::LookupTableRecord > > > tokens_
 

Detailed Description

Definition at line 16 of file EfficiencyLoader.h.

Constructor & Destructor Documentation

◆ EfficiencyLoader() [1/2]

pat::helper::EfficiencyLoader::EfficiencyLoader ( )
inline

Empty constructor.

Definition at line 19 of file EfficiencyLoader.h.

19 {}

◆ EfficiencyLoader() [2/2]

EfficiencyLoader::EfficiencyLoader ( const edm::ParameterSet iConfig,
edm::ConsumesCollector &&  iC 
)

Constructor from a PSet.

Definition at line 7 of file EfficiencyLoader.cc.

7  {
8  // Get the names (sorted)
10  std::sort(names_.begin(), names_.end());
11 
12  // get the InputTags
13  for (std::vector<std::string>::const_iterator it = names_.begin(), ed = names_.end(); it != ed; ++it) {
15  }
16 
17  // prepare the Handles
18  handles_.resize(names_.size());
19 }

References edm::ParameterSet::getParameter(), edm::ParameterSet::getParameterNamesForType(), handles_, names_, jetUpdater_cfi::sort, and tokens_.

Member Function Documentation

◆ enabled()

bool pat::helper::EfficiencyLoader::enabled ( ) const
inline

◆ newEvent()

void EfficiencyLoader::newEvent ( const edm::Event event)

◆ setEfficiencies()

template<typename T , typename R >
void pat::helper::EfficiencyLoader::setEfficiencies ( pat::PATObject< T > &  obj,
const R &  originalRef 
) const

Member Data Documentation

◆ handles_

std::vector<edm::Handle<edm::ValueMap<pat::LookupTableRecord> > > pat::helper::EfficiencyLoader::handles_
private

Definition at line 37 of file EfficiencyLoader.h.

Referenced by EfficiencyLoader(), newEvent(), and setEfficiencies().

◆ names_

std::vector<std::string> pat::helper::EfficiencyLoader::names_
private

Definition at line 35 of file EfficiencyLoader.h.

Referenced by EfficiencyLoader(), enabled(), newEvent(), and setEfficiencies().

◆ tokens_

std::vector<edm::EDGetTokenT<edm::ValueMap<pat::LookupTableRecord> > > pat::helper::EfficiencyLoader::tokens_
private

Definition at line 36 of file EfficiencyLoader.h.

Referenced by EfficiencyLoader(), and newEvent().

mps_fire.i
i
Definition: mps_fire.py:428
dqmiodumpmetadata.n
n
Definition: dqmiodumpmetadata.py:28
edm::ConsumesCollector::consumes
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
Definition: ConsumesCollector.h:55
getGTfromDQMFile.obj
obj
Definition: getGTfromDQMFile.py:32
jetUpdater_cfi.sort
sort
Definition: jetUpdater_cfi.py:29
pat::helper::EfficiencyLoader::handles_
std::vector< edm::Handle< edm::ValueMap< pat::LookupTableRecord > > > handles_
Definition: EfficiencyLoader.h:37
edm::ParameterSet::getParameterNamesForType
std::vector< std::string > getParameterNamesForType(bool trackiness=true) const
Definition: ParameterSet.h:179
iEvent
int iEvent
Definition: GenABIO.cc:224
pat::helper::EfficiencyLoader::names_
std::vector< std::string > names_
Definition: EfficiencyLoader.h:35
edm::ValueMap
Definition: ValueMap.h:107
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
pat::helper::EfficiencyLoader::tokens_
std::vector< edm::EDGetTokenT< edm::ValueMap< pat::LookupTableRecord > > > tokens_
Definition: EfficiencyLoader.h:36
edm::InputTag
Definition: InputTag.h:15