CMS 3D CMS Logo

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

#include <TriggerVariables.h>

Inheritance diagram for L1BitComputer:
VariableComputer

Public Member Functions

void compute (const edm::Event &iEvent) const override
 
 L1BitComputer (CachingVariable::CachingVariableFactoryArg arg, edm::ConsumesCollector &iC)
 
 ~L1BitComputer () 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< L1GlobalTriggerReadoutRecordsrc_
 

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 5 of file TriggerVariables.h.

Constructor & Destructor Documentation

◆ L1BitComputer()

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

Definition at line 7 of file TriggerVariables.h.

References edm::ConsumesCollector::consumes(), VariableComputer::declare(), mps_fire::i, src_, and contentValuesCheck::ss.

8  : VariableComputer(arg, iC) {
10  edm::Service<InputTagDistributorService>()->retrieve("src", arg.iConfig));
11  for (int i = 0; i != 128; i++) {
12  std::stringstream ss;
13  ss << i;
14  declare(ss.str(), iC);
15  }
16 
17  for (int i = 0; i != 64; i++) {
18  std::stringstream ss;
19  ss << "TechTrig_";
20  ss << i;
21  declare(ss.str(), iC);
22  }
23  }
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
VariableComputer(const CachingVariable::CachingVariableFactoryArg &arg, edm::ConsumesCollector &iC)
A arg
Definition: Factorize.h:31
edm::EDGetTokenT< L1GlobalTriggerReadoutRecord > src_
void declare(std::string var, edm::ConsumesCollector &iC)

◆ ~L1BitComputer()

L1BitComputer::~L1BitComputer ( )
inlineoverride

Definition at line 24 of file TriggerVariables.h.

24 {}

Member Function Documentation

◆ compute()

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

Implements VariableComputer.

Definition at line 26 of file TriggerVariables.h.

References VariableComputer::assign(), L1GlobalTriggerReadoutRecord::decisionWord(), VariableComputer::doesNotCompute(), edm::HandleBase::failedToGet(), mps_fire::i, iEvent, alignCSCRings::r, src_, contentValuesCheck::ss, and L1GlobalTriggerReadoutRecord::technicalTriggerWord().

26  {
28  iEvent.getByToken(src_, l1Handle);
29  if (l1Handle.failedToGet())
31  const DecisionWord& dWord = l1Handle->decisionWord();
32  for (int i = 0; i != 128; i++) {
33  std::stringstream ss;
34  ss << i;
35  double r = dWord.at(i);
36  assign(ss.str(), r);
37  }
38 
39  const TechnicalTriggerWord& tTWord = l1Handle->technicalTriggerWord();
40  for (int i = 0; i != 64; i++) {
41  std::stringstream ss;
42  ss << "TechTrig_";
43  ss << i;
44  double r = tTWord.at(i);
45  assign(ss.str(), r);
46  }
47  }
const DecisionWord & decisionWord(int bxInEventValue) const
void assign(std::string var, double &value) const
bool failedToGet() const
Definition: HandleBase.h:72
int iEvent
Definition: GenABIO.cc:224
std::vector< bool > DecisionWord
typedefs
std::vector< bool > TechnicalTriggerWord
technical trigger bits (64 bits)
const TechnicalTriggerWord & technicalTriggerWord(int bxInEventValue) const
void doesNotCompute() const
edm::EDGetTokenT< L1GlobalTriggerReadoutRecord > src_

Member Data Documentation

◆ src_

edm::EDGetTokenT<L1GlobalTriggerReadoutRecord> L1BitComputer::src_
private

Definition at line 50 of file TriggerVariables.h.

Referenced by compute(), and L1BitComputer().