CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
EfficiencyLoader.cc
Go to the documentation of this file.
2 
3 #include <algorithm>
4 
6 
7 EfficiencyLoader::EfficiencyLoader(const edm::ParameterSet &iConfig)
8 {
9  // Get the names (sorted)
11  std::sort(names_.begin(), names_.end());
12 
13  // get the InputTags
14  for (std::vector<std::string>::const_iterator it = names_.begin(), ed = names_.end(); it != ed; ++it) {
15  tags_.push_back( iConfig.getParameter<edm::InputTag>(*it) );
16  }
17 
18  // prepare the Handles
19  handles_.resize(names_.size());
20 }
21 
22 void
24  for (size_t i = 0, n = names_.size(); i < n; ++i) {
25  iEvent.getByLabel(tags_[i], handles_[i]);
26  }
27 }
T getParameter(std::string const &) const
int i
Definition: DBlmapReader.cc:9
std::vector< std::string > names_
std::vector< std::string > getParameterNamesForType(bool trackiness=true) const
Definition: ParameterSet.h:188
int iEvent
Definition: GenABIO.cc:243
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:359
std::vector< edm::Handle< edm::ValueMap< pat::LookupTableRecord > > > handles_
std::vector< edm::InputTag > tags_
void newEvent(const edm::Event &event) const
To be called for each new event, reads in the ValueMaps for efficiencies.