Loading [MathJax]/jax/output/SVG/config.js
ATLAS Offline Software
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
Public Member Functions | Protected Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
TRTStrawAlign Class Reference

#include <TRTStrawAlign.h>

Inheritance diagram for TRTStrawAlign:
Collaboration diagram for TRTStrawAlign:

Public Member Functions

 TRTStrawAlign (const std::string &name, ISvcLocator *pSvcLocator)
 
 ~TRTStrawAlign (void)
 
virtual StatusCode initialize (void) override
 
virtual StatusCode execute (void) override
 
virtual StatusCode finalize (void) override
 
virtual StatusCode sysInitialize () override
 Override sysInitialize. More...
 
virtual const DataObjIDColl & extraOutputDeps () const override
 Return the list of extra output dependencies. More...
 
ServiceHandle< StoreGateSvc > & evtStore ()
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc. More...
 
const ServiceHandle< StoreGateSvc > & evtStore () const
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc. More...
 
const ServiceHandle< StoreGateSvc > & detStore () const
 The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc. More...
 
virtual StatusCode sysStart () override
 Handle START transition. More...
 
virtual std::vector< Gaudi::DataHandle * > inputHandles () const override
 Return this algorithm's input handles. More...
 
virtual std::vector< Gaudi::DataHandle * > outputHandles () const override
 Return this algorithm's output handles. More...
 
Gaudi::Details::PropertyBase & declareProperty (Gaudi::Property< T > &t)
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleKey &hndl, const std::string &doc, const SG::VarHandleKeyType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleBase &hndl, const std::string &doc, const SG::VarHandleType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleKeyArray &hndArr, const std::string &doc, const SG::VarHandleKeyArrayType &)
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, T &property, const std::string &doc, const SG::NotHandleType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, T &property, const std::string &doc="none")
 Declare a new Gaudi property. More...
 
void updateVHKA (Gaudi::Details::PropertyBase &)
 
MsgStream & msg () const
 
MsgStream & msg (const MSG::Level lvl) const
 
bool msgLvl (const MSG::Level lvl) const
 

Protected Member Functions

void renounceArray (SG::VarHandleKeyArray &handlesArray)
 remove all handles from I/O resolution More...
 
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce (T &h)
 
void extraDeps_update_handler (Gaudi::Details::PropertyBase &ExtraDeps)
 Add StoreName to extra input/output deps as needed. More...
 

Private Types

typedef ServiceHandle< StoreGateSvcStoreGateSvc_t
 

Private Member Functions

Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyArrayType &)
 specialization for handling Gaudi::Property<SG::VarHandleKeyArray> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleType &)
 specialization for handling Gaudi::Property<SG::VarHandleBase> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &t, const SG::NotHandleType &)
 specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray> More...
 

Private Attributes

ServiceHandle< ITRT_StrawAlignDbSvcp_caldbtool {this,"DbTool","TRT_StrawAlignDbSvc"}
 db tool More...
 
ServiceHandle< ITRT_AlignDbSvcp_aligndbtool {this,"AlignDbTool","TRT_AlignDbSvc"}
 db tool More...
 
bool m_doStrawAlign {}
 
bool m_doModuleAlign {}
 
const InDetDD::TRT_DetectorManagerm_trtman {nullptr}
 detector manager More...
 
const TRT_IDm_trt {nullptr}
 trt id helper More...
 
bool m_setup {false}
 true for first event More...
 
bool m_doWriteToPOOL {false}
 stream structures to output More...
 
bool m_doRegIOV {false}
 register structures in the IOV service More...
 
std::string m_inputModuleAlignmentTextFile
 text file to read module alignment data More...
 
std::string m_inputStrawAlignmentTextFile
 text file to read straw alignment data More...
 
std::string m_outputModuleAlignmentTextFile
 output module level text file More...
 
std::string m_outputStrawAlignmentTextFile
 output module level text file
More...
 
std::string m_outputPOOLFile
 POOL file to write. More...
 
std::string m_moduleAlignTag
 IOV version tag for module alignment. More...
 
std::string m_stawAlignTag
 IOV version tag for straw alignment. More...
 
int m_runRangeBegin
 IOV range. More...
 
int m_runRangeEnd
 IOV range. More...
 
int m_eventRangeBegin
 IOV range. More...
 
int m_eventRangeEnd
 IOV range. More...
 
DataObjIDColl m_extendedExtraObjects
 
StoreGateSvc_t m_evtStore
 Pointer to StoreGate (event store by default) More...
 
StoreGateSvc_t m_detStore
 Pointer to StoreGate (detector store by default) More...
 
std::vector< SG::VarHandleKeyArray * > m_vhka
 
bool m_varHandleArraysDeclared
 

Detailed Description

Definition at line 26 of file TRTStrawAlign.h.

Member Typedef Documentation

◆ StoreGateSvc_t

typedef ServiceHandle<StoreGateSvc> AthCommonDataStore< AthCommonMsg< Algorithm > >::StoreGateSvc_t
privateinherited

Definition at line 388 of file AthCommonDataStore.h.

Constructor & Destructor Documentation

◆ TRTStrawAlign()

TRTStrawAlign::TRTStrawAlign ( const std::string &  name,
ISvcLocator *  pSvcLocator 
)

Definition at line 22 of file TRTStrawAlign.cxx.

23  :AthAlgorithm (name, pSvcLocator),
28  m_outputPOOLFile(""),
29  m_moduleAlignTag("TRTAlign_00"),
30  m_stawAlignTag("TrtCalibDx_00"),
31  m_runRangeBegin(0),
32  m_runRangeEnd(9999999),
34  m_eventRangeEnd(9999999)
35 
36 {
38  declareProperty("RegisterIOV",m_doRegIOV);
40  declareProperty("InputStrawAlignmentFile",m_inputStrawAlignmentTextFile);
41  declareProperty("PoolOutputFile",m_outputPOOLFile);
43  declareProperty("StrawAlignmentTextOutputFile",m_outputStrawAlignmentTextFile);
44  declareProperty("VersionTag",m_moduleAlignTag);
45  declareProperty("VersionTagStrawAlign",m_stawAlignTag);
46  declareProperty("ValidRun1",m_runRangeBegin);
47  declareProperty("ValidRun2",m_runRangeEnd);
48  declareProperty("ValidEvent1",m_eventRangeBegin);
49  declareProperty("ValidEvent2",m_eventRangeEnd);
50  declareProperty("DoStrawAlign",m_doStrawAlign);
51  declareProperty("DoModuleAlign",m_doModuleAlign);
52 }

◆ ~TRTStrawAlign()

TRTStrawAlign::~TRTStrawAlign ( void  )
default

Member Function Documentation

◆ declareGaudiProperty() [1/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< Algorithm > >::declareGaudiProperty ( Gaudi::Property< T > &  hndl,
const SG::VarHandleKeyArrayType  
)
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKeyArray>

Definition at line 170 of file AthCommonDataStore.h.

172  {
173  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
174  hndl.value(),
175  hndl.documentation());
176 
177  }

◆ declareGaudiProperty() [2/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< Algorithm > >::declareGaudiProperty ( Gaudi::Property< T > &  hndl,
const SG::VarHandleKeyType  
)
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKey>

Definition at line 156 of file AthCommonDataStore.h.

158  {
159  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
160  hndl.value(),
161  hndl.documentation());
162 
163  }

◆ declareGaudiProperty() [3/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< Algorithm > >::declareGaudiProperty ( Gaudi::Property< T > &  hndl,
const SG::VarHandleType  
)
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleBase>

Definition at line 184 of file AthCommonDataStore.h.

186  {
187  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
188  hndl.value(),
189  hndl.documentation());
190  }

◆ declareGaudiProperty() [4/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< Algorithm > >::declareGaudiProperty ( Gaudi::Property< T > &  t,
const SG::NotHandleType  
)
inlineprivateinherited

specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray>

Definition at line 199 of file AthCommonDataStore.h.

200  {
201  return PBASE::declareProperty(t);
202  }

◆ declareProperty() [1/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< Algorithm > >::declareProperty ( const std::string &  name,
SG::VarHandleBase hndl,
const std::string &  doc,
const SG::VarHandleType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
hndlObject holding the property value.
docDocumentation string for the property.

This is the version for types that derive from SG::VarHandleBase. The property value object is put on the input and output lists as appropriate; then we forward to the base class.

Definition at line 245 of file AthCommonDataStore.h.

249  {
250  this->declare(hndl.vhKey());
251  hndl.vhKey().setOwner(this);
252 
253  return PBASE::declareProperty(name,hndl,doc);
254  }

◆ declareProperty() [2/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< Algorithm > >::declareProperty ( const std::string &  name,
SG::VarHandleKey hndl,
const std::string &  doc,
const SG::VarHandleKeyType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
hndlObject holding the property value.
docDocumentation string for the property.

This is the version for types that derive from SG::VarHandleKey. The property value object is put on the input and output lists as appropriate; then we forward to the base class.

Definition at line 221 of file AthCommonDataStore.h.

225  {
226  this->declare(hndl);
227  hndl.setOwner(this);
228 
229  return PBASE::declareProperty(name,hndl,doc);
230  }

◆ declareProperty() [3/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< Algorithm > >::declareProperty ( const std::string &  name,
SG::VarHandleKeyArray hndArr,
const std::string &  doc,
const SG::VarHandleKeyArrayType  
)
inlineinherited

Definition at line 259 of file AthCommonDataStore.h.

263  {
264 
265  // std::ostringstream ost;
266  // ost << Algorithm::name() << " VHKA declareProp: " << name
267  // << " size: " << hndArr.keys().size()
268  // << " mode: " << hndArr.mode()
269  // << " vhka size: " << m_vhka.size()
270  // << "\n";
271  // debug() << ost.str() << endmsg;
272 
273  hndArr.setOwner(this);
274  m_vhka.push_back(&hndArr);
275 
276  Gaudi::Details::PropertyBase* p = PBASE::declareProperty(name, hndArr, doc);
277  if (p != 0) {
278  p->declareUpdateHandler(&AthCommonDataStore<PBASE>::updateVHKA, this);
279  } else {
280  ATH_MSG_ERROR("unable to call declareProperty on VarHandleKeyArray "
281  << name);
282  }
283 
284  return p;
285 
286  }

◆ declareProperty() [4/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< Algorithm > >::declareProperty ( const std::string &  name,
T &  property,
const std::string &  doc,
const SG::NotHandleType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
propertyObject holding the property value.
docDocumentation string for the property.

This is the generic version, for types that do not derive from SG::VarHandleKey. It just forwards to the base class version of declareProperty.

Definition at line 333 of file AthCommonDataStore.h.

337  {
338  return PBASE::declareProperty(name, property, doc);
339  }

◆ declareProperty() [5/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< Algorithm > >::declareProperty ( const std::string &  name,
T &  property,
const std::string &  doc = "none" 
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
propertyObject holding the property value.
docDocumentation string for the property.

This dispatches to either the generic declareProperty or the one for VarHandle/Key/KeyArray.

Definition at line 352 of file AthCommonDataStore.h.

355  {
356  typedef typename SG::HandleClassifier<T>::type htype;
357  return declareProperty (name, property, doc, htype());
358  }

◆ declareProperty() [6/6]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< Algorithm > >::declareProperty ( Gaudi::Property< T > &  t)
inlineinherited

Definition at line 145 of file AthCommonDataStore.h.

145  {
146  typedef typename SG::HandleClassifier<T>::type htype;
148  }

◆ detStore()

const ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< Algorithm > >::detStore ( ) const
inlineinherited

The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 95 of file AthCommonDataStore.h.

95 { return m_detStore; }

◆ evtStore() [1/2]

ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< Algorithm > >::evtStore ( )
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 85 of file AthCommonDataStore.h.

85 { return m_evtStore; }

◆ evtStore() [2/2]

const ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< Algorithm > >::evtStore ( ) const
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 90 of file AthCommonDataStore.h.

90 { return m_evtStore; }

◆ execute()

StatusCode TRTStrawAlign::execute ( void  )
overridevirtual

Definition at line 112 of file TRTStrawAlign.cxx.

112  {
113 
114  StatusCode sc=StatusCode::SUCCESS;
115  //
116  // at first event:
117  if (!m_setup) {
118  m_setup=true;
119 
120  if (m_doStrawAlign) {
121  // read alignment constants from text file
122  if (!m_inputStrawAlignmentTextFile.empty()) {
124  if(sc!=StatusCode::SUCCESS) {
125  ATH_MSG_ERROR(" Could not read input text file ");
126  return StatusCode::FAILURE;
127  }
128  }
129 
130  // write alignment constants to text file
131  if (!m_outputStrawAlignmentTextFile.empty()) {
133  if(sc!=StatusCode::SUCCESS) {
134  ATH_MSG_ERROR(" Could not write output text file ");
135  return StatusCode::FAILURE;
136  }
137  }
138 
139  if(m_doWriteToPOOL) {
140  if( StatusCode::SUCCESS != p_caldbtool->streamOutObjects()) {
141  ATH_MSG_ERROR(" Could not stream Straw Alignment objects to " << m_outputPOOLFile);
142  return StatusCode::FAILURE;
143  }
144  }
145  if(m_doRegIOV) {
146  if( StatusCode::SUCCESS != p_caldbtool->registerObjects(m_stawAlignTag,m_runRangeBegin,m_eventRangeBegin,m_runRangeEnd,m_eventRangeEnd) ) {
147  ATH_MSG_ERROR(" Could not register Straw Alignment objects ");
148  return StatusCode::FAILURE;
149  }
150  }
151  }
152 
153  if (m_doModuleAlign) {
154  // read alignment constants from text file
155  if (!m_inputModuleAlignmentTextFile.empty()) {
156  sc=p_aligndbtool->readAlignTextFile(m_inputModuleAlignmentTextFile);
157  if(sc!=StatusCode::SUCCESS) {
158  ATH_MSG_ERROR(" Could not read input text file ");
159  return StatusCode::FAILURE;
160  }
161  }
162 
163  // write alignment constants to text file
164  if (!m_outputModuleAlignmentTextFile.empty()) {
165  sc=p_aligndbtool->writeAlignTextFile(m_outputModuleAlignmentTextFile);
166  if(sc!=StatusCode::SUCCESS) {
167  ATH_MSG_ERROR( " Could not write output text file ");
168  return StatusCode::FAILURE;
169  }
170  }
171 
172  if(m_doWriteToPOOL) {
173  if( StatusCode::SUCCESS != p_aligndbtool->streamOutAlignObjects()) {
174  ATH_MSG_ERROR(" Could not stream Module Alignment objects to " << m_outputPOOLFile);
175  return StatusCode::FAILURE;
176  }
177  }
178  if(m_doRegIOV) {
179  if( StatusCode::SUCCESS != p_aligndbtool->registerAlignObjects(m_moduleAlignTag
183  ,m_eventRangeEnd) ) {
184 
185  ATH_MSG_ERROR(" Could not register Module Alignment objects ");
186  return StatusCode::FAILURE;
187  }
188  }
189  }
190 
191  }
192 
193  return StatusCode::SUCCESS;
194 }

◆ extraDeps_update_handler()

void AthCommonDataStore< AthCommonMsg< Algorithm > >::extraDeps_update_handler ( Gaudi::Details::PropertyBase &  ExtraDeps)
protectedinherited

Add StoreName to extra input/output deps as needed.

use the logic of the VarHandleKey to parse the DataObjID keys supplied via the ExtraInputs and ExtraOuputs Properties to add the StoreName if it's not explicitly given

◆ extraOutputDeps()

const DataObjIDColl & AthAlgorithm::extraOutputDeps ( ) const
overridevirtualinherited

Return the list of extra output dependencies.

This list is extended to include symlinks implied by inheritance relations.

Definition at line 50 of file AthAlgorithm.cxx.

51 {
52  // If we didn't find any symlinks to add, just return the collection
53  // from the base class. Otherwise, return the extended collection.
54  if (!m_extendedExtraObjects.empty()) {
56  }
57  return Algorithm::extraOutputDeps();
58 }

◆ finalize()

StatusCode TRTStrawAlign::finalize ( void  )
overridevirtual

Definition at line 197 of file TRTStrawAlign.cxx.

197  {
198 
199  //
200  // check a few straw positions
201  // NB: alignment corrections will not be seen because elelemnts are taken from the Det Manager
202  for(int strlay=0;strlay<3;strlay++) {
203  for(int str=7;str<10;str++) {
204  Identifier id=m_trt->layer_id(-1,1,0,strlay);
205  const InDetDD::TRT_BaseElement* element = m_trtman->getElement(id);
206  float y = element->strawCenter(str).x();
207  float x = element->strawCenter(str).y();
208  float z = element->strawCenter(str).z();
210  << "bec -1 layer 0 sector 1 plane "
211  << strlay << " straw " << str << endmsg;
213  << " x " << x << " y " << y << " z " << z << endmsg;
214  id=m_trt->layer_id(1,1,0,strlay);
215  element = m_trtman->getElement(id);
216  y = element->strawCenter(str).x();
217  x = element->strawCenter(str).y();
218  z = element->strawCenter(str).z();
220  << "bec 1 layer 0 sector 1 plane "
221  << strlay << " straw " << str << endmsg;
223  << " x " << x << " y " << y << " z " << z << endmsg;
224  }
225  }
226 
227  return StatusCode::SUCCESS;
228 }

◆ initialize()

StatusCode TRTStrawAlign::initialize ( void  )
overridevirtual

Definition at line 58 of file TRTStrawAlign.cxx.

58  {
59 
60  ATH_MSG_DEBUG(" in initialize() ");
61 
62  //
63  // Get TRT manager and ID helper
65  ATH_CHECK(detStore()->retrieve(m_trt,"TRT_ID"));
66  ATH_MSG_DEBUG("TRT manager and helper found ");
67 
68  //get Database manager tools
69  if (m_doStrawAlign) {
70  ATH_CHECK(p_caldbtool.retrieve());
71  ATH_MSG_DEBUG(" TRTStrawAlignDbTool found ");
72  if (m_doWriteToPOOL) {
73  ATH_MSG_INFO("Straw alignment will be written to POOL file " << m_outputPOOLFile);
74  }
75  if (m_doRegIOV) {
76  ATH_MSG_INFO("Straw alignment will be registered with IOV");
77  ATH_MSG_INFO(" run range: " << m_runRangeBegin << " to " << m_runRangeEnd);
78  ATH_MSG_INFO(" version tag: " << m_stawAlignTag);
79  }
80  if (!m_inputStrawAlignmentTextFile.empty()) {
81  ATH_MSG_INFO("Straw Alignment will read from text file " << m_inputStrawAlignmentTextFile);
82  }
83  if (!m_outputStrawAlignmentTextFile.empty()) {
84  ATH_MSG_INFO("Straw Alignment will be written on text file " << m_outputStrawAlignmentTextFile);
85  }
86  }
87 
88  if (m_doModuleAlign) {
89  ATH_CHECK(p_aligndbtool.retrieve());
90  ATH_MSG_DEBUG(" TRTAlignDbTool found ");
91 
92  if (m_doWriteToPOOL) {
93  ATH_MSG_INFO("Module alignment will be written to POOL file " << m_outputPOOLFile);
94  }
95  if (m_doRegIOV) {
96  ATH_MSG_INFO("Module alignment will be registered with IOV");
97  ATH_MSG_INFO(" run range: " << m_runRangeBegin << " to " << m_runRangeEnd);
98  ATH_MSG_INFO(" version tag: " << m_moduleAlignTag);
99  }
100  if (!m_inputModuleAlignmentTextFile.empty()) {
101  ATH_MSG_INFO("Module Alignment will read from text file " << m_inputModuleAlignmentTextFile);
102  }
103  if (!m_outputModuleAlignmentTextFile.empty()) {
104  ATH_MSG_INFO("Module Alignment will be written on text file " << m_outputModuleAlignmentTextFile);
105  }
106  }
107 
108  return StatusCode::SUCCESS;
109 }

◆ inputHandles()

virtual std::vector<Gaudi::DataHandle*> AthCommonDataStore< AthCommonMsg< Algorithm > >::inputHandles ( ) const
overridevirtualinherited

Return this algorithm's input handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ msg() [1/2]

MsgStream& AthCommonMsg< Algorithm >::msg ( ) const
inlineinherited

Definition at line 24 of file AthCommonMsg.h.

24  {
25  return this->msgStream();
26  }

◆ msg() [2/2]

MsgStream& AthCommonMsg< Algorithm >::msg ( const MSG::Level  lvl) const
inlineinherited

Definition at line 27 of file AthCommonMsg.h.

27  {
28  return this->msgStream(lvl);
29  }

◆ msgLvl()

bool AthCommonMsg< Algorithm >::msgLvl ( const MSG::Level  lvl) const
inlineinherited

Definition at line 30 of file AthCommonMsg.h.

30  {
31  return this->msgLevel(lvl);
32  }

◆ outputHandles()

virtual std::vector<Gaudi::DataHandle*> AthCommonDataStore< AthCommonMsg< Algorithm > >::outputHandles ( ) const
overridevirtualinherited

Return this algorithm's output handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ renounce()

std::enable_if_t<std::is_void_v<std::result_of_t<decltype(&T::renounce)(T)> > && !std::is_base_of_v<SG::VarHandleKeyArray, T> && std::is_base_of_v<Gaudi::DataHandle, T>, void> AthCommonDataStore< AthCommonMsg< Algorithm > >::renounce ( T &  h)
inlineprotectedinherited

Definition at line 380 of file AthCommonDataStore.h.

381  {
382  h.renounce();
383  PBASE::renounce (h);
384  }

◆ renounceArray()

void AthCommonDataStore< AthCommonMsg< Algorithm > >::renounceArray ( SG::VarHandleKeyArray handlesArray)
inlineprotectedinherited

remove all handles from I/O resolution

Definition at line 364 of file AthCommonDataStore.h.

364  {
365  handlesArray.renounce();
366  }

◆ sysInitialize()

StatusCode AthAlgorithm::sysInitialize ( )
overridevirtualinherited

Override sysInitialize.

Override sysInitialize from the base class.

Loop through all output handles, and if they're WriteCondHandles, automatically register them and this Algorithm with the CondSvc

Scan through all outputHandles, and if they're WriteCondHandles, register them with the CondSvc

Reimplemented from AthCommonDataStore< AthCommonMsg< Algorithm > >.

Reimplemented in AthAnalysisAlgorithm, AthFilterAlgorithm, PyAthena::Alg, and AthHistogramAlgorithm.

Definition at line 66 of file AthAlgorithm.cxx.

66  {
68 
69  if (sc.isFailure()) {
70  return sc;
71  }
72  ServiceHandle<ICondSvc> cs("CondSvc",name());
73  for (auto h : outputHandles()) {
74  if (h->isCondition() && h->mode() == Gaudi::DataHandle::Writer) {
75  // do this inside the loop so we don't create the CondSvc until needed
76  if ( cs.retrieve().isFailure() ) {
77  ATH_MSG_WARNING("no CondSvc found: won't autoreg WriteCondHandles");
78  return StatusCode::SUCCESS;
79  }
80  if (cs->regHandle(this,*h).isFailure()) {
81  sc = StatusCode::FAILURE;
82  ATH_MSG_ERROR("unable to register WriteCondHandle " << h->fullKey()
83  << " with CondSvc");
84  }
85  }
86  }
87  return sc;
88 }

◆ sysStart()

virtual StatusCode AthCommonDataStore< AthCommonMsg< Algorithm > >::sysStart ( )
overridevirtualinherited

Handle START transition.

We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.

◆ updateVHKA()

void AthCommonDataStore< AthCommonMsg< Algorithm > >::updateVHKA ( Gaudi::Details::PropertyBase &  )
inlineinherited

Definition at line 308 of file AthCommonDataStore.h.

308  {
309  // debug() << "updateVHKA for property " << p.name() << " " << p.toString()
310  // << " size: " << m_vhka.size() << endmsg;
311  for (auto &a : m_vhka) {
312  std::vector<SG::VarHandleKey*> keys = a->keys();
313  for (auto k : keys) {
314  k->setOwner(this);
315  }
316  }
317  }

Member Data Documentation

◆ m_detStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< Algorithm > >::m_detStore
privateinherited

Pointer to StoreGate (detector store by default)

Definition at line 393 of file AthCommonDataStore.h.

◆ m_doModuleAlign

bool TRTStrawAlign::m_doModuleAlign {}
private

Definition at line 39 of file TRTStrawAlign.h.

◆ m_doRegIOV

bool TRTStrawAlign::m_doRegIOV {false}
private

register structures in the IOV service

Definition at line 46 of file TRTStrawAlign.h.

◆ m_doStrawAlign

bool TRTStrawAlign::m_doStrawAlign {}
private

Definition at line 38 of file TRTStrawAlign.h.

◆ m_doWriteToPOOL

bool TRTStrawAlign::m_doWriteToPOOL {false}
private

stream structures to output

Definition at line 45 of file TRTStrawAlign.h.

◆ m_eventRangeBegin

int TRTStrawAlign::m_eventRangeBegin
private

IOV range.

Definition at line 56 of file TRTStrawAlign.h.

◆ m_eventRangeEnd

int TRTStrawAlign::m_eventRangeEnd
private

IOV range.

Definition at line 57 of file TRTStrawAlign.h.

◆ m_evtStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< Algorithm > >::m_evtStore
privateinherited

Pointer to StoreGate (event store by default)

Definition at line 390 of file AthCommonDataStore.h.

◆ m_extendedExtraObjects

DataObjIDColl AthAlgorithm::m_extendedExtraObjects
privateinherited

Definition at line 79 of file AthAlgorithm.h.

◆ m_inputModuleAlignmentTextFile

std::string TRTStrawAlign::m_inputModuleAlignmentTextFile
private

text file to read module alignment data

Definition at line 47 of file TRTStrawAlign.h.

◆ m_inputStrawAlignmentTextFile

std::string TRTStrawAlign::m_inputStrawAlignmentTextFile
private

text file to read straw alignment data

Definition at line 48 of file TRTStrawAlign.h.

◆ m_moduleAlignTag

std::string TRTStrawAlign::m_moduleAlignTag
private

IOV version tag for module alignment.

Definition at line 52 of file TRTStrawAlign.h.

◆ m_outputModuleAlignmentTextFile

std::string TRTStrawAlign::m_outputModuleAlignmentTextFile
private

output module level text file

Definition at line 49 of file TRTStrawAlign.h.

◆ m_outputPOOLFile

std::string TRTStrawAlign::m_outputPOOLFile
private

POOL file to write.

Definition at line 51 of file TRTStrawAlign.h.

◆ m_outputStrawAlignmentTextFile

std::string TRTStrawAlign::m_outputStrawAlignmentTextFile
private

output module level text file

Definition at line 50 of file TRTStrawAlign.h.

◆ m_runRangeBegin

int TRTStrawAlign::m_runRangeBegin
private

IOV range.

Definition at line 54 of file TRTStrawAlign.h.

◆ m_runRangeEnd

int TRTStrawAlign::m_runRangeEnd
private

IOV range.

Definition at line 55 of file TRTStrawAlign.h.

◆ m_setup

bool TRTStrawAlign::m_setup {false}
private

true for first event

Definition at line 42 of file TRTStrawAlign.h.

◆ m_stawAlignTag

std::string TRTStrawAlign::m_stawAlignTag
private

IOV version tag for straw alignment.

Definition at line 53 of file TRTStrawAlign.h.

◆ m_trt

const TRT_ID* TRTStrawAlign::m_trt {nullptr}
private

trt id helper

Definition at line 41 of file TRTStrawAlign.h.

◆ m_trtman

const InDetDD::TRT_DetectorManager* TRTStrawAlign::m_trtman {nullptr}
private

detector manager

Definition at line 40 of file TRTStrawAlign.h.

◆ m_varHandleArraysDeclared

bool AthCommonDataStore< AthCommonMsg< Algorithm > >::m_varHandleArraysDeclared
privateinherited

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vhka

std::vector<SG::VarHandleKeyArray*> AthCommonDataStore< AthCommonMsg< Algorithm > >::m_vhka
privateinherited

Definition at line 398 of file AthCommonDataStore.h.

◆ p_aligndbtool

ServiceHandle<ITRT_AlignDbSvc> TRTStrawAlign::p_aligndbtool {this,"AlignDbTool","TRT_AlignDbSvc"}
private

db tool

Definition at line 37 of file TRTStrawAlign.h.

◆ p_caldbtool

ServiceHandle<ITRT_StrawAlignDbSvc> TRTStrawAlign::p_caldbtool {this,"DbTool","TRT_StrawAlignDbSvc"}
private

db tool

Definition at line 36 of file TRTStrawAlign.h.


The documentation for this class was generated from the following files:
python.PyKernel.retrieve
def retrieve(aClass, aKey=None)
Definition: PyKernel.py:110
TRT_ID::layer_id
Identifier layer_id(int barrel_ec, int phi_module, int layer_or_wheel, int straw_layer) const
For an individual straw layer.
Definition: TRT_ID.h:500
TRTStrawAlign::m_inputModuleAlignmentTextFile
std::string m_inputModuleAlignmentTextFile
text file to read module alignment data
Definition: TRTStrawAlign.h:47
TRTStrawAlign::m_inputStrawAlignmentTextFile
std::string m_inputStrawAlignmentTextFile
text file to read straw alignment data
Definition: TRTStrawAlign.h:48
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
TRTStrawAlign::m_trt
const TRT_ID * m_trt
trt id helper
Definition: TRTStrawAlign.h:41
TRTStrawAlign::p_aligndbtool
ServiceHandle< ITRT_AlignDbSvc > p_aligndbtool
db tool
Definition: TRTStrawAlign.h:37
AthCommonDataStore< AthCommonMsg< Algorithm > >::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
TRTStrawAlign::m_stawAlignTag
std::string m_stawAlignTag
IOV version tag for straw alignment.
Definition: TRTStrawAlign.h:53
TRTStrawAlign::m_outputModuleAlignmentTextFile
std::string m_outputModuleAlignmentTextFile
output module level text file
Definition: TRTStrawAlign.h:49
TRTStrawAlign::m_doStrawAlign
bool m_doStrawAlign
Definition: TRTStrawAlign.h:38
AthCommonDataStore< AthCommonMsg< Algorithm > >::m_evtStore
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
Definition: AthCommonDataStore.h:390
AthCommonDataStore< AthCommonMsg< Algorithm > >::m_vhka
std::vector< SG::VarHandleKeyArray * > m_vhka
Definition: AthCommonDataStore.h:398
InDetDD::TRT_BaseElement::strawCenter
const Amg::Vector3D & strawCenter(int straw) const
Straw Surface: Local -> global transform of the straw via integer.
Definition: TRT_BaseElement.cxx:143
AthCommonMsg< Algorithm >::msgLvl
bool msgLvl(const MSG::Level lvl) const
Definition: AthCommonMsg.h:30
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
x
#define x
TRTStrawAlign::m_trtman
const InDetDD::TRT_DetectorManager * m_trtman
detector manager
Definition: TRTStrawAlign.h:40
AthenaPoolTestRead.sc
sc
Definition: AthenaPoolTestRead.py:27
TRTStrawAlign::m_outputStrawAlignmentTextFile
std::string m_outputStrawAlignmentTextFile
output module level text file
Definition: TRTStrawAlign.h:50
AthCommonDataStore< AthCommonMsg< Algorithm > >::detStore
const ServiceHandle< StoreGateSvc > & detStore() const
The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
Definition: AthCommonDataStore.h:95
SG::VarHandleKeyArray::setOwner
virtual void setOwner(IDataHandleHolder *o)=0
IDTPMcnv.htype
htype
Definition: IDTPMcnv.py:29
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
AthCommonDataStore
Definition: AthCommonDataStore.h:52
AthAlgorithm::sysInitialize
virtual StatusCode sysInitialize() override
Override sysInitialize.
Definition: AthAlgorithm.cxx:66
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
AthCommonDataStore< AthCommonMsg< Algorithm > >::outputHandles
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override
Return this algorithm's output handles.
z
#define z
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
TRTStrawAlign::m_eventRangeEnd
int m_eventRangeEnd
IOV range.
Definition: TRTStrawAlign.h:57
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
AthCommonDataStore< AthCommonMsg< Algorithm > >::m_detStore
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
Definition: AthCommonDataStore.h:393
TRTStrawAlign::m_eventRangeBegin
int m_eventRangeBegin
IOV range.
Definition: TRTStrawAlign.h:56
SG::VarHandleKeyArray::renounce
virtual void renounce()=0
SG::HandleClassifier::type
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
Definition: HandleClassifier.h:54
TRTStrawAlign::m_doRegIOV
bool m_doRegIOV
register structures in the IOV service
Definition: TRTStrawAlign.h:46
TRTStrawAlign::m_doWriteToPOOL
bool m_doWriteToPOOL
stream structures to output
Definition: TRTStrawAlign.h:45
merge_scale_histograms.doc
string doc
Definition: merge_scale_histograms.py:9
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:240
TRTStrawAlign::m_setup
bool m_setup
true for first event
Definition: TRTStrawAlign.h:42
InDetDD::TRT_DetectorManager::getElement
const TRT_BaseElement * getElement(Identifier id) const
Access Elements Generically---------------------------------------------—.
Definition: TRT_DetectorManager.cxx:148
TRTStrawAlign::m_doModuleAlign
bool m_doModuleAlign
Definition: TRTStrawAlign.h:39
AthAlgorithm::m_extendedExtraObjects
DataObjIDColl m_extendedExtraObjects
Definition: AthAlgorithm.h:79
a
TList * a
Definition: liststreamerinfos.cxx:10
TRTStrawAlign::m_runRangeEnd
int m_runRangeEnd
IOV range.
Definition: TRTStrawAlign.h:55
y
#define y
h
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
DEBUG
#define DEBUG
Definition: page_access.h:11
TRTStrawAlign::p_caldbtool
ServiceHandle< ITRT_StrawAlignDbSvc > p_caldbtool
db tool
Definition: TRTStrawAlign.h:36
AthCommonMsg< Algorithm >::msg
MsgStream & msg() const
Definition: AthCommonMsg.h:24
SG::VarHandleBase::vhKey
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Definition: StoreGate/src/VarHandleBase.cxx:629
AthAlgorithm::AthAlgorithm
AthAlgorithm()
Default constructor:
str
Definition: BTagTrackIpAccessor.cxx:11
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:798
LHEF::Writer
Pythia8::Writer Writer
Definition: Prophecy4fMerger.cxx:12
TRTStrawAlign::m_moduleAlignTag
std::string m_moduleAlignTag
IOV version tag for module alignment.
Definition: TRTStrawAlign.h:52
TRTStrawAlign::m_outputPOOLFile
std::string m_outputPOOLFile
POOL file to write.
Definition: TRTStrawAlign.h:51
AthCommonDataStore::declareGaudiProperty
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition: AthCommonDataStore.h:156
fitman.k
k
Definition: fitman.py:528
InDetDD::TRT_BaseElement
Definition: TRT_BaseElement.h:52
TRTStrawAlign::m_runRangeBegin
int m_runRangeBegin
IOV range.
Definition: TRTStrawAlign.h:54
ServiceHandle< ICondSvc >
Identifier
Definition: IdentifierFieldParser.cxx:14