ATLAS Offline Software
Public Member Functions | Public Attributes | List of all members
SCT_RodDecoderErrorsHelper Class Reference

allows to accumulate errors in one fillColection call More...

#include <SCT_RodDecoder.h>

Collaboration diagram for SCT_RodDecoderErrorsHelper:

Public Member Functions

 SCT_RodDecoderErrorsHelper (IDCInDetBSErrContainer &idcContainer)
 
 ~SCT_RodDecoderErrorsHelper ()
 
void noerror (const IdentifierHash id)
 
void add (const IdentifierHash id, SCT_ByteStreamErrors::ErrorType etype)
 
void removeIfEmpty (const IdentifierHash id)
 

Public Attributes

std::map< IdentifierHash, IDCInDetBSErrContainer::ErrorCodeaccumulatedErrors
 
IDCInDetBSErrContainererrorsIDC
 

Detailed Description

allows to accumulate errors in one fillColection call

Errors information is scattered across this code. To be sure that all of the errors are saved this helper class provides add method allowing to update/accumulate erorr. The IDC, for a very good reasons (MT safety) do not allow for that.

Definition at line 41 of file SCT_RodDecoder.h.

Constructor & Destructor Documentation

◆ SCT_RodDecoderErrorsHelper()

SCT_RodDecoderErrorsHelper::SCT_RodDecoderErrorsHelper ( IDCInDetBSErrContainer idcContainer)
inline

Definition at line 43 of file SCT_RodDecoder.h.

44  : errorsIDC{ idcContainer } {}

◆ ~SCT_RodDecoderErrorsHelper()

SCT_RodDecoderErrorsHelper::~SCT_RodDecoderErrorsHelper ( )
inline

Definition at line 45 of file SCT_RodDecoder.h.

45  {
46  for (auto [id, err]: accumulatedErrors) {
47  errorsIDC.setOrDrop(id, err);
48  }
49  }

Member Function Documentation

◆ add()

void SCT_RodDecoderErrorsHelper::add ( const IdentifierHash  id,
SCT_ByteStreamErrors::ErrorType  etype 
)
inline

Definition at line 54 of file SCT_RodDecoder.h.

54  {
56  }

◆ noerror()

void SCT_RodDecoderErrorsHelper::noerror ( const IdentifierHash  id)
inline

Definition at line 50 of file SCT_RodDecoder.h.

50  {
51  accumulatedErrors[id]; // this adds 0 (no error) for an ID
52  }

◆ removeIfEmpty()

void SCT_RodDecoderErrorsHelper::removeIfEmpty ( const IdentifierHash  id)
inline

Definition at line 58 of file SCT_RodDecoder.h.

58  {
59  if (accumulatedErrors[id]==0) {
60  accumulatedErrors.erase(id);
61  }
62  }

Member Data Documentation

◆ accumulatedErrors

std::map<IdentifierHash, IDCInDetBSErrContainer::ErrorCode> SCT_RodDecoderErrorsHelper::accumulatedErrors

Definition at line 64 of file SCT_RodDecoder.h.

◆ errorsIDC

IDCInDetBSErrContainer& SCT_RodDecoderErrorsHelper::errorsIDC

Definition at line 65 of file SCT_RodDecoder.h.


The documentation for this class was generated from the following file:
SCT_ByteStreamErrors::addError
void addError(IDCInDetBSErrContainer::ErrorCode &errWord, ErrorType errType)
Definition: ISCT_ByteStreamErrorsTool.h:43
dqt_zlumi_pandas.err
err
Definition: dqt_zlumi_pandas.py:182
SCT_RodDecoderErrorsHelper::accumulatedErrors
std::map< IdentifierHash, IDCInDetBSErrContainer::ErrorCode > accumulatedErrors
Definition: SCT_RodDecoder.h:64
IdentifiableValueContainer::setOrDrop
bool setOrDrop(size_t i, const T &value)
Set the value for the given hash.
Definition: IdentifiableValueContainer.h:129
id
SG::auxid_t id
Definition: Control/AthContainers/Root/debug.cxx:227
SCT_RodDecoderErrorsHelper::errorsIDC
IDCInDetBSErrContainer & errorsIDC
Definition: SCT_RodDecoder.h:65