ATLAS Offline Software
NswCalibDbAlg.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef MUONCONDALG_NSWCALIBDBALG_H
6 #define MUONCONDALG_NSWCALIBDBALG_H
7 
8 // STL includes
9 #include <string>
10 #include <vector>
11 
12 // Gaudi includes
13 #include "GaudiKernel/ICondSvc.h"
14 #include "GaudiKernel/ServiceHandle.h"
15 #include "GaudiKernel/ToolHandle.h"
16 
17 // Athena includes
21 
22 // Muon includes
25 #include "MuonCondData/NswT0Data.h"
27 #include "MuonCondData/Defs.h"
28 
29 
30 // Forward declarations
32 class TTree;
33 
34 
36 
37 public:
38 
40  virtual ~NswCalibDbAlg() = default;
41  virtual StatusCode initialize() override;
42  virtual StatusCode execute (const EventContext&) const override;
43  virtual bool isReEntrant() const override { return false; }
44 
45 
46 private:
47 
52 
56 
57  StatusCode processTdoPdoData(const EventContext& ctx) const;
58  StatusCode processThrData (const EventContext& ctx) const;
59  StatusCode processNSWT0Data (const EventContext& ctx) const;
60 
64  StatusCode loadTimeChargeData(const EventContext& ctx, const readKey_t& readKey, const TimeChargeTech,
65  const TimeChargeType type, writeHandleTdoPdo_t& writeHandle, NswCalibDbTimeChargeData* writeCdo) const;
66  StatusCode loadThresholdData (const EventContext&, const readKey_t&, const ThresholdTech, writeHandleThr_t &, NswCalibDbThresholdData* ) const;
67 
69  StatusCode loadT0ToTree(const EventContext& ctx, const readKey_t& readKey, writeHandleT0_t& writeHandle, std::unique_ptr<TTree>& tree) const;
70  StatusCode loadT0Data (const std::unique_ptr<TTree>& tree, NswT0Data* writeCdo, const T0Tech tech) const;
71 
72  bool buildChannelId(Identifier& channelId, unsigned int elinkId, unsigned int vmm, unsigned int channel) const;
73 
74  Gaudi::Property<bool> m_isData {this, "isData" , true , "Processing data"};
75 
76  ServiceHandle<ICondSvc> m_condSvc{this, "CondSvc", "CondSvc"};
77  ServiceHandle<Muon::IMuonIdHelperSvc> m_idHelperSvc{this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"};
78 
79  writeKeyTdoPdo_t m_writeKey_tdopdo{this, "WriteKey_TdoPdo", "NswCalibDbTimeChargeData", "Key of output calibration data (TDOs and PDOs)" };
80  writeKeyThr_t m_writeKey_thr {this, "WriteKey_Thr" , "NswCalibDbThresholdData" , "Key of output calibration data (VMM thresholds)"};
81  writeKeyMmT0_t m_writeKey_nswT0 {this, "WriteKey_NswT0" , "NswT0Data" , "Key of output calibration data (NSW T0s)"};
82 
83  readKey_t m_readKey_mm_sidea_tdo {this, "ReadKey_MM_SIDEA_TDO" , "/MDT/MM/TIME/SIDEA" , "Key of input MM condition data for side A data TDO"};
84  readKey_t m_readKey_mm_sidec_tdo {this, "ReadKey_MM_SIDEC_TDO" , "/MDT/MM/TIME/SIDEC" , "Key of input MM condition data for side C data TDO"};
85  readKey_t m_readKey_mm_sidea_pdo {this, "ReadKey_MM_SIDEA_PDO" , "/MDT/MM/CHARGE/SIDEA" , "Key of input MM condition data for side A data PDO"};
86  readKey_t m_readKey_mm_sidec_pdo {this, "ReadKey_MM_SIDEC_PDO" , "/MDT/MM/CHARGE/SIDEC" , "Key of input MM condition data for side C data PDO"};
87  readKey_t m_readKey_mm_sidea_thr {this, "ReadKey_MM_SIDEA_THR" , "/MDT/MM/THR/SIDEA" , "Key of input MM condition data for side A data THR"};
88  readKey_t m_readKey_mm_sidec_thr {this, "ReadKey_MM_SIDEC_THR" , "/MDT/MM/THR/SIDEC" , "Key of input MM condition data for side C data THR"};
89  readKey_t m_readKey_stgc_sidea_tdo{this, "ReadKey_STGC_SIDEA_TDO", "/TGC/NSW/TIME/SIDEA" , "Key of input sTGC condition data for side A data TDO"};
90  readKey_t m_readKey_stgc_sidec_tdo{this, "ReadKey_STGC_SIDEC_TDO", "/TGC/NSW/TIME/SIDEC" , "Key of input sTGC condition data for side C data TDO"};
91  readKey_t m_readKey_stgc_sidea_pdo{this, "ReadKey_STGC_SIDEA_PDO", "/TGC/NSW/CHARGE/SIDEA", "Key of input sTGC condition data for side A data PDO"};
92  readKey_t m_readKey_stgc_sidec_pdo{this, "ReadKey_STGC_SIDEC_PDO", "/TGC/NSW/CHARGE/SIDEC", "Key of input sTGC condition data for side C data PDO"};
93  readKey_t m_readKey_stgc_sidea_thr{this, "ReadKey_STGC_SIDEA_THR", "/TGC/NSW/THR/SIDEA" , "Key of input sTGC condition data for side A data THR"};
94  readKey_t m_readKey_stgc_sidec_thr{this, "ReadKey_STGC_SIDEC_THR", "/TGC/NSW/THR/SIDEC" , "Key of input sTGC condition data for side C data THR"};
95 
96  Gaudi::Property<bool> m_loadMmT0Data {this, "loadMmT0Data", false, "Enable loading the sTgc T0Data"};
97  Gaudi::Property<bool> m_loadsTgcT0Data {this, "loadsTgcT0Data", false, "Enable loading the sTgcT0Data"};
98  readKey_t m_readKey_mm_t0{this, "ReadKey_MM_T0", "" , "Key of input MM condition data for side A data T0"};
99  readKey_t m_readKey_stgc_t0{this, "ReadKey_STGC_T0", "" , "Key of input sTGC condition data for side C data T0"};
100  Gaudi::Property<std::string> m_mmT0FilePath{this, "MmT0FileName", "", "Path to a file containing the MM T0 data, this will override the data from the conditions db"};
101  Gaudi::Property<std::string> m_stgcT0FilePath{this, "sTgcT0FileName", "", "Path to a file containing the sTGC T0 data, this will override the data from the conditions db"};
102 
103 };
104 
105 
106 #endif
NswCalibDbAlg::~NswCalibDbAlg
virtual ~NswCalibDbAlg()=default
NswCalibDbAlg::loadThresholdData
StatusCode loadThresholdData(const EventContext &, const readKey_t &, const ThresholdTech, writeHandleThr_t &, NswCalibDbThresholdData *) const
Definition: NswCalibDbAlg.cxx:315
NswCalibDbThresholdData
Definition: NswCalibDbThresholdData.h:21
plotting.yearwise_efficiency.channel
channel
Definition: yearwise_efficiency.py:28
NswCalibDbTimeChargeData.h
NswCalibDbAlg::m_readKey_stgc_sidea_tdo
readKey_t m_readKey_stgc_sidea_tdo
Definition: NswCalibDbAlg.h:89
NswCalibDbAlg::initialize
virtual StatusCode initialize() override
Definition: NswCalibDbAlg.cxx:23
NswCalibDbAlg::processTdoPdoData
StatusCode processTdoPdoData(const EventContext &ctx) const
Definition: NswCalibDbAlg.cxx:74
tree
TChain * tree
Definition: tile_monitor.h:30
NswCalibDbAlg::m_readKey_stgc_sidea_pdo
readKey_t m_readKey_stgc_sidea_pdo
Definition: NswCalibDbAlg.h:91
NswCalibDbThresholdData::ThrsldTechType
ThrsldTechType
Definition: NswCalibDbThresholdData.h:26
NswCalibDbAlg::isReEntrant
virtual bool isReEntrant() const override
Definition: NswCalibDbAlg.h:43
WriteCondHandleKey.h
NswCalibDbAlg::m_stgcT0FilePath
Gaudi::Property< std::string > m_stgcT0FilePath
Definition: NswCalibDbAlg.h:101
NswCalibDbAlg::m_idHelperSvc
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc
Definition: NswCalibDbAlg.h:77
NswCalibDbAlg::m_readKey_mm_sidec_tdo
readKey_t m_readKey_mm_sidec_tdo
Definition: NswCalibDbAlg.h:84
NswCalibDbAlg::m_loadsTgcT0Data
Gaudi::Property< bool > m_loadsTgcT0Data
Definition: NswCalibDbAlg.h:97
NswCalibDbTimeChargeData::CalibDataType
CalibDataType
Definition: NswCalibDbTimeChargeData.h:22
CondAttrListCollection
This class is a collection of AttributeLists where each one is associated with a channel number....
Definition: CondAttrListCollection.h:52
NswCalibDbAlg::buildChannelId
bool buildChannelId(Identifier &channelId, unsigned int elinkId, unsigned int vmm, unsigned int channel) const
Definition: NswCalibDbAlg.cxx:463
AthReentrantAlgorithm
An algorithm that can be simultaneously executed in multiple threads.
Definition: AthReentrantAlgorithm.h:83
NswCalibDbAlg::m_readKey_stgc_t0
readKey_t m_readKey_stgc_t0
Definition: NswCalibDbAlg.h:99
NswCalibDbAlg::m_writeKey_nswT0
writeKeyMmT0_t m_writeKey_nswT0
Definition: NswCalibDbAlg.h:81
AthReentrantAlgorithm::AthReentrantAlgorithm
AthReentrantAlgorithm()
Default constructor:
NswCalibDbAlg::loadT0ToTree
StatusCode loadT0ToTree(const EventContext &ctx, const readKey_t &readKey, writeHandleT0_t &writeHandle, std::unique_ptr< TTree > &tree) const
Definition: NswCalibDbAlg.cxx:220
NswCalibDbAlg::m_writeKey_thr
writeKeyThr_t m_writeKey_thr
Definition: NswCalibDbAlg.h:80
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
NswCalibDbAlg::m_readKey_stgc_sidec_tdo
readKey_t m_readKey_stgc_sidec_tdo
Definition: NswCalibDbAlg.h:90
NswT0Data
Definition: NswT0Data.h:16
NswCalibDbAlg::m_readKey_mm_sidea_tdo
readKey_t m_readKey_mm_sidea_tdo
Definition: NswCalibDbAlg.h:83
NswCalibDbAlg::m_readKey_mm_sidec_thr
readKey_t m_readKey_mm_sidec_thr
Definition: NswCalibDbAlg.h:88
CaloCondBlobAlgs_fillNoiseFromASCII.channelId
channelId
Definition: CaloCondBlobAlgs_fillNoiseFromASCII.py:122
NswCalibDbAlg::m_readKey_stgc_sidec_pdo
readKey_t m_readKey_stgc_sidec_pdo
Definition: NswCalibDbAlg.h:92
NswCalibDbAlg
Definition: NswCalibDbAlg.h:35
ReadCondHandleKey.h
AthReentrantAlgorithm.h
NswCalibDbAlg::m_isData
Gaudi::Property< bool > m_isData
Definition: NswCalibDbAlg.h:74
Defs.h
NswCalibDbAlg::loadTimeChargeData
StatusCode loadTimeChargeData(const EventContext &ctx, const readKey_t &readKey, const TimeChargeTech, const TimeChargeType type, writeHandleTdoPdo_t &writeHandle, NswCalibDbTimeChargeData *writeCdo) const
Definition: NswCalibDbAlg.cxx:383
NswCalibDbAlg::execute
virtual StatusCode execute(const EventContext &) const override
Definition: NswCalibDbAlg.cxx:60
NswCalibDbAlg::m_loadMmT0Data
Gaudi::Property< bool > m_loadMmT0Data
Definition: NswCalibDbAlg.h:96
NswCalibDbAlg::m_mmT0FilePath
Gaudi::Property< std::string > m_mmT0FilePath
Definition: NswCalibDbAlg.h:100
NswCalibDbAlg::m_readKey_mm_t0
readKey_t m_readKey_mm_t0
Definition: NswCalibDbAlg.h:98
SG::ReadCondHandleKey< CondAttrListCollection >
NswT0Data.h
NswCalibDbAlg::m_readKey_mm_sidea_pdo
readKey_t m_readKey_mm_sidea_pdo
Definition: NswCalibDbAlg.h:85
NswCalibDbAlg::m_writeKey_tdopdo
writeKeyTdoPdo_t m_writeKey_tdopdo
Definition: NswCalibDbAlg.h:79
NswCalibDbAlg::m_readKey_stgc_sidec_thr
readKey_t m_readKey_stgc_sidec_thr
Definition: NswCalibDbAlg.h:94
MuonCond::CalibTechType
CalibTechType
Definition: MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondData/MuonCondData/Defs.h:37
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
NswCalibDbAlg::processNSWT0Data
StatusCode processNSWT0Data(const EventContext &ctx) const
Definition: NswCalibDbAlg.cxx:149
NswCalibDbAlg::m_readKey_stgc_sidea_thr
readKey_t m_readKey_stgc_sidea_thr
Definition: NswCalibDbAlg.h:93
NswCalibDbAlg::processThrData
StatusCode processThrData(const EventContext &ctx) const
Definition: NswCalibDbAlg.cxx:115
SG::WriteCondHandleKey< NswCalibDbTimeChargeData >
NswCalibDbTimeChargeData
Definition: NswCalibDbTimeChargeData.h:19
NswCalibDbAlg::m_readKey_mm_sidea_thr
readKey_t m_readKey_mm_sidea_thr
Definition: NswCalibDbAlg.h:87
NswCalibDbAlg::m_condSvc
ServiceHandle< ICondSvc > m_condSvc
Definition: NswCalibDbAlg.h:76
SG::WriteCondHandle
Definition: WriteCondHandle.h:26
NswCalibDbAlg::loadT0Data
StatusCode loadT0Data(const std::unique_ptr< TTree > &tree, NswT0Data *writeCdo, const T0Tech tech) const
Definition: NswCalibDbAlg.cxx:251
NswCalibDbAlg::m_readKey_mm_sidec_pdo
readKey_t m_readKey_mm_sidec_pdo
Definition: NswCalibDbAlg.h:86
IMuonIdHelperSvc.h
NswCalibDbThresholdData.h
ServiceHandle< ICondSvc >