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-2017 CERN for the benefit of the ATLAS collaboration
3*/
4
5#pragma once
6#ifndef TRIGINTERFACES_ENUMS_H
7#define TRIGINTERFACES_ENUMS_H
8
9#include <vector>
10#include <string>
11#include <stdint.h>
12
13namespace HLT {
14 struct Action {
15 typedef enum {
21
22 } Code;
23 };
24
47
48
49
50
70
80 class ErrorCode {
81 public:
82 ErrorCode();
85
86
87 ErrorCode(uint32_t c);
89
92
94
95 // comapricon operators
96 bool operator==(const ErrorCode& ec) const;
97 bool operator!=(const ErrorCode& ec) const;
98
99 bool operator<(const ErrorCode& ec) const;
100 bool operator>(const ErrorCode& ec) const;
101
102 // conversions
103 operator uint32_t() const {return code;}
104
105 // bool operator<(const ErrorCode& e1, const ErrorCode& e2 ) {return e1.code & 0x3;}// < e.code &0x3; }
106 Action::Code action() const;
107 Reason::Code reason() const;
109
110 std::string str();
111
112 uint32_t code;
113 };
114
115 std::string strErrorCode(const ErrorCode code);
116 // const std::string& str(const Reason::Code code) { return "U"; }
117
118
119 //bunch of defines for backward compatibility
123
136
142
148
149
150 // keep order so that worst is most right!
151 /* enum ErrorCode {
152 OK=0, MISSING_FEATURE,
153 STOP_THIS_CHAIN_,
154 ERROR,
155 INVALID_TE, TOOL_FAILURE,
156 NUM_ERROR, SG_ERROR, NAV_ERROR,
157 GAUDI_EXCEPTION, EFORMAT_EXCEPTION, STD_EXCEPTION, UNKNOWN_EXCEPTION, // bunch of exceptions we handle
158 STOP_EVENT_,
159 NO_LVL1_ITEMS, NO_LVL2_CHAINS,
160 NO_LVL1_RESULT, WRONG_HLT_RESULT, NO_HLT_RESULT,
161 TIMEOUT,
162 STOP_JOB_,
163 BAD_JOB_SETUP, BAD_ALGO_CONFIG, FATAL, LAST_ERROR };
164
165
166 const std::string& strErrorCode( ErrorCode ec );
167 */
168 // search for the ErrorCode and return the position. return -1 if it can not be found.
169 int getErrorCodePosFromStr(const std::string& ec);
170
172
173 enum HLTLevel { L2 = 0, EF, HLT, UNKNOWN };
174
175}
176
177
178
179// definitions
183
184
185inline HLT::ErrorCode::ErrorCode(uint32_t c) { code = c; }
186inline HLT::ErrorCode::ErrorCode(const HLT::ErrorCode c, HLT::Reason::Code r) { code = c.code; code &= 0x30; code |= r; }
187
190
192
193// comapricon operators
194inline bool HLT::ErrorCode::operator==(const HLT::ErrorCode& ec) const { return uint32_t(*this) == uint32_t(ec); }
195inline bool HLT::ErrorCode::operator!=(const HLT::ErrorCode& ec) const { return !(*this == ec); }
196
197inline bool HLT::ErrorCode::operator<(const HLT::ErrorCode& ec) const { return uint32_t(*this) < uint32_t(ec); }
198inline bool HLT::ErrorCode::operator>(const HLT::ErrorCode& ec) const { return !(*this<ec) && !(*this == ec); }
199
200// conversions
201//HLT::ErrorCode::operator uint32_t() const { return code; }
202
203// bool operator<(const ErrorCode& e1, const ErrorCode& e2 ) {return e1.code & 0x3;}// < e.code &0x3; }
207
208
209
210#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...