ATLAS Offline Software
RpcByteStreamErrorContainer.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 /***************************************************************************
6  MuonByteStreamErrors package
7  RpcByteStreamErrorContainer class
8  -----------------------------------------
9  ***************************************************************************/
10 
11 
12 #ifndef MUONBYTESTREAMERRORS_RPCBYTESTREAMERRORCONTAINER_H
13 #define MUONBYTESTREAMERRORS_RPCBYTESTREAMERRORCONTAINER_H
14 
15 
18 #include "AthenaKernel/CLASS_DEF.h"
19 
20 
21 namespace Muon {
22  enum RpcBSerrorTypes {
23  NoError,
24  CMHeaderErrors, // CM related error (from 0 to 8 in a pad)
25  CMSubHeaderErrors, // CM related error
26  CMFooterErrors, // CM related error
27  CRC8checkFailures, // CM related error
28  CMmissing, // CM related error
29  RXHeaderErrors, // PAD related error (0 or 1 on a pad)
40  Rpc_NUM_ERROR_TYPES // always have this one last, so we can use it as a loop index
41  };
42  // For a given pad (uniquely identified by an IdentifierHash: first item or key in the pair) the error code (second item in the pair) keep the whole
43  // information on the errors met in the pad fragment decoding;
44  //
45  // If there are CM errors in the pad, the error code is built as ValueCM=100+sum(value*10^cmid) over all cmids with errors;
46  // value in the range 1-5, i.e. CMHeaderErrors - CRC8checkFailures;
47  // If there's a Pad error, the error code is set to ValuePad+ValueCM, with ValuePad in the range 5-Rpc_NUM_ERROR_TYPES-1
48 
50  {
51  public:
53 
55  RpcByteStreamErrorContainer( const DataVector<std::pair<IdentifierHash, int> > & errorVector );
57 
58  void clear();
59  void addError(IdentifierHash, int);
60  int getError(IdentifierHash) const;
61  std::vector<IdentifierHash> getPadsWithError() const;
62 
64 
65  private:
67  };
68 
69 }
70 
72 #endif // MUONBYTESTREAMERRORS_RPCBYTESTREAMERRORCONTAINER_H
73 
Muon::RpcByteStreamErrorContainer::getError
int getError(IdentifierHash) const
Definition: RpcByteStreamErrorContainer.cxx:38
Muon::CMmissing
@ CMmissing
Definition: RpcByteStreamErrorContainer.h:36
Muon::RpcByteStreamErrorContainer::RpcByteStreamErrorContainer
RpcByteStreamErrorContainer()
Definition: RpcByteStreamErrorContainer.cxx:10
Muon::RpcByteStreamErrorContainer::~RpcByteStreamErrorContainer
~RpcByteStreamErrorContainer()
Definition: RpcByteStreamErrorContainer.cxx:18
Muon::RXHeaderErrors
@ RXHeaderErrors
Definition: RpcByteStreamErrorContainer.h:37
Muon::RXSubHeaderErrors
@ RXSubHeaderErrors
Definition: RpcByteStreamErrorContainer.h:38
Muon::PADmissing
@ PADmissing
Definition: RpcByteStreamErrorContainer.h:43
Muon::RpcByteStreamErrorContainer::getPadsWithError
std::vector< IdentifierHash > getPadsWithError() const
Definition: RpcByteStreamErrorContainer.cxx:56
Muon
This class provides conversion from CSC RDO data to CSC Digits.
Definition: TrackSystemController.h:45
Muon::RpcBSerrorTypes
RpcBSerrorTypes
Definition: RpcByteStreamErrorContainer.h:26
Muon::CMFooterErrors
@ CMFooterErrors
Definition: RpcByteStreamErrorContainer.h:34
Muon::CMHeaderErrors
@ CMHeaderErrors
Definition: RpcByteStreamErrorContainer.h:32
Muon::RpcByteStreamErrorContainer::getAllErrors
const DataVector< std::pair< IdentifierHash, int > > & getAllErrors() const
Definition: RpcByteStreamErrorContainer.cxx:22
Muon::RpcByteStreamErrorContainer
Definition: RpcByteStreamErrorContainer.h:54
Muon::RXFooterErrors
@ RXFooterErrors
Definition: RpcByteStreamErrorContainer.h:47
Muon::PADHeaderErrors
@ PADHeaderErrors
Definition: RpcByteStreamErrorContainer.h:39
Muon::CMSubHeaderErrors
@ CMSubHeaderErrors
Definition: RpcByteStreamErrorContainer.h:33
Muon::RpcByteStreamErrorContainer::rpcErrorIterator
DataVector< std::pair< IdentifierHash, int > >::const_iterator rpcErrorIterator
Definition: RpcByteStreamErrorContainer.h:56
Muon::Rpc_NUM_ERROR_TYPES
@ Rpc_NUM_ERROR_TYPES
Definition: RpcByteStreamErrorContainer.h:48
DataVector
Derived DataVector<T>.
Definition: DataVector.h:581
Muon::NoError
@ NoError
Definition: RpcByteStreamErrorContainer.h:31
Muon::PADPreFooterErrors
@ PADPreFooterErrors
Definition: RpcByteStreamErrorContainer.h:41
IdentifierHash.h
Muon::RpcByteStreamErrorContainer::clear
void clear()
Definition: RpcByteStreamErrorContainer.cxx:34
DataVector.h
An STL vector of pointers that by default owns its pointed-to elements.
Muon::SLHeaderErrors
@ SLHeaderErrors
Definition: RpcByteStreamErrorContainer.h:44
Muon::PADSubHeaderErrors
@ PADSubHeaderErrors
Definition: RpcByteStreamErrorContainer.h:40
CLASS_DEF
#define CLASS_DEF(NAME, CID, VERSION)
associate a clid and a version to a type eg
Definition: Control/AthenaKernel/AthenaKernel/CLASS_DEF.h:64
Muon::PADFooterErrors
@ PADFooterErrors
Definition: RpcByteStreamErrorContainer.h:42
Muon::CRC8checkFailures
@ CRC8checkFailures
Definition: RpcByteStreamErrorContainer.h:35
Muon::SLFooterErrors
@ SLFooterErrors
Definition: RpcByteStreamErrorContainer.h:46
Muon::RpcByteStreamErrorContainer::m_errorVector
DataVector< std::pair< IdentifierHash, int > > m_errorVector
Definition: RpcByteStreamErrorContainer.h:70
Muon::SLSubHeaderErrors
@ SLSubHeaderErrors
Definition: RpcByteStreamErrorContainer.h:45
IdentifierHash
This is a "hash" representation of an Identifier. This encodes a 32 bit index which can be used to lo...
Definition: IdentifierHash.h:25
CLASS_DEF.h
macros to associate a CLID to a type
Muon::RpcByteStreamErrorContainer::addError
void addError(IdentifierHash, int)
Definition: RpcByteStreamErrorContainer.cxx:27