ATLAS Offline Software
ISCT_ByteStreamErrorsTool.h
Go to the documentation of this file.
1 // -*- C++ -*-
2 
3 /*
4  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
5 */
6 
13 #ifndef ISCT_ByteStreamErrorsTool_h
14 #define ISCT_ByteStreamErrorsTool_h
15 
20 #include "GaudiKernel/EventContext.h"
21 
22 #include <set>
23 
24 class Identifier;
25 class IdentifierHash;
26 
31 namespace SCT_ByteStreamErrors {
34  return IDCInDetBSErrContainer::ErrorCode{1} << errType;
35  }
36 
38  inline bool hasError(IDCInDetBSErrContainer::ErrorCode errWord, ErrorType errType) {
39  return errWord & makeError(errType);
40  }
41 
43  inline void addError(IDCInDetBSErrContainer::ErrorCode& errWord, ErrorType errType) {
44  errWord |= makeError(errType);
45  }
46 
47 }
48 
49 
51 
52 public:
53  //@name Tool methods
55 
56  virtual ~ISCT_ByteStreamErrorsTool() = default;
57 
61 
62  virtual std::set<IdentifierHash> getErrorSet(int errorType) const =0;
63  virtual std::set<IdentifierHash> getErrorSet(int errorType, const EventContext& ctx) const =0;
64 
66  virtual unsigned int tempMaskedChips(const Identifier& moduleId) const =0;
67  virtual unsigned int tempMaskedChips(const Identifier& moduleId, const EventContext& ctx) const =0;
69  virtual unsigned int abcdErrorChips(const Identifier& moduleId) const =0;
70  virtual unsigned int abcdErrorChips(const Identifier& moduleId, const EventContext& ctx) const =0;
71 
72 private:
73 
74 };
75 
76 #endif // ISCT_ByteStreamErrorsTool_h
ISCT_ByteStreamErrorsTool::DeclareInterfaceID
DeclareInterfaceID(ISCT_ByteStreamErrorsTool, 1, 0)
Creates the InterfaceID and interfaceID() method.
ISCT_ByteStreamErrorsTool::tempMaskedChips
virtual unsigned int tempMaskedChips(const Identifier &moduleId, const EventContext &ctx) const =0
SCT_ByteStreamErrors::addError
void addError(IDCInDetBSErrContainer::ErrorCode &errWord, ErrorType errType)
Definition: ISCT_ByteStreamErrorsTool.h:43
ISCT_ByteStreamErrorsTool::abcdErrorChips
virtual unsigned int abcdErrorChips(const Identifier &moduleId) const =0
Status ABCD errors of chips for a particular module (packed as 1st 12 bits of unsigned int)
ISCT_ConditionsTool.h
ISCT_ByteStreamErrorsTool::getErrorSet
virtual std::set< IdentifierHash > getErrorSet(int errorType) const =0
ISCT_ByteStreamErrorsTool::getErrorSet
virtual std::set< IdentifierHash > getErrorSet(int errorType, const EventContext &ctx) const =0
ISCT_ByteStreamErrorsTool
Definition: ISCT_ByteStreamErrorsTool.h:50
ISCT_ByteStreamErrorsTool::~ISCT_ByteStreamErrorsTool
virtual ~ISCT_ByteStreamErrorsTool()=default
ISCT_ByteStreamErrorsTool::abcdErrorChips
virtual unsigned int abcdErrorChips(const Identifier &moduleId, const EventContext &ctx) const =0
SCT_ByteStreamErrors
Definition: SCT_ByteStreamErrors.h:172
InDetHierarchy.h
IDCInDetBSErrContainer::ErrorCode
uint64_t ErrorCode
Definition: IDCInDetBSErrContainer.h:21
SCT_ByteStreamErrors::ErrorType
ErrorType
SCT byte stream error type enums used in SCT_RodDecoder, SCT_ByteStreamErrorsTool,...
Definition: SCT_ByteStreamErrors.h:178
IDCInDetBSErrContainer.h
ISCT_ByteStreamErrorsTool::tempMaskedChips
virtual unsigned int tempMaskedChips(const Identifier &moduleId) const =0
Temporary status of chips for a particular module (packed as 1st 12 bits of unsigned int)
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
SCT_ByteStreamErrors::makeError
IDCInDetBSErrContainer::ErrorCode makeError(ErrorType errType)
<
Definition: ISCT_ByteStreamErrorsTool.h:33
SCT_ByteStreamErrors.h
Define SCT byte stream errors and utility methods.
ISCT_ConditionsTool
Definition: ISCT_ConditionsTool.h:34
Identifier
Definition: IdentifierFieldParser.cxx:14