ATLAS Offline Software
AbstractErrorCode.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 
7 bool AbstractErrorCode::bitIsSet(unsigned int number) const {
8  unsigned int correspondingNumber = (unsigned int) (1<<number);
9 
10  bool isSet( ( m_errorCode & correspondingNumber) > 0);
11 
12  return isSet;
13 }
14 
15 void AbstractErrorCode::setBit(unsigned int number, bool value) {
16  bool isSet(bitIsSet(number));
17  unsigned int correspondingNumber = (unsigned int) (1<<number);
18 
19  // set bit if not set yet
20  if ((value) && (!isSet)) m_errorCode |= correspondingNumber;
21  // remove bit if bit is set
22  if ((!value) && (isSet)) m_errorCode &= ~correspondingNumber;
23 }
AbstractErrorCode::setBit
void setBit(unsigned int number, bool value)
Definition: AbstractErrorCode.cxx:15
CaloCellPos2Ntuple.int
int
Definition: CaloCellPos2Ntuple.py:24
athena.value
value
Definition: athena.py:122
AbstractErrorCode::m_errorCode
unsigned int m_errorCode
Definition: AbstractErrorCode.h:32
AbstractErrorCode::bitIsSet
bool bitIsSet(unsigned int number) const
Definition: AbstractErrorCode.cxx:7
python.selection.number
number
Definition: selection.py:20
AbstractErrorCode.h