ATLAS Offline Software
Loading...
Searching...
No Matches
Trigger/TrigEvent/TrigSteeringEvent/TrigSteeringEvent/Enums.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef TRIGSTEERINGEVENT_ENUMS_H
6#define TRIGSTEERINGEVENT_ENUMS_H
7
8#include <string>
9#include <stdint.h>
10
11namespace HLT {
12 struct Action {
13 typedef enum {
19
20 } Code;
21 };
22
45
46
47
48
68
78 class ErrorCode {
79 public:
80 ErrorCode();
83
84
85 ErrorCode(uint32_t c);
87
90
92
93 // comparison operators
94 bool operator==(const ErrorCode& ec) const;
95 bool operator!=(const ErrorCode& ec) const;
96
97 bool operator<(const ErrorCode& ec) const;
98 bool operator>(const ErrorCode& ec) const;
99
100 // conversions
101 operator uint32_t() const {return code;}
102
103 // bool operator<(const ErrorCode& e1, const ErrorCode& e2 ) {return e1.code & 0x3;}// < e.code &0x3; }
104 Action::Code action() const;
105 Reason::Code reason() const;
107
108 std::string str();
109
110 uint32_t code;
111 };
112
113 std::string strErrorCode(const ErrorCode code);
114 // const std::string& str(const Reason::Code code) { return "U"; }
115
116
117 //bunch of defines for backward compatibility
121
134
140
146
147
148 // keep order so that worst is most right!
149 /* enum ErrorCode {
150 OK=0, MISSING_FEATURE,
151 STOP_THIS_CHAIN_,
152 ERROR,
153 INVALID_TE, TOOL_FAILURE,
154 NUM_ERROR, SG_ERROR, NAV_ERROR,
155 GAUDI_EXCEPTION, EFORMAT_EXCEPTION, STD_EXCEPTION, UNKNOWN_EXCEPTION, // bunch of exceptions we handle
156 STOP_EVENT_,
157 NO_LVL1_ITEMS, NO_LVL2_CHAINS,
158 NO_LVL1_RESULT, WRONG_HLT_RESULT, NO_HLT_RESULT,
159 TIMEOUT,
160 STOP_JOB_,
161 BAD_JOB_SETUP, BAD_ALGO_CONFIG, FATAL, LAST_ERROR };
162
163
164 const std::string& strErrorCode( ErrorCode ec );
165 */
166 // search for the ErrorCode and return the position. return -1 if it can not be found.
167 int getErrorCodePosFromStr(const std::string& ec);
168
170
171 enum HLTLevel { L2 = 0, EF, HLT, UNKNOWN };
172
173}
174
175
176
177// definitions
181
182
183inline HLT::ErrorCode::ErrorCode(uint32_t c) { code = c; }
184inline HLT::ErrorCode::ErrorCode(const HLT::ErrorCode c, HLT::Reason::Code r) { code = c.code; code &= 0x30; code |= r; }
185
188
190
191// comapricon operators
192inline bool HLT::ErrorCode::operator==(const HLT::ErrorCode& ec) const { return uint32_t(*this) == uint32_t(ec); }
193inline bool HLT::ErrorCode::operator!=(const HLT::ErrorCode& ec) const { return !(*this == ec); }
194
195inline bool HLT::ErrorCode::operator<(const HLT::ErrorCode& ec) const { return uint32_t(*this) < uint32_t(ec); }
196inline bool HLT::ErrorCode::operator>(const HLT::ErrorCode& ec) const { return !(*this<ec) && !(*this == ec); }
197
198// conversions
199//HLT::ErrorCode::operator uint32_t() const { return code; }
200
201// bool operator<(const ErrorCode& e1, const ErrorCode& e2 ) {return e1.code & 0x3;}// < e.code &0x3; }
205
206
207
208#endif
static Double_t a
uint32_t code
storage of error code where 4 least significant bits(0-3) are storing Reason, 2 next (4-5) are for Ac...
SteeringInternalReason::Code steeringInternalReason() const
std::string str()
Definition Enums.cxx:134
int r
Definition globals.cxx:22
It used to be useful piece of code for replacing actual SG with other store of similar functionality ...
static const ErrorCode OK(Action::CONTINUE)
static const ErrorCode STOP_EVENT_(Action::ABORT_EVENT)
static const ErrorCode UNKNOWN_EXCEPTION(Action::ABORT_CHAIN, Reason::UNKNOWN_EXCEPTION)
static const ErrorCode ERROR(Action::ABORT_CHAIN, Reason::UNKNOWN)
static const ErrorCode BAD_ALGO_CONFIG(Action::ABORT_JOB, Reason::BAD_JOB_SETUP)
static const ErrorCode NO_LVL1_RESULT(Action::ABORT_EVENT, SteeringInternalReason::NO_LVL1_RESULT)
static const ErrorCode BAD_JOB_SETUP(Action::ABORT_JOB, Reason::BAD_JOB_SETUP)
static const ErrorCode LAST_ERROR(Action::ABORT_JOB, Reason::LAST_, SteeringInternalReason::LAST_)
static const ErrorCode WRONG_HLT_RESULT(Action::ABORT_EVENT, SteeringInternalReason::WRONG_HLT_RESULT)
static const ErrorCode MISSING_FEATURE(Action::CONTINUE, Reason::MISSING_FEATURE)
static const ErrorCode GAUDI_EXCEPTION(Action::ABORT_CHAIN, Reason::GAUDI_EXCEPTION)
static const ErrorCode NO_LVL2_CHAINS(Action::ABORT_EVENT, SteeringInternalReason::NO_LVL2_CHAINS)
static const ErrorCode SG_ERROR(Action::ABORT_CHAIN, Reason::NAV_ERROR)
static const ErrorCode TOOL_FAILURE(Action::ABORT_CHAIN, Reason::UNKNOWN)
static const ErrorCode STOP_JOB_(Action::ABORT_JOB)
static const ErrorCode STOP_THIS_CHAIN_(Action::CONTINUE, Reason::MISSING_FEATURE)
std::string strErrorCode(const ErrorCode code)
Definition Enums.cxx:99
static const ErrorCode INVALID_TE(Action::ABORT_CHAIN, Reason::UNKNOWN)
int getErrorCodePosFromStr(const std::string &ec)
Definition Enums.cxx:105
const FeatureContainerInit< FEATURE, CONTAINER > RegisterFeatureContainerTypes< FEATURE, CONTAINER >::s
static const ErrorCode NUM_ERROR(Action::ABORT_CHAIN, Reason::UNKNOWN)
static const ErrorCode EFORMAT_EXCEPTION(Action::ABORT_CHAIN, Reason::EFORMAT_EXCEPTION)
static const ErrorCode FATAL(Action::ABORT_JOB, Reason::UNKNOWN)
void reportErrorCode(ErrorCode &e1, ErrorCode e2)
static const ErrorCode STD_EXCEPTION(Action::ABORT_CHAIN, Reason::STD_EXCEPTION)
static const ErrorCode NO_LVL1_ITEMS(Action::ABORT_EVENT, SteeringInternalReason::NO_LVL1_ITEMS)
static const ErrorCode NAV_ERROR(Action::ABORT_CHAIN, Reason::NAV_ERROR)
@ CONTINUE
if all is OK the processing should be continued
@ ABORT_CHAIN
if things went wrong but it is not severe, other unrelated chains will continue
@ ABORT_EVENT
if things went wrong severely, event corruption suspected
@ USERDEF_1
this is custom user defined code: for clarity users should define consts i.e.
@ BAD_JOB_SETUP
the job is possibly badly configured (2 places where this can occur: configuration,...
@ LAST_
and can't be higher because of serialization in the chain
@ MISSING_ROD
while unpacking detector data ROD fragment is missing
@ MISSING_FEATURE
the feataure was expected but could not be found
@ CORRUPTED_ROD
ROD with the detector data seems to be corrupted.
@ NO_LVL2_CHAINS
in the LVL2 result unpacked at EF no active LVL2 chains are present, that means no seeding informatio...
@ NO_LVL1_ITEMS
in the LVL1 result delivered to LVL2 none of LVL1 items are present, that means no seeding informatio...
@ MISSING_OTHER_ROI
one ore more missing RoI except CALO/MUON (e.g.
@ WRONG_HLT_RESULT
error while unpacking HLT reult (happnes at EF when LVL2 result is unpacked)
@ NO_HLT_RESULT
no HLT result is present (means that LVL2 result was not delivered to EF)
@ LAST_
there is basically no restriction on size since these errors are not saved per chain so do not need t...