ATLAS Offline Software
OnlineErrorCode.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef TRIGSTEERINGEVENT_OnlineErrorCode_H
6 #define TRIGSTEERINGEVENT_OnlineErrorCode_H
7 #include <ostream>
8 #include <cstdint>
9 
10 namespace HLT {
15  enum class OnlineErrorCode : uint32_t {
16  UNCLASSIFIED = 0,
19  NO_EVENT_INFO = 3,
23  NO_HLT_RESULT = 7,
26  AFTER_RESULT_SENT = 10,
27  COOL_UPDATE = 11,
28  TIMEOUT = 12,
29  RESULT_TRUNCATION = 13,
31  BAD_CTP_FRAGMENT = 15,
33  };
34 
35  // There's no cleaner way to map enum to string, but watch out for C++ Reflection TS, it may come one day
36  #define OnlineErrorCodeSwitchCase(ENUM_NAME) \
37  case OnlineErrorCode::ENUM_NAME: return "OnlineErrorCode::"#ENUM_NAME; break;
38 
39  constexpr std::string_view OnlineErrorCodeToString(const OnlineErrorCode code) {
40  switch (code) {
41  OnlineErrorCodeSwitchCase(UNCLASSIFIED);
58  default: return "UNDEFINED_OnlineErrorCode"; break;
59  }
60  }
61 
62  inline std::ostream& operator<< (std::ostream& os, const HLT::OnlineErrorCode code) {
64  }
65 
71  switch (code) {
77  return true;
78  default:
79  return false;
80  }
81  }
82 
83 } // namespace HLT
84 
85 #endif // TRIGSTEERINGEVENT_OnlineErrorCode_H
HLT::OnlineErrorCode::UNCLASSIFIED
@ UNCLASSIFIED
HLT::OnlineErrorCode::TIMEOUT
@ TIMEOUT
HLT::OnlineErrorCode::AFTER_RESULT_SENT
@ AFTER_RESULT_SENT
xAOD::uint32_t
setEventNumber uint32_t
Definition: EventInfo_v1.cxx:127
HLT::OnlineErrorCode::MISSING_CTP_FRAGMENT
@ MISSING_CTP_FRAGMENT
HLT::OnlineErrorCode::OUTPUT_BUILD_FAILURE
@ OUTPUT_BUILD_FAILURE
HLT::OnlineErrorCode::SCHEDULING_FAILURE
@ SCHEDULING_FAILURE
HLT::OnlineErrorCode::CANNOT_ACCESS_SLOT
@ CANNOT_ACCESS_SLOT
HLT::OnlineErrorCode::NO_EVENT_INFO
@ NO_EVENT_INFO
HLT::OnlineErrorCode::BEFORE_NEXT_EVENT
@ BEFORE_NEXT_EVENT
HLT::OnlineErrorCode::BAD_CTP_FRAGMENT
@ BAD_CTP_FRAGMENT
HLT::operator<<
MsgStream & operator<<(MsgStream &m, const Navigation &nav)
Definition: Navigation.cxx:168
OnlineErrorCodeSwitchCase
#define OnlineErrorCodeSwitchCase(ENUM_NAME)
Definition: OnlineErrorCode.h:36
histSizes.code
code
Definition: histSizes.py:129
HLT
It used to be useful piece of code for replacing actual SG with other store of similar functionality ...
Definition: HLTResultReader.h:26
HLT::OnlineErrorCode::OUTPUT_SEND_FAILURE
@ OUTPUT_SEND_FAILURE
HLT::OnlineErrorCode::NO_HLT_RESULT
@ NO_HLT_RESULT
HLT::isEventProcessingErrorCode
constexpr bool isEventProcessingErrorCode(const OnlineErrorCode code)
Definition: OnlineErrorCode.h:70
HLT::OnlineErrorCodeToString
constexpr std::string_view OnlineErrorCodeToString(const OnlineErrorCode code)
Definition: OnlineErrorCode.h:39
ReadFromCoolCompare.os
os
Definition: ReadFromCoolCompare.py:231
HLT::OnlineErrorCode::PROCESSING_FAILURE
@ PROCESSING_FAILURE
HLT::OnlineErrorCode
OnlineErrorCode
Definition: OnlineErrorCode.h:15
HLT::OnlineErrorCode::SCHEDULER_POP_FAILURE
@ SCHEDULER_POP_FAILURE
HLT::OnlineErrorCode::COOL_UPDATE
@ COOL_UPDATE
HLT::OnlineErrorCode::RESULT_TRUNCATION
@ RESULT_TRUNCATION
OnlineErrorCode
Error codes saved to ByteStream status word in case of HLT failure online.
HLT::OnlineErrorCode::CANNOT_RETRIEVE_EVENT
@ CANNOT_RETRIEVE_EVENT