ATLAS Offline Software
Loading...
Searching...
No Matches
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
14
17
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
33std::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
58std::ostream& operator<<(std::ostream& output, const FineTimeErrorCode& r) {
59 output << r.errorCode();
60 return output;
61}
std::ostream & operator<<(std::ostream &output, const FineTimeErrorCode &r)
bool bitIsSet(unsigned int number) const
unsigned int errorCode() const
AbstractErrorCode(unsigned int errorCode)
FineTimeErrorCode & operator|=(const FineTimeErrorCode &e)
std::string printStatus() const
FineTimeErrorCode & operator=(const FineTimeErrorCode &e)
int r
Definition globals.cxx:22