CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Attributes
reco::modules::RoleNames Struct Reference

#include <CandCombiner.h>

Public Member Functions

 RoleNames (const edm::ParameterSet &cfg)
 
const std::vector< std::string > roles () const
 
void set (reco::CompositeCandidate &c) const
 

Private Attributes

std::string name_
 Name of this candidate. More...
 
std::vector< std::string > roles_
 

Detailed Description

Definition at line 40 of file CandCombiner.h.

Constructor & Destructor Documentation

reco::modules::RoleNames::RoleNames ( const edm::ParameterSet cfg)
inlineexplicit

Definition at line 41 of file CandCombiner.h.

References edm::ParameterSet::exists(), edm::ParameterSet::getParameter(), name_, roles_, and AlCaHLTBitMon_QueryRunRegistry::string.

41  {
42 
43  if ( cfg.exists("name") )
44  name_ = cfg.getParameter<std::string>("name");
45  else
46  name_ = "";
47  if ( cfg.exists("roles") )
48  roles_ = cfg.getParameter<std::vector<std::string> >("roles");
49  else
50  roles_ = std::vector<std::string>();
51  }
T getParameter(std::string const &) const
bool exists(std::string const &parameterName) const
checks if a parameter exists
std::vector< std::string > roles_
Definition: CandCombiner.h:62
std::string name_
Name of this candidate.
Definition: CandCombiner.h:60

Member Function Documentation

const std::vector<std::string> reco::modules::RoleNames::roles ( ) const
inline

Definition at line 52 of file CandCombiner.h.

References roles_.

52 { return roles_; }
std::vector< std::string > roles_
Definition: CandCombiner.h:62
void reco::modules::RoleNames::set ( reco::CompositeCandidate c) const
inline

Definition at line 53 of file CandCombiner.h.

References reco::CompositeCandidate::applyRoles(), name_, roles_, reco::CompositeCandidate::setName(), and reco::CompositeCandidate::setRoles().

Referenced by betterConfigParser.BetterConfigParser::getGeneral().

53  {
54  c.setName(name_);
55  c.setRoles(roles_);
56  c.applyRoles();
57  }
void setRoles(const role_collection &roles)
set the roles
std::vector< std::string > roles_
Definition: CandCombiner.h:62
std::string name_
Name of this candidate.
Definition: CandCombiner.h:60
void setName(std::string name)
set the name of the candidate

Member Data Documentation

std::string reco::modules::RoleNames::name_
private

Name of this candidate.

Definition at line 60 of file CandCombiner.h.

Referenced by RoleNames(), and set().

std::vector<std::string> reco::modules::RoleNames::roles_
private

Definition at line 62 of file CandCombiner.h.

Referenced by RoleNames(), roles(), and set().