CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros 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 35 of file GlobalExtBlk.h.

Constructor & Destructor Documentation

GlobalExtBlk::GlobalExtBlk ( )

constructors

Definition at line 32 of file GlobalExtBlk.cc.

References m_extDecision, and maxExternalConditions.

33 {
34 
35  // Reserve/Clear out the decision words
38 
39 }
static const unsigned int maxExternalConditions
Definition: GlobalExtBlk.h:47
std::vector< bool > m_extDecision
Definition: GlobalExtBlk.h:65
GlobalExtBlk::~GlobalExtBlk ( )
virtual

destructor

Definition at line 44 of file GlobalExtBlk.cc.

45 {
46 
47  // empty now
48 }

Member Function Documentation

bool GlobalExtBlk::getExternalDecision ( unsigned int  bit) const

Get decision bits.

Definition at line 67 of file GlobalExtBlk.cc.

References m_extDecision.

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

68 {
69  if(bit>=m_extDecision.size()) return false;
70  return m_extDecision.at(bit);
71 }
std::vector< bool > m_extDecision
Definition: GlobalExtBlk.h:65
void GlobalExtBlk::print ( std::ostream &  myCout) const

pretty print the content of a GlobalExtBlk

Definition at line 86 of file GlobalExtBlk.cc.

References i, and m_extDecision.

87 {
88 
89  myCout << " GlobalExtBlk " << std::endl;
90 
91  // Loop through bits to create a hex word of algorithm bits.
92  int lengthWd = m_extDecision.size();
93  myCout << " External Conditions 0x" << std::hex;
94  int digit = 0;
95  bool firstNonZero = false;
96  for(int i=lengthWd-1; i>-1; i--) {
97  if(m_extDecision.at(i)) digit |= (1 << (i%4));
98  if(digit > 0) firstNonZero = true;
99  if((i%4) == 0 && firstNonZero){
100  myCout << std::hex << std::setw(1) << digit;
101  digit = 0;
102  if(i%32 == 0 && i<lengthWd-1) myCout << " ";
103  }
104  } //end loop over algorithm bits
105  if(!firstNonZero) myCout << "0";
106  myCout << std::endl;
107 
108 }
int i
Definition: DBlmapReader.cc:9
std::vector< bool > m_extDecision
Definition: GlobalExtBlk.h:65
void GlobalExtBlk::reset ( void  )

reset the content of a GlobalExtBlk

Definition at line 75 of file GlobalExtBlk.cc.

References m_extDecision, and maxExternalConditions.

76 {
77 
78  // Clear out the decision words
79  // but leave the vector intact
81 
82 
83 }
static const unsigned int maxExternalConditions
Definition: GlobalExtBlk.h:47
std::vector< bool > m_extDecision
Definition: GlobalExtBlk.h:65
void GlobalExtBlk::setExternalDecision ( unsigned int  bit,
bool  val 
)

Set decision bits.

Definition at line 52 of file GlobalExtBlk.cc.

References LogTrace, and m_extDecision.

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

53 {
54  if(bit < m_extDecision.size()) {
55 
56  m_extDecision.at(bit) = val;
57 
58  }else {
59  // Need some erorr checking here.
60  LogTrace("L1TGlobal") << "Attempting to set a external bit " << bit << " beyond limit " << m_extDecision.size();
61  }
62 
63 }
#define LogTrace(id)
std::vector< bool > m_extDecision
Definition: GlobalExtBlk.h:65

Member Data Documentation

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

Definition at line 65 of file GlobalExtBlk.h.

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

const unsigned int GlobalExtBlk::maxExternalConditions = 256
static

Definition at line 47 of file GlobalExtBlk.h.

Referenced by GlobalExtBlk(), and reset().