test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Types | Public Member Functions | Private Attributes
VariableHelper Class Reference

#include <VariableHelper.h>

Public Types

typedef std::map< std::string,
const CachingVariable * >
::const_iterator 
iterator
 

Public Member Functions

iterator begin ()
 
iterator end ()
 
void print () const
 
std::string printValues (const edm::Event &event) const
 
void setHolder (std::string hn)
 
const CachingVariablevariable (std::string name) const
 
 VariableHelper (const edm::ParameterSet &iConfig, edm::ConsumesCollector &iC)
 
 ~VariableHelper ()
 

Private Attributes

std::map< std::string, const
CachingVariable * > 
variables_
 

Detailed Description

Definition at line 10 of file VariableHelper.h.

Member Typedef Documentation

typedef std::map<std::string,const CachingVariable*>::const_iterator VariableHelper::iterator

Definition at line 18 of file VariableHelper.h.

Constructor & Destructor Documentation

VariableHelper::VariableHelper ( const edm::ParameterSet iConfig,
edm::ConsumesCollector iC 
)

Definition at line 9 of file VariableHelper.cc.

References reco::get(), edm::ParameterSet::getParameter(), edm::ParameterSet::getParameterSetNames(), i, PFRecoTauDiscriminationAgainstElectronMVA3GBR_cfi::method, AlCaHLTBitMon_QueryRunRegistry::string, and variables_.

9  {
10  std::vector<std::string> psetNames;
11  iConfig.getParameterSetNames(psetNames);
12  for (unsigned int i=0;i!=psetNames.size();++i){
13  std::string & vname=psetNames[i];
14  edm::ParameterSet vPset=iConfig.getParameter<edm::ParameterSet>(psetNames[i]);
15  std::string method=vPset.getParameter<std::string>("method");
16 
18  }
19 
20 }
T getParameter(std::string const &) const
int i
Definition: DBlmapReader.cc:9
std::map< std::string, const CachingVariable * > variables_
size_t getParameterSetNames(std::vector< std::string > &output, bool trackiness=true) const
T get(const Candidate &c)
Definition: component.h:55
VariableHelper::~VariableHelper ( )
inline

Definition at line 13 of file VariableHelper.h.

References variables_.

13  {
14  for (iterator it = variables_.begin() ; it!=variables_.end() ;++it){
15  delete it->second;
16  }
17  }
std::map< std::string, const CachingVariable * > variables_
std::map< std::string, const CachingVariable * >::const_iterator iterator

Member Function Documentation

iterator VariableHelper::begin ( void  )
inline

Definition at line 22 of file VariableHelper.h.

References variables_.

22 { return variables_.begin();}
std::map< std::string, const CachingVariable * > variables_
iterator VariableHelper::end ( void  )
inline

Definition at line 23 of file VariableHelper.h.

References variables_.

23 { return variables_.end();}
std::map< std::string, const CachingVariable * > variables_
void VariableHelper::print ( void  ) const

Definition at line 28 of file VariableHelper.cc.

References variables_.

Referenced by VariableHelperService::init(), and variable().

28  {
29  iterator it = variables_.begin();
30  iterator it_end = variables_.end();
31  for (;it!=it_end;++it) it->second->print();
32 }
std::map< std::string, const CachingVariable * > variables_
std::map< std::string, const CachingVariable * >::const_iterator iterator
std::string VariableHelper::printValues ( const edm::Event event) const

Definition at line 34 of file VariableHelper.cc.

References event(), contentValuesCheck::ss, and variables_.

34  {
35  std::stringstream ss;
36  iterator it = variables_.begin();
37  iterator it_end = variables_.end();
38  ss<<std::setw(10)<<event.id().run()<<" : "
39  <<std::setw(10)<<event.id().event();
40  for (;it!=it_end;++it) {
41  if (it->second->compute(event))
42  ss<<" : "<<it->first<<"="<<(*it->second)(event);
43  else
44  ss<<" : "<<it->first<<" N/A";
45  }
46  return ss.str();
47 }
std::map< std::string, const CachingVariable * > variables_
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger but the state exists so we define the behavior If all triggers are the negative crieriion will lead to accepting the event(this again matches the behavior of"!*"before the partial wildcard feature was incorporated).The per-event"cost"of each negative criterion with multiple relevant triggers is about the same as!*was in the past
std::map< std::string, const CachingVariable * >::const_iterator iterator
void VariableHelper::setHolder ( std::string  hn)

Definition at line 22 of file VariableHelper.cc.

References variables_.

Referenced by VariableHelperService::init().

22  {
23  iterator it = variables_.begin();
24  iterator it_end = variables_.end();
25  for (;it!=it_end;++it) it->second->setHolder(hn);
26 }
std::map< std::string, const CachingVariable * > variables_
std::map< std::string, const CachingVariable * >::const_iterator iterator
const CachingVariable * VariableHelper::variable ( std::string  name) const

Definition at line 48 of file VariableHelper.cc.

References print(), findQualityFiles::v, and variables_.

48  {
49  iterator v=variables_.find(name);
50  if (v!=variables_.end())
51  return v->second;
52  else
53  {
54  edm::LogError("VariableHelper")<<"I don't know anything named: "<<name
55  <<" list of available variables follows.";
56  print();
57  return 0;
58  }
59 }
std::map< std::string, const CachingVariable * > variables_
void print() const
std::map< std::string, const CachingVariable * >::const_iterator iterator

Member Data Documentation

std::map<std::string,const CachingVariable*> VariableHelper::variables_
private