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
HLTBitVariable Class Reference

#include <TriggerVariables.h>

Inheritance diagram for HLTBitVariable:
CachingVariable

Public Member Functions

CachingVariable::evalType eval (const edm::Event &iEvent) const
 
 HLTBitVariable (CachingVariableFactoryArg arg, edm::ConsumesCollector &iC)
 
- Public Member Functions inherited from CachingVariable
void addDescriptionLine (const std::string &s)
 
 CachingVariable (std::string m, std::string n, const edm::ParameterSet &iConfig, edm::ConsumesCollector &iC)
 
bool compute (const edm::Event &iEvent) const
 
const Descriptiondescription () const
 
const std::string & holderName () const
 
const std::string & method () const
 
const std::string & name () const
 
valueType operator() (const edm::Event &iEvent) const
 
void print () const
 
void setHolder (std::string hn) const
 
virtual ~CachingVariable ()
 

Private Attributes

std::string bitName_
 
edm::EDGetTokenT
< edm::TriggerResults
src_
 

Additional Inherited Members

- Public Types inherited from CachingVariable
typedef std::pair< bool,
valueType
evalType
 
typedef double valueType
 
typedef std::map< std::string,
const CachingVariable * > 
vMap
 
- Protected Member Functions inherited from CachingVariable
evalTypebaseEval (const edm::Event &iEvent) const
 
bool notSeenThisEventAlready (const edm::Event &iEvent) const
 
void setCache (valueType &v) const
 
void setNotCompute () const
 
- Protected Attributes inherited from CachingVariable
evalType cache_
 
edm::ParameterSet conf_
 
Description d_
 
edm::Event::CacheIdentifier_t eventCacheID_ =0
 
std::string holderName_
 
std::string method_
 
std::string name_
 

Detailed Description

Definition at line 92 of file TriggerVariables.h.

Constructor & Destructor Documentation

HLTBitVariable::HLTBitVariable ( CachingVariableFactoryArg  arg,
edm::ConsumesCollector iC 
)
inline

Definition at line 94 of file TriggerVariables.h.

References CachingVariable::CachingVariableFactoryArg::m, and CachingVariable::CachingVariableFactoryArg::n.

94  :
95  CachingVariable("HLTBitVariable",arg.n,arg.iConfig,iC),
97  bitName_(arg.n){ arg.m[arg.n]=this;}
CachingVariable(std::string m, std::string n, const edm::ParameterSet &iConfig, edm::ConsumesCollector &iC)
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
edm::EDGetTokenT< edm::TriggerResults > src_
A arg
Definition: Factorize.h:36
std::string bitName_

Member Function Documentation

CachingVariable::evalType HLTBitVariable::eval ( const edm::Event iEvent) const
inlinevirtual

Reimplemented from CachingVariable.

Definition at line 98 of file TriggerVariables.h.

References bitName_, edm::HandleBase::failedToGet(), edm::Event::getByToken(), cmsHarvester::index, edm::TriggerNames::size(), src_, edm::TriggerNames::triggerIndex(), and edm::Event::triggerNames().

98  {
100  iEvent.getByToken(src_, hltHandle);
101  if (hltHandle.failedToGet()) return std::make_pair(false,0);
102  const edm::TriggerNames & trgNames = iEvent.triggerNames(*hltHandle);
103  unsigned int index = trgNames.triggerIndex(bitName_);
104  if ( index==trgNames.size() ) return std::make_pair(false,0);
105  else return std::make_pair(true, hltHandle->accept(index));
106 
107  }
virtual edm::TriggerNames const & triggerNames(edm::TriggerResults const &triggerResults) const
Definition: Event.cc:215
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:462
edm::EDGetTokenT< edm::TriggerResults > src_
Strings::size_type size() const
Definition: TriggerNames.cc:39
unsigned int triggerIndex(std::string const &name) const
Definition: TriggerNames.cc:32
bool failedToGet() const
Definition: HandleBase.h:79
std::string bitName_

Member Data Documentation

std::string HLTBitVariable::bitName_
private

Definition at line 110 of file TriggerVariables.h.

Referenced by eval().

edm::EDGetTokenT<edm::TriggerResults> HLTBitVariable::src_
private

Definition at line 109 of file TriggerVariables.h.

Referenced by eval().