ATLAS Offline Software
MuonCalibDbCalibrationSource.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef MuonCalib_MuonCalibDbCalibrationSource
6 #define MuonCalib_MuonCalibDbCalibrationSource
7 
8 // this
11 // athena
13 #include "GaudiKernel/ToolHandle.h"
14 
15 namespace MuonCalib {
16 
17  class CalibDbConnection;
18  class RegionSelectorBase;
19  class CalibHeadOperations;
20 
22  public:
23  //===============================destructor -- constructor======================
25  MuonCalibDbCalibrationSource(const std::string& t, const std::string& n, const IInterface* p);
26 
28  //===============================AlgTool interface =============================
31 
32  //===============================IConditionsStorage interface===================
34  bool StoreT0Chamber(const int& chamber, const std::map<TubeId, coral::AttributeList>& rows);
35  // call back for rt
36  bool StoreRtChamber(const int& chamber, const std::map<int, SamplePoint>& points);
37 
38  private:
39  inline const std::vector<std::string>& RowsFromMdtTubeTable() const { return m_mdt_tube_cols; }
40  inline const std::vector<std::string>& RowsFromMdtTubeVTable() const { return m_mdt_tube_v_cols; }
41  //===============================IMuonCalibConditionsSource interface ==========
42  inline void SetIOV(int& start, int& end) const {
43  if (start < 0) { start = m_iov_start; }
44  if (end < 0) { end = m_iov_end; }
45  }
46  //===============================job options====================================
47  // head id and site name - job options
48  std::string m_site_name;
49  int m_head_id = 0;
50  // overwirte iov - job-option
51  int m_iov_start = 0, m_iov_end = 0;
52  // connection string for calibration db - job option
54  // username and password for calib-db connection
55  std::string m_username, m_password;
56  // calibratino region, for which the calibration is copied
57  std::string m_region_str;
58  // drift time offsets per radius - job options
59  std::vector<float> m_drift_time_offsets;
60  // store t0 or rt
62  // global t0 offset - added to the t0 values
63  float m_t0_offset;
64  // creation flags - job options
66  unsigned int m_creation_flags;
67  //===============================private data==================================
68  // selected columns
69  std::vector<std::string> m_mdt_tube_cols, m_mdt_tube_v_cols;
70  std::unique_ptr<CalibDbConnection> m_connection;
71  std::unique_ptr<CalibDbConnection> m_data_connection;
72  std::unique_ptr<CalibHeadOperations> m_head_ops;
73  std::unique_ptr<RegionSelectorBase> m_region;
74 
75  protected:
76  //===============================IMuonCalibConditionsSource interface ==========
78  bool insert_calibration(bool store_t0, bool store_rt);
79  };
80 
81 } // namespace MuonCalib
82 
83 #endif
MuonCalib::MuonCalibDbCalibrationSource::m_calib_connection_string
std::string m_calib_connection_string
Definition: MuonCalibDbCalibrationSource.h:53
MuonCalib::MuonCalibDbCalibrationSource::m_head_id
int m_head_id
Definition: MuonCalibDbCalibrationSource.h:49
MuonCalib::MuonCalibDbCalibrationSource::m_region
std::unique_ptr< RegionSelectorBase > m_region
Definition: MuonCalibDbCalibrationSource.h:73
MuonCalib::MuonCalibDbCalibrationSource::MuonCalibDbCalibrationSource
MuonCalibDbCalibrationSource(const std::string &t, const std::string &n, const IInterface *p)
constructor
Definition: MuonCalibDbCalibrationSource.cxx:36
MuonCalib::MuonCalibDbCalibrationSource::StoreT0Chamber
bool StoreT0Chamber(const int &chamber, const std::map< TubeId, coral::AttributeList > &rows)
call back for t0
Definition: MuonCalibDbCalibrationSource.cxx:102
IConditionsStorage.h
MuonCalib::MuonCalibDbCalibrationSource::m_iov_end
int m_iov_end
Definition: MuonCalibDbCalibrationSource.h:51
MuonCalib::MuonCalibDbCalibrationSource::initialize
StatusCode initialize()
initialize
Definition: MuonCalibDbCalibrationSource.cxx:64
calibdata.chamber
chamber
Definition: calibdata.py:32
MuonCalib::MuonCalibDbCalibrationSource::m_mdt_tube_cols
std::vector< std::string > m_mdt_tube_cols
Definition: MuonCalibDbCalibrationSource.h:69
mergePhysValFiles.start
start
Definition: DataQuality/DataQualityUtils/scripts/mergePhysValFiles.py:14
MuonCalib::MuonCalibDbCalibrationSource::StoreRtChamber
bool StoreRtChamber(const int &chamber, const std::map< int, SamplePoint > &points)
Definition: MuonCalibDbCalibrationSource.cxx:125
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
MuonCalib::MuonCalibDbCalibrationSource::m_time_slewing_applied
bool m_time_slewing_applied
Definition: MuonCalibDbCalibrationSource.h:65
mergePhysValFiles.end
end
Definition: DataQuality/DataQualityUtils/scripts/mergePhysValFiles.py:93
MuonCalib::MuonCalibDbCalibrationSource::m_iov_start
int m_iov_start
Definition: MuonCalibDbCalibrationSource.h:51
MuonCalib::MuonCalibDbCalibrationSource::m_username
std::string m_username
Definition: MuonCalibDbCalibrationSource.h:55
MuonCalib::MuonCalibDbCalibrationSource
Definition: MuonCalibDbCalibrationSource.h:21
MuonCalib::MuonCalibDbCalibrationSource::m_store_rt
bool m_store_rt
Definition: MuonCalibDbCalibrationSource.h:61
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
beamspotman.n
n
Definition: beamspotman.py:731
MuonCalib::IConditionsStorage
Definition: IConditionsStorage.h:21
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
MuonCalib::MuonCalibDbCalibrationSource::SetIOV
void SetIOV(int &start, int &end) const
Definition: MuonCalibDbCalibrationSource.h:42
MuonCalib::MuonCalibDbCalibrationSource::m_drift_time_offsets
std::vector< float > m_drift_time_offsets
Definition: MuonCalibDbCalibrationSource.h:59
AthAlgTool.h
MuonCalib::MuonCalibDbCalibrationSource::m_calib_working_schema
std::string m_calib_working_schema
Definition: MuonCalibDbCalibrationSource.h:53
MuonCalib
CscCalcPed - algorithm that finds the Cathode Strip Chamber pedestals from an RDO.
Definition: CscCalcPed.cxx:22
MuonCalib::MuonCalibDbCalibrationSource::m_password
std::string m_password
Definition: MuonCalibDbCalibrationSource.h:55
MuonCalib::MuonCalibDbCalibrationSource::m_b_field_correction_applied
bool m_b_field_correction_applied
Definition: MuonCalibDbCalibrationSource.h:65
MuonCalib::MuonCalibDbCalibrationSource::m_region_str
std::string m_region_str
Definition: MuonCalibDbCalibrationSource.h:57
beamspotnt.rows
list rows
Definition: bin/beamspotnt.py:1112
MuonCalib::MuonCalibDbCalibrationSource::~MuonCalibDbCalibrationSource
virtual ~MuonCalibDbCalibrationSource()
MuonCalib::MuonCalibDbCalibrationSource::m_store_t0
bool m_store_t0
Definition: MuonCalibDbCalibrationSource.h:61
MuonCalib::MuonCalibDbCalibrationSource::m_data_connection
std::unique_ptr< CalibDbConnection > m_data_connection
Definition: MuonCalibDbCalibrationSource.h:71
MuonCalib::MuonCalibDbCalibrationSource::m_creation_flags
unsigned int m_creation_flags
Definition: MuonCalibDbCalibrationSource.h:66
MuonCalib::MuonCalibDbCalibrationSource::m_connection
std::unique_ptr< CalibDbConnection > m_connection
Definition: MuonCalibDbCalibrationSource.h:70
MuonCalib::MuonCalibDbCalibrationSource::m_mdt_tube_v_cols
std::vector< std::string > m_mdt_tube_v_cols
Definition: MuonCalibDbCalibrationSource.h:69
IMuonCalibConditionsSource.h
MuonCalib::MuonCalibDbCalibrationSource::RowsFromMdtTubeTable
const std::vector< std::string > & RowsFromMdtTubeTable() const
Definition: MuonCalibDbCalibrationSource.h:39
MuonCalib::MuonCalibDbCalibrationSource::m_t0_offset
float m_t0_offset
Definition: MuonCalibDbCalibrationSource.h:63
MuonCalib::IMuonCalibConditionsSource
Definition: IMuonCalibConditionsSource.h:17
MuonCalib::MuonCalibDbCalibrationSource::RowsFromMdtTubeVTable
const std::vector< std::string > & RowsFromMdtTubeVTable() const
Definition: MuonCalibDbCalibrationSource.h:40
MuonCalib::MuonCalibDbCalibrationSource::m_site_name
std::string m_site_name
Definition: MuonCalibDbCalibrationSource.h:48
AthAlgTool
Definition: AthAlgTool.h:26
MuonCalib::MuonCalibDbCalibrationSource::insert_calibration
bool insert_calibration(bool store_t0, bool store_rt)
insert calibration
Definition: MuonCalibDbCalibrationSource.cxx:149
jobOptions.points
points
Definition: jobOptions.GenevaPy8_Zmumu.py:97
MuonCalib::MuonCalibDbCalibrationSource::m_head_ops
std::unique_ptr< CalibHeadOperations > m_head_ops
Definition: MuonCalibDbCalibrationSource.h:72