ATLAS Offline Software
TRTCondWrite.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 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 public:
37 
38 
40  TRTCondWrite(const std::string& name, ISvcLocator* pSvcLocator);
42  ~TRTCondWrite(void);
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 
59  private:
60 
61  bool m_setup;
62  std::string m_par_caltextfile;
63  const TRT_ID* m_trtid;
66 
67  // WriteHandle Keys
68  SG::WriteCondHandleKey<RtRelationContainer> m_rtWriteKey{this,"RtWriteKeyName","/TRT/Calib/RT","r-t relation out-key"};
69  SG::WriteCondHandleKey<StrawT0Container> m_t0WriteKey{this,"T0WriteKeyName","/TRT/Calib/T0","t0 out-key"};
70 
71 
72 };
73 
74 #endif // TRTCONDITIONSALGS_TRTCONDWRITE_H
75 
TRTCondWrite::finalize
virtual StatusCode finalize(void) override
Definition: TRTCondWrite.cxx:126
TRTCondWrite::m_t0WriteKey
SG::WriteCondHandleKey< StrawT0Container > m_t0WriteKey
Definition: TRTCondWrite.h:69
vtune_athena.format
format
Definition: vtune_athena.py:14
TRTCondWrite::m_condSvc
ServiceHandle< ICondSvc > m_condSvc
Definition: TRTCondWrite.h:65
TRTCondWrite::m_rtWriteKey
SG::WriteCondHandleKey< RtRelationContainer > m_rtWriteKey
Definition: TRTCondWrite.h:68
TRTCondWrite::m_par_caltextfile
std::string m_par_caltextfile
input text file
Definition: TRTCondWrite.h:62
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:293
TRTCondWrite::~TRTCondWrite
~TRTCondWrite(void)
destructor
Definition: TRTCondWrite.cxx:38
TRTCondWrite::m_setup
bool m_setup
true at first event
Definition: TRTCondWrite.h:61
DataHandle.h
TRTCondWrite::readTextFile
virtual StatusCode readTextFile(const std::string &file, int &format)
Definition: TRTCondWrite.cxx:160
python.iconfTool.models.loaders.level
level
Definition: loaders.py:20
TRTCondWrite::execute
virtual StatusCode execute(void) override
Definition: TRTCondWrite.cxx:89
IAthenaOutputStreamTool.h
Interface to an output stream tool.
AthAlgorithm.h
Identifier
Definition: DetectorDescription/Identifier/Identifier/Identifier.h:32
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:299
file
TFile * file
Definition: tile_monitor.h:29
TRTCondWrite
Definition: TRTCondWrite.h:33
TRTCondWrite::TRTCondWrite
TRTCondWrite(const std::string &name, ISvcLocator *pSvcLocator)
constructor
Definition: TRTCondWrite.cxx:24
AthAlgorithm
Definition: AthAlgorithm.h:47
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
TRTCond::ExpandedIdentifier::STRAW
@ STRAW
Definition: InnerDetector/InDetConditions/TRT_ConditionsData/TRT_ConditionsData/ExpandedIdentifier.h:37
TRTCondWrite::StrawT0Container
TRTCond::StrawT0MultChanContainer StrawT0Container
Definition: TRTCondWrite.h:36
TRT_ID
Definition: TRT_ID.h:84
TRTCondWrite::initialize
virtual StatusCode initialize(void) override
Definition: TRTCondWrite.cxx:41
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:63
SG::WriteCondHandleKey
Definition: WriteCondHandleKey.h:20
TRTCondWrite::readTextFile_Format1
virtual StatusCode readTextFile_Format1(std::istream &)
Definition: TRTCondWrite.cxx:192
TRTCond::ExpandedIdentifier
Identifier for TRT detector elements in the conditions code.
Definition: InnerDetector/InDetConditions/TRT_ConditionsData/TRT_ConditionsData/ExpandedIdentifier.h:30
TRTCond::StrawT0MultChanContainer
Definition: StrawT0MultChanContainer.h:31
TRTCondWrite::m_detstore
ServiceHandle< StoreGateSvc > m_detstore
Definition: TRTCondWrite.h:64
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:132
ServiceHandle< StoreGateSvc >
TRTCondWrite::RtRelationContainer
TRTCond::RtRelationMultChanContainer RtRelationContainer
Definition: TRTCondWrite.h:35
TRTCond::RtRelationMultChanContainer
Definition: RtRelationMultChanContainer.h:29