ATLAS Offline Software
Loading...
Searching...
No Matches
AlignmentErrorDbAlg.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3*/
4#ifndef MUONCONDSVC_MUONALIGNMENTERRORDBALG_H
5#define MUONCONDSVC_MUONALIGNMENTERRORDBALG_H
6
7#include <GaudiKernel/EventIDRange.h>
13#include <Identifier/Identifier.h>
14#include <unordered_map>
21namespace Muon{
23public:
24
25 using AthCondAlgorithm::AthCondAlgorithm;
26 ~AlignmentErrorDbAlg() override = default;
27
28 StatusCode initialize() override;
29 StatusCode execute(const EventContext& ctx) const override;
30
31private:
32 std::tuple<std::string, EventIDRange> getDbClobContent(const EventContext& ctx) const;
33 std::tuple<std::string, EventIDRange> getFileClobContent() const;
34
35 SG::ReadCondHandleKey<CondAttrListCollection> m_readKey{this, "ReadKey", "/MUONALIGN/ERRS",
36 "Key of input muon alignment error condition data"};
37 SG::WriteCondHandleKey<MuonAlignmentErrorData> m_writeKey{this, "WriteKey", "MuonAlignmentErrorData",
38 "Key of output muon alignment error condition data"};
39 Gaudi::Property<std::string> m_clobFileOverride{this, "clobFileOverride", "",
40 "Set this to the location of a CLOB file to override the DB setting"};
41 ServiceHandle<Muon::IMuonIdHelperSvc> m_idHelperSvc{this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"};
42 ToolHandle<MuonCalib::IIdToFixedIdTool> m_idTool{this, "idTool", "MuonCalib::IdToFixedIdTool"};
43 // SOME USEFUL METHODS //
44 // GET STATION EXACT NAME, FROM:
45 // https://gitlab.cern.ch/Asap/AsapModules/Track/MuonAlignTrk/-/blob/master/MuonAlignTrk/MuonFixedLongId.h?ref_type=heads
46 std::string hardwareName(MuonCalib::MuonFixedLongId calibId) const;
47 std::string_view side(MuonCalib::MuonFixedLongId calibId) const;
48 std::string sectorString(MuonCalib::MuonFixedLongId calibId) const;
49 int sector(MuonCalib::MuonFixedLongId calibId) const;
50 int hardwareEta(MuonCalib::MuonFixedLongId calibId) const;
51 bool isSmallSector(MuonCalib::MuonFixedLongId calibId) const;
52 void generateMap(const auto & helper_obj, const auto & idTool, MuonAlignmentErrorData::MuonAlignmentErrorRuleCache& adev_new,
53 std::vector<MuonAlignmentErrorData::MuonAlignmentErrorRule>& devVec) const;
54};
55}
56#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.
std::string sectorString(MuonCalib::MuonFixedLongId calibId) const
ToolHandle< MuonCalib::IIdToFixedIdTool > m_idTool
SG::WriteCondHandleKey< MuonAlignmentErrorData > m_writeKey
bool isSmallSector(MuonCalib::MuonFixedLongId calibId) const
int sector(MuonCalib::MuonFixedLongId calibId) const
StatusCode initialize() override
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc
StatusCode execute(const EventContext &ctx) const override
SG::ReadCondHandleKey< CondAttrListCollection > m_readKey
int hardwareEta(MuonCalib::MuonFixedLongId calibId) const
~AlignmentErrorDbAlg() override=default
std::string hardwareName(MuonCalib::MuonFixedLongId calibId) const
std::tuple< std::string, EventIDRange > getDbClobContent(const EventContext &ctx) const
std::tuple< std::string, EventIDRange > getFileClobContent() const
std::string_view side(MuonCalib::MuonFixedLongId calibId) const
void generateMap(const auto &helper_obj, const auto &idTool, MuonAlignmentErrorData::MuonAlignmentErrorRuleCache &adev_new, std::vector< MuonAlignmentErrorData::MuonAlignmentErrorRule > &devVec) const
Gaudi::Property< std::string > m_clobFileOverride
NRpcCablingAlg reads raw condition data and writes derived condition data to the condition store.