ATLAS Offline Software
LArHVPathologyDbAlg.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef LARCONDUTILS_LARHVPATHOLOGYDBALG_H
6 #define LARCONDUTILS_LARHVPATHOLOGYDBALG_H
7 
14 
17 
18 #include <optional>
19 #include <memory>
20 
21 class LArEM_ID;
22 class LArHEC_ID;
23 class LArFCAL_ID;
24 class LArOnlineID;
25 class CaloIdManager;
26 class Identifier;
27 
28 
34 {
35  public:
36 
39 
40  virtual StatusCode initialize() override;
41  virtual StatusCode execute() override;
42 
43  private:
44  std::optional<LArHVPathologiesDb> createCondObjects (const EventContext& ctx, const CaloDetDescrManager* calodetdescrmgr) const;
45  StatusCode printCondObjects (const EventContext& ctx, const CaloDetDescrManager* calodetdescrmgr, const std::vector<LArHVPathologiesDb::LArHVElectPathologyDb>* path=nullptr) const;
46 
47  std::vector<unsigned int> getElectInd(const LArHVIdMapping& hvIdMapping,
48  const Identifier& id, unsigned int module, unsigned int line,
49  const CaloDetDescrManager* calodetdescrmgr) const;
50 
51  int getHVline(const LArHVIdMapping& hvIdMapping,
52  const Identifier& id, short unsigned int ElectInd,
53  const CaloDetDescrManager* calodetdescrmgr) const;
54 
55 
56  std::unique_ptr<AthenaAttributeList> hvPathology2AttrList(const LArHVPathologiesDb& pathologyContainer) const;
57 
58  BooleanProperty m_writeCondObjs{this,"WriteCondObjs",false};
59  StringProperty m_inpFile{this,"InpFile",{}};
60  StringProperty m_outFile{this,"OutFile",{}};
61  StringProperty m_folder{this,"Folder","/LAR/HVPathologiesOfl/Pathologies"};
62  IntegerProperty m_mode{this,"Mode",0,"Mode to read file (0=offlineID/elecID, 1=online ID fields + HV module/line, 2=type is HV value to overwrite)"};
63 
64  const CaloIdManager* m_caloIdMgr{nullptr};
65  const LArEM_ID* m_larem_id{nullptr};
66  const LArHEC_ID* m_larhec_id{nullptr};
67  const LArFCAL_ID* m_larfcal_id{nullptr};
68  const LArOnlineID* m_laronline_id{nullptr};
69 
71  {this, "LArHVIdMapping", "LArHVIdMap", "SG key for HV ID mapping"};
73  {this, "OnOffMap", "LArOnOffIdMap", "SG key for mapping object"};
75  {this, "CaloDetDescrManager", "CaloDetDescrManager", "SG Key for CaloDetDescrManager in the Condition Store" };
76 
78  {this, "HVPAthologyKey", "LArHVPathology", "Key for HV pathologies in Cond. store"};
79 };
80 
81 #endif
LArHVPathologyDbAlg::m_larfcal_id
const LArFCAL_ID * m_larfcal_id
Definition: LArHVPathologyDbAlg.h:67
LArHVPathologyDbAlg::m_larem_id
const LArEM_ID * m_larem_id
Definition: LArHVPathologyDbAlg.h:65
LArHVPathology.h
athena.path
path
python interpreter configuration --------------------------------------—
Definition: athena.py:128
LArHVPathologyDbAlg::m_folder
StringProperty m_folder
Definition: LArHVPathologyDbAlg.h:61
LArHVPathologyDbAlg::m_caloMgrKey
SG::ReadCondHandleKey< CaloDetDescrManager > m_caloMgrKey
Definition: LArHVPathologyDbAlg.h:75
LArHVPathologyDbAlg::m_mode
IntegerProperty m_mode
Definition: LArHVPathologyDbAlg.h:62
LArHVPathologyDbAlg::getElectInd
std::vector< unsigned int > getElectInd(const LArHVIdMapping &hvIdMapping, const Identifier &id, unsigned int module, unsigned int line, const CaloDetDescrManager *calodetdescrmgr) const
Definition: LArHVPathologyDbAlg.cxx:275
LArHVPathologyDbAlg::m_cablingKey
SG::ReadCondHandleKey< LArOnOffIdMapping > m_cablingKey
Definition: LArHVPathologyDbAlg.h:73
LArHEC_ID
Helper class for LArHEC offline identifiers.
Definition: LArHEC_ID.h:76
LArHVPathologyDbAlg::m_hvCablingKey
SG::ReadCondHandleKey< LArHVIdMapping > m_hvCablingKey
Definition: LArHVPathologyDbAlg.h:71
LArHVPathologyDbAlg::m_laronline_id
const LArOnlineID * m_laronline_id
Definition: LArHVPathologyDbAlg.h:68
dq_defect_bulk_create_defects.line
line
Definition: dq_defect_bulk_create_defects.py:27
CaloDetDescrManager.h
Definition of CaloDetDescrManager.
LArHVPathologyDbAlg::m_writeCondObjs
BooleanProperty m_writeCondObjs
Definition: LArHVPathologyDbAlg.h:58
AthAlgorithm.h
python.PyAthena.module
module
Definition: PyAthena.py:131
LArHVPathologyDbAlg::m_inpFile
StringProperty m_inpFile
Definition: LArHVPathologyDbAlg.h:59
LArHVPathologiesDb.h
LArOnOffIdMapping.h
LArHVPathologyDbAlg::m_hvPathologyKey
SG::ReadCondHandleKey< LArHVPathology > m_hvPathologyKey
Definition: LArHVPathologyDbAlg.h:78
CaloIdManager
This class initializes the Calo (LAr and Tile) offline identifiers.
Definition: CaloIdManager.h:45
LArHVPathologyDbAlg::m_outFile
StringProperty m_outFile
Definition: LArHVPathologyDbAlg.h:60
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
LArHVIdMapping.h
AthAlgorithm
Definition: AthAlgorithm.h:47
ReadCondHandleKey.h
LArHVPathologiesDb
Definition: LArHVPathologiesDb.h:19
LArHVPathologyDbAlg::getHVline
int getHVline(const LArHVIdMapping &hvIdMapping, const Identifier &id, short unsigned int ElectInd, const CaloDetDescrManager *calodetdescrmgr) const
Definition: LArHVPathologyDbAlg.cxx:374
LArHVPathologyDbAlg::~LArHVPathologyDbAlg
~LArHVPathologyDbAlg()=default
LArOnlineID
Definition: LArOnlineID.h:21
LArHVPathologyDbAlg::initialize
virtual StatusCode initialize() override
Definition: LArHVPathologyDbAlg.cxx:40
AthenaAttributeList.h
An AttributeList represents a logical row of attributes in a metadata table. The name and type of eac...
LArHVPathologyDbAlg
Definition: LArHVPathologyDbAlg.h:34
SG::ReadCondHandleKey< LArHVIdMapping >
LArHVPathologyDbAlg::m_larhec_id
const LArHEC_ID * m_larhec_id
Definition: LArHVPathologyDbAlg.h:66
LArHVIdMapping
Definition: LArHVIdMapping.h:21
CaloDetDescrManager
This class provides the client interface for accessing the detector description information common to...
Definition: CaloDetDescrManager.h:473
LArHVPathologyDbAlg::execute
virtual StatusCode execute() override
Definition: LArHVPathologyDbAlg.cxx:69
LArHVPathologyDbAlg::createCondObjects
std::optional< LArHVPathologiesDb > createCondObjects(const EventContext &ctx, const CaloDetDescrManager *calodetdescrmgr) const
Definition: LArHVPathologyDbAlg.cxx:114
LArHVPathologyDbAlg::hvPathology2AttrList
std::unique_ptr< AthenaAttributeList > hvPathology2AttrList(const LArHVPathologiesDb &pathologyContainer) const
Definition: LArHVPathologyDbAlg.cxx:478
AthAlgorithm::AthAlgorithm
AthAlgorithm()
Default constructor:
LArEM_ID
Helper class for LArEM offline identifiers.
Definition: LArEM_ID.h:111
LArHVPathologyDbAlg::m_caloIdMgr
const CaloIdManager * m_caloIdMgr
Definition: LArHVPathologyDbAlg.h:64
LArFCAL_ID
Helper class for LArFCAL offline identifiers.
Definition: LArFCAL_ID.h:49
LArHVPathologyDbAlg::printCondObjects
StatusCode printCondObjects(const EventContext &ctx, const CaloDetDescrManager *calodetdescrmgr, const std::vector< LArHVPathologiesDb::LArHVElectPathologyDb > *path=nullptr) const
Definition: LArHVPathologyDbAlg.cxx:210
Identifier
Definition: IdentifierFieldParser.cxx:14