ATLAS Offline Software
Public Types | Public Member Functions | Protected Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
TRTCalibrationMgr Class Reference

#include <TRTCalibrationMgr.h>

Inheritance diagram for TRTCalibrationMgr:
Collaboration diagram for TRTCalibrationMgr:

Public Types

typedef TRTCond::RtRelationMultChanContainer RtRelationContainer
 
typedef TRTCond::StrawT0MultChanContainer StrawT0Container
 

Public Member Functions

 TRTCalibrationMgr (const std::string &name, ISvcLocator *pSvcLocator)
 
 ~TRTCalibrationMgr (void)
 
virtual StatusCode initialize (void) override
 
virtual StatusCode execute (void) override
 
virtual StatusCode finalize (void) override
 
StatusCode streamOutCalibObjects ()
 
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

ToolHandleArray< IFillAlignTrkInfom_TrackInfoTools {this, "AlignTrkTools", {}, ""}
 
PublicToolHandleArray< ITRTCalibratorm_TRTCalibTools {this, "TRTCalibrator", {}, ""}
 
ToolHandleArray< IFitToolm_FitTools {this, "FitTools", {}, ""}
 
ToolHandle< Trk::ITrackFitterm_trackFitter {this, "TrackFitter", "Trk::GlobalChi2Fitter/InDetTrackFitter", ""}
 
ToolHandle< Trk::ITrackSelectorToolm_trackSelector {this, "TrackSelectorTool", "InDet::InDetTrackSelectorTool/InDetTrackSelectorTool", "Tool for the selection of tracks"}
 
ToolHandle< IAthenaOutputStreamToolm_streamer {this, "StreamTool", "AthenaOutputStreamTool/CondStream1", "OutputStreamTool"}
 
Gaudi::Property< bool > m_dorefit {this, "DoRefit" , true , "Does a Re-Fit"}
 
Gaudi::Property< bool > m_docalibrate {this, "DoCalibrate" , false, "Does the calibration"}
 
Gaudi::Property< bool > m_writeConstants {this, "WriteConstants", false, "Write out the calibration constants"}
 
Gaudi::Property< unsigned int > m_max_ntrk {this, "Max_ntrk", 100000, ""}
 
Gaudi::Property< std::string > m_par_rtcontainerkey {this, "Par_rtcontainer", "/TRT/Calib/RT", ""}
 
Gaudi::Property< std::string > m_par_t0containerkey {this, "par_t0container", "/TRT/Calib/T0", ""}
 
int m_ntrk = 0
 
SG::ReadHandleKey< xAOD::VertexContainerm_verticesKey {this, "VerticesKey" , "PrimaryVertices" , "RHK for primary vertices" }
 
SG::ReadHandleKey< xAOD::EventInfom_EventInfoKey {this, "EventInfoKey" , "EventInfo" , "RHK for xAOD::EventInfo" }
 
SG::ReadHandleKey< TrackCollectionm_TrkCollection {this, "TrkCollectionKey", "CombinedInDetTracks", "RHKs for track collections"}
 
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

This algorithm controls the flow of the TRT calibration.

Documentation being updated (Jan 2009)

The calculation of t0 from the timeresidual histogram is made in the following way: First it is checked where the maximum bin is located. If its absolute value is bigger then 5 ns NO fit is made, but the histogram mean value is used for Dt0 instead (this was just taken from previous versions and I have never really questioned the reason for it). If the highest bin is lower than 5 ns a normal gaussian fit is made and Dt0 is set to the mean of that. The new t0 is then the old t0

  @author Chafik, Johan, Alex

Definition at line 58 of file TRTCalibrationMgr.h.

Member Typedef Documentation

◆ RtRelationContainer

Definition at line 65 of file TRTCalibrationMgr.h.

◆ StoreGateSvc_t

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

Definition at line 388 of file AthCommonDataStore.h.

◆ StrawT0Container

Definition at line 66 of file TRTCalibrationMgr.h.

Constructor & Destructor Documentation

◆ TRTCalibrationMgr()

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

Definition at line 28 of file TRTCalibrationMgr.cxx.

28  :
29  AthAlgorithm (name, pSvcLocator){}

◆ ~TRTCalibrationMgr()

TRTCalibrationMgr::~TRTCalibrationMgr ( void  )

Definition at line 33 of file TRTCalibrationMgr.cxx.

34 {}

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 TRTCalibrationMgr::execute ( void  )
overridevirtual

Definition at line 100 of file TRTCalibrationMgr.cxx.

100  {
101 
102  if (m_docalibrate){
103  ATH_MSG_INFO("skipping execute() calibrating instead");
104  bool CalibOK = m_TRTCalibTools[0]->calibrate();
105  if (CalibOK)
106  {
107  return StatusCode::SUCCESS;
108  }
109  else
110  {
111  return StatusCode::FAILURE;
112  }
113  }
114 
115  if (m_writeConstants)
116  {
118  return sc;
119  }
120 
121  // Get Primary vertices. Skip events without three good tracks on vertex.
122 
124  if (not vertices.isValid())
125  {
126  ATH_MSG_DEBUG("Couldn't retrieve VertexContainer with key: PrimaryVertices");
127  return StatusCode::SUCCESS; // just skip to next event in case of no vertexcontainer
128  }
129 
130  int countVertices(0);
131  for (const xAOD::Vertex *vx : *(vertices.cptr()))
132  {
133  if (vx->vertexType() == xAOD::VxType::PriVtx)
134  {
135  if (vx->nTrackParticles() >= 3)
136  countVertices++;
137  }
138  }
139  if (countVertices < 1)
140  {
141  ATH_MSG_INFO("no vertices found");
142  return StatusCode::SUCCESS;
143  }
144 
145  // get event info pointer
147  if (not EventInfo.isValid())
148  {
149  ATH_MSG_FATAL("skipping event, could not get EventInfo");
150  return StatusCode::FAILURE;
151  }
152 
153  // Loop over tracks; get track info and accumulate it
154  const Trk::Track *aTrack;
155 
157  // retrieve all tracks, but only from one collection (CombinedInDetTracks)
158 
159  if (trks.isValid())
160  {
161 
162  if (trks->size() < 3)
163  {
164  ATH_MSG_INFO("skipping event, it contains only " << trks->size() << " tracks (less than 3)");
165  return StatusCode::SUCCESS;
166  }
167 
168  if (trks->size() > m_max_ntrk)
169  {
170  ATH_MSG_INFO("skipping event, it contains " << trks->size() << " tracks, more than max: " << m_max_ntrk);
171  return StatusCode::SUCCESS;
172  }
173  for (TrackCollection::const_iterator t = trks->begin(); t != trks->end(); ++t)
174  {
175 
176  if (m_trackSelector->decision(*(*t), nullptr))
177  {
178 
179  m_ntrk++;
180  aTrack = *t;
181 
182  if (m_dorefit)
183  {
184  // Refit Track with new ROT creator
185  Trk::RunOutlierRemoval runOutlier = true;
186  aTrack = m_trackFitter->fit(Gaudi::Hive::currentContext(), *aTrack, runOutlier, aTrack->info().particleHypothesis()).release();
187  }
188  // Check selection if requested
189  if (aTrack)
190  {
191  // fill track info
192  TRT::TrackInfo at;
193  // Run, event, track id
194  at[TRT::Track::run] = EventInfo->runNumber();
195  at[TRT::Track::event] = EventInfo->eventNumber();
197  ATH_MSG_DEBUG(" Track " << m_ntrk << " accepted Info: run="
198  << at[TRT::Track::run] << " event=" << at[TRT::Track::event]);
199  for (unsigned int j = 0; j < m_TrackInfoTools.size(); j++)
200 
201  if (!m_TrackInfoTools[j]->fill(aTrack, &at, *EventInfo, *vertices))
202  break;
203  if (m_dorefit)
204  delete aTrack;
205  }
206  }
207  }
208  }
209  return StatusCode::SUCCESS;
210 }

◆ 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 TRTCalibrationMgr::finalize ( void  )
overridevirtual

Definition at line 214 of file TRTCalibrationMgr.cxx.

214  {
215  ATH_MSG_INFO( "CALIBSTAT CM_TRKS: " << m_ntrk);
216 
217  gROOT->SetMustClean(false);
218 
219  // Accumulators to finalize
220  std::vector<IdentifierProfileHistogram*> histograms;
221  for (unsigned int j=0;j<m_TrackInfoTools.size();j++)
222  if ((m_TrackInfoTools[j]->finalize()).isFailure()){
223  ATH_MSG_FATAL( "Error calling TrackInfo tool finalize ");
224  return StatusCode::FAILURE;
225  }
226 
227  return StatusCode::SUCCESS;
228 }

◆ initialize()

StatusCode TRTCalibrationMgr::initialize ( void  )
overridevirtual

Definition at line 38 of file TRTCalibrationMgr.cxx.

38  {
39  ATH_MSG_DEBUG("initialize()");
40 
41  if (m_docalibrate){
42  if (!m_TRTCalibTools.size() || m_TRTCalibTools.retrieve().isFailure())
43  {
44  ATH_MSG_FATAL("Cannot get Calibration tool " << m_TRTCalibTools);
45  return StatusCode::FAILURE;
46  }
47  }
48  else{
49  if (!m_TrackInfoTools.size() || m_TrackInfoTools.retrieve().isFailure())
50  {
51  ATH_MSG_FATAL("Cannot get TrackInfo filler tool " << m_TrackInfoTools);
52  return StatusCode::FAILURE;
53  }
54  }
55 
56  if (!m_FitTools.size() || m_FitTools.retrieve().isFailure()){
57  ATH_MSG_FATAL("Cannot get Fit tools " << m_FitTools);
58  return StatusCode::FAILURE;
59  }
60 
61  if (m_trackFitter.retrieve().isFailure()){
62  ATH_MSG_FATAL("Failed to retrieve tool " << m_trackFitter);
63  return StatusCode::FAILURE;
64  }
65 
66  if (m_writeConstants){
67  ATH_CHECK(m_streamer.retrieve());
68  }
69 
70 
71  // Initialize ReadHandles and ReadHandleKeys
72  ATH_CHECK(m_verticesKey.initialize());
74  ATH_CHECK(m_TrkCollection.initialize());
75 
76  ATH_MSG_INFO("Tracks from Trk::Track collection:");
77  ATH_MSG_INFO("\n\t" << m_TrkCollection);
78 
79  // Get the Track Selector Tool
80  if (!m_trackSelector.empty())
81  {
82  StatusCode sc = m_trackSelector.retrieve();
83  if (sc.isFailure())
84  {
85  ATH_MSG_FATAL("Could not retrieve " << m_trackSelector << " (to select the tracks which are written to the ntuple) ");
86  ATH_MSG_INFO("Set the ToolHandle to None if track selection is supposed to be disabled");
87  return sc;
88  }
89  }
90 
91  ATH_MSG_INFO("Track Selector retrieved");
92 
93  m_ntrk = 0;
94 
95  return StatusCode::SUCCESS;
96 }

◆ 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  }

◆ streamOutCalibObjects()

StatusCode TRTCalibrationMgr::streamOutCalibObjects ( )

Definition at line 230 of file TRTCalibrationMgr.cxx.

231 {
232  ATH_MSG_INFO( "entering streamOutCalibObjects " );
233  StatusCode sc = m_streamer->connectOutput();
234  if (sc.isFailure()) {
235  ATH_MSG_ERROR("Could not connect stream to output");
236  return( StatusCode::FAILURE);
237  }
238 
242 
243  sc = m_streamer->streamObjects(typeKeys);
244  if (sc.isFailure()) {
245  ATH_MSG_ERROR("Could not stream out Containers ");
246  return( StatusCode::FAILURE);
247  }
248 
249  sc = m_streamer->commitOutput();
250  if (sc.isFailure()) {
251  ATH_MSG_ERROR("Could not commit output stream");
252  return( StatusCode::FAILURE);
253  }
254 
255  ATH_MSG_INFO( " Streamed out and committed " << typeKeys.size() << " objects " );
256  return StatusCode::SUCCESS;
257 }

◆ 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_docalibrate

Gaudi::Property<bool> TRTCalibrationMgr::m_docalibrate {this, "DoCalibrate" , false, "Does the calibration"}
private

Definition at line 85 of file TRTCalibrationMgr.h.

◆ m_dorefit

Gaudi::Property<bool> TRTCalibrationMgr::m_dorefit {this, "DoRefit" , true , "Does a Re-Fit"}
private

Definition at line 84 of file TRTCalibrationMgr.h.

◆ m_EventInfoKey

SG::ReadHandleKey<xAOD::EventInfo> TRTCalibrationMgr::m_EventInfoKey {this, "EventInfoKey" , "EventInfo" , "RHK for xAOD::EventInfo" }
private

Definition at line 98 of file TRTCalibrationMgr.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_FitTools

ToolHandleArray<IFitTool> TRTCalibrationMgr::m_FitTools {this, "FitTools", {}, ""}
private

Definition at line 78 of file TRTCalibrationMgr.h.

◆ m_max_ntrk

Gaudi::Property<unsigned int> TRTCalibrationMgr::m_max_ntrk {this, "Max_ntrk", 100000, ""}
private

Definition at line 88 of file TRTCalibrationMgr.h.

◆ m_ntrk

int TRTCalibrationMgr::m_ntrk = 0
private

Definition at line 94 of file TRTCalibrationMgr.h.

◆ m_par_rtcontainerkey

Gaudi::Property<std::string> TRTCalibrationMgr::m_par_rtcontainerkey {this, "Par_rtcontainer", "/TRT/Calib/RT", ""}
private

Definition at line 90 of file TRTCalibrationMgr.h.

◆ m_par_t0containerkey

Gaudi::Property<std::string> TRTCalibrationMgr::m_par_t0containerkey {this, "par_t0container", "/TRT/Calib/T0", ""}
private

Definition at line 91 of file TRTCalibrationMgr.h.

◆ m_streamer

ToolHandle<IAthenaOutputStreamTool> TRTCalibrationMgr::m_streamer {this, "StreamTool", "AthenaOutputStreamTool/CondStream1", "OutputStreamTool"}
private

Definition at line 81 of file TRTCalibrationMgr.h.

◆ m_trackFitter

ToolHandle<Trk::ITrackFitter> TRTCalibrationMgr::m_trackFitter {this, "TrackFitter", "Trk::GlobalChi2Fitter/InDetTrackFitter", ""}
private

Definition at line 79 of file TRTCalibrationMgr.h.

◆ m_TrackInfoTools

ToolHandleArray<IFillAlignTrkInfo> TRTCalibrationMgr::m_TrackInfoTools {this, "AlignTrkTools", {}, ""}
private

Definition at line 76 of file TRTCalibrationMgr.h.

◆ m_trackSelector

ToolHandle<Trk::ITrackSelectorTool> TRTCalibrationMgr::m_trackSelector {this, "TrackSelectorTool", "InDet::InDetTrackSelectorTool/InDetTrackSelectorTool", "Tool for the selection of tracks"}
private

Definition at line 80 of file TRTCalibrationMgr.h.

◆ m_TrkCollection

SG::ReadHandleKey<TrackCollection> TRTCalibrationMgr::m_TrkCollection {this, "TrkCollectionKey", "CombinedInDetTracks", "RHKs for track collections"}
private

Definition at line 99 of file TRTCalibrationMgr.h.

◆ m_TRTCalibTools

PublicToolHandleArray<ITRTCalibrator> TRTCalibrationMgr::m_TRTCalibTools {this, "TRTCalibrator", {}, ""}
private

Definition at line 77 of file TRTCalibrationMgr.h.

◆ m_varHandleArraysDeclared

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

Definition at line 399 of file AthCommonDataStore.h.

◆ m_verticesKey

SG::ReadHandleKey<xAOD::VertexContainer> TRTCalibrationMgr::m_verticesKey {this, "VerticesKey" , "PrimaryVertices" , "RHK for primary vertices" }
private

Definition at line 97 of file TRTCalibrationMgr.h.

◆ m_vhka

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

Definition at line 398 of file AthCommonDataStore.h.

◆ m_writeConstants

Gaudi::Property<bool> TRTCalibrationMgr::m_writeConstants {this, "WriteConstants", false, "Write out the calibration constants"}
private

Definition at line 86 of file TRTCalibrationMgr.h.


The documentation for this class was generated from the following files:
ATH_MSG_FATAL
#define ATH_MSG_FATAL(x)
Definition: AthMsgStreamMacros.h:34
DataModel_detail::const_iterator
Const iterator class for DataVector/DataList.
Definition: DVLIterator.h:82
TRTCalibrationMgr::m_verticesKey
SG::ReadHandleKey< xAOD::VertexContainer > m_verticesKey
Definition: TRTCalibrationMgr.h:97
IAthenaOutputStreamTool::TypeKeyPairs
std::vector< TypeKeyPair > TypeKeyPairs
Definition: IAthenaOutputStreamTool.h:99
python.PerfMonSerializer.p
def p
Definition: PerfMonSerializer.py:743
covarianceTool.histograms
dictionary histograms
Definition: covarianceTool.py:53
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
TRTCalibrationMgr::m_max_ntrk
Gaudi::Property< unsigned int > m_max_ntrk
Definition: TRTCalibrationMgr.h:88
Trk::Track
The ATLAS Track class.
Definition: Tracking/TrkEvent/TrkTrack/TrkTrack/Track.h:73
TRTCond::RtRelationMultChanContainer::classname
static const char * classname()
classname used to talk to iovservice
Definition: RtRelationMultChanContainer.h:42
SG::ReadHandle
Definition: StoreGate/StoreGate/ReadHandle.h:70
AthCommonDataStore::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
TRTCalibrationMgr::m_par_rtcontainerkey
Gaudi::Property< std::string > m_par_rtcontainerkey
Definition: TRTCalibrationMgr.h:90
Trk::Track::info
const TrackInfo & info() const
Returns a const ref to info of a const tracks.
TRTCalibrationMgr::m_TRTCalibTools
PublicToolHandleArray< ITRTCalibrator > m_TRTCalibTools
Definition: TRTCalibrationMgr.h:77
TRT::Track::event
@ event
Definition: InnerDetector/InDetCalibEvent/TRT_CalibData/TRT_CalibData/TrackInfo.h:74
EventInfo
EventInfo
Definition: EventTPCnv.cxx:47
TRTCalibrationMgr::m_dorefit
Gaudi::Property< bool > m_dorefit
Definition: TRTCalibrationMgr.h:84
AthCommonDataStore< AthCommonMsg< Algorithm > >::m_evtStore
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
Definition: AthCommonDataStore.h:390
TRTCalibrationMgr::m_trackFitter
ToolHandle< Trk::ITrackFitter > m_trackFitter
Definition: TRTCalibrationMgr.h:79
AthCommonDataStore< AthCommonMsg< Algorithm > >::m_vhka
std::vector< SG::VarHandleKeyArray * > m_vhka
Definition: AthCommonDataStore.h:398
TRTCalibrationMgr::m_TrackInfoTools
ToolHandleArray< IFillAlignTrkInfo > m_TrackInfoTools
Definition: TRTCalibrationMgr.h:76
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
TRTCalibrationMgr::m_par_t0containerkey
Gaudi::Property< std::string > m_par_t0containerkey
Definition: TRTCalibrationMgr.h:91
TRTCalibrationMgr::m_writeConstants
Gaudi::Property< bool > m_writeConstants
Definition: TRTCalibrationMgr.h:86
TRT::TrackInfo
Definition: InnerDetector/InDetCalibEvent/TRT_CalibData/TRT_CalibData/TrackInfo.h:83
TRT::Track::run
@ run
Definition: InnerDetector/InDetCalibEvent/TRT_CalibData/TRT_CalibData/TrackInfo.h:73
AthenaPoolTestRead.sc
sc
Definition: AthenaPoolTestRead.py:27
Trk::RunOutlierRemoval
bool RunOutlierRemoval
switch to toggle quality processing after fit
Definition: FitterTypes.h:22
SG::VarHandleKeyArray::setOwner
virtual void setOwner(IDataHandleHolder *o)=0
TRTCalibrationMgr::finalize
virtual StatusCode finalize(void) override
Definition: TRTCalibrationMgr.cxx:214
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
TRTCalibrationMgr::m_ntrk
int m_ntrk
Definition: TRTCalibrationMgr.h:94
AthCommonDataStore< AthCommonMsg< Algorithm > >::outputHandles
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override
Return this algorithm's output handles.
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
xAOD::VxType::PriVtx
@ PriVtx
Primary vertex.
Definition: TrackingPrimitives.h:571
IAthenaOutputStreamTool::TypeKeyPair
std::pair< std::string, std::string > TypeKeyPair
Stream out objects.
Definition: IAthenaOutputStreamTool.h:98
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
SG::VarHandleKey::initialize
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:103
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
merge_scale_histograms.doc
string doc
Definition: merge_scale_histograms.py:9
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:192
EventInfo
This class provides general information about an event. Event information is provided by the accessor...
Definition: EventInfo/EventInfo/EventInfo.h:42
TRTCond::StrawT0MultChanContainer::classname
static const char * classname()
classname used to talk to iovservice
Definition: StrawT0MultChanContainer.h:80
TRTCalibrationMgr::streamOutCalibObjects
StatusCode streamOutCalibObjects()
Definition: TRTCalibrationMgr.cxx:230
TRTCalibrationMgr::m_trackSelector
ToolHandle< Trk::ITrackSelectorTool > m_trackSelector
Definition: TRTCalibrationMgr.h:80
AthAlgorithm::m_extendedExtraObjects
DataObjIDColl m_extendedExtraObjects
Definition: AthAlgorithm.h:79
a
TList * a
Definition: liststreamerinfos.cxx:10
h
xAOD::Vertex_v1
Class describing a Vertex.
Definition: Vertex_v1.h:42
lumiFormat.fill
fill
Definition: lumiFormat.py:111
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
TRT::Track::trackNumber
@ trackNumber
Definition: InnerDetector/InDetCalibEvent/TRT_CalibData/TRT_CalibData/TrackInfo.h:75
TRTCalibrationMgr::m_EventInfoKey
SG::ReadHandleKey< xAOD::EventInfo > m_EventInfoKey
Definition: TRTCalibrationMgr.h:98
TRTCalibrationMgr::m_TrkCollection
SG::ReadHandleKey< TrackCollection > m_TrkCollection
Definition: TRTCalibrationMgr.h:99
SG::VarHandleBase::vhKey
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Definition: StoreGate/src/VarHandleBase.cxx:616
declareProperty
#define declareProperty(n, p, h)
Definition: BaseFakeBkgTool.cxx:15
AthAlgorithm::AthAlgorithm
AthAlgorithm()
Default constructor:
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:790
LHEF::Writer
Pythia8::Writer Writer
Definition: Prophecy4fMerger.cxx:12
AthCommonDataStore::declareGaudiProperty
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition: AthCommonDataStore.h:156
TRTCalibrationMgr::m_FitTools
ToolHandleArray< IFitTool > m_FitTools
Definition: TRTCalibrationMgr.h:78
TRTCalibrationMgr::m_docalibrate
Gaudi::Property< bool > m_docalibrate
Definition: TRTCalibrationMgr.h:85
Trk::TrackInfo::particleHypothesis
ParticleHypothesis particleHypothesis() const
Returns the particle hypothesis used for Track fitting.
fitman.k
k
Definition: fitman.py:528
ServiceHandle< ICondSvc >
TRTCalibrationMgr::m_streamer
ToolHandle< IAthenaOutputStreamTool > m_streamer
Definition: TRTCalibrationMgr.h:81