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)
 
- Public Member Functions inherited from CachingVariable
void addDescriptionLine (const std::string &s)
 
 CachingVariable (std::string m, std::string n, const edm::ParameterSet &iConfig)
 
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::InputTag 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
 
void setCache (valueType &v) const
 
void setNotCompute () const
 
- Protected Attributes inherited from CachingVariable
evalType cache_
 
edm::ParameterSet conf_
 
Description d_
 
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)
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),
96  src_(edm::Service<InputTagDistributorService>()->retrieve("src",arg.iConfig)),
97  bitName_(arg.n){ arg.m[arg.n]=this;}
A arg
Definition: Factorize.h:36
edm::InputTag src_
CachingVariable(std::string m, std::string n, const edm::ParameterSet &iConfig)
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::getByLabel(), getHLTprescales::index, edm::TriggerNames::size(), src_, edm::TriggerNames::triggerIndex(), and edm::Event::triggerNames().

98  {
100  iEvent.getByLabel(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:199
Strings::size_type size() const
Definition: TriggerNames.cc:39
unsigned int triggerIndex(std::string const &name) const
Definition: TriggerNames.cc:32
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:356
bool failedToGet() const
Definition: HandleBase.h:80
edm::InputTag src_
std::string bitName_

Member Data Documentation

std::string HLTBitVariable::bitName_
private

Definition at line 110 of file TriggerVariables.h.

Referenced by eval().

edm::InputTag HLTBitVariable::src_
private

Definition at line 109 of file TriggerVariables.h.

Referenced by eval().