CMS 3D CMS Logo

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 override
 
 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::TriggerResultssrc_
 

Additional Inherited Members

- Public Types inherited from CachingVariable
typedef std::pair< bool, valueTypeevalType
 
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::HLTBitVariable ( CachingVariableFactoryArg  arg,
edm::ConsumesCollector iC 
)
inline

Definition at line 94 of file TriggerVariables.h.

95  : CachingVariable("HLTBitVariable", arg.n, arg.iConfig, iC),
96  src_(
98  bitName_(arg.n) {
99  arg.m[arg.n] = this;
100  }

Member Function Documentation

◆ eval()

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

Reimplemented from CachingVariable.

Definition at line 101 of file TriggerVariables.h.

101  {
103  iEvent.getByToken(src_, hltHandle);
104  if (hltHandle.failedToGet())
105  return std::make_pair(false, 0);
106  const edm::TriggerNames& trgNames = iEvent.triggerNames(*hltHandle);
107  unsigned int index = trgNames.triggerIndex(bitName_);
108  if (index == trgNames.size())
109  return std::make_pair(false, 0);
110  else
111  return std::make_pair(true, hltHandle->accept(index));
112  }

References edm::HLTGlobalStatus::accept(), bitName_, edm::HandleBase::failedToGet(), iEvent, edm::TriggerNames::size(), src_, and edm::TriggerNames::triggerIndex().

Member Data Documentation

◆ bitName_

std::string HLTBitVariable::bitName_
private

Definition at line 116 of file TriggerVariables.h.

Referenced by eval().

◆ src_

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

Definition at line 115 of file TriggerVariables.h.

Referenced by eval().

HLTBitVariable::bitName_
std::string bitName_
Definition: TriggerVariables.h:116
edm::Handle< edm::TriggerResults >
HLTBitVariable::src_
edm::EDGetTokenT< edm::TriggerResults > src_
Definition: TriggerVariables.h:115
edm::ConsumesCollector::consumes
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
Definition: ConsumesCollector.h:55
edm::HandleBase::failedToGet
bool failedToGet() const
Definition: HandleBase.h:72
CachingVariable::CachingVariable
CachingVariable(std::string m, std::string n, const edm::ParameterSet &iConfig, edm::ConsumesCollector &iC)
Definition: CachingVariable.h:55
edm::Service
Definition: Service.h:30
iEvent
int iEvent
Definition: GenABIO.cc:224
edm::TriggerNames::size
Strings::size_type size() const
Definition: TriggerNames.cc:31
edm::TriggerNames
Definition: TriggerNames.h:55
edm::HLTGlobalStatus::accept
bool accept() const
Has at least one path accepted the event?
Definition: HLTGlobalStatus.h:49
AlignmentPI::index
index
Definition: AlignmentPayloadInspectorHelper.h:46
funct::arg
A arg
Definition: Factorize.h:31
edm::TriggerNames::triggerIndex
unsigned int triggerIndex(std::string const &name) const
Definition: TriggerNames.cc:24
edm::TriggerResults
Definition: TriggerResults.h:35