ATLAS Offline Software
Loading...
Searching...
No Matches
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
27#include "MuonCondData/Defs.h"
28
29
30// Forward declarations
32class TTree;
33
34
36
37public:
38
39 using AthCondAlgorithm::AthCondAlgorithm;
40 virtual ~NswCalibDbAlg() = default;
41 virtual StatusCode initialize() override;
42 virtual StatusCode execute (const EventContext&) const override;
43
44
45private:
46
51
55
56 StatusCode processTdoPdoData(const EventContext& ctx) const;
57 StatusCode processThrData (const EventContext& ctx) const;
58 StatusCode processNSWT0Data (const EventContext& ctx) const;
59
63 StatusCode loadTimeChargeData(const EventContext& ctx, const readKey_t& readKey, const TimeChargeTech,
64 const TimeChargeType type, writeHandleTdoPdo_t& writeHandle, NswCalibDbTimeChargeData* writeCdo) const;
65 StatusCode loadThresholdData (const EventContext&, const readKey_t&, const ThresholdTech, writeHandleThr_t &, NswCalibDbThresholdData* ) const;
66
68 StatusCode loadT0ToTree(const EventContext& ctx, const readKey_t& readKey, writeHandleT0_t& writeHandle, std::unique_ptr<TTree>& tree) const;
69 StatusCode loadT0Data (const std::unique_ptr<TTree>& tree, NswT0Data* writeCdo, const T0Tech tech) const;
70
71 bool buildChannelId(Identifier& channelId, unsigned int elinkId, unsigned int vmm, unsigned int channel) const;
72
73 Gaudi::Property<bool> m_isData {this, "isData" , true, "Processing data"};
74 Gaudi::Property<bool> m_processThresholds{this, "processThresholds", false, "Process threshold 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
Base class for conditions algorithms.
Base class for conditions algorithms.
This class is a collection of AttributeLists where each one is associated with a channel number.
writeKeyTdoPdo_t m_writeKey_tdopdo
readKey_t m_readKey_mm_sidea_pdo
StatusCode loadT0ToTree(const EventContext &ctx, const readKey_t &readKey, writeHandleT0_t &writeHandle, std::unique_ptr< TTree > &tree) const
SG::ReadCondHandleKey< CondAttrListCollection > readKey_t
NswCalibDbThresholdData::ThrsldTechType ThresholdTech
Gaudi::Property< bool > m_processThresholds
readKey_t m_readKey_stgc_sidec_tdo
readKey_t m_readKey_mm_sidec_tdo
SG::WriteCondHandleKey< NswCalibDbTimeChargeData > writeKeyTdoPdo_t
Gaudi::Property< std::string > m_mmT0FilePath
virtual StatusCode initialize() override
StatusCode loadThresholdData(const EventContext &, const readKey_t &, const ThresholdTech, writeHandleThr_t &, NswCalibDbThresholdData *) const
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc
ServiceHandle< ICondSvc > m_condSvc
virtual ~NswCalibDbAlg()=default
readKey_t m_readKey_mm_sidea_thr
readKey_t m_readKey_stgc_sidec_pdo
readKey_t m_readKey_stgc_sidec_thr
readKey_t m_readKey_stgc_sidea_tdo
Gaudi::Property< std::string > m_stgcT0FilePath
readKey_t m_readKey_mm_sidea_tdo
readKey_t m_readKey_mm_sidec_pdo
StatusCode loadT0Data(const std::unique_ptr< TTree > &tree, NswT0Data *writeCdo, const T0Tech tech) const
Gaudi::Property< bool > m_loadsTgcT0Data
readKey_t m_readKey_mm_sidec_thr
readKey_t m_readKey_stgc_sidea_thr
bool buildChannelId(Identifier &channelId, unsigned int elinkId, unsigned int vmm, unsigned int channel) const
readKey_t m_readKey_stgc_t0
NswCalibDbTimeChargeData::CalibDataType TimeChargeType
Gaudi::Property< bool > m_loadMmT0Data
SG::WriteCondHandle< NswCalibDbTimeChargeData > writeHandleTdoPdo_t
StatusCode processThrData(const EventContext &ctx) const
virtual StatusCode execute(const EventContext &) const override
MuonCond::CalibTechType TimeChargeTech
StatusCode processTdoPdoData(const EventContext &ctx) const
StatusCode loadTimeChargeData(const EventContext &ctx, const readKey_t &readKey, const TimeChargeTech, const TimeChargeType type, writeHandleTdoPdo_t &writeHandle, NswCalibDbTimeChargeData *writeCdo) const
StatusCode processNSWT0Data(const EventContext &ctx) const
readKey_t m_readKey_stgc_sidea_pdo
writeKeyMmT0_t m_writeKey_nswT0
SG::WriteCondHandle< NswCalibDbThresholdData > writeHandleThr_t
readKey_t m_readKey_mm_t0
Gaudi::Property< bool > m_isData
SG::WriteCondHandleKey< NswT0Data > writeKeyMmT0_t
SG::WriteCondHandleKey< NswCalibDbThresholdData > writeKeyThr_t
writeKeyThr_t m_writeKey_thr
SG::WriteCondHandle< NswT0Data > writeHandleT0_t
MuonCond::CalibTechType T0Tech
TChain * tree