ATLAS Offline Software
TileTBStat.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 //****************************************************************************
6 // Filename : TileTBNtuple.h
7 // Author : Paulo da Silva
8 // Created : Oct, 2003
9 //
10 // DESCRIPTION
11 //
12 // To create TB beam Ntuple file from Digits container
13 //
14 // Properties (JobOption Parameters):
15 //
16 // TileDigitsContainer string key value of Digits in TDS
17 // TileBeamElemContainer string key of BeamElems in TDS
18 //
19 // BUGS:
20 //
21 // History:
22 //
23 //
24 //****************************************************************************
25 
26 /* @class TileTBStat
27  @brief Class to produce run statistics. This is used to store run informations in TileCal commissioning database.
28  */
29 
30 #ifndef TileTBStat_H
31 #define TileTBStat_H
32 
33 // Gauid includes
34 #include "GaudiKernel/ToolHandle.h"
35 #include "GaudiKernel/ServiceHandle.h"
36 
37 
38 // Athena incldues
43 
44 #include "TileEvent/TileDQstatus.h"
47 
48 class TileID;
49 class TileHWID;
50 
51 #include <string>
52 #include <vector>
53 #include <map>
54 
55 #include <inttypes.h>
56 
57 class StatDouble {
58  public:
59  StatDouble();
60  void addValue(double Value);
61  double getMean();
62  double getChi2();
63  void print(const char* s, bool minMaxOnly = false);
64  int Counter;
65  double Min, Max, Sum, SumSq;
66 };
67 
68 class StatInt {
69  public:
70  StatInt();
71  void addValue(int Value);
72  void print(const char* s, bool minMaxOnly = false);
73  std::map<int, int> checkOut;
74 };
75 
76 class TileTBStat: public AthAlgorithm {
77  public:
78  //Constructor
79  TileTBStat(const std::string& name, ISvcLocator* pSvcLocator);
80 
81  //Destructor
82  virtual ~TileTBStat();
83 
84  //Gaudi Hooks
85  virtual StatusCode initialize() override;
86  virtual StatusCode execute() override;
87  virtual StatusCode finalize() override;
88 
89  private:
90 
91  Gaudi::Property<bool> m_printAllEvents{this,
92  "PrintAllEvents", false, "Print all events"};
93  Gaudi::Property<bool> m_detectDummyFragments{this,
94  "DetectDummyFragments", false, "Detect dummy fragments"};
96  "TileHid2RESrcID", "TileHid2RESrcID", "TileHid2RESrcID key"};
98  "TileDQstatus", "TileDQstatus", "Tile DQ status key"};
100  "TileLaserObject", "TileLaserObj", "Tile laser object key"};
101 
106  "ROBDataProviderSvc", "ROBDataProviderSvc", "The ROB data provider service"};
107 
108  int m_evtNr;
127 
147 
148  /* the ROD data sub-fragment */
149  typedef struct T_RobRodFragMap {
153  std::vector<uint32_t> fragID;
155 
156  /* the ROD data sub-fragment */
157  typedef struct T_RodDataFrag {
162 
163  std::vector<T_RobRodFragMap> m_fragMap;
164  std::vector<T_RobRodFragMap> m_beamFragMap;
165 
166  void find_frag(const uint32_t* data, unsigned int size, T_RobRodFragMap & ROBfrag);
167 
169 };
170 
171 #endif
TileTBStat::m_timeLast
uint32_t m_timeLast
Definition: TileTBStat.h:136
ReadHandleKey.h
Property holding a SG store/key/clid from which a ReadHandle is made.
TileTBStat::initialize
virtual StatusCode initialize() override
Definition: TileTBStat.cxx:161
StatInt
Definition: TileTBStat.h:68
TileTBStat::T_RodDataFrag::data
uint32_t data[1]
Definition: TileTBStat.h:160
data
char data[hepevt_bytes_allocation_ATLAS]
Definition: HepEvt.cxx:11
TileTBStat::m_evtMin
uint32_t m_evtMin
Definition: TileTBStat.h:137
python.SystemOfUnits.s
int s
Definition: SystemOfUnits.py:131
xAOD::uint32_t
setEventNumber uint32_t
Definition: EventInfo_v1.cxx:127
StatDouble::addValue
void addValue(double Value)
Definition: TileTBStat.cxx:57
TileTBStat::m_cisPipeline
StatInt m_cisPipeline
Definition: TileTBStat.h:115
TileTBStat::m_cisPhase
StatInt m_cisPhase
Definition: TileTBStat.h:120
TileTBStat::m_Alarm
int m_Alarm
Definition: TileTBStat.h:126
TileTBStat::T_RobRodFragMap::RODid
uint32_t RODid
Definition: TileTBStat.h:152
TileTBStat::m_ShClose
int m_ShClose
Definition: TileTBStat.h:126
TileTBStat::find_frag
void find_frag(const uint32_t *data, unsigned int size, T_RobRodFragMap &ROBfrag)
Definition: TileTBStat.cxx:702
TileTBStat::m_calibMode
uint32_t m_calibMode
Definition: TileTBStat.h:139
TileTBStat::m_cisI3Delay
StatInt m_cisI3Delay
Definition: TileTBStat.h:116
Value
tag-value pair class.
Definition: Value.h:39
StatInt::print
void print(const char *s, bool minMaxOnly=false)
Definition: TileTBStat.cxx:103
TileTBStat::m_nSpill
uint32_t m_nSpill
Definition: TileTBStat.h:141
TileTBStat::m_lasFiltNum
StatInt m_lasFiltNum
Definition: TileTBStat.h:122
StatInt::checkOut
std::map< int, int > checkOut
Definition: TileTBStat.h:73
StatDouble::print
void print(const char *s, bool minMaxOnly=false)
Definition: TileTBStat.cxx:75
TileLaserObject.h
SG::ReadHandleKey< TileDQstatus >
TileTBStat::m_spillPattern
uint32_t m_spillPattern
Definition: TileTBStat.h:140
TileTBStat::m_checkOn
int m_checkOn
Definition: TileTBStat.h:125
TileTBStat::T_RodDataFrag::id
uint32_t id
Definition: TileTBStat.h:159
TileTBStat::m_cisMode
StatInt m_cisMode
Definition: TileTBStat.h:113
StatDouble::StatDouble
StatDouble()
Definition: TileTBStat.cxx:49
TileTBStat::m_detectDummyFragments
Gaudi::Property< bool > m_detectDummyFragments
Definition: TileTBStat.h:93
TileTBStat::T_RodDataFrag::size
uint32_t size
Definition: TileTBStat.h:158
StatDouble::Counter
int Counter
Definition: TileTBStat.h:64
TileTBStat::T_RodDataFrag
Definition: TileTBStat.h:157
TileTBStat::m_beamFragMap
std::vector< T_RobRodFragMap > m_beamFragMap
Definition: TileTBStat.h:164
AthAlgorithm.h
TileTBStat::m_check1
int m_check1
Definition: TileTBStat.h:125
TileTBStat::m_check0
int m_check0
Definition: TileTBStat.h:125
python.setupRTTAlg.size
int size
Definition: setupRTTAlg.py:39
TileHWID
Helper class for TileCal online (hardware) identifiers.
Definition: TileHWID.h:49
TileTBStat::m_cisCap
StatInt m_cisCap
Definition: TileTBStat.h:118
TileTBStat::m_cisCard
StatInt m_cisCard
Definition: TileTBStat.h:121
TileTBStat::T_RobRodFragMap
struct TileTBStat::T_RobRodFragMap T_RobRodFragMap
TileTBStat::m_prevTrig
uint32_t m_prevTrig
Definition: TileTBStat.h:132
StatDouble
Definition: TileTBStat.h:57
TileTBStat::m_Error
int m_Error
Definition: TileTBStat.h:126
TileTBStat::TileTBStat
TileTBStat(const std::string &name, ISvcLocator *pSvcLocator)
Definition: TileTBStat.cxx:125
StatDouble::SumSq
double SumSq
Definition: TileTBStat.h:65
TileID
Helper class for TileCal offline identifiers.
Definition: TileID.h:68
StatDouble::Min
double Min
Definition: TileTBStat.h:65
TileTBStat
Class to produce run statistics. Used to fill commissioning database.
Definition: TileTBStat.h:76
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
TileTBStat::m_evtMax
uint32_t m_evtMax
Definition: TileTBStat.h:138
TileTBStat::m_cisEvent
StatInt m_cisEvent
Definition: TileTBStat.h:119
TileTBStat::T_RodDataFrag
struct TileTBStat::T_RodDataFrag T_RodDataFrag
StatDouble::Max
double Max
Definition: TileTBStat.h:65
TileTBStat::m_nEvt
uint32_t m_nEvt[5]
Definition: TileTBStat.h:142
TileTBStat::m_cisPar
uint32_t m_cisPar[16]
Definition: TileTBStat.h:143
TileDQstatus.h
Information produced by TileDQstatusAlg (used to be done by TileBeamInfoProvider).
TileTBStat::m_timeBegin
uint32_t m_timeBegin
Definition: TileTBStat.h:134
AthAlgorithm
Definition: AthAlgorithm.h:47
TileTBStat::m_check2
int m_check2
Definition: TileTBStat.h:125
ReadCondHandleKey.h
TileTBStat::m_cisSamples
StatInt m_cisSamples
Definition: TileTBStat.h:114
TileTBStat::T_RobRodFragMap::L1type
uint32_t L1type
Definition: TileTBStat.h:150
TileTBStat::finalize
virtual StatusCode finalize() override
Definition: TileTBStat.cxx:498
StatDouble::getMean
double getMean()
Definition: TileTBStat.cxx:66
TileHid2RESrcID.h
TileTBStat::T_RobRodFragMap::ROBid
uint32_t ROBid
Definition: TileTBStat.h:151
TileTBStat::m_gasFlow
StatDouble m_gasFlow
Definition: TileTBStat.h:112
TileTBStat::m_robSvc
ServiceHandle< IROBDataProviderSvc > m_robSvc
Name of ROB data provider service.
Definition: TileTBStat.h:105
TileTBStat::execute
virtual StatusCode execute() override
Definition: TileTBStat.cxx:195
TileTBStat::m_lasAmp
StatInt m_lasAmp
Definition: TileTBStat.h:123
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
TileTBStat::m_fragMap
std::vector< T_RobRodFragMap > m_fragMap
Definition: TileTBStat.h:163
TileTBStat::m_cisDAC
StatInt m_cisDAC
Definition: TileTBStat.h:117
SG::ReadCondHandleKey< TileHid2RESrcID >
TileTBStat::m_laserBoxTemp
StatDouble m_laserBoxTemp
Definition: TileTBStat.h:109
TileTBStat::m_laserDiodeTemp
StatDouble m_laserDiodeTemp
Definition: TileTBStat.h:110
TileTBStat::m_laserObjectKey
SG::ReadHandleKey< TileLaserObject > m_laserObjectKey
Definition: TileTBStat.h:99
TileTBStat::m_ShOpen
int m_ShOpen
Definition: TileTBStat.h:126
TileTBStat::T_RobRodFragMap
Definition: TileTBStat.h:149
TileTBStat::m_trigType
int m_trigType
Definition: TileTBStat.h:131
TileTBStat::m_cisBeg
uint32_t m_cisBeg[19]
Definition: TileTBStat.h:145
TileTBStat::m_laserBoxHum
StatDouble m_laserBoxHum
Definition: TileTBStat.h:111
TileTBStat::m_lasAlphaPos
StatInt m_lasAlphaPos
Definition: TileTBStat.h:124
StatInt::addValue
void addValue(int Value)
Definition: TileTBStat.cxx:99
TileTBStat::m_printAllEvents
Gaudi::Property< bool > m_printAllEvents
Definition: TileTBStat.h:91
TileTBStat::~TileTBStat
virtual ~TileTBStat()
Definition: TileTBStat.cxx:157
TileTBStat::m_hid2RESrcIDKey
SG::ReadCondHandleKey< TileHid2RESrcID > m_hid2RESrcIDKey
Definition: TileTBStat.h:95
TileTBStat::T_RobRodFragMap::fragID
std::vector< uint32_t > fragID
Definition: TileTBStat.h:153
TileTBStat::m_runNo
uint32_t m_runNo
Definition: TileTBStat.h:128
TileTBStat::m_evtNr
int m_evtNr
Definition: TileTBStat.h:108
TileTBStat::m_dqStatusKey
SG::ReadHandleKey< TileDQstatus > m_dqStatusKey
Definition: TileTBStat.h:97
TileTBStat::m_cis1st
uint32_t m_cis1st[16]
Definition: TileTBStat.h:144
TileTBStat::m_timeStart
uint32_t m_timeStart
Definition: TileTBStat.h:135
TileTBStat::m_lasStatus
int m_lasStatus
Definition: TileTBStat.h:125
TileTBStat::m_cisEnd
uint32_t m_cisEnd[19]
Definition: TileTBStat.h:146
TileTBStat::m_evtNo
uint32_t m_evtNo
Definition: TileTBStat.h:130
StatInt::StatInt
StatInt()
Definition: TileTBStat.cxx:96
IROBDataProviderSvc.h
StatDouble::Sum
double Sum
Definition: TileTBStat.h:65
TileTBStat::m_evTime
uint32_t m_evTime
Definition: TileTBStat.h:129
TileTBStat::m_checkOff
int m_checkOff
Definition: TileTBStat.h:125
TileTBStat::m_evtBegin
uint32_t m_evtBegin
Definition: TileTBStat.h:133
ServiceHandle< IROBDataProviderSvc >
TileTBStat::m_nEventsPerTrigger
uint32_t m_nEventsPerTrigger[257]
Definition: TileTBStat.h:168
StatDouble::getChi2
double getChi2()
Definition: TileTBStat.cxx:70