ATLAS Offline Software
MuonCalibTriggerInfo.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef MUONCALIBTRIGGERINFO_H
6 #define MUONCALIBTRIGGERINFO_H
7 
8 #include <string>
9 #include <vector>
10 
12 
13 namespace MuonCalib {
14 
17  L1_EM3 = 0,
30  UNKNOWNTRIGGERTYPE = 999
31  };
32 
35  public:
37  static std::vector<int> triggerBits(MuonCalibTriggerType type);
38 
40  static std::string itemName(MuonCalibTriggerType type);
41 
43  static bool validType(MuonCalibTriggerType type);
44 
46  static bool isRpcTrigger(MuonCalibTriggerType type);
47 
49  static bool isTgcTrigger(MuonCalibTriggerType type);
50 
52  static bool isMbtsTrigger(MuonCalibTriggerType type);
53 
55  static bool isLVL1CaloTrigger(MuonCalibTriggerType type);
56 
58  static void dumpMapping();
59 
60  private:
61  static void addEntry(MuonCalibTriggerType type, int bit, const std::string& name);
62  static void addEntry(MuonCalibTriggerType type, std::vector<int>& bits, const std::string& name);
63  static void initMap();
64  static std::vector<std::pair<std::vector<int>, std::string> > m_typeToBitAndStringMapping;
65  };
66 
75  public:
78  MuonCalibTriggerInfo(int tbpbit, int tapbit, int tavbit, int bcIndex);
80 
82  MuonCalibTriggerType type() const { return m_type; }
83 
85  int tbp() const { return m_tbpbit; }
86 
88  int tap() const { return m_tapbit; }
89 
91  int tav() const { return m_tavbit; }
92 
94  double delay() const { return m_delay; }
95 
97  int bcIndex() const { return m_bcIndex; }
98 
100  std::vector<int> triggerBits() const { return MuonCalibTriggerTypeHelper::triggerBits(m_type); }
101 
103  std::string typeString() const { return MuonCalibTriggerTypeHelper::itemName(m_type); }
104 
105  private:
107  int m_tbpbit;
108  int m_tapbit;
109  int m_tavbit;
110  double m_delay;
111  int m_bcIndex;
112  };
113 
114 } // namespace MuonCalib
115 
116 #endif
MuonCalib::L1_MU0_HIGH_RPC
@ L1_MU0_HIGH_RPC
Definition: MuonCalibTriggerInfo.h:25
ATLAS_NOT_THREAD_SAFE
#define ATLAS_NOT_THREAD_SAFE
getNoisyStrip() Find noisy strips from hitmaps and write out into xml/db formats
Definition: checker_macros.h:212
MuonCalib::L1_XE20
@ L1_XE20
Definition: MuonCalibTriggerInfo.h:20
MuonCalib::L1_MU6_TGC
@ L1_MU6_TGC
Definition: MuonCalibTriggerInfo.h:28
MuonCalib::MuonCalibTriggerInfo::typeString
std::string typeString() const
return string representing type
Definition: MuonCalibTriggerInfo.h:103
MuonCalib::MuonCalibTriggerInfo::m_tbpbit
int m_tbpbit
trig bit before pre-scale
Definition: MuonCalibTriggerInfo.h:107
MuonCalib::MuonCalibTriggerInfo::tav
int tav() const
return the trigger bit after veto
Definition: MuonCalibTriggerInfo.h:91
MuonCalib::MuonCalibTriggerTypeHelper
helper class to for MuonCalibTriggerType which provides a mapping to the actual bit number
Definition: MuonCalibTriggerInfo.h:34
MuonCalib::UNKNOWNTRIGGERTYPE
@ UNKNOWNTRIGGERTYPE
Definition: MuonCalibTriggerInfo.h:30
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
MuonCalib::MuonCalibTriggerInfo::m_delay
double m_delay
delay of signal wrt firing trigger
Definition: MuonCalibTriggerInfo.h:110
MuonCalib::MuonCalibTriggerType
MuonCalibTriggerType
enum for all trigger type
Definition: MuonCalibTriggerInfo.h:16
MuonCalib::L1_J5
@ L1_J5
Definition: MuonCalibTriggerInfo.h:19
MuonCalib::MuonCalibTriggerInfo::MuonCalibTriggerInfo
MuonCalibTriggerInfo()
default constructor
Definition: MuonCalibTriggerInfo.cxx:97
MuonCalib
CscCalcPed - algorithm that finds the Cathode Strip Chamber pedestals from an RDO.
Definition: CscCalcPed.cxx:22
MuonCalib::L1_EM3
@ L1_EM3
Definition: MuonCalibTriggerInfo.h:17
MuonCalib::MuonCalibTriggerTypeHelper::triggerBits
static std::vector< int > triggerBits(MuonCalibTriggerType type)
get trigger bit for a given type
Definition: MuonCalibTriggerInfo.cxx:16
MuonCalib::L1_MU0_TGC_HALO
@ L1_MU0_TGC_HALO
Definition: MuonCalibTriggerInfo.h:26
MuonCalib::MuonCalibTriggerInfo
Simplified class designed to store information of a trigger.
Definition: MuonCalibTriggerInfo.h:74
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
MuonCalib::MuonCalibTriggerInfo::tap
int tap() const
return the trigger bit after prescale
Definition: MuonCalibTriggerInfo.h:88
MuonCalib::MuonCalibTriggerInfo::tbp
int tbp() const
return the trigger bit before prescale
Definition: MuonCalibTriggerInfo.h:85
MuonCalib::MuonCalibTriggerTypeHelper::itemName
static std::string itemName(MuonCalibTriggerType type)
get trigger bit for a given type
Definition: MuonCalibTriggerInfo.cxx:22
MuonCalib::MuonCalibTriggerInfo::bcIndex
int bcIndex() const
return the bcIndex of the trigger
Definition: MuonCalibTriggerInfo.h:97
MuonCalib::MuonCalibTriggerInfo::type
MuonCalibTriggerType type() const
destructor
Definition: MuonCalibTriggerInfo.h:82
MuonCalib::L1_TAU5
@ L1_TAU5
Definition: MuonCalibTriggerInfo.h:18
MuonCalib::MuonCalibTriggerInfo::m_bcIndex
int m_bcIndex
trig bc Index
Definition: MuonCalibTriggerInfo.h:111
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
MuonCalib::NUMBEROFKNOWNTRIGGERS
@ NUMBEROFKNOWNTRIGGERS
Definition: MuonCalibTriggerInfo.h:29
MuonCalib::MuonCalibTriggerInfo::delay
double delay() const
return the delay of the signal wrt firing trigger
Definition: MuonCalibTriggerInfo.h:94
MuonCalib::MuonCalibTriggerInfo::triggerBits
std::vector< int > triggerBits() const
return the trigger bits for this type
Definition: MuonCalibTriggerInfo.h:100
MuonCalib::MuonCalibTriggerInfo::m_type
MuonCalibTriggerType m_type
type
Definition: MuonCalibTriggerInfo.h:106
MuonCalib::MuonCalibTriggerInfo::m_tavbit
int m_tavbit
trig bit after veto
Definition: MuonCalibTriggerInfo.h:109
MuonCalib::MuonCalibTriggerInfo::m_tapbit
int m_tapbit
trig bit after pre-scale
Definition: MuonCalibTriggerInfo.h:108
checker_macros.h
Define macros for attributes used to control the static checker.
MuonCalib::L1_MU6_RPC
@ L1_MU6_RPC
Definition: MuonCalibTriggerInfo.h:24
MuonCalib::L1_MU0_TGC
@ L1_MU0_TGC
Definition: MuonCalibTriggerInfo.h:27
MuonCalib::MuonCalibTriggerInfo::~MuonCalibTriggerInfo
~MuonCalibTriggerInfo()
Definition: MuonCalibTriggerInfo.h:79