ATLAS Offline Software
TileMonitorAlgorithm.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 TILEMONITORING_TILEMONITORALGORITHM_H
6 #define TILEMONITORING_TILEMONITORALGORITHM_H
7 
9 
10 class CaloCell;
11 class TileID;
12 
18 
19  public:
20 
21  TileMonitorAlgorithm(const std::string& name, ISvcLocator* svcLocator)
22  :AthMonitorAlgorithm(name, svcLocator), m_l1TriggerIndices(9, -1) {}
23 
25  virtual ~TileMonitorAlgorithm() = default;
26  virtual StatusCode initialize() override;
27  virtual StatusCode fillHistograms(const EventContext& ctx) const override = 0;
28 
35 
41 
47  PART_EBC, PART_ALL, MAX_PART}; // ROS - 1
48 
54  std::vector<int> getL1TriggerIndices(uint32_t lvl1TriggerType) const;
55 
61  L1TriggerTypeBit getL1TriggerTypeBit(int lvl1TriggerIdx) const;
62 
66  int getNumberOfL1Triggers(void) const {return m_fillHistogramsForL1Triggers.size();};
67 
73  bool isPhysicsEvent(uint32_t lvl1TriggerType) const;
74 
79  Partition getPartition(const CaloCell* cell, const TileID* tileID) const;
80 
85  Partition getPartition(Identifier id, const TileID* tileID) const;
86 
91  Partition getPartition(IdentifierHash hash, const TileID* tileID) const;
92 
93 
94  private:
95 
96  L1TriggerTypeBit getL1TriggerTypeBitFromName(const std::string& triggerBitName) const;
97 
98  Gaudi::Property<std::vector<std::string>> m_fillHistogramsForL1Triggers{this,
99  "fillHistogramsForL1Triggers", {}, "Fill histograms per given L1 trigger types"};
100 
101  std::vector<L1TriggerTypeBit> m_l1Triggers;
102  std::vector<int> m_l1TriggerIndices;
103  std::vector<std::string> m_l1TriggerBitNames{"bit0_RNDM", "bit1_ZeroBias", "bit2_L1CAL", "bit3_MUON",
104  "bit4_RPC", "bit5_FTK", "bti6_CTP", "bit7_Calib", "AnyPhysTrig"};
105 };
106 
107 
108 #endif // TILEMONITORING_TILEMONITORALGORITHM_H
TileMonitorAlgorithm::fillHistograms
virtual StatusCode fillHistograms(const EventContext &ctx) const override=0
adds event to the monitoring histograms
TileMonitorAlgorithm::getL1TriggerIndices
std::vector< int > getL1TriggerIndices(uint32_t lvl1TriggerType) const
Return indices of histograms to be filled according fired L1 trigger type.
Definition: TileMonitorAlgorithm.cxx:67
TileMonitorAlgorithm::BIT2_L1CAL
@ BIT2_L1CAL
Definition: TileMonitorAlgorithm.h:33
TileMonitorAlgorithm::BIT4_RPC
@ BIT4_RPC
Definition: TileMonitorAlgorithm.h:34
ReadCellNoiseFromCool.cell
cell
Definition: ReadCellNoiseFromCool.py:53
TileMonitorAlgorithm::isPhysicsEvent
bool isPhysicsEvent(uint32_t lvl1TriggerType) const
Return true if it is physics event or false for calibration event.
Definition: TileMonitorAlgorithm.cxx:98
TileMonitorAlgorithm::PART_EBA
@ PART_EBA
Definition: TileMonitorAlgorithm.h:46
TileMonitorAlgorithm::PART_EBC
@ PART_EBC
Definition: TileMonitorAlgorithm.h:47
xAOD::uint32_t
setEventNumber uint32_t
Definition: EventInfo_v1.cxx:127
TileMonitorAlgorithm::ANY_PHYSICS
@ ANY_PHYSICS
Definition: TileMonitorAlgorithm.h:34
TileMonitorAlgorithm::BIT3_MUON
@ BIT3_MUON
Definition: TileMonitorAlgorithm.h:33
TileMonitorAlgorithm::m_l1Triggers
std::vector< L1TriggerTypeBit > m_l1Triggers
Definition: TileMonitorAlgorithm.h:101
TileMonitorAlgorithm::~TileMonitorAlgorithm
virtual ~TileMonitorAlgorithm()=default
TileMonitorAlgorithm::m_fillHistogramsForL1Triggers
Gaudi::Property< std::vector< std::string > > m_fillHistogramsForL1Triggers
Definition: TileMonitorAlgorithm.h:98
TileMonitorAlgorithm::MAX_SAMP
@ MAX_SAMP
Definition: TileMonitorAlgorithm.h:40
TileMonitorAlgorithm::BIT5_FTK
@ BIT5_FTK
Definition: TileMonitorAlgorithm.h:34
TileMonitorAlgorithm::L1TriggerTypeBit
L1TriggerTypeBit
Describes L1 trigger type bits.
Definition: TileMonitorAlgorithm.h:33
TileMonitorAlgorithm::BIT6_CTP
@ BIT6_CTP
Definition: TileMonitorAlgorithm.h:34
AthMonitorAlgorithm
Base class for Athena Monitoring Algorithms.
Definition: AthMonitorAlgorithm.h:36
TileMonitorAlgorithm::SAMP_ALL
@ SAMP_ALL
Definition: TileMonitorAlgorithm.h:40
TileMonitorAlgorithm::initialize
virtual StatusCode initialize() override
initialize
Definition: TileMonitorAlgorithm.cxx:10
TileMonitorAlgorithm::TileMonitorAlgorithm
TileMonitorAlgorithm(const std::string &name, ISvcLocator *svcLocator)
Definition: TileMonitorAlgorithm.h:21
TileMonitorAlgorithm::m_l1TriggerBitNames
std::vector< std::string > m_l1TriggerBitNames
Definition: TileMonitorAlgorithm.h:103
TileMonitorAlgorithm::BIT7_CALIB
@ BIT7_CALIB
Definition: TileMonitorAlgorithm.h:34
TileID
Helper class for TileCal offline identifiers.
Definition: TileID.h:68
Identifier
Definition: DetectorDescription/Identifier/Identifier/Identifier.h:32
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
TileMonitorAlgorithm::BIT0_RNDM
@ BIT0_RNDM
Definition: TileMonitorAlgorithm.h:33
AthMonitorAlgorithm.h
TileMonitorAlgorithm::Partition
Partition
Describes Tile partitions (ROS - 1)
Definition: TileMonitorAlgorithm.h:46
TileMonitorAlgorithm::AuxiliarySampling
AuxiliarySampling
Describes Tile auxiliary sampling.
Definition: TileMonitorAlgorithm.h:40
TileMonitorAlgorithm::PART_ALL
@ PART_ALL
Definition: TileMonitorAlgorithm.h:47
TileMonitorAlgorithm::PART_LBC
@ PART_LBC
Definition: TileMonitorAlgorithm.h:46
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
TileMonitorAlgorithm::m_l1TriggerIndices
std::vector< int > m_l1TriggerIndices
Definition: TileMonitorAlgorithm.h:102
TileMonitorAlgorithm::getL1TriggerTypeBit
L1TriggerTypeBit getL1TriggerTypeBit(int lvl1TriggerIdx) const
Return Level1 Trigger type bit according trigger index.
Definition: TileMonitorAlgorithm.cxx:104
CaloCell
Data object for each calorimeter readout cell.
Definition: CaloCell.h:57
CaloCondBlobAlgs_fillNoiseFromASCII.hash
dictionary hash
Definition: CaloCondBlobAlgs_fillNoiseFromASCII.py:109
TileMonitorAlgorithm::getNumberOfL1Triggers
int getNumberOfL1Triggers(void) const
Return number of L1 triggers for which histograms should be filled.
Definition: TileMonitorAlgorithm.h:66
TileMonitorAlgorithm::MAX_PART
@ MAX_PART
Definition: TileMonitorAlgorithm.h:47
TileMonitorAlgorithm::BIT1_ZEROBIAS
@ BIT1_ZEROBIAS
Definition: TileMonitorAlgorithm.h:33
AthMonitorAlgorithm::AthMonitorAlgorithm
AthMonitorAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Constructor.
Definition: AthMonitorAlgorithm.cxx:7
TileMonitorAlgorithm::getL1TriggerTypeBitFromName
L1TriggerTypeBit getL1TriggerTypeBitFromName(const std::string &triggerBitName) const
Definition: TileMonitorAlgorithm.cxx:35
IdentifierHash
Definition: IdentifierHash.h:38
TileMonitorAlgorithm::getPartition
Partition getPartition(const CaloCell *cell, const TileID *tileID) const
Return Partition for Tile cell or MAX_PART otherwise.
Definition: TileMonitorAlgorithm.cxx:109
TileMonitorAlgorithm::PART_LBA
@ PART_LBA
Definition: TileMonitorAlgorithm.h:46
TileMonitorAlgorithm
Base class for Tile monitoring per L1 trigger type.
Definition: TileMonitorAlgorithm.h:17