ATLAS Offline Software
SCT_ConfigurationCondAlg.h
Go to the documentation of this file.
1 // -*- C++ -*-
2 
3 /*
4  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
5 */
6 
7 #ifndef SCT_CONFIGURATIONCONDALG
8 #define SCT_CONFIGURATIONCONDALG
9 
11 
13 #include "Identifier/Identifier.h"
21 
22 // Gaudi includes
23 #include "GaudiKernel/ICondSvc.h"
24 #include "GaudiKernel/ServiceHandle.h"
25 #include "GaudiKernel/ToolHandle.h"
26 
27 // Forward declarations
28 class SCT_ID;
29 
31 {
32  public:
33  SCT_ConfigurationCondAlg(const std::string& name, ISvcLocator* pSvcLocator);
34  virtual ~SCT_ConfigurationCondAlg() = default;
35  virtual StatusCode initialize() override final;
36  virtual StatusCode execute(const EventContext& ctx) const override final;
37  virtual StatusCode finalize() override final;
38  virtual bool isReEntrant() const override final { return false; }
39 
40  private:
42  enum {badLink=255, stripsPerChip=128, lastStrip=767};
43 
44  StatusCode fillChannelData(SCT_ConfigurationCondData* writeCdo, SG::WriteCondHandle<SCT_ConfigurationCondData>& writeHandle, const EventContext& ctx) const;
45  StatusCode fillModuleData(SCT_ConfigurationCondData* writeCdo, SG::WriteCondHandle<SCT_ConfigurationCondData>& writeHandle, const EventContext& ctx) const;
46  StatusCode fillLinkStatus(SCT_ConfigurationCondData* writeCdo, SG::WriteCondHandle<SCT_ConfigurationCondData>& writeHandle, const EventContext& ctx) const;
47  Identifier getStripId(const unsigned int truncatedSerialNumber, const unsigned int chipNumber, const unsigned int stripNumber,
48  const InDetDD::SiDetectorElementCollection* elements, const EventContext& ctx) const;
49 
50  static const std::string s_coolChannelFolderName;
51  static const std::string s_coolChannelFolderName2;
52  static const std::string s_coolChannelFolderName2Slim;
53  static const std::string s_coolModuleFolderName;
54  static const std::string s_coolModuleFolderName2;
55  static const std::string s_coolMurFolderName;
56  static const std::string s_coolMurFolderName2;
57 
58  SG::ReadCondHandleKey<CondAttrListVec> m_readKeyChannel{this, "ReadKeyChannel", "/SCT/DAQ/Config/Chip", "Key of input (raw) conditions folder of chips"};
59  SG::ReadCondHandleKey<CondAttrListVec> m_readKeyModule{this, "ReadKeyModule", "/SCT/DAQ/Config/Module", "Key of input (raw) conditions folder of modules"};
60  SG::ReadCondHandleKey<CondAttrListVec> m_readKeyMur{this, "ReadKeyMur", "/SCT/DAQ/Config/MUR", "Key of input (raw) conditions folder of Murs"};
61  SG::ReadCondHandleKey<InDetDD::SiDetectorElementCollection> m_SCTDetEleCollKey{this, "SCTDetEleCollKey", "SCT_DetectorElementCollection", "Key of SiDetectorElementCollection for SCT"};
62  SG::WriteCondHandleKey<SCT_ConfigurationCondData> m_writeKey{this, "WriteKey", "SCT_ConfigurationCondData", "Key of output (derived) conditions data"};
63  ServiceHandle<ICondSvc> m_condSvc{this, "CondSvc", "CondSvc"};
64  ToolHandle<ISCT_CablingTool> m_cablingTool{this, "SCT_CablingTool", "SCT_CablingTool", "Tool to retrieve SCT Cabling"};
65  ToolHandle<ISCT_ReadoutTool> m_readoutTool{this, "SCT_ReadoutTool", "SCT_ReadoutTool", "Handle on readout tool"};
66  const SCT_ID* m_pHelper{nullptr};
67 };
68 
69 #endif // SCT_CONFIGURATIONCONDALG
SCT_ConfigurationCondAlg::m_pHelper
const SCT_ID * m_pHelper
ID helper for SCT.
Definition: SCT_ConfigurationCondAlg.h:66
SCT_ConfigurationCondAlg::m_readKeyMur
SG::ReadCondHandleKey< CondAttrListVec > m_readKeyMur
Definition: SCT_ConfigurationCondAlg.h:60
SCT_ConfigurationCondAlg::s_coolMurFolderName
static const std::string s_coolMurFolderName
Definition: SCT_ConfigurationCondAlg.h:55
InDetDD::SiDetectorElementCollection
Definition: SiDetectorElementCollection.h:30
SCT_ConfigurationCondAlg::s_coolChannelFolderName
static const std::string s_coolChannelFolderName
Definition: SCT_ConfigurationCondAlg.h:50
SCT_ConfigurationCondAlg::execute
virtual StatusCode execute(const EventContext &ctx) const override final
Definition: SCT_ConfigurationCondAlg.cxx:73
SCT_ConfigurationCondAlg::fillModuleData
StatusCode fillModuleData(SCT_ConfigurationCondData *writeCdo, SG::WriteCondHandle< SCT_ConfigurationCondData > &writeHandle, const EventContext &ctx) const
Definition: SCT_ConfigurationCondAlg.cxx:270
SCT_ConfigurationCondAlg::lastStrip
@ lastStrip
Definition: SCT_ConfigurationCondAlg.h:42
SCT_ConfigurationCondAlg::m_readKeyChannel
SG::ReadCondHandleKey< CondAttrListVec > m_readKeyChannel
Definition: SCT_ConfigurationCondAlg.h:58
WriteCondHandleKey.h
SCT_ConfigurationCondAlg::s_coolModuleFolderName
static const std::string s_coolModuleFolderName
Definition: SCT_ConfigurationCondAlg.h:53
SCT_ConfigurationCondAlg::badLink
@ badLink
Definition: SCT_ConfigurationCondAlg.h:42
const
bool const RAWDATA *ch2 const
Definition: LArRodBlockPhysicsV0.cxx:560
SCT_ConfigurationCondAlg::isReEntrant
virtual bool isReEntrant() const override final
Definition: SCT_ConfigurationCondAlg.h:38
SCT_ConfigurationCondAlg::m_condSvc
ServiceHandle< ICondSvc > m_condSvc
Definition: SCT_ConfigurationCondAlg.h:63
AthReentrantAlgorithm
An algorithm that can be simultaneously executed in multiple threads.
Definition: AthReentrantAlgorithm.h:83
SCT_ConfigurationCondAlg::initialize
virtual StatusCode initialize() override final
Definition: SCT_ConfigurationCondAlg.cxx:35
SCT_ConfigurationCondAlg::~SCT_ConfigurationCondAlg
virtual ~SCT_ConfigurationCondAlg()=default
SCT_ConfigurationCondData.h
SCT_ConfigurationCondAlg::fillChannelData
StatusCode fillChannelData(SCT_ConfigurationCondData *writeCdo, SG::WriteCondHandle< SCT_ConfigurationCondData > &writeHandle, const EventContext &ctx) const
Definition: SCT_ConfigurationCondAlg.cxx:113
ISCT_ReadoutTool.h
SCT_ConfigurationCondAlg::m_writeKey
SG::WriteCondHandleKey< SCT_ConfigurationCondData > m_writeKey
Definition: SCT_ConfigurationCondAlg.h:62
CondAttrListVec.h
A CondAttrListVec is an Athena DataObject holding a vector of CORAL AttributeLists,...
SCT_ConfigurationCondAlg::m_SCTDetEleCollKey
SG::ReadCondHandleKey< InDetDD::SiDetectorElementCollection > m_SCTDetEleCollKey
Definition: SCT_ConfigurationCondAlg.h:61
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
WriteCondHandle.h
SCT_ConfigurationCondAlg::m_cablingTool
ToolHandle< ISCT_CablingTool > m_cablingTool
Handle on SCT cabling service.
Definition: SCT_ConfigurationCondAlg.h:64
SCT_ConfigurationCondAlg::getStripId
Identifier getStripId(const unsigned int truncatedSerialNumber, const unsigned int chipNumber, const unsigned int stripNumber, const InDetDD::SiDetectorElementCollection *elements, const EventContext &ctx) const
Definition: SCT_ConfigurationCondAlg.cxx:400
SCT_ConfigurationCondAlg::SCT_ConfigurationCondAlg
SCT_ConfigurationCondAlg(const std::string &name, ISvcLocator *pSvcLocator)
Definition: SCT_ConfigurationCondAlg.cxx:30
SCT_ConfigurationCondData
Class for data object used in SCT_ConfigurationCondAlg and SCT_ConfigurationConditionsTool.
Definition: SCT_ConfigurationCondData.h:30
SCT_ConfigurationCondAlg::s_coolChannelFolderName2
static const std::string s_coolChannelFolderName2
Definition: SCT_ConfigurationCondAlg.h:51
ReadCondHandleKey.h
AthReentrantAlgorithm.h
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
SCT_ConfigurationCondAlg::stripsPerChip
@ stripsPerChip
Definition: SCT_ConfigurationCondAlg.h:42
SCT_ConfigurationCondAlg::m_readoutTool
ToolHandle< ISCT_ReadoutTool > m_readoutTool
Handle on readout tool.
Definition: SCT_ConfigurationCondAlg.h:65
SiDetectorElementCollection.h
SCT_ConfigurationCondAlg::s_coolMurFolderName2
static const std::string s_coolMurFolderName2
Definition: SCT_ConfigurationCondAlg.h:56
SCT_ConfigurationCondAlg::finalize
virtual StatusCode finalize() override final
Definition: SCT_ConfigurationCondAlg.cxx:434
SG::ReadCondHandleKey< CondAttrListVec >
SCT_ConfigurationCondAlg::s_coolChannelFolderName2Slim
static const std::string s_coolChannelFolderName2Slim
Definition: SCT_ConfigurationCondAlg.h:52
SCT_ConfigurationCondAlg::s_coolModuleFolderName2
static const std::string s_coolModuleFolderName2
Definition: SCT_ConfigurationCondAlg.h:54
SCT_ID
Definition: SCT_ID.h:68
SCT_ConfigurationCondAlg
Definition: SCT_ConfigurationCondAlg.h:31
SCT_ConfigurationCondAlg::fillLinkStatus
StatusCode fillLinkStatus(SCT_ConfigurationCondData *writeCdo, SG::WriteCondHandle< SCT_ConfigurationCondData > &writeHandle, const EventContext &ctx) const
Definition: SCT_ConfigurationCondAlg.cxx:340
ISCT_CablingTool.h
SG::WriteCondHandleKey< SCT_ConfigurationCondData >
SCT_ConfigurationCondAlg::m_readKeyModule
SG::ReadCondHandleKey< CondAttrListVec > m_readKeyModule
Definition: SCT_ConfigurationCondAlg.h:59
SG::WriteCondHandle
Definition: WriteCondHandle.h:26
ServiceHandle< ICondSvc >
Identifier
Definition: IdentifierFieldParser.cxx:14