ATLAS Offline Software
Loading...
Searching...
No Matches
Muon::RpcByteStreamErrorContainer Class Reference

#include <RpcByteStreamErrorContainer.h>

Collaboration diagram for Muon::RpcByteStreamErrorContainer:

Public Types

typedef DataVector< std::pair< IdentifierHash, int > >::const_iterator rpcErrorIterator

Public Member Functions

 RpcByteStreamErrorContainer ()
 RpcByteStreamErrorContainer (const DataVector< std::pair< IdentifierHash, int > > &errorVector)
 ~RpcByteStreamErrorContainer ()
void clear ()
void addError (IdentifierHash, int)
int getError (IdentifierHash) const
std::vector< IdentifierHashgetPadsWithError () const
const DataVector< std::pair< IdentifierHash, int > > & getAllErrors () const

Private Attributes

DataVector< std::pair< IdentifierHash, int > > m_errorVector

Detailed Description

Definition at line 49 of file RpcByteStreamErrorContainer.h.

Member Typedef Documentation

◆ rpcErrorIterator

Constructor & Destructor Documentation

◆ RpcByteStreamErrorContainer() [1/2]

Muon::RpcByteStreamErrorContainer::RpcByteStreamErrorContainer ( )

Definition at line 10 of file RpcByteStreamErrorContainer.cxx.

11{}

◆ RpcByteStreamErrorContainer() [2/2]

Muon::RpcByteStreamErrorContainer::RpcByteStreamErrorContainer ( const DataVector< std::pair< IdentifierHash, int > > & errorVector)

Definition at line 13 of file RpcByteStreamErrorContainer.cxx.

14 :
15 m_errorVector (inputVector)
16{}
DataVector< std::pair< IdentifierHash, int > > m_errorVector

◆ ~RpcByteStreamErrorContainer()

Muon::RpcByteStreamErrorContainer::~RpcByteStreamErrorContainer ( )

Definition at line 18 of file RpcByteStreamErrorContainer.cxx.

19{}

Member Function Documentation

◆ addError()

void Muon::RpcByteStreamErrorContainer::addError ( IdentifierHash idh,
int type )

Definition at line 27 of file RpcByteStreamErrorContainer.cxx.

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}

◆ clear()

void Muon::RpcByteStreamErrorContainer::clear ( )

Definition at line 34 of file RpcByteStreamErrorContainer.cxx.

35{
36 if (m_errorVector.size()!=0) m_errorVector.clear();
37}

◆ getAllErrors()

const DataVector< std::pair< IdentifierHash, int > > & Muon::RpcByteStreamErrorContainer::getAllErrors ( ) const

Definition at line 22 of file RpcByteStreamErrorContainer.cxx.

23{
24 return m_errorVector;
25}

◆ getError()

int Muon::RpcByteStreamErrorContainer::getError ( IdentifierHash idh) const

Definition at line 38 of file RpcByteStreamErrorContainer.cxx.

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}
DataVector< std::pair< IdentifierHash, int > >::const_iterator rpcErrorIterator

◆ getPadsWithError()

std::vector< IdentifierHash > Muon::RpcByteStreamErrorContainer::getPadsWithError ( ) const

Definition at line 56 of file RpcByteStreamErrorContainer.cxx.

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}

Member Data Documentation

◆ m_errorVector

DataVector<std::pair<IdentifierHash, int> > Muon::RpcByteStreamErrorContainer::m_errorVector
private

Definition at line 66 of file RpcByteStreamErrorContainer.h.


The documentation for this class was generated from the following files: