CMS 3D CMS Logo

Public Member Functions | Private Attributes

L1GlobalTriggerObjectMaps::AlgorithmResult Class Reference

#include <L1GlobalTriggerObjectMaps.h>

List of all members.

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 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.

                                      :
  m_startIndexOfConditions(startIndexOfConditions),
  m_algorithmResult(algorithmResult) {

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

Member Function Documentation

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

Definition at line 105 of file L1GlobalTriggerObjectMaps.h.

References m_algorithmBitNumber.

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

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

Definition at line 106 of file L1GlobalTriggerObjectMaps.h.

References m_algorithmResult.

{ return m_algorithmResult; }
bool L1GlobalTriggerObjectMaps::AlgorithmResult::operator< ( AlgorithmResult const &  right) const [inline]

Definition at line 108 of file L1GlobalTriggerObjectMaps.h.

References algorithmBitNumber(), and m_algorithmBitNumber.

                                                       {
      return m_algorithmBitNumber < right.algorithmBitNumber();
    }
unsigned L1GlobalTriggerObjectMaps::AlgorithmResult::startIndexOfConditions ( ) const [inline]

Definition at line 104 of file L1GlobalTriggerObjectMaps.h.

References m_startIndexOfConditions.


Member Data Documentation

Definition at line 113 of file L1GlobalTriggerObjectMaps.h.

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

Definition at line 114 of file L1GlobalTriggerObjectMaps.h.

Referenced by algorithmResult().

Definition at line 112 of file L1GlobalTriggerObjectMaps.h.

Referenced by startIndexOfConditions().