ATLAS Offline Software
Static Public Member Functions | Static Private Member Functions | Static Private Attributes | List of all members
MuonCalib::MuonCalibTriggerTypeHelper Class Reference

helper class to for MuonCalibTriggerType which provides a mapping to the actual bit number More...

#include <MuonCalibTriggerInfo.h>

Collaboration diagram for MuonCalib::MuonCalibTriggerTypeHelper:

Static Public Member Functions

static std::vector< int > triggerBits (MuonCalibTriggerType type)
 get trigger bit for a given type More...
 
static std::string itemName (MuonCalibTriggerType type)
 get trigger bit for a given type More...
 
static bool validType (MuonCalibTriggerType type)
 check whether type is valid More...
 
static bool isRpcTrigger (MuonCalibTriggerType type)
 check whether type is valid More...
 
static bool isTgcTrigger (MuonCalibTriggerType type)
 check whether type is valid More...
 
static bool isMbtsTrigger (MuonCalibTriggerType type)
 check whether type is valid More...
 
static bool isLVL1CaloTrigger (MuonCalibTriggerType type)
 check whether type is valid More...
 
static void dumpMapping ()
 dump mapping More...
 

Static Private Member Functions

static void addEntry (MuonCalibTriggerType type, int bit, const std::string &name)
 
static void addEntry (MuonCalibTriggerType type, std::vector< int > &bits, const std::string &name)
 
static void initMap ()
 

Static Private Attributes

static std::vector< std::pair< std::vector< int >, std::string > > m_typeToBitAndStringMapping
 

Detailed Description

helper class to for MuonCalibTriggerType which provides a mapping to the actual bit number

Definition at line 34 of file MuonCalibTriggerInfo.h.

Member Function Documentation

◆ addEntry() [1/2]

void MuonCalib::MuonCalibTriggerTypeHelper::addEntry ( MuonCalibTriggerType  type,
int  bit,
const std::string &  name 
)
staticprivate

Definition at line 50 of file MuonCalibTriggerInfo.cxx.

50  {
51  if (!validType(type)) {
52  MsgStream log(Athena::getMessageSvc(), "MuonCalibTriggerTypeHelper");
53  log << MSG::WARNING << "MuonCalibTriggerTypeHelper::addEntry -> invalid trigger type" << endmsg;
54  return;
55  }
56  std::vector<int> bits;
57  bits.push_back(bit);
58  m_typeToBitAndStringMapping[type] = std::make_pair(bits, name);
59  }

◆ addEntry() [2/2]

void MuonCalib::MuonCalibTriggerTypeHelper::addEntry ( MuonCalibTriggerType  type,
std::vector< int > &  bits,
const std::string &  name 
)
staticprivate

Definition at line 61 of file MuonCalibTriggerInfo.cxx.

61  {
62  if (!validType(type)) {
63  MsgStream log(Athena::getMessageSvc(), "MuonCalibTriggerTypeHelper");
64  log << MSG::WARNING << "MuonCalibTriggerTypeHelper::addEntry -> invalid trigger type" << endmsg;
65  return;
66  }
67  m_typeToBitAndStringMapping[type] = std::make_pair(bits, name);
68  }

◆ dumpMapping()

void MuonCalib::MuonCalibTriggerTypeHelper::dumpMapping ( )
static

dump mapping

Definition at line 106 of file MuonCalibTriggerInfo.cxx.

106  {
107  initMap();
108  MsgStream log(Athena::getMessageSvc(), "MuonCalibTriggerTypeHelper");
109  log << MSG::INFO << "MuonCalibTriggerTypeHelper::dumpMapping, map size " << m_typeToBitAndStringMapping.size() << endmsg;
110  std::vector<std::pair<std::vector<int>, std::string> >::const_iterator it = m_typeToBitAndStringMapping.begin();
111  std::vector<std::pair<std::vector<int>, std::string> >::const_iterator it_end = m_typeToBitAndStringMapping.end();
112  int index = 0;
113  for (; it != it_end; ++it) {
114  log << MSG::INFO << "index " << index++ << " type " << it->second << " nbits " << it->first.size() << " bits " << endmsg;
115  for (unsigned int i = 0; i < it->first.size(); ++i) { log << MSG::INFO << " " << it->first[i] << endmsg; }
116  }
117  }

◆ initMap()

void MuonCalib::MuonCalibTriggerTypeHelper::initMap ( )
staticprivate

Definition at line 70 of file MuonCalibTriggerInfo.cxx.

70  {
71  if (!m_typeToBitAndStringMapping.empty()) return;
73 
74  addEntry(L1_EM3, 0, "L1_EM3");
75  addEntry(L1_TAU5, 64, "L1_TAU5");
76  addEntry(L1_J5, 96, "L1_J5");
77  addEntry(L1_XE20, 129, "L1_XE20");
78 
79  std::vector<int> bits;
80  bits.push_back(23);
81  for (int i = 30; i <= 45; ++i) bits.push_back(i);
82  addEntry(L1_MBTS_1_COMM, bits, "L1_MBTS_1_COMM");
83 
84  bits.clear();
85  bits.push_back(24);
86  for (int i = 46; i <= 61; ++i) bits.push_back(i);
87  addEntry(L1_MBTS_2_COMM, bits, "L1_MBTS_2_COMM");
88  addEntry(L1_MU0_LOW_RPC, 89, "L1_MU0_LOW_RPC");
89  addEntry(L1_MU6_RPC, 90, "L1_MU6_RPC");
90  addEntry(L1_MU0_HIGH_RPC, 93, "L1_MU0_HIGH_RPC");
91  addEntry(L1_MU0_TGC_HALO, 88, "L1_MU0_TGC_HALO");
92  addEntry(L1_MU0_TGC, 91, "L1_MU0_TGC");
93  addEntry(L1_MU6_TGC, 92, "L1_MU6_TGC");
94  addEntry(NUMBEROFKNOWNTRIGGERS, -1, "UNKNOWN");
95  }

◆ isLVL1CaloTrigger()

bool MuonCalib::MuonCalibTriggerTypeHelper::isLVL1CaloTrigger ( MuonCalibTriggerType  type)
static

check whether type is valid

Definition at line 45 of file MuonCalibTriggerInfo.cxx.

45  {
46  if (type == L1_EM3 || type == L1_TAU5 || type == L1_J5 || type == L1_XE20) return true;
47  return false;
48  }

◆ isMbtsTrigger()

bool MuonCalib::MuonCalibTriggerTypeHelper::isMbtsTrigger ( MuonCalibTriggerType  type)
static

check whether type is valid

Definition at line 40 of file MuonCalibTriggerInfo.cxx.

40  {
41  if (type == L1_MBTS_1_COMM || type == L1_MBTS_2_COMM) return true;
42  return false;
43  }

◆ isRpcTrigger()

bool MuonCalib::MuonCalibTriggerTypeHelper::isRpcTrigger ( MuonCalibTriggerType  type)
static

check whether type is valid

Definition at line 30 of file MuonCalibTriggerInfo.cxx.

30  {
31  if (type == L1_MU0_LOW_RPC || type == L1_MU6_RPC || type == L1_MU0_HIGH_RPC) return true;
32  return false;
33  }

◆ isTgcTrigger()

bool MuonCalib::MuonCalibTriggerTypeHelper::isTgcTrigger ( MuonCalibTriggerType  type)
static

check whether type is valid

Definition at line 35 of file MuonCalibTriggerInfo.cxx.

35  {
36  if (type == L1_MU0_TGC_HALO || type == L1_MU0_TGC || type == L1_MU6_TGC) return true;
37  return false;
38  }

◆ itemName()

std::string MuonCalib::MuonCalibTriggerTypeHelper::itemName ( MuonCalibTriggerType  type)
static

get trigger bit for a given type

Definition at line 22 of file MuonCalibTriggerInfo.cxx.

22  {
23  initMap();
25  return m_typeToBitAndStringMapping[type].second;
26  }

◆ triggerBits()

std::vector< int > MuonCalib::MuonCalibTriggerTypeHelper::triggerBits ( MuonCalibTriggerType  type)
static

get trigger bit for a given type

Definition at line 16 of file MuonCalibTriggerInfo.cxx.

16  {
17  initMap();
19  return m_typeToBitAndStringMapping[type].first;
20  }

◆ validType()

bool MuonCalib::MuonCalibTriggerTypeHelper::validType ( MuonCalibTriggerType  type)
static

check whether type is valid

Definition at line 28 of file MuonCalibTriggerInfo.cxx.

28 { return (type >= L1_EM3 && type < NUMBEROFKNOWNTRIGGERS); }

Member Data Documentation

◆ m_typeToBitAndStringMapping

std::vector< std::pair< std::vector< int >, std::string > > MuonCalib::MuonCalibTriggerTypeHelper::m_typeToBitAndStringMapping
staticprivate

Definition at line 64 of file MuonCalibTriggerInfo.h.


The documentation for this class was generated from the following files:
MuonCalib::L1_MU0_HIGH_RPC
@ L1_MU0_HIGH_RPC
Definition: MuonCalibTriggerInfo.h:25
MuonCalib::MuonCalibTriggerTypeHelper::validType
static bool validType(MuonCalibTriggerType type)
check whether type is valid
Definition: MuonCalibTriggerInfo.cxx:28
MuonCalib::MuonCalibTriggerTypeHelper::addEntry
static void addEntry(MuonCalibTriggerType type, int bit, const std::string &name)
Definition: MuonCalibTriggerInfo.cxx:50
MuonCalib::MuonCalibTriggerTypeHelper::initMap
static void initMap()
Definition: MuonCalibTriggerInfo.cxx:70
index
Definition: index.py:1
MuonCalib::L1_XE20
@ L1_XE20
Definition: MuonCalibTriggerInfo.h:20
MuonCalib::L1_MU6_TGC
@ L1_MU6_TGC
Definition: MuonCalibTriggerInfo.h:28
skel.it
it
Definition: skel.GENtoEVGEN.py:423
Athena::getMessageSvc
IMessageSvc * getMessageSvc(bool quiet=false)
Definition: getMessageSvc.cxx:20
MuonCalib::MuonCalibTriggerTypeHelper::m_typeToBitAndStringMapping
static std::vector< std::pair< std::vector< int >, std::string > > m_typeToBitAndStringMapping
Definition: MuonCalibTriggerInfo.h:64
MuonCalib::L1_MBTS_2_COMM
@ L1_MBTS_2_COMM
Definition: MuonCalibTriggerInfo.h:22
lumiFormat.i
int i
Definition: lumiFormat.py:92
MuonCalib::L1_J5
@ L1_J5
Definition: MuonCalibTriggerInfo.h:19
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
MuonCalib::L1_EM3
@ L1_EM3
Definition: MuonCalibTriggerInfo.h:17
MuonCalib::L1_MU0_TGC_HALO
@ L1_MU0_TGC_HALO
Definition: MuonCalibTriggerInfo.h:26
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
MuonCalib::L1_TAU5
@ L1_TAU5
Definition: MuonCalibTriggerInfo.h:18
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
MuonCalib::L1_MBTS_1_COMM
@ L1_MBTS_1_COMM
Definition: MuonCalibTriggerInfo.h:21
MuonCalib::L1_MU0_LOW_RPC
@ L1_MU0_LOW_RPC
Definition: MuonCalibTriggerInfo.h:23
python.CaloCondTools.log
log
Definition: CaloCondTools.py:20
MuonCalib::NUMBEROFKNOWNTRIGGERS
@ NUMBEROFKNOWNTRIGGERS
Definition: MuonCalibTriggerInfo.h:29
MuonCalib::L1_MU6_RPC
@ L1_MU6_RPC
Definition: MuonCalibTriggerInfo.h:24
MuonCalib::L1_MU0_TGC
@ L1_MU0_TGC
Definition: MuonCalibTriggerInfo.h:27