ATLAS Offline Software
Loading...
Searching...
No Matches
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
6
7namespace Muon {
8
9
12
13RpcByteStreamErrorContainer::RpcByteStreamErrorContainer( const DataVector< std::pair < IdentifierHash, int > > & inputVector )
14 :
15 m_errorVector (inputVector)
16{}
17
20
26
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}
35{
36 if (m_errorVector.size()!=0) m_errorVector.clear();
37}
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
56std::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}
Derived DataVector<T>.
Definition DataVector.h:795
This is a "hash" representation of an Identifier.
std::vector< IdentifierHash > getPadsWithError() const
DataVector< std::pair< IdentifierHash, int > > m_errorVector
DataVector< std::pair< IdentifierHash, int > >::const_iterator rpcErrorIterator
const DataVector< std::pair< IdentifierHash, int > > & getAllErrors() const
NRpcCablingAlg reads raw condition data and writes derived condition data to the condition store.