ATLAS Offline Software
FineTimeErrorCode.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 #include <iomanip>
8 #include <iostream>
9 #include <sstream>
10 
11 
13 }
14 
15 FineTimeErrorCode::FineTimeErrorCode(unsigned int errorCode): AbstractErrorCode(errorCode) {
16 }
17 
19 }
20 
22 {
23  this->errorCode(e.errorCode());
24  return *this;
25 }
26 
28 {
29  this->errorCode( this->errorCode() | e.errorCode() );
30  return *this;
31 }
32 
33 std::string FineTimeErrorCode::printStatus() const {
34 
35  std::stringstream status;
36 
37  status << "ErrorCode: " << this->errorCode() << std::endl;
38 
39  status << "Bit " << std::setw(2) << BadRefBit
40  << ": BadRefBit: "
41  << bitIsSet(BadRefBit) << std::endl;
42 
43  status << "Bit " << std::setw(2) << BadCalibBit
44  << ": BadCalibBit: "
45  << bitIsSet(BadCalibBit) << std::endl;
46 
47  status << "Bit " << std::setw(2) << RefSetByHand
48  << ": RefSetByHand: "
49  << bitIsSet(RefSetByHand) << std::endl;
50  status << "Bit " << std::setw(2) << CalibSetByHand
51  << ": CalibSetByHand: "
52  << bitIsSet(CalibSetByHand) << std::endl;
53 
54  return status.str();
55 }
56 
57 
58 std::ostream& operator<<(std::ostream& output, const FineTimeErrorCode& r) {
59  output << r.errorCode();
60  return output;
61 }
FineTimeErrorCode::RefSetByHand
@ RefSetByHand
Definition: FineTimeErrorCode.h:29
AllowedVariables::e
e
Definition: AsgElectronSelectorTool.cxx:37
beamspotman.r
def r
Definition: beamspotman.py:676
FineTimeErrorCode
FineTimeErrorCode class for L1Calo error codes.
Definition: FineTimeErrorCode.h:19
AbstractErrorCode::errorCode
unsigned int errorCode() const
Definition: AbstractErrorCode.h:21
FineTimeErrorCode::operator=
FineTimeErrorCode & operator=(const FineTimeErrorCode &e)
Definition: FineTimeErrorCode.cxx:21
FineTimeErrorCode::BadCalibBit
@ BadCalibBit
Definition: FineTimeErrorCode.h:28
FineTimeErrorCode::printStatus
std::string printStatus() const
Definition: FineTimeErrorCode.cxx:33
FineTimeErrorCode.h
FineTimeErrorCode::BadRefBit
@ BadRefBit
Definition: FineTimeErrorCode.h:27
operator<<
std::ostream & operator<<(std::ostream &output, const FineTimeErrorCode &r)
Definition: FineTimeErrorCode.cxx:58
FineTimeErrorCode::CalibSetByHand
@ CalibSetByHand
Definition: FineTimeErrorCode.h:30
AbstractErrorCode::bitIsSet
bool bitIsSet(unsigned int number) const
Definition: AbstractErrorCode.cxx:7
merge.output
output
Definition: merge.py:17
FineTimeErrorCode::FineTimeErrorCode
FineTimeErrorCode()
Definition: FineTimeErrorCode.cxx:12
AbstractErrorCode
AbstractErrorCode abstract base class for L1Calo error codes.
Definition: AbstractErrorCode.h:16
merge.status
status
Definition: merge.py:17
FineTimeErrorCode::operator|=
FineTimeErrorCode & operator|=(const FineTimeErrorCode &e)
Definition: FineTimeErrorCode.cxx:27