test
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 41 of file CandCombiner.h.

Constructor & Destructor Documentation

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

Definition at line 42 of file CandCombiner.h.

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

42  {
43 
44  if ( cfg.exists("name") )
45  name_ = cfg.getParameter<std::string>("name");
46  else
47  name_ = "";
48  if ( cfg.exists("roles") )
49  roles_ = cfg.getParameter<std::vector<std::string> >("roles");
50  else
51  roles_ = std::vector<std::string>();
52  }
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:63
std::string name_
Name of this candidate.
Definition: CandCombiner.h:61

Member Function Documentation

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

Definition at line 53 of file CandCombiner.h.

References roles_.

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

Definition at line 54 of file CandCombiner.h.

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

54  {
55  c.setName(name_);
56  c.setRoles(roles_);
57  c.applyRoles();
58  }
void setRoles(const role_collection &roles)
set the roles
std::vector< std::string > roles_
Definition: CandCombiner.h:63
std::string name_
Name of this candidate.
Definition: CandCombiner.h:61
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 61 of file CandCombiner.h.

Referenced by RoleNames(), and set().

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

Definition at line 63 of file CandCombiner.h.

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