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 98 of file L1GlobalTriggerObjectMaps.h.

Constructor & Destructor Documentation

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

Definition at line 248 of file L1GlobalTriggerObjectMaps.cc.

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

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

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 108 of file L1GlobalTriggerObjectMaps.h.

References algorithmBitNumber(), and m_algorithmBitNumber.

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

Member Data Documentation

short L1GlobalTriggerObjectMaps::AlgorithmResult::m_algorithmBitNumber
private

Definition at line 113 of file L1GlobalTriggerObjectMaps.h.

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

bool L1GlobalTriggerObjectMaps::AlgorithmResult::m_algorithmResult
private

Definition at line 114 of file L1GlobalTriggerObjectMaps.h.

Referenced by algorithmResult().

unsigned L1GlobalTriggerObjectMaps::AlgorithmResult::m_startIndexOfConditions
private

Definition at line 112 of file L1GlobalTriggerObjectMaps.h.

Referenced by startIndexOfConditions().