ATLAS Offline Software
Loading...
Searching...
No Matches
MuonAlignmentErrorDbAlg.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3*/
4
8
9#ifndef MUONCONDSVC_MUONALIGNMENTERRORDBALG_H
10#define MUONCONDSVC_MUONALIGNMENTERRORDBALG_H
11
12#include <GaudiKernel/EventIDRange.h>
18#include <Identifier/Identifier.h>
19#include <unordered_map>
24public:
25
26 MuonAlignmentErrorDbAlg(const std::string& name, ISvcLocator* pSvcLocator);
27
28 ~MuonAlignmentErrorDbAlg() override = default;
29
30 StatusCode initialize() override;
31 StatusCode execute(const EventContext& ctx) const override;
32
33private:
34 std::tuple<std::string, EventIDRange> getDbClobContent(const EventContext& ctx) const;
35 std::tuple<std::string, EventIDRange> getFileClobContent() const;
36
37 SG::ReadCondHandleKey<CondAttrListCollection> m_readKey{this, "ReadKey", "/MUONALIGN/ERRS",
38 "Key of input muon alignment error condition data"};
39 SG::WriteCondHandleKey<MuonAlignmentErrorData> m_writeKey{this, "WriteKey", "MuonAlignmentErrorData",
40 "Key of output muon alignment error condition data"};
41 Gaudi::Property<std::string> m_clobFileOverride{this, "clobFileOverride", "",
42 "Set this to the location of a CLOB file to override the DB setting"};
43 ServiceHandle<Muon::IMuonIdHelperSvc> m_idHelperSvc{this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"};
44 ToolHandle<MuonCalib::IIdToFixedIdTool> m_idTool{this, "idTool", "MuonCalib::IdToFixedIdTool"};
45 // SOME USEFUL METHODS //
46 // GET STATION EXACT NAME, FROM:
47 // https://gitlab.cern.ch/Asap/AsapModules/Track/MuonAlignTrk/-/blob/master/MuonAlignTrk/MuonFixedLongId.h?ref_type=heads
48 std::string hardwareName(MuonCalib::MuonFixedLongId calibId) const;
49 std::string_view side(MuonCalib::MuonFixedLongId calibId) const;
50 std::string sectorString(MuonCalib::MuonFixedLongId calibId) const;
51 int sector(MuonCalib::MuonFixedLongId calibId) const;
52 int hardwareEta(MuonCalib::MuonFixedLongId calibId) const;
53 bool isSmallSector(MuonCalib::MuonFixedLongId calibId) const;
54 void generateMap(const auto & helper_obj, const auto & idTool, MuonAlignmentErrorData::MuonAlignmentErrorRuleCache& adev_new,
55 std::vector<MuonAlignmentErrorData::MuonAlignmentErrorRule>& devVec) const;
56};
57
58#endif
Base class for conditions algorithms.
This file defines the class for a collection of AttributeLists where each one is associated with a ch...
Base class for conditions algorithms.
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc
void generateMap(const auto &helper_obj, const auto &idTool, MuonAlignmentErrorData::MuonAlignmentErrorRuleCache &adev_new, std::vector< MuonAlignmentErrorData::MuonAlignmentErrorRule > &devVec) const
int hardwareEta(MuonCalib::MuonFixedLongId calibId) const
std::string sectorString(MuonCalib::MuonFixedLongId calibId) const
std::string hardwareName(MuonCalib::MuonFixedLongId calibId) const
std::tuple< std::string, EventIDRange > getFileClobContent() const
bool isSmallSector(MuonCalib::MuonFixedLongId calibId) const
std::string_view side(MuonCalib::MuonFixedLongId calibId) const
ToolHandle< MuonCalib::IIdToFixedIdTool > m_idTool
~MuonAlignmentErrorDbAlg() override=default
std::tuple< std::string, EventIDRange > getDbClobContent(const EventContext &ctx) const
MuonAlignmentErrorDbAlg(const std::string &name, ISvcLocator *pSvcLocator)
SG::ReadCondHandleKey< CondAttrListCollection > m_readKey
SG::WriteCondHandleKey< MuonAlignmentErrorData > m_writeKey
StatusCode execute(const EventContext &ctx) const override
Gaudi::Property< std::string > m_clobFileOverride
int sector(MuonCalib::MuonFixedLongId calibId) const