ATLAS Offline Software
Loading...
Searching...
No Matches
Enums.cxx File Reference
#include "TrigSteeringEvent/Enums.h"
#include <string>
#include <sstream>
#include <iostream>
Include dependency graph for Enums.cxx:

Go to the source code of this file.

Namespaces

namespace  HLTEnums

Functions

const std::string & strAction (const Action::Code code)
Action::Code getActionFromString (const std::string &str)
const std::string strReason (const Reason::Code code)
Reason::Code getReasonFromString (const std::string &str)
SteeringInternalReason::Code getSteeringInternalReasonFromString (const std::string &str)
const std::string strSteeringInternalReason (const SteeringInternalReason::Code code)

Variables

const std::string ActionNames [4] = {"CONTINUE", "ABORT_CHAIN", "ABORT_EVENT", "ABORT_JOB"}
const std::string HLTEnums::ReasonNames [16]
const std::string HLTEnums::SteeringInternalReasonNames []

Function Documentation

◆ getActionFromString()

Action::Code getActionFromString ( const std::string & str)

Definition at line 17 of file Enums.cxx.

17 {
18 if (str == "CONTINUE") return Action::CONTINUE;
19 else if (str == "ABORT_CHAIN") return Action::ABORT_CHAIN;
20 else if (str == "ABORT_EVENT") return Action::ABORT_EVENT;
21 else if (str == "ABORT_JOB") return Action::ABORT_JOB;
23}
@ 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

◆ getReasonFromString()

Reason::Code getReasonFromString ( const std::string & str)

Definition at line 41 of file Enums.cxx.

41 {
42 bool found = false;
43 int i=0;
44 for ( i = 0; i < HLT::Reason::LAST_; ++i ) {
45 if (str == HLTEnums::ReasonNames[i]) {
46 found = true;
47 break;
48 }
49 }
50 if ( ! found )
52 return Reason::Code(i);
53}
const std::string ReasonNames[16]
Definition Enums.cxx:27
@ LAST_
and can't be higher because of serialization in the chain

◆ getSteeringInternalReasonFromString()

SteeringInternalReason::Code getSteeringInternalReasonFromString ( const std::string & str)

Definition at line 74 of file Enums.cxx.

74 {
75 bool found = false;
76 unsigned int i=0;
77
78 for ( i = 0; i < HLT::SteeringInternalReason::LAST_; ++i ) {
80 found = true;
81 break;
82 }
83 }
84 if ( ! found )
87}
const std::string SteeringInternalReasonNames[]
Definition Enums.cxx:57
@ LAST_
there is basically no restriction on size since these errors are not saved per chain so do not need t...

◆ strAction()

const std::string & strAction ( const Action::Code code)

Definition at line 13 of file Enums.cxx.

13 {
14 return ActionNames[code & 0x3];
15}
const std::string ActionNames[4]
Definition Enums.cxx:11

◆ strReason()

const std::string strReason ( const Reason::Code code)

Definition at line 37 of file Enums.cxx.

37 {
38 return HLTEnums::ReasonNames[code & 0xf];
39}

◆ strSteeringInternalReason()

const std::string strSteeringInternalReason ( const SteeringInternalReason::Code code)

Definition at line 92 of file Enums.cxx.

92 {
93 if ( unsigned(code) < HLT::SteeringInternalReason::LAST_ )
95 return "UNSPECIFIED_";
96}

Variable Documentation

◆ ActionNames

const std::string ActionNames[4] = {"CONTINUE", "ABORT_CHAIN", "ABORT_EVENT", "ABORT_JOB"}

Definition at line 11 of file Enums.cxx.

11{"CONTINUE", "ABORT_CHAIN", "ABORT_EVENT", "ABORT_JOB"};