ATLAS Offline Software
Namespaces | Functions | Variables
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

 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;
22  return Action::UNSPECIFIED_;
23 }

◆ 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 )
51  return Reason::UNSPECIFIED_;
52  return Reason::Code(i);
53 }

◆ 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 )
85  return SteeringInternalReason::UNSPECIFIED_;
87 }

◆ strAction()

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

Definition at line 13 of file Enums.cxx.

13  {
14  return ActionNames[code & 0x3];
15 }

◆ 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.

HLT::Reason::Code
Code
Definition: Trigger/TrigEvent/TrigSteeringEvent/TrigSteeringEvent/Enums.h:26
HLT::SteeringInternalReason::Code
Code
Definition: Trigger/TrigEvent/TrigSteeringEvent/TrigSteeringEvent/Enums.h:52
HLTEnums::ReasonNames
const std::string ReasonNames[16]
Definition: Enums.cxx:27
lumiFormat.i
int i
Definition: lumiFormat.py:92
HLT::SteeringInternalReason::LAST_
@ LAST_
there is basically no restriction on size since these errors are not saved per chain so do not need t...
Definition: Trigger/TrigEvent/TrigSteeringEvent/TrigSteeringEvent/Enums.h:66
pmontree.code
code
Definition: pmontree.py:443
HLT::Reason::LAST_
@ LAST_
and can't be higher because of serialization in the chain
Definition: Trigger/TrigEvent/TrigSteeringEvent/TrigSteeringEvent/Enums.h:43
CondAlgsOpts.found
int found
Definition: CondAlgsOpts.py:101
str
Definition: BTagTrackIpAccessor.cxx:11
HLTEnums::SteeringInternalReasonNames
const std::string SteeringInternalReasonNames[]
Definition: Enums.cxx:57
ActionNames
const std::string ActionNames[4]
Definition: Enums.cxx:11