ATLAS Offline Software
TRTCondWrite.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 TRTCONDITIONSALGS_TRTCONDWRITE_H
6 #define TRTCONDITIONSALGS_TRTCONDWRITE_H
7 
13 //
14 #include <string>
16 #include "GaudiKernel/ToolHandle.h"
17 #include "GaudiKernel/IInterface.h"
18 #include "GaudiKernel/ServiceHandle.h"
19 #include "GaudiKernel/ICondSvc.h"
20 #include "StoreGate/StoreGateSvc.h"
22 #include "StoreGate/DataHandle.h"
23 #include "InDetIdentifier/TRT_ID.h"
27 #include "GaudiKernel/EventIDRange.h"
28 
33 class TRTCondWrite : public AthAlgorithm
34 {
35 public:
38 
40  TRTCondWrite(const std::string &name, ISvcLocator *pSvcLocator);
42  virtual ~TRTCondWrite() override = default;
43 
44  virtual StatusCode initialize(void) override;
45  virtual StatusCode execute(void) override;
46  virtual StatusCode finalize(void) override;
47 
50 
52  virtual StatusCode checkTextFile(const std::string &file, int &format);
53  virtual StatusCode readTextFile(const std::string &file, int &format);
54  virtual StatusCode readTextFile_Format1(std::istream &);
55 
56  virtual EventIDRange IOVInfRange() const;
57 
58 private:
59  const TRT_ID *m_trtid{};
60  ServiceHandle<ICondSvc> m_condSvc{this, "CondSvc", "CondSvc"};
61  Gaudi::Property<std::string> m_par_caltextfile{this, "CalibInputFile", "dummy_TRTCondWrite.txt", ""};
62 
63  // WriteHandle Keys
64  SG::WriteCondHandleKey<RtRelationContainer> m_rtWriteKey{this, "RtWriteKeyName", "/TRT/Calib/RT", "r-t relation out-key"};
65  SG::WriteCondHandleKey<StrawT0Container> m_t0WriteKey{this, "T0WriteKeyName", "/TRT/Calib/T0", "t0 out-key"};
66 };
67 
68 #endif // TRTCONDITIONSALGS_TRTCONDWRITE_H
TRTCondWrite::finalize
virtual StatusCode finalize(void) override
Definition: TRTCondWrite.cxx:108
TRTCondWrite::m_t0WriteKey
SG::WriteCondHandleKey< StrawT0Container > m_t0WriteKey
Definition: TRTCondWrite.h:65
vtune_athena.format
format
Definition: vtune_athena.py:14
TRTCondWrite::m_condSvc
ServiceHandle< ICondSvc > m_condSvc
Definition: TRTCondWrite.h:60
TRTCondWrite::m_rtWriteKey
SG::WriteCondHandleKey< RtRelationContainer > m_rtWriteKey
Definition: TRTCondWrite.h:64
TRT_ID.h
This is an Identifier helper class for the TRT subdetector. This class is a factory for creating comp...
WriteCondHandleKey.h
TRTCondWrite::trtcondid
virtual TRTCond::ExpandedIdentifier trtcondid(const Identifier &id, int level=TRTCond::ExpandedIdentifier::STRAW) const
create an TRTCond::ExpandedIdentifier from a TRTID identifier
Definition: TRTCondWrite.cxx:304
DataHandle.h
TRTCondWrite::readTextFile
virtual StatusCode readTextFile(const std::string &file, int &format)
Definition: TRTCondWrite.cxx:147
python.iconfTool.models.loaders.level
level
Definition: loaders.py:20
TRTCondWrite::execute
virtual StatusCode execute(void) override
Definition: TRTCondWrite.cxx:74
IAthenaOutputStreamTool.h
Interface to an output stream tool.
AthAlgorithm.h
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
TRTCondWrite::IOVInfRange
virtual EventIDRange IOVInfRange() const
Definition: TRTCondWrite.cxx:310
file
TFile * file
Definition: tile_monitor.h:29
TRTCondWrite
Definition: TRTCondWrite.h:34
TRTCondWrite::TRTCondWrite
TRTCondWrite(const std::string &name, ISvcLocator *pSvcLocator)
constructor
Definition: TRTCondWrite.cxx:22
AthAlgorithm
Definition: AthAlgorithm.h:47
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:240
TRTCond::ExpandedIdentifier::STRAW
@ STRAW
Definition: InnerDetector/InDetConditions/TRT_ConditionsData/TRT_ConditionsData/ExpandedIdentifier.h:37
TRTCondWrite::m_par_caltextfile
Gaudi::Property< std::string > m_par_caltextfile
Definition: TRTCondWrite.h:61
TRTCondWrite::StrawT0Container
TRTCond::StrawT0MultChanContainer StrawT0Container
Definition: TRTCondWrite.h:37
TRT_ID
Definition: TRT_ID.h:82
TRTCondWrite::initialize
virtual StatusCode initialize(void) override
Definition: TRTCondWrite.cxx:25
RtRelationMultChanContainer.h
Class for storing/accessing trt rtrelations with channels 1;95;0c.
TRTCondWrite::m_trtid
const TRT_ID * m_trtid
trt id helper
Definition: TRTCondWrite.h:59
SG::WriteCondHandleKey
Definition: WriteCondHandleKey.h:20
TRTCondWrite::readTextFile_Format1
virtual StatusCode readTextFile_Format1(std::istream &)
Definition: TRTCondWrite.cxx:185
TRTCond::ExpandedIdentifier
Identifier for TRT detector elements in the conditions code.
Definition: InnerDetector/InDetConditions/TRT_ConditionsData/TRT_ConditionsData/ExpandedIdentifier.h:30
TRTCondWrite::~TRTCondWrite
virtual ~TRTCondWrite() override=default
destructor
TRTCond::StrawT0MultChanContainer
Definition: StrawT0MultChanContainer.h:31
StoreGateSvc.h
StrawT0MultChanContainer.h
TRTCondWrite::checkTextFile
virtual StatusCode checkTextFile(const std::string &file, int &format)
read calibration from text file into TDS
Definition: TRTCondWrite.cxx:113
ServiceHandle< ICondSvc >
TRTCondWrite::RtRelationContainer
TRTCond::RtRelationMultChanContainer RtRelationContainer
Definition: TRTCondWrite.h:36
TRTCond::RtRelationMultChanContainer
Definition: RtRelationMultChanContainer.h:29
Identifier
Definition: IdentifierFieldParser.cxx:14