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.

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  }

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

◆ ~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.

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  }

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

Member Data Documentation

◆ src_

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

Definition at line 50 of file TriggerVariables.h.

Referenced by compute(), and L1BitComputer().

mps_fire.i
i
Definition: mps_fire.py:355
L1BitComputer::src_
edm::EDGetTokenT< L1GlobalTriggerReadoutRecord > src_
Definition: TriggerVariables.h:50
VariableComputer::doesNotCompute
void doesNotCompute() const
Definition: CachingVariable.cc:79
edm::Handle
Definition: AssociativeIterator.h:50
L1GlobalTriggerReadoutRecord
Definition: L1GlobalTriggerReadoutRecord.h:46
contentValuesCheck.ss
ss
Definition: contentValuesCheck.py:33
VariableComputer::VariableComputer
VariableComputer(const CachingVariable::CachingVariableFactoryArg &arg, edm::ConsumesCollector &iC)
Definition: CachingVariable.cc:44
edm::ConsumesCollector::consumes
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
Definition: ConsumesCollector.h:49
VariableComputer::assign
void assign(std::string var, double &value) const
Definition: CachingVariable.cc:66
edm::HandleBase::failedToGet
bool failedToGet() const
Definition: HandleBase.h:72
L1GlobalTriggerReadoutRecord::decisionWord
const DecisionWord & decisionWord(int bxInEventValue) const
Definition: L1GlobalTriggerReadoutRecord.cc:186
edm::Service
Definition: Service.h:30
iEvent
int iEvent
Definition: GenABIO.cc:224
VariableComputer::declare
void declare(std::string var, edm::ConsumesCollector &iC)
Definition: CachingVariable.cc:55
alignCSCRings.r
r
Definition: alignCSCRings.py:93
DecisionWord
std::vector< bool > DecisionWord
typedefs
Definition: L1GlobalTriggerReadoutSetupFwd.h:34
funct::arg
A arg
Definition: Factorize.h:36
L1GlobalTriggerReadoutRecord::technicalTriggerWord
const TechnicalTriggerWord & technicalTriggerWord(int bxInEventValue) const
Definition: L1GlobalTriggerReadoutRecord.cc:212
TechnicalTriggerWord
std::vector< bool > TechnicalTriggerWord
technical trigger bits (64 bits)
Definition: L1GlobalTriggerReadoutSetupFwd.h:41