ATLAS Offline Software
CalibrationFileIOTool.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef CalibrationFileIOTool_H
6 #define CalibrationFileIOTool_H
7 
8 // MuonCalibStandAloneBase
12 
13 namespace MuonCalib {
14 
15  class RtRelation;
16 
17  class CalibrationFileIOTool : public AthAlgTool, virtual public ICalibrationIOTool {
18  public:
20  CalibrationFileIOTool(const std::string &t, const std::string &n, const IInterface *p);
22  StatusCode WriteT0(const MdtTubeFitContainer *t0_output, const NtupleStationId &station_id, int /*iov_start*/, int /*iov_end*/) override;
24  StatusCode WriteRt(const RtCalibrationOutput *rt_relation, std::shared_ptr<const IRtResolution> resolution,
25  const NtupleStationId &station_id, int /*iov_start*/, int /*iov_end*/, bool /*real_rt*/,
26  bool /*real resolution*/) override;
28  StatusCode LoadT0(std::map<NtupleStationId, MdtStationT0Container *> &t0s, int /*iov_id*/) override;
30  StatusCode LoadRt(std::map<NtupleStationId, IRtRelation *> &rts, std::map<NtupleStationId, IRtResolution *> &res,
31  int /*iov_id*/) override;
32 
33  private:
35  std::string m_calib_dir;
41  bool fill_rt(std::unique_ptr<RtDataFromFile::RtRelation> &rt, const std::shared_ptr<const IRtRelation>& new_rt,
42  const std::shared_ptr<const MuonCalib::IRtResolution>& resolut);
44  static bool interpret_chamber_name(const std::string &nm, const char *prefix, std::string &station, int &eta, int &phi, int &ml) ;
46  void read_rt_relation(const std::string &fname, std::map<NtupleStationId, IRtRelation *> &rts,
47  std::map<NtupleStationId, IRtResolution *> &res, const MuonCalib::NtupleStationId &id);
48  };
49 
50 } // namespace MuonCalib
51 #endif
MuonCalib::CalibrationFileIOTool::fill_rt
bool fill_rt(std::unique_ptr< RtDataFromFile::RtRelation > &rt, const std::shared_ptr< const IRtRelation > &new_rt, const std::shared_ptr< const MuonCalib::IRtResolution > &resolut)
fill rt relation
Definition: CalibrationFileIOTool.cxx:153
MuonCalib::CalibrationFileIOTool::WriteT0
StatusCode WriteT0(const MdtTubeFitContainer *t0_output, const NtupleStationId &station_id, int, int) override
write out t0
Definition: CalibrationFileIOTool.cxx:51
MuonCalib::CalibrationFileIOTool::read_rt_relation
void read_rt_relation(const std::string &fname, std::map< NtupleStationId, IRtRelation * > &rts, std::map< NtupleStationId, IRtResolution * > &res, const MuonCalib::NtupleStationId &id)
create the rt relation and resolution
Definition: CalibrationFileIOTool.cxx:233
MuonCalib::RtCalibrationOutput
Definition: RtCalibrationOutput.h:21
MuonCalib::CalibrationFileIOTool::m_use_fixed_id
bool m_use_fixed_id
use fixed identifier if set tot true - job option
Definition: CalibrationFileIOTool.h:37
TRTCalib_Extractor.rts
dictionary rts
Definition: TRTCalib_Extractor.py:15
TRTCalib_cfilter.t0s
list t0s
Definition: TRTCalib_cfilter.py:110
MuonCalib::NtupleStationId
Definition: NtupleStationId.h:36
ICalibrationIOTool.h
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
Dedxcorrection::resolution
double resolution[nGasTypes][nParametersResolution]
Definition: TRT_ToT_Corrections.h:46
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
beamspotman.n
n
Definition: beamspotman.py:731
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
AthAlgTool.h
MuonCalib::CalibrationFileIOTool::m_calib_dir
std::string m_calib_dir
path to calibration directory - job option
Definition: CalibrationFileIOTool.h:35
res
std::pair< std::vector< unsigned int >, bool > res
Definition: JetGroupProductTest.cxx:14
checkCorrelInHIST.prefix
dictionary prefix
Definition: checkCorrelInHIST.py:391
MuonCalib
CscCalcPed - algorithm that finds the Cathode Strip Chamber pedestals from an RDO.
Definition: CscCalcPed.cxx:22
MuonCalib::CalibrationFileIOTool::LoadRt
StatusCode LoadRt(std::map< NtupleStationId, IRtRelation * > &rts, std::map< NtupleStationId, IRtResolution * > &res, int) override
load rts
Definition: CalibrationFileIOTool.cxx:126
python.AthDsoLogger.fname
string fname
Definition: AthDsoLogger.py:67
CalibCoolCompareRT.nm
nm
Definition: CalibCoolCompareRT.py:110
MuonCalib::CalibrationFileIOTool::CalibrationFileIOTool
CalibrationFileIOTool(const std::string &t, const std::string &n, const IInterface *p)
constructor
Definition: CalibrationFileIOTool.cxx:43
MuonCalib::CalibrationFileIOTool::LoadT0
StatusCode LoadT0(std::map< NtupleStationId, MdtStationT0Container * > &t0s, int) override
load t0s
Definition: CalibrationFileIOTool.cxx:94
MuonCalib::MdtTubeFitContainer
Holds single-tube full calibration information of one chamber.
Definition: MdtTubeFitContainer.h:16
MuonCalib::CalibrationFileIOTool::WriteRt
StatusCode WriteRt(const RtCalibrationOutput *rt_relation, std::shared_ptr< const IRtResolution > resolution, const NtupleStationId &station_id, int, int, bool, bool) override
write rt
Definition: CalibrationFileIOTool.cxx:70
AthAlgTool
Definition: AthAlgTool.h:26
MuonCalib::ICalibrationIOTool
Definition: ICalibrationIOTool.h:30
MuonCalib::CalibrationFileIOTool
Definition: CalibrationFileIOTool.h:17
MuonCalib::CalibrationFileIOTool::interpret_chamber_name
static bool interpret_chamber_name(const std::string &nm, const char *prefix, std::string &station, int &eta, int &phi, int &ml)
extract station identifier from file name
Definition: CalibrationFileIOTool.cxx:212
MuonCalib::CalibrationFileIOTool::m_rt_lookup
bool m_rt_lookup
create rt relation as lookup table if set tot true - job option
Definition: CalibrationFileIOTool.h:39
RtDataFromFile.h