CMS 3D CMS Logo

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

#include <L1GlobalTriggerObjectMaps.h>

Public Member Functions

short algorithmBitNumber () const
 
 AlgorithmResult ()
 
 AlgorithmResult (unsigned startIndexOfConditions, int algorithmBitNumber, bool algorithmResult)
 
bool algorithmResult () const
 
bool operator< (AlgorithmResult const &right) const
 
unsigned startIndexOfConditions () const
 

Private Attributes

short m_algorithmBitNumber
 
bool m_algorithmResult
 
unsigned m_startIndexOfConditions
 

Detailed Description

Definition at line 96 of file L1GlobalTriggerObjectMaps.h.

Constructor & Destructor Documentation

L1GlobalTriggerObjectMaps::AlgorithmResult::AlgorithmResult ( )
L1GlobalTriggerObjectMaps::AlgorithmResult::AlgorithmResult ( unsigned  startIndexOfConditions,
int  algorithmBitNumber,
bool  algorithmResult 
)

Definition at line 246 of file L1GlobalTriggerObjectMaps.cc.

References cms::Exception::addContext(), algorithmBitNumber(), m_algorithmBitNumber, bookConverter::max, and min().

248  :
251 
252  // We made the decision to try to save space in the data format
253  // and fit this object into 8 bytes by making the persistent
254  // algorithmBitNumber a short. This creates something very
255  // ugly below. In practice the range should never be exceeded.
256  // In fact it is currently always supposed to be less than 128.
257  // I hope this never comes back to haunt us for some unexpected reason.
258  // I cringe when I look at it, but cannot think of any practical
259  // harm ... It is probably a real bug if anyone ever
260  // tries to shove a big int into here.
263  cms::Exception ex("L1GlobalTrigger");
264  ex << "algorithmBitNumber out of range of a short int";
265  ex.addContext("Calling L1GlobalTriggerObjectMaps::AlgorithmResult::AlgorithmResult");
266  throw ex;
267  }
268  m_algorithmBitNumber = static_cast<short>(algorithmBitNumber);
269 }
T min(T a, T b)
Definition: MathUtil.h:58

Member Function Documentation

short L1GlobalTriggerObjectMaps::AlgorithmResult::algorithmBitNumber ( ) const
inline
bool L1GlobalTriggerObjectMaps::AlgorithmResult::algorithmResult ( ) const
inline
bool L1GlobalTriggerObjectMaps::AlgorithmResult::operator< ( AlgorithmResult const &  right) const
inline

Definition at line 106 of file L1GlobalTriggerObjectMaps.h.

References algorithmBitNumber(), and m_algorithmBitNumber.

106  {
107  return m_algorithmBitNumber < right.algorithmBitNumber();
108  }
unsigned L1GlobalTriggerObjectMaps::AlgorithmResult::startIndexOfConditions ( ) const
inline

Member Data Documentation

short L1GlobalTriggerObjectMaps::AlgorithmResult::m_algorithmBitNumber
private

Definition at line 111 of file L1GlobalTriggerObjectMaps.h.

Referenced by algorithmBitNumber(), AlgorithmResult(), and operator<().

bool L1GlobalTriggerObjectMaps::AlgorithmResult::m_algorithmResult
private

Definition at line 112 of file L1GlobalTriggerObjectMaps.h.

Referenced by algorithmResult().

unsigned L1GlobalTriggerObjectMaps::AlgorithmResult::m_startIndexOfConditions
private

Definition at line 110 of file L1GlobalTriggerObjectMaps.h.

Referenced by startIndexOfConditions().