ATLAS Offline Software
Loading...
Searching...
No Matches
MuonSpectrometer
MuonConditions
MuonByteStreamErrors
src
RpcByteStreamErrorContainer.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 "
MuonByteStreamErrors/RpcByteStreamErrorContainer.h
"
6
7
namespace
Muon
{
8
9
10
RpcByteStreamErrorContainer::RpcByteStreamErrorContainer
( )
11
{}
12
13
RpcByteStreamErrorContainer::RpcByteStreamErrorContainer
(
const
DataVector
< std::pair < IdentifierHash, int > > & inputVector )
14
:
15
m_errorVector
(inputVector)
16
{}
17
18
RpcByteStreamErrorContainer::~RpcByteStreamErrorContainer
( )
19
{}
20
21
const
DataVector<std::pair<IdentifierHash, int>
>&
22
RpcByteStreamErrorContainer::getAllErrors
()
const
23
{
24
return
m_errorVector
;
25
}
26
27
void
RpcByteStreamErrorContainer::addError
(
IdentifierHash
idh,
int
type
)
28
{
29
30
std::pair<IdentifierHash, int>* err =
new
std::pair<IdentifierHash, int>(std::make_pair(idh,
type
));
31
m_errorVector
.push_back(err);
32
33
}
34
void
RpcByteStreamErrorContainer::clear
()
35
{
36
if
(
m_errorVector
.size()!=0)
m_errorVector
.clear();
37
}
38
int
RpcByteStreamErrorContainer::getError
(
IdentifierHash
idh)
const
39
{
40
int
errorCode=-1;
41
if
(
m_errorVector
.size()==0)
return
errorCode;
42
rpcErrorIterator
myIt =
m_errorVector
.begin();
43
rpcErrorIterator
myItE =
m_errorVector
.end();
44
for
(;myIt!=myItE;++myIt)
45
{
46
IdentifierHash
myPadId = (*myIt)->first;
47
if
(myPadId==idh) {
48
errorCode= (*myIt)->second;
49
break
;
50
}
51
}
52
53
return
errorCode;
54
}
55
56
std::vector<IdentifierHash>
RpcByteStreamErrorContainer::getPadsWithError
()
const
57
{
58
rpcErrorIterator
myIt =
m_errorVector
.begin();
59
rpcErrorIterator
myItE =
m_errorVector
.end();
60
std::vector<IdentifierHash> myList;
61
for
(;myIt!=myItE;++myIt)
62
{
63
IdentifierHash
myPadId = (*myIt)->first;
64
myList.push_back(myPadId);
65
}
66
return
myList;
67
}
68
69
70
}
RpcByteStreamErrorContainer.h
DataVector
Derived DataVector<T>.
Definition
DataVector.h:795
IdentifierHash
This is a "hash" representation of an Identifier.
Definition
IdentifierHash.h:25
Muon::RpcByteStreamErrorContainer::getPadsWithError
std::vector< IdentifierHash > getPadsWithError() const
Definition
RpcByteStreamErrorContainer.cxx:56
Muon::RpcByteStreamErrorContainer::getError
int getError(IdentifierHash) const
Definition
RpcByteStreamErrorContainer.cxx:38
Muon::RpcByteStreamErrorContainer::m_errorVector
DataVector< std::pair< IdentifierHash, int > > m_errorVector
Definition
RpcByteStreamErrorContainer.h:66
Muon::RpcByteStreamErrorContainer::RpcByteStreamErrorContainer
RpcByteStreamErrorContainer()
Definition
RpcByteStreamErrorContainer.cxx:10
Muon::RpcByteStreamErrorContainer::rpcErrorIterator
DataVector< std::pair< IdentifierHash, int > >::const_iterator rpcErrorIterator
Definition
RpcByteStreamErrorContainer.h:52
Muon::RpcByteStreamErrorContainer::getAllErrors
const DataVector< std::pair< IdentifierHash, int > > & getAllErrors() const
Definition
RpcByteStreamErrorContainer.cxx:22
Muon::RpcByteStreamErrorContainer::addError
void addError(IdentifierHash, int)
Definition
RpcByteStreamErrorContainer.cxx:27
Muon::RpcByteStreamErrorContainer::clear
void clear()
Definition
RpcByteStreamErrorContainer.cxx:34
Muon::RpcByteStreamErrorContainer::~RpcByteStreamErrorContainer
~RpcByteStreamErrorContainer()
Definition
RpcByteStreamErrorContainer.cxx:18
Muon
NRpcCablingAlg reads raw condition data and writes derived condition data to the condition store.
Definition
TrackSystemController.h:45
type
Generated on
for ATLAS Offline Software by
1.14.0