ATLAS Offline Software
Loading...
Searching...
No Matches
Trigger
TrigT1
TrigT1CaloCalibConditions
src
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
5
#include "
TrigT1CaloCalibConditions/AbstractErrorCode.h
"
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.h
AbstractErrorCode::bitIsSet
bool bitIsSet(unsigned int number) const
Definition
AbstractErrorCode.cxx:7
AbstractErrorCode::setBit
void setBit(unsigned int number, bool value)
Definition
AbstractErrorCode.cxx:15
AbstractErrorCode::m_errorCode
unsigned int m_errorCode
Definition
AbstractErrorCode.h:32
number
std::string number(const double &d, const std::string &s)
Definition
utils.cxx:186
Generated on
for ATLAS Offline Software by
1.14.0