CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Static Public Attributes | Private Attributes
GlobalExtBlk Class Reference

#include <GlobalExtBlk.h>

Public Member Functions

bool getExternalDecision (unsigned int bit) const
 Get decision bits. More...
 
 GlobalExtBlk ()
 constructors More...
 
void print (std::ostream &myCout) const
 pretty print the content of a GlobalExtBlk More...
 
void reset ()
 reset the content of a GlobalExtBlk More...
 
void setExternalDecision (unsigned int bit, bool val)
 Set decision bits. More...
 
virtual ~GlobalExtBlk ()
 destructor More...
 

Static Public Attributes

static const unsigned int maxExternalConditions = 256
 

Private Attributes

std::vector< bool > m_extDecision
 

Detailed Description

Description: L1 micro Global Trigger - Block holding Algorithm Information

Implementation: <TODO: enter implementation details>

Author
: Brian Winer - Ohio State

Description: see header file.

Implementation: <TODO: enter implementation details>

Author
: Brian Winer – Ohio State

Definition at line 34 of file GlobalExtBlk.h.

Constructor & Destructor Documentation

GlobalExtBlk::GlobalExtBlk ( )

constructors

Definition at line 28 of file GlobalExtBlk.cc.

References m_extDecision, and maxExternalConditions.

28  {
29  // Reserve/Clear out the decision words
31  m_extDecision.assign(maxExternalConditions, false);
32 }
static const unsigned int maxExternalConditions
Definition: GlobalExtBlk.h:43
std::vector< bool > m_extDecision
Definition: GlobalExtBlk.h:58
GlobalExtBlk::~GlobalExtBlk ( )
virtual

destructor

Definition at line 35 of file GlobalExtBlk.cc.

35  {
36  // empty now
37 }

Member Function Documentation

bool GlobalExtBlk::getExternalDecision ( unsigned int  bit) const

Get decision bits.

Definition at line 51 of file GlobalExtBlk.cc.

References m_extDecision.

Referenced by l1t::ExternalCondition::evaluateCondition().

51  {
52  if (bit >= m_extDecision.size())
53  return false;
54  return m_extDecision.at(bit);
55 }
std::vector< bool > m_extDecision
Definition: GlobalExtBlk.h:58
void GlobalExtBlk::print ( std::ostream &  myCout) const

pretty print the content of a GlobalExtBlk

Definition at line 65 of file GlobalExtBlk.cc.

References mps_fire::i, and m_extDecision.

65  {
66  myCout << " GlobalExtBlk " << std::endl;
67 
68  // Loop through bits to create a hex word of algorithm bits.
69  int lengthWd = m_extDecision.size();
70  myCout << " External Conditions 0x" << std::hex;
71  int digit = 0;
72  bool firstNonZero = false;
73  for (int i = lengthWd - 1; i > -1; i--) {
74  if (m_extDecision.at(i))
75  digit |= (1 << (i % 4));
76  if (digit > 0)
77  firstNonZero = true;
78  if ((i % 4) == 0 && firstNonZero) {
79  myCout << std::hex << std::setw(1) << digit;
80  digit = 0;
81  if (i % 32 == 0 && i < lengthWd - 1)
82  myCout << " ";
83  }
84  } //end loop over algorithm bits
85  if (!firstNonZero)
86  myCout << "0";
87  myCout << std::endl;
88 }
std::vector< bool > m_extDecision
Definition: GlobalExtBlk.h:58
void GlobalExtBlk::reset ( void  )

reset the content of a GlobalExtBlk

Definition at line 58 of file GlobalExtBlk.cc.

References m_extDecision, and maxExternalConditions.

Referenced by l1t::GenToInputProducer::produce().

58  {
59  // Clear out the decision words
60  // but leave the vector intact
61  m_extDecision.assign(maxExternalConditions, false);
62 }
static const unsigned int maxExternalConditions
Definition: GlobalExtBlk.h:43
std::vector< bool > m_extDecision
Definition: GlobalExtBlk.h:58
void GlobalExtBlk::setExternalDecision ( unsigned int  bit,
bool  val 
)

Set decision bits.

Definition at line 40 of file GlobalExtBlk.cc.

References LogTrace, m_extDecision, and hgcalPerformanceValidation::val.

Referenced by L1TExtCondProducer::produce(), L1TExtCondLegacyToStage2::produce(), l1t::GenToInputProducer::produce(), and l1t::stage2::GlobalExtBlkUnpacker::unpack().

40  {
41  if (bit < m_extDecision.size()) {
42  m_extDecision.at(bit) = val;
43 
44  } else {
45  // Need some erorr checking here.
46  LogTrace("L1TGlobal") << "Attempting to set a external bit " << bit << " beyond limit " << m_extDecision.size();
47  }
48 }
#define LogTrace(id)
std::vector< bool > m_extDecision
Definition: GlobalExtBlk.h:58

Member Data Documentation

std::vector<bool> GlobalExtBlk::m_extDecision
private

Definition at line 58 of file GlobalExtBlk.h.

Referenced by getExternalDecision(), GlobalExtBlk(), print(), reset(), and setExternalDecision().

const unsigned int GlobalExtBlk::maxExternalConditions = 256
static