CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
HLTBitComputer Class Reference

#include <TriggerVariables.h>

Inheritance diagram for HLTBitComputer:
VariableComputer

Public Member Functions

void compute (const edm::Event &iEvent) const override
 
 HLTBitComputer (CachingVariable::CachingVariableFactoryArg arg, edm::ConsumesCollector &iC)
 
 ~HLTBitComputer () override
 
- Public Member Functions inherited from VariableComputer
void assign (std::string var, double &value) const
 
void declare (std::string var, edm::ConsumesCollector &iC)
 
void doesNotCompute () const
 
void doesNotCompute (std::string var) const
 
const std::string & name () const
 
bool notSeenThisEventAlready (const edm::Event &iEvent) const
 
 VariableComputer (const CachingVariable::CachingVariableFactoryArg &arg, edm::ConsumesCollector &iC)
 
virtual ~VariableComputer ()
 

Private Attributes

edm::EDGetTokenT< edm::TriggerResultssrc_
 
std::vector< std::string > validTriggerNames_
 

Additional Inherited Members

- Protected Attributes inherited from VariableComputer
const CachingVariable::CachingVariableFactoryArgarg_
 
edm::Event::CacheIdentifier_t eventCacheID_ = 0
 
std::map< std::string, const ComputedVariable * > iCompute_
 
std::string method_
 
std::string name_
 
std::string separator_
 

Detailed Description

Definition at line 57 of file TriggerVariables.h.

Constructor & Destructor Documentation

◆ HLTBitComputer()

HLTBitComputer::HLTBitComputer ( CachingVariable::CachingVariableFactoryArg  arg,
edm::ConsumesCollector iC 
)
inline

Definition at line 59 of file TriggerVariables.h.

60  : VariableComputer(arg, iC) {
62  HLTConfigProvider provider;
63  //the function will not work anymore until a major redesign is performed. so long for HLT variables.
64  //provider.init(src_.process());
65  validTriggerNames_ = provider.triggerNames();
66  for (unsigned int iT = 0; iT != validTriggerNames_.size(); ++iT) {
67  TString tname(validTriggerNames_[iT]);
68  tname.ReplaceAll("HLT_", ""); //remove the "HLT_" prefix
69  declare(std::string(static_cast<const char*>(tname)), iC);
70  }
71  }

References edm::ConsumesCollector::consumes(), VariableComputer::declare(), src_, AlCaHLTBitMon_QueryRunRegistry::string, tname(), and validTriggerNames_.

◆ ~HLTBitComputer()

HLTBitComputer::~HLTBitComputer ( )
inlineoverride

Definition at line 72 of file TriggerVariables.h.

72 {}

Member Function Documentation

◆ compute()

void HLTBitComputer::compute ( const edm::Event iEvent) const
inlineoverridevirtual

Implements VariableComputer.

Definition at line 73 of file TriggerVariables.h.

73  {
75  iEvent.getByToken(src_, trh);
76  if (!trh.isValid())
78  const edm::TriggerNames& triggerNames = iEvent.triggerNames(*trh);
79  for (unsigned int iT = 0; iT != validTriggerNames_.size(); ++iT) {
80  TString tname(validTriggerNames_[iT]);
81  tname.ReplaceAll("HLT_", "");
82  double r = trh->accept(triggerNames.triggerIndex(validTriggerNames_[iT]));
83  assign(std::string(static_cast<const char*>(tname)), r);
84  }
85  }

References edm::HLTGlobalStatus::accept(), VariableComputer::assign(), VariableComputer::doesNotCompute(), iEvent, edm::HandleBase::isValid(), alignCSCRings::r, src_, AlCaHLTBitMon_QueryRunRegistry::string, tname(), L1TEGammaOffline_cfi::triggerNames, and validTriggerNames_.

Member Data Documentation

◆ src_

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

Definition at line 88 of file TriggerVariables.h.

Referenced by compute(), and HLTBitComputer().

◆ validTriggerNames_

std::vector<std::string> HLTBitComputer::validTriggerNames_
private

Definition at line 89 of file TriggerVariables.h.

Referenced by compute(), and HLTBitComputer().

HLTBitComputer::validTriggerNames_
std::vector< std::string > validTriggerNames_
Definition: TriggerVariables.h:89
VariableComputer::doesNotCompute
void doesNotCompute() const
Definition: CachingVariable.cc:79
edm::Handle< edm::TriggerResults >
VariableComputer::VariableComputer
VariableComputer(const CachingVariable::CachingVariableFactoryArg &arg, edm::ConsumesCollector &iC)
Definition: CachingVariable.cc:44
L1TEGammaOffline_cfi.triggerNames
triggerNames
Definition: L1TEGammaOffline_cfi.py:40
edm::ConsumesCollector::consumes
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
Definition: ConsumesCollector.h:55
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
VariableComputer::assign
void assign(std::string var, double &value) const
Definition: CachingVariable.cc:66
edm::Service
Definition: Service.h:30
iEvent
int iEvent
Definition: GenABIO.cc:224
tname
std::string tname(const std::string &tableName, const std::string &schemaVersion)
Definition: CredentialStore.cc:150
VariableComputer::declare
void declare(std::string var, edm::ConsumesCollector &iC)
Definition: CachingVariable.cc:55
alignCSCRings.r
r
Definition: alignCSCRings.py:93
HLTConfigProvider
Definition: HLTConfigProvider.h:29
HLTBitComputer::src_
edm::EDGetTokenT< edm::TriggerResults > src_
Definition: TriggerVariables.h:88
edm::TriggerNames
Definition: TriggerNames.h:55
edm::HLTGlobalStatus::accept
bool accept() const
Has at least one path accepted the event?
Definition: HLTGlobalStatus.h:49
funct::arg
A arg
Definition: Factorize.h:31
edm::HandleBase::isValid
bool isValid() const
Definition: HandleBase.h:70
edm::TriggerResults
Definition: TriggerResults.h:35