CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
L1GlobalTriggerObjectMaps::AlgorithmResult Class Reference

#include <L1GlobalTriggerObjectMaps.h>

Public Member Functions

short algorithmBitNumber () const
 
 AlgorithmResult ()
 
bool algorithmResult () const
 
 AlgorithmResult (unsigned startIndexOfConditions, int algorithmBitNumber, bool algorithmResult)
 
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 90 of file L1GlobalTriggerObjectMaps.h.

Constructor & Destructor Documentation

◆ AlgorithmResult() [1/2]

L1GlobalTriggerObjectMaps::AlgorithmResult::AlgorithmResult ( )

◆ AlgorithmResult() [2/2]

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

Definition at line 214 of file L1GlobalTriggerObjectMaps.cc.

218  // We made the decision to try to save space in the data format
219  // and fit this object into 8 bytes by making the persistent
220  // algorithmBitNumber a short. This creates something very
221  // ugly below. In practice the range should never be exceeded.
222  // In fact it is currently always supposed to be less than 128.
223  // I hope this never comes back to haunt us for some unexpected reason.
224  // I cringe when I look at it, but cannot think of any practical
225  // harm ... It is probably a real bug if anyone ever
226  // tries to shove a big int into here.
229  cms::Exception ex("L1GlobalTrigger");
230  ex << "algorithmBitNumber out of range of a short int";
231  ex.addContext("Calling L1GlobalTriggerObjectMaps::AlgorithmResult::AlgorithmResult");
232  throw ex;
233  }
234  m_algorithmBitNumber = static_cast<short>(algorithmBitNumber);
235 }

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

Member Function Documentation

◆ algorithmBitNumber()

short L1GlobalTriggerObjectMaps::AlgorithmResult::algorithmBitNumber ( ) const
inline

Definition at line 95 of file L1GlobalTriggerObjectMaps.h.

95 { return m_algorithmBitNumber; }

References m_algorithmBitNumber.

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

◆ algorithmResult()

bool L1GlobalTriggerObjectMaps::AlgorithmResult::algorithmResult ( ) const
inline

Definition at line 96 of file L1GlobalTriggerObjectMaps.h.

96 { return m_algorithmResult; }

References m_algorithmResult.

◆ operator<()

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

Definition at line 98 of file L1GlobalTriggerObjectMaps.h.

98 { return m_algorithmBitNumber < right.algorithmBitNumber(); }

References algorithmBitNumber(), and m_algorithmBitNumber.

◆ startIndexOfConditions()

unsigned L1GlobalTriggerObjectMaps::AlgorithmResult::startIndexOfConditions ( ) const
inline

Definition at line 94 of file L1GlobalTriggerObjectMaps.h.

94 { return m_startIndexOfConditions; }

References m_startIndexOfConditions.

Member Data Documentation

◆ m_algorithmBitNumber

short L1GlobalTriggerObjectMaps::AlgorithmResult::m_algorithmBitNumber
private

Definition at line 102 of file L1GlobalTriggerObjectMaps.h.

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

◆ m_algorithmResult

bool L1GlobalTriggerObjectMaps::AlgorithmResult::m_algorithmResult
private

Definition at line 103 of file L1GlobalTriggerObjectMaps.h.

Referenced by algorithmResult().

◆ m_startIndexOfConditions

unsigned L1GlobalTriggerObjectMaps::AlgorithmResult::m_startIndexOfConditions
private

Definition at line 101 of file L1GlobalTriggerObjectMaps.h.

Referenced by startIndexOfConditions().

L1GlobalTriggerObjectMaps::AlgorithmResult::algorithmBitNumber
short algorithmBitNumber() const
Definition: L1GlobalTriggerObjectMaps.h:95
L1GlobalTriggerObjectMaps::AlgorithmResult::m_algorithmResult
bool m_algorithmResult
Definition: L1GlobalTriggerObjectMaps.h:103
min
T min(T a, T b)
Definition: MathUtil.h:58
L1GlobalTriggerObjectMaps::AlgorithmResult::m_algorithmBitNumber
short m_algorithmBitNumber
Definition: L1GlobalTriggerObjectMaps.h:102
L1GlobalTriggerObjectMaps::AlgorithmResult::m_startIndexOfConditions
unsigned m_startIndexOfConditions
Definition: L1GlobalTriggerObjectMaps.h:101
SiStripPI::max
Definition: SiStripPayloadInspectorHelper.h:169
L1GlobalTriggerObjectMaps::AlgorithmResult::algorithmResult
bool algorithmResult() const
Definition: L1GlobalTriggerObjectMaps.h:96
L1GlobalTriggerObjectMaps::AlgorithmResult::startIndexOfConditions
unsigned startIndexOfConditions() const
Definition: L1GlobalTriggerObjectMaps.h:94
cms::Exception
Definition: Exception.h:70