ATLAS Offline Software
Loading...
Searching...
No Matches
TrigConf::L1DataDef Class Reference

#include <L1DataDef.h>

Collaboration diagram for TrigConf::L1DataDef:

Classes

struct  TriggerTypeConfig

Public Types

enum  TriggerType {
  EM =1 , TAU , MUON , JET ,
  FJET , FJ , JE , JF ,
  JB , XE , TE , XS ,
  MBTS , MBTSSI , LUCID , TRT ,
  BCM , ZDC , NIM , ZB ,
  TH , M , BCMCMB , CALREQ ,
  BPTX , TOPO , ALFA , BGRP = 100 ,
  RNDM , PCLK , UNDEF = 199
}
typedef TriggerTypeConfig InternalTriggerType
typedef std::map< TriggerType, TriggerTypeConfigTypeConfigMap_t
typedef std::map< std::string, TriggerTypeSTypeTypeMap_t

Static Public Member Functions

static void setMaxThresholdsFromL1Version (unsigned int l1version)
static void printMaxThresholds ()
static TriggerType stringAsType (const std::string &type)
static std::string & typeAsString (TriggerType tt)
static const std::vector< TriggerType > & types ()
static const TypeConfigMap_ttypeConfigs ()
static TriggerTypeConfigtypeConfig (TriggerType tt)
static bool addConfig (TriggerType tt, const std::string &name, unsigned int max, bool internal=false)
static void setOldJEP3Cabling ()
static void setNewJEP3Cabling ()

Static Private Attributes

static TypeConfigMap_t g_typeConfigs ATLAS_THREAD_SAFE
static STypeTypeMap_t g_sTypeType ATLAS_THREAD_SAFE
static std::vector< TriggerType > g_Types ATLAS_THREAD_SAFE
static unsigned int g_l1Version ATLAS_THREAD_SAFE {0}

Detailed Description

Definition at line 16 of file L1DataDef.h.

Member Typedef Documentation

◆ InternalTriggerType

◆ STypeTypeMap_t

typedef std::map<std::string, TriggerType> TrigConf::L1DataDef::STypeTypeMap_t

Definition at line 43 of file L1DataDef.h.

◆ TypeConfigMap_t

Definition at line 42 of file L1DataDef.h.

Member Enumeration Documentation

◆ TriggerType

Enumerator
EM 
TAU 
MUON 
JET 
FJET 
FJ 
JE 
JF 
JB 
XE 
TE 
XS 
MBTS 
MBTSSI 
LUCID 
TRT 
BCM 
ZDC 
NIM 
ZB 
TH 
BCMCMB 
CALREQ 
BPTX 
TOPO 
ALFA 
BGRP 
RNDM 
PCLK 
UNDEF 

Definition at line 19 of file L1DataDef.h.

19 {
20 EM=1, TAU, MUON, // 1-3
21 JET, FJET, FJ, JE, JF, JB, // 4-9
22 XE, TE, XS, // 10 - 12
23 MBTS, MBTSSI, LUCID, TRT, BCM, ZDC, NIM, // 13 - 19
24 ZB, TH, M, BCMCMB, CALREQ, BPTX, // 20 - 25
25 TOPO, // 26
26 ALFA, // 27
27 BGRP = 100, RNDM, PCLK, // 100 - 102
28 UNDEF = 199 // 199
29 };

Member Function Documentation

◆ addConfig()

bool TrigConf::L1DataDef::addConfig ( TriggerType tt,
const std::string & name,
unsigned int max,
bool internal = false )
inlinestatic

Definition at line 60 of file L1DataDef.h.

60 {
61 g_typeConfigs.insert(TypeConfigMap_t::value_type(tt, TriggerTypeConfig(tt, name, max, internal)));
62 g_sTypeType.insert(STypeTypeMap_t::value_type(name,tt));
63 g_Types.push_back(tt);
64 return true;
65 }
#define max(a, b)
Definition cfImp.cxx:41

◆ printMaxThresholds()

void TrigConf::L1DataDef::printMaxThresholds ( )
static

Definition at line 57 of file L1DataDef.cxx.

57 {
58 std::cout << "L1 Version: " << g_l1Version << std::endl;
59 for(const auto & x: g_typeConfigs) {
60 std::cout << "Maximum number of thresholds for type " << std::setw(6) << x.second.name << " : " << x.second.max << std::endl;
61 }
62}
#define x

◆ setMaxThresholdsFromL1Version()

void TrigConf::L1DataDef::setMaxThresholdsFromL1Version ( unsigned int l1version)
static

Definition at line 65 of file L1DataDef.cxx.

65 {
66 // this has to come from L1Common/L1CommonVersion.h
67 if(l1version==0) {
68 typeConfig(EM).max = 16;
69 typeConfig(TAU).max = 8;
70 typeConfig(MUON).max = 6;
71 typeConfig(TH).max = 8;
72 typeConfig(JET).max = 8;
73 typeConfig(FJET).max = 0;
74 typeConfig(FJ).max = 8;
75 typeConfig(JF).max = 4;
76 typeConfig(JB).max = 4;
77 typeConfig(JE).max = 4;
78 typeConfig(M).max = 6;
79 typeConfig(TE).max = 8;
80 typeConfig(XE).max = 8;
81 typeConfig(XS).max = 8;
82 typeConfig(RNDM).max = 2;
83 typeConfig(PCLK).max = 2;
84 typeConfig(BGRP).max = 8;
85 typeConfig(MBTS).max = 2;
86 typeConfig(MBTSSI).max = 32;
87 typeConfig(NIM).max = 37;
90 typeConfig(BPTX).max = 2;
91 typeConfig(LUCID).max = 2;
92 typeConfig(TRT).max = 1;
93 typeConfig(BCM).max = 3;
94 typeConfig(ZDC).max = 3;
95 typeConfig(ZB).max = 10;
96 typeConfig(TOPO).max = 0;
97 typeConfig(ALFA).max = 0;
98 } else if (l1version==1) {
99 typeConfig(EM).max = 16;
100 typeConfig(TAU).max = 16;
101 typeConfig(MUON).max = 6;
102 typeConfig(TH).max = 8;
103 typeConfig(JET).max = 25;
104 typeConfig(FJET).max = 0;
105 typeConfig(FJ).max = 0;
106 typeConfig(JF).max = 0;
107 typeConfig(JB).max = 0;
108 typeConfig(JE).max = 0;
109 typeConfig(M).max = 6;
110 typeConfig(TE).max = 16;
111 typeConfig(XE).max = 16;
112 typeConfig(XS).max = 8;
113 typeConfig(RNDM).max = 4;
114 typeConfig(PCLK).max = 0;
115 typeConfig(BGRP).max = 16;
116 typeConfig(MBTS).max = 3;
117 typeConfig(MBTSSI).max = 32;
118 typeConfig(NIM).max = 37;
119 typeConfig(BCMCMB).max = 1;
120 typeConfig(CALREQ).max = 3;
121 typeConfig(BPTX).max = 2;
122 typeConfig(LUCID).max = 6;
123 typeConfig(TRT).max = 1;
124 typeConfig(BCM).max = 6;
125 typeConfig(ZDC).max = 3;
126 typeConfig(ZB).max = 10;
127 typeConfig(TOPO).max = 128;
128 typeConfig(ALFA).max = 64;
129 } else {
130 std::cerr << "ERROR TrigConf::L1DataDef::setMaxThresholdsFromL1Version() L1Version not known:" << l1version << std::endl;
131 throw(std::runtime_error("Unknown L1 Version"));
132 }
133
134 g_l1Version=l1version;
135
136}
static TriggerTypeConfig & typeConfig(TriggerType tt)

◆ setNewJEP3Cabling()

void TrigConf::L1DataDef::setNewJEP3Cabling ( )
static

Definition at line 160 of file L1DataDef.cxx.

160 {
161 typeConfig(TE).max = 8;
162 typeConfig(XE).max = 8;
163 typeConfig(XS).max = 8;
164}

◆ setOldJEP3Cabling()

void TrigConf::L1DataDef::setOldJEP3Cabling ( )
static

Definition at line 152 of file L1DataDef.cxx.

152 {
153 typeConfig(TE).max = 4;
154 typeConfig(XE).max = 8;
155 typeConfig(XS).max = 0;
156}

◆ stringAsType()

TriggerType TrigConf::L1DataDef::stringAsType ( const std::string & type)
inlinestatic

Definition at line 51 of file L1DataDef.h.

51{ return g_sTypeType[type]; }

◆ typeAsString()

std::string & TrigConf::L1DataDef::typeAsString ( TriggerType tt)
inlinestatic

Definition at line 53 of file L1DataDef.h.

53{ return typeConfig(tt).name; }

◆ typeConfig()

TrigConf::L1DataDef::TriggerTypeConfig & TrigConf::L1DataDef::typeConfig ( TriggerType tt)
static

Definition at line 140 of file L1DataDef.cxx.

140 {
141 TypeConfigMap_t::iterator c = g_typeConfigs.find(tt);
142 if( c==g_typeConfigs.end() ) {
143 std::cerr << "Trigger type " << tt << " is defined in L1DataDef.h but not registered in L1DataDef.cxx" << std::endl;
144 throw std::runtime_error("TriggerType not registered");
145 }
146 return c->second;
147}

◆ typeConfigs()

const TypeConfigMap_t & TrigConf::L1DataDef::typeConfigs ( )
inlinestatic

Definition at line 57 of file L1DataDef.h.

57{ return g_typeConfigs; }

◆ types()

const std::vector< TriggerType > & TrigConf::L1DataDef::types ( )
inlinestatic

Definition at line 55 of file L1DataDef.h.

55{ return g_Types; }

Member Data Documentation

◆ ATLAS_THREAD_SAFE [1/4]

TypeConfigMap_t g_typeConfigs TrigConf::L1DataDef::ATLAS_THREAD_SAFE
inlinestaticprivate

Definition at line 72 of file L1DataDef.h.

◆ ATLAS_THREAD_SAFE [2/4]

STypeTypeMap_t g_sTypeType TrigConf::L1DataDef::ATLAS_THREAD_SAFE
inlinestaticprivate

Definition at line 73 of file L1DataDef.h.

◆ ATLAS_THREAD_SAFE [3/4]

std::vector<TriggerType> g_Types TrigConf::L1DataDef::ATLAS_THREAD_SAFE
inlinestaticprivate

Definition at line 74 of file L1DataDef.h.

◆ ATLAS_THREAD_SAFE [4/4]

unsigned int g_l1Version TrigConf::L1DataDef::ATLAS_THREAD_SAFE {0}
inlinestaticprivate

Definition at line 75 of file L1DataDef.h.

75{0};

The documentation for this class was generated from the following files: