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

#include <LArTBH6BeamInfo.h>

Inheritance diagram for LArTBH6BeamInfo:
Collaboration diagram for LArTBH6BeamInfo:

Public Member Functions

 LArTBH6BeamInfo (const std::string &name, ISvcLocator *pSvcLocator)
 
virtual ~LArTBH6BeamInfo ()
 
StatusCode initialize ()
 
StatusCode execute ()
 
StatusCode finalize ()
 
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 std::vector< double > dVect
 
typedef ServiceHandle< StoreGateSvcStoreGateSvc_t
 

Private Member Functions

bool fitVect (const dVect &vec_x, const dVect &vec_xz, const dVect &vec_ex, double &a1, double &a2, double &chi2, dVect &residual)
 Fit data to the function u = a1 + a2*w. More...
 
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

std::vector< std::string > m_HitsCollNames
 
bool m_Primary
 
int m_pcode
 
float m_cryoX
 
int m_numEv
 
SG::ReadHandle< TBEventInfom_theEventInfo
 
SG::WriteHandle< TBTrackm_track
 
std::vector< SG::ReadHandle< AthenaHitsVector< LArG4H6FrontHit > > > m_hitcoll
 
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 21 of file LArTBH6BeamInfo.h.

Member Typedef Documentation

◆ dVect

typedef std::vector<double> LArTBH6BeamInfo::dVect
private

Definition at line 38 of file LArTBH6BeamInfo.h.

◆ StoreGateSvc_t

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

Definition at line 388 of file AthCommonDataStore.h.

Constructor & Destructor Documentation

◆ LArTBH6BeamInfo()

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

Definition at line 16 of file LArTBH6BeamInfo.cxx.

17  :AthAlgorithm(name, pSvcLocator),
18  m_Primary(true),
19  m_pcode(999),
20  m_cryoX(0.),
21  m_numEv(0),
22  m_theEventInfo("TBEventInfo")
23 {
24  declareProperty("HitsContainer",m_HitsCollNames);
25 // m_HitsCollNames.push_back("LArTBFrontHitCollection");
26  declareProperty("PrimaryTrackOnly",m_Primary);
27  declareProperty("PrimaryParticle",m_pcode);
28 
29  for (const auto &it : m_HitsCollNames){
31  }
32 
33 }

◆ ~LArTBH6BeamInfo()

LArTBH6BeamInfo::~LArTBH6BeamInfo ( )
virtual

Definition at line 35 of file LArTBH6BeamInfo.cxx.

36 {}

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 LArTBH6BeamInfo::execute ( )

Definition at line 59 of file LArTBH6BeamInfo.cxx.

60 {
61  ATH_MSG_INFO ( "LArTBH6BeamInfo in execute" );
62  CLHEP::Hep3Vector pos;
63 
64  if ( m_numEv == 0 ){
66  }
67 
68  dVect v_x;
69  dVect v_y;
70  dVect v_xz;
71  dVect v_yz;
72  dVect v_ex;
73  dVect v_ey;
74 
75 // loop hit containers
76  for (auto &it : m_hitcoll) {
77 
78  ATH_MSG_INFO (" hit container: "<< it->Name() <<" size: "<<it->size() );
79 
80  for (const LArG4H6FrontHit* hit : *it){
81  // loop over hits, find track==0 and make a fit, store a TBTrack to StoreGate
82  if(hit->GetSC() > 0) continue; // scintilator hit
83  if(m_Primary) {
84  if(hit->GetTrackID() != 1) continue; // not a primary particle
85  } else {
86  if(hit->GetPcode() != m_pcode) continue; // not a beam particle
87  }
88  pos = hit->GetPos();
89  if(hit->GetX() > 0) { // X-coordinate
90  v_x.push_back(pos.x());
91  v_xz.push_back(pos.z()+21600.*mm);
92  v_ex.push_back(0.01); // take the error from somewhere !!!
93  } else {
94  v_y.push_back(pos.y());
95  v_yz.push_back(pos.z()+21600.*mm);
96  v_ey.push_back(0.01); // take the error from somewhere !!!
97  }
98  }
99 
100  }
101 
102  if(v_x.size() < 2 || v_y.size() < 2) { // Could not fit
103  ATH_MSG_DEBUG ( "Could not fit, setting zero. "<<v_x.size()<<"/"<<v_y.size() );
104  m_track = std::make_unique<TBTrack>(0,0);
105  m_track->setUintercept(0.);
106  m_track->setVintercept(0.);
107  m_track->setUslope(0.);
108  m_track->setVslope(0.);
109 // m_track->setResidualu(0, 0);
110 // m_track->setResidualv(0, 0);
111  m_track->setChi2_u(1000.);
112  m_track->setChi2_v(1000.);
113  m_track->setCryoHitu(0.);
114  m_track->setCryoHitv(0.);
115  m_track->setCryoHitw(30000.);
116  return StatusCode::FAILURE;
117  }
118  // Now fit somehow
119  double chi2_x = 0;
120  double chi2_y = 0;
121  std::vector<double> residual_x, residual_y;
122  double a1_x = 0;
123  double a2_x = 0;
124  double a1_y = 0;
125  double a2_y = 0;
126  bool check = true;
127 
128  check = fitVect(v_x, v_xz, v_ex, a1_x, a2_x, chi2_x, residual_x);
129 
130  if(!check){
131  ATH_MSG_ERROR ( "Fit in X-coordinate failure." );
132  return StatusCode::FAILURE;
133  }
134 
135  check = fitVect(v_y, v_yz, v_ey, a1_y, a2_y, chi2_y, residual_y);
136  if(!check){
137  ATH_MSG_ERROR ( "Fit in Y-coordinate failure." );
138  return StatusCode::FAILURE;
139  }
140 
141  // Setting the slopes & intercepts for each track //
142  ATH_MSG_DEBUG ( "Setting fit parameters of track." );
143  ATH_MSG_DEBUG ( "Intercepts: "<<a1_x<<" "<<a1_y );
144  ATH_MSG_DEBUG ( "Slopes: "<<a2_x<<" "<<a2_y );
145 
146  m_track = std::make_unique<TBTrack>(v_x.size(), v_y.size());
147 
148  m_track->setUintercept(a1_x);
149  m_track->setVintercept(a1_y);
150  m_track->setUslope(a2_x);
151  m_track->setVslope(a2_y);
152 
153  // Setting the residual for plane u //
154  for(size_t i = 0; i < v_x.size(); ++i){
155  m_track->setResidualu(i, residual_x[i]);
156  }
157 
158  // Setting the residual for plane v //
159  for(size_t i = 0; i < v_y.size(); ++i){
160  m_track->setResidualv(i, residual_y[i]);
161  }
162 
163  ATH_MSG_DEBUG ( "chi2 in X: " << chi2_x );
164  ATH_MSG_DEBUG ( "chi2 in Y: " << chi2_y );
165  ATH_MSG_DEBUG ( "Setting chi2s of track." );
166 
167  m_track->setChi2_u(chi2_x);
168  m_track->setChi2_v(chi2_y);
169 
170  // Setting the cryo plane (30000 mm in TB coordinate)
171  m_track->setCryoHitu(a2_x*30000.+a1_x+m_cryoX);
172  m_track->setCryoHitv(a2_y*30000.+a1_y);
173  m_track->setCryoHitw(30000.);
174 
175  return StatusCode::SUCCESS;
176 }

◆ 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 LArTBH6BeamInfo::finalize ( )

Definition at line 182 of file LArTBH6BeamInfo.cxx.

183 {
184  ATH_MSG_INFO ( "LArTBH6BeamInfo::finalize()" );
185  return StatusCode::SUCCESS;
186 }

◆ fitVect()

bool LArTBH6BeamInfo::fitVect ( const dVect vec_x,
const dVect vec_xz,
const dVect vec_ex,
double &  a1,
double &  a2,
double &  chi2,
dVect residual 
)
private

Fit data to the function u = a1 + a2*w.

and determines intercept, slope, residual for each BPC, and chi2 on fit

Definition at line 189 of file LArTBH6BeamInfo.cxx.

192 {
193  // v_u = vector of u data points
194  // v_w = vector of w data points
195  // v_eu = vector of errors in u data points
196  // v_ew = vector of errors in w data points
197  // a1 and a2 = fit parameters: u = a1 + a2*w
198 
199  // *** note that the fit algorithm used (given in 'Numerical Methods
200  // in C' section 15.2) assumes that the w data points are known exactly
201  // i.e. that v_ew[i]=0 for all i
202 
203  // 'Numerical Methods' notes that the task of fitting a straight
204  // line model with errors in both coordinates is "considerably harder"
205  // (section 15.3) - but clearly it could be done
206 
207  int i;
208  double s = 0;
209  double su = 0;
210  double sww = 0;
211  double sw = 0;
212  double suw = 0;
213 
214  int hitNum = vec.size();
215  for(i = 0; i < hitNum; ++i){
216 
217  ATH_MSG_DEBUG ( "Position in X: " << vec[i] );
218  ATH_MSG_DEBUG ( "Position in Z: " << vec_z[i] );
219  ATH_MSG_DEBUG ( "Error in X: " << vec_e[i] );
220 
221  s += 1 / (vec_e[i]*vec_e[i]);
222  su += vec[i] / (vec_e[i]*vec_e[i]);
223  sww += vec_z[i]*vec_z[i] / (vec_e[i]*vec_e[i]);
224  sw += vec_z[i] / (vec_e[i]*vec_e[i]);
225  suw += vec[i]*vec_z[i] / (vec_e[i]*vec_e[i]);
226  }
227 
228  const double denom = (s*sww-sw*sw);
229  if(denom == 0){
230  ATH_MSG_ERROR ( " Invalid denominator" );
231  return false;
232  }
233 
234  const double inv_denom = 1. / denom;
235  a1 = (su*sww - sw*suw) * inv_denom;
236  a2 = (s*suw - su*sw) * inv_denom;
237  ATH_MSG_DEBUG ( "Fit results:" << " intercept = " << a1 << " and slope = " << a2 );
238 
239  // Fill residual
240  residual.clear();
241  for (i = 0; i < hitNum; ++i) {
242  residual.push_back(vec[i] - a1 - a2*vec_z[i]);
243  }
244  // Fill Chi2
245  chi2 = 0;
246  for(i = 0; i < hitNum; ++i){
247  chi2 += (vec[i] - a1 - a2*vec_z[i])*(vec[i] - a1 - a2*vec_z[i])/(vec_e[i]*vec_e[i]);
248  }
249 
250  return true;
251 }

◆ initialize()

StatusCode LArTBH6BeamInfo::initialize ( )

Definition at line 42 of file LArTBH6BeamInfo.cxx.

43 {
44 
45  if((!m_Primary) && (m_pcode == 999)) {
46  ATH_MSG_ERROR ( "Pcode should be in jO, if not PrimaryTrackOnly !" );
47  return StatusCode::FAILURE;
48  }
49 
50 // End of Initialization
51  ATH_MSG_INFO ( "LArTBH6BeamInfo initialisation completed" );
52  return StatusCode::SUCCESS;
53 }

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

float LArTBH6BeamInfo::m_cryoX
private

Definition at line 51 of file LArTBH6BeamInfo.h.

◆ 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_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_hitcoll

std::vector< SG::ReadHandle< AthenaHitsVector<LArG4H6FrontHit> > > LArTBH6BeamInfo::m_hitcoll
private

Definition at line 56 of file LArTBH6BeamInfo.h.

◆ m_HitsCollNames

std::vector<std::string> LArTBH6BeamInfo::m_HitsCollNames
private

Definition at line 47 of file LArTBH6BeamInfo.h.

◆ m_numEv

int LArTBH6BeamInfo::m_numEv
private

Definition at line 52 of file LArTBH6BeamInfo.h.

◆ m_pcode

int LArTBH6BeamInfo::m_pcode
private

Definition at line 49 of file LArTBH6BeamInfo.h.

◆ m_Primary

bool LArTBH6BeamInfo::m_Primary
private

Definition at line 48 of file LArTBH6BeamInfo.h.

◆ m_theEventInfo

SG::ReadHandle<TBEventInfo> LArTBH6BeamInfo::m_theEventInfo
private

Definition at line 54 of file LArTBH6BeamInfo.h.

◆ m_track

SG::WriteHandle<TBTrack> LArTBH6BeamInfo::m_track
private

Definition at line 55 of file LArTBH6BeamInfo.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.


The documentation for this class was generated from the following files:
TBTrack::setChi2_v
void setChi2_v(double chi2v)
Definition: TBTrack.h:74
TBTrack::setVslope
void setVslope(double vslope)
Definition: TBTrack.h:77
python.SystemOfUnits.s
int s
Definition: SystemOfUnits.py:131
LArTBH6BeamInfo::m_theEventInfo
SG::ReadHandle< TBEventInfo > m_theEventInfo
Definition: LArTBH6BeamInfo.h:54
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
ClusterSeg::residual
@ residual
Definition: ClusterNtuple.h:20
SG::ReadHandle
Definition: StoreGate/StoreGate/ReadHandle.h:70
AthCommonDataStore< AthCommonMsg< Algorithm > >::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
LArTBH6BeamInfo::m_Primary
bool m_Primary
Definition: LArTBH6BeamInfo.h:48
TBTrack::setVintercept
void setVintercept(double vintercept)
Definition: TBTrack.h:79
skel.it
it
Definition: skel.GENtoEVGEN.py:396
AthCommonDataStore< AthCommonMsg< Algorithm > >::m_evtStore
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
Definition: AthCommonDataStore.h:390
LArTBH6BeamInfo::m_track
SG::WriteHandle< TBTrack > m_track
Definition: LArTBH6BeamInfo.h:55
AthCommonDataStore< AthCommonMsg< Algorithm > >::m_vhka
std::vector< SG::VarHandleKeyArray * > m_vhka
Definition: AthCommonDataStore.h:398
TBTrack::setCryoHitv
void setCryoHitv(float cryov)
Definition: TBTrack.h:85
TBTrack::setCryoHitu
void setCryoHitu(float cryou)
Definition: TBTrack.h:84
vec
std::vector< size_t > vec
Definition: CombinationsGeneratorTest.cxx:12
TBTrack::setUslope
void setUslope(double uslope)
Definition: TBTrack.h:76
LArTBH6BeamInfo::fitVect
bool fitVect(const dVect &vec_x, const dVect &vec_xz, const dVect &vec_ex, double &a1, double &a2, double &chi2, dVect &residual)
Fit data to the function u = a1 + a2*w.
Definition: LArTBH6BeamInfo.cxx:189
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
LArTBH6BeamInfo::m_numEv
int m_numEv
Definition: LArTBH6BeamInfo.h:52
LArTBH6BeamInfo::dVect
std::vector< double > dVect
Definition: LArTBH6BeamInfo.h:38
AthenaPoolTestRead.sc
sc
Definition: AthenaPoolTestRead.py:27
LArTBH6BeamInfo::m_cryoX
float m_cryoX
Definition: LArTBH6BeamInfo.h:51
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.
TBTrack::setUintercept
void setUintercept(double uintercept)
Definition: TBTrack.h:78
lumiFormat.i
int i
Definition: lumiFormat.py:85
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
chi2
double chi2(TH1 *h0, TH1 *h1)
Definition: comparitor.cxx:523
AthCommonDataStore< AthCommonMsg< Algorithm > >::m_detStore
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
Definition: AthCommonDataStore.h:393
compute_lumi.denom
denom
Definition: compute_lumi.py:76
TBTrack::setCryoHitw
void setCryoHitw(float cryow)
Definition: TBTrack.h:86
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
TBTrack::setResidualv
void setResidualv(int ind, double residualv)
Definition: TBTrack.h:82
merge_scale_histograms.doc
string doc
Definition: merge_scale_histograms.py:9
LArTBH6BeamInfo::m_HitsCollNames
std::vector< std::string > m_HitsCollNames
Definition: LArTBH6BeamInfo.h:47
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
LArTBH6BeamInfo::m_pcode
int m_pcode
Definition: LArTBH6BeamInfo.h:49
LArNewCalib_Delay_OFC_Cali.check
check
Definition: LArNewCalib_Delay_OFC_Cali.py:267
python.LumiBlobConversion.pos
pos
Definition: LumiBlobConversion.py:18
python.SystemOfUnits.mm
int mm
Definition: SystemOfUnits.py:83
AthAlgorithm::m_extendedExtraObjects
DataObjIDColl m_extendedExtraObjects
Definition: AthAlgorithm.h:79
a
TList * a
Definition: liststreamerinfos.cxx:10
h
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
TBTrack::setChi2_u
void setChi2_u(double chi2u)
Definition: TBTrack.h:73
SG::VarHandleBase::vhKey
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Definition: StoreGate/src/VarHandleBase.cxx:623
AthAlgorithm::AthAlgorithm
AthAlgorithm()
Default constructor:
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:798
LArG4H6FrontHit
Definition: LArG4H6FrontHit.h:23
TBTrack::setResidualu
void setResidualu(int ind, double residualu)
Definition: TBTrack.h:81
LHEF::Writer
Pythia8::Writer Writer
Definition: Prophecy4fMerger.cxx:12
TBEventInfo::getCryoX
float getCryoX() const
Definition: TBEventInfo.h:70
AthenaHitsVector
Definition: AthenaHitsVector.h:39
AthCommonDataStore::declareGaudiProperty
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition: AthCommonDataStore.h:156
LArTBH6BeamInfo::m_hitcoll
std::vector< SG::ReadHandle< AthenaHitsVector< LArG4H6FrontHit > > > m_hitcoll
Definition: LArTBH6BeamInfo.h:56
fitman.k
k
Definition: fitman.py:528
ServiceHandle< ICondSvc >