ATLAS Offline Software
Loading...
Searching...
No Matches
TRT_PrepDataToxAOD Class Reference

#include <TRT_PrepDataToxAOD.h>

Inheritance diagram for TRT_PrepDataToxAOD:
Collaboration diagram for TRT_PrepDataToxAOD:

Public Types

enum  EGasType {
  kUnset =-128 , kXenon =0 , kArgon =1 , kKrypton =2 ,
  kEmAr =6 , kEmKr =7
}

Public Member Functions

 TRT_PrepDataToxAOD (const std::string &name, ISvcLocator *pSvcLocator)
virtual StatusCode initialize ()
virtual StatusCode execute ()
virtual StatusCode finalize ()
virtual StatusCode sysInitialize () override
 Override sysInitialize.
virtual const DataObjIDColl & extraOutputDeps () const override
 Return the list of extra output dependencies.
ServiceHandle< StoreGateSvc > & evtStore ()
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
const ServiceHandle< StoreGateSvc > & detStore () const
 The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
virtual StatusCode sysStart () override
 Handle START transition.
virtual std::vector< Gaudi::DataHandle * > inputHandles () const override
 Return this algorithm's input handles.
virtual std::vector< Gaudi::DataHandle * > outputHandles () const override
 Return this algorithm's output handles.
Gaudi::Details::PropertyBase & declareProperty (Gaudi::Property< T, V, H > &t)
void updateVHKA (Gaudi::Details::PropertyBase &)
MsgStream & msg () const
bool msgLvl (const MSG::Level lvl) const

Protected Member Functions

void renounceArray (SG::VarHandleKeyArray &handlesArray)
 remove all handles from I/O resolution
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.

Private Types

typedef ServiceHandle< StoreGateSvcStoreGateSvc_t

Private Member Functions

Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey>

Private Attributes

Gaudi::Property< bool > m_useTruthInfo {this, "UseTruthInfo",false,"Use data object"}
Gaudi::Property< bool > m_writeSDOs {this, "WriteSDOs", false,"Use data object"}
SG::ReadHandleKey< InDet::TRT_DriftCircleContainer > m_driftcirclecontainer {this,"DriftCircleContainer","TRT_DriftCircles","RHK to retrieve the drift Circle Container"}
SG::ReadHandleKey< PRD_MultiTruthCollectionm_multiTruth {this,"PRD_MultiTruth","PRD_MultiTruthTRT","RHK to retrieve PRD multitruth"}
SG::ReadHandleKey< InDetSimDataCollectionm_SDOcontainer {this,"MC_TRTUncompressedHit","TRT_SDO_Map","RHK to retrieve TRT SDO map"}
SG::WriteHandleKey< xAOD::TrackMeasurementValidationContainerm_xAodContainer {this,"TRTxAodContainer","TRT_DriftCircles","WHK to write the TRT drift circle container"}
SG::WriteHandleKey< std::vector< unsigned int > > m_xAodOffset {this,"TRTxAodOffset","TRT_DriftCirclesOffsets","WHK to write the TRT drift circle offsets"}
ToolHandle< ITRT_DriftFunctionToolm_driftFunctionTool {this, "TRTDriftFunctionTool", "TRT_DriftFunctionTool", "DriftFunctionTool"}
ToolHandle< ITRT_CalDbToolm_trtcaldbTool {this, "TRTCalDbTool", "TRT_CalDbTool", ""}
ServiceHandle< ITRT_StrawNeighbourSvcm_neighbourSvc {this, "NeighbourSvc", "TRT_StrawNeighbourSvc", ""}
ToolHandle< ITRT_StrawStatusSummaryToolm_TRTStrawSummaryTool {this, "TRTStrawSummaryTool", "TRT_StrawStatusSummaryTool", ""}
const TRT_IDm_TRTHelper {}
const InDetDD::TRT_DetectorManagerm_trtman {}
bool m_firstEventWarnings {true}
DataObjIDColl m_extendedExtraObjects
StoreGateSvc_t m_evtStore
 Pointer to StoreGate (event store by default)
StoreGateSvc_t m_detStore
 Pointer to StoreGate (detector store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
bool m_varHandleArraysDeclared

Detailed Description

Definition at line 40 of file TRT_PrepDataToxAOD.h.

Member Typedef Documentation

◆ StoreGateSvc_t

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

Definition at line 388 of file AthCommonDataStore.h.

Member Enumeration Documentation

◆ EGasType

Constructor & Destructor Documentation

◆ TRT_PrepDataToxAOD()

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

Definition at line 41 of file TRT_PrepDataToxAOD.cxx.

41 :
42 AthAlgorithm(name,pSvcLocator)
43{
44}
AthAlgorithm()
Default constructor:

Member Function Documentation

◆ declareGaudiProperty()

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

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

Definition at line 156 of file AthCommonDataStore.h.

158 {
160 hndl.value(),
161 hndl.documentation());
162
163 }
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)

◆ declareProperty()

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

Definition at line 145 of file AthCommonDataStore.h.

145 {
146 typedef typename SG::HandleClassifier<T>::type htype;
148 }
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>

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

◆ evtStore()

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.

◆ execute()

StatusCode TRT_PrepDataToxAOD::execute ( )
virtual

Definition at line 83 of file TRT_PrepDataToxAOD.cxx.

84{
85 //This is needed for the algorithm. If not there, it fails
86
87 SG::ReadHandle<InDet::TRT_DriftCircleContainer> h_trtPrds(m_driftcirclecontainer);
88 if (not h_trtPrds.isValid()) {
89 ATH_MSG_ERROR("Cannot retrieve TRT PrepDataContainer " << m_driftcirclecontainer.key());
90 return StatusCode::FAILURE;
91 }
92
93 //This is optional for the algorithm. If not there, just print a one-time warning
94 // On ESD
95
96 const PRD_MultiTruthCollection* prdmtColl = nullptr; // to be used in the loop later
97 if (m_useTruthInfo && (!m_multiTruth.key().empty()) ) {
98 SG::ReadHandle<PRD_MultiTruthCollection> h_prdmtColl(m_multiTruth);
99 if (not h_prdmtColl.isValid()){
101 ATH_MSG_WARNING("PRD MultiTruth collection not available (" << m_multiTruth.key() << "). Skipping this info although requested.");}
102 } else {
103 prdmtColl = h_prdmtColl.cptr();
104 }
105 }
106
107 //This is optional for the algorithm. If not there, just print a one-time warning
108 // On RDO
109
110 const InDetSimDataCollection* sdoCollection = nullptr; // to be used in the loop later
111 if (m_writeSDOs && m_useTruthInfo && (!m_SDOcontainer.key().empty()) ) {
112 SG::ReadHandle<InDetSimDataCollection> h_sdoCollection(m_SDOcontainer);
113 if (not h_sdoCollection.isValid()) {
115 ATH_MSG_WARNING("SDO Collection not available (" << m_SDOcontainer.key() << "). Skipping this info although requested.");}
116 } else{
117 sdoCollection = h_sdoCollection.cptr();
118 }
119 }
120
121
122 // Create the xAOD container and its auxiliary store:
123 SG::WriteHandle<xAOD::TrackMeasurementValidationContainer> xaod(m_xAodContainer);
124 ATH_CHECK(xaod.record(std::make_unique<xAOD::TrackMeasurementValidationContainer>(),std::make_unique<xAOD::TrackMeasurementValidationAuxContainer>() ) );
125
126 SG::WriteHandle<std::vector<unsigned int>> offsets(m_xAodOffset);
127 ATH_CHECK(offsets.record(std::make_unique<std::vector<unsigned int>>(m_TRTHelper->straw_layer_hash_max() , 0) ));
128
129 InDet::TRT_DriftCircleContainer::const_iterator it = h_trtPrds->begin();
130 InDet::TRT_DriftCircleContainer::const_iterator it_end = h_trtPrds->end();
131 unsigned int counter(0);
132 for( ; it!=it_end; ++it ) {
133
134 //Fill Offset container
135 if( m_TRTHelper->straw_layer_hash_max() <= (*it)->identifyHash() )
136 ATH_MSG_ERROR("My assumption about the maximum size of the hash was wrong");
137 (*offsets)[ (*it)->identifyHash() ] = counter;
138
139 // skip empty collections
140 if( (*it)->empty() ) continue;
141
142 // loop over collection and convert to xAOD
143 for( const auto prd : **it ){
144
145 ++counter;
146
147 // create and add xAOD object
149 xaod->push_back(xprd);
150
151 Identifier surfaceID = prd->identify();
152
153 xprd->setIdentifier(surfaceID.get_compact());
154
155
156 // Save ID info:
157 AUXDATA(xprd, int, bec) = m_TRTHelper->barrel_ec( surfaceID ) ;
158 AUXDATA(xprd, int, layer) = m_TRTHelper->layer_or_wheel(surfaceID ) ;
159 AUXDATA(xprd, int, phi_module) = m_TRTHelper->phi_module( surfaceID ) ;
160 AUXDATA(xprd, int, strawlayer) = m_TRTHelper->straw_layer( surfaceID ) ;
161 AUXDATA(xprd, int, strawnumber) = m_TRTHelper->straw( surfaceID ) ;
162 const InDetDD::TRT_BaseElement* element = m_trtman->getElement(surfaceID);
163 AUXDATA(xprd, float, strawphi) = element->center(surfaceID).phi();
164
165 int chip=0;
166 int board=-1;
167 m_neighbourSvc->getChip(surfaceID,chip);
168 if(abs(m_TRTHelper->barrel_ec(surfaceID))<2)
169 board=m_neighbourSvc->chipToBoardBarrel(chip,m_TRTHelper->layer_or_wheel(surfaceID));
170 else if (chip<12)
171 board=0;
172 else {
173 chip=chip-20;
174 board=1;
175 }
176 AUXDATA(xprd, int, TRTboard) = board ;
177 AUXDATA(xprd, int, TRTchip) = chip ;
178
179
180 //Set Local Position
181 const Amg::Vector2D& locpos = prd->localPosition();
182 float locY(0.);
183 float locX = locpos.x();
184 if ( !(std::isinf(locpos.y()) || std::isnan(locpos.y())) ){
185 if (locpos.y()>=1e-07)
186 locY=locpos.y();
187 } else {
188 locY = -9999.;
189 }
190
191 // Set local error matrix
192 xprd->setLocalPosition(locX,locY);
193
194 const Amg::MatrixX& localCov = prd->localCovariance();
195 if(localCov.size() == 1){
196 xprd->setLocalPositionError( sqrt(localCov(0,0)), 0., 0. );
197 } else if(localCov.size() == 2){
198 xprd->setLocalPositionError( sqrt(localCov(0,0)), sqrt(localCov(1,1)), sqrt(localCov(0,1)) );
199 } else {
200 xprd->setLocalPositionError(0.,0.,0.);
201 }
202
203
204 //Set Global position
205 const Amg::Vector3D gpos = prd->detectorElement()->surface(surfaceID).localToGlobal(prd->localPosition());
206 xprd->setGlobalPosition(gpos.x(),gpos.y(),gpos.z());
207
208
209 //TRT hit bit word
210 unsigned int word = prd->getWord();
211
212
213 double tot = prd->timeOverThreshold();
214 bool isvalid=false;
215 AUXDATA(xprd, float, drifttime) = prd->driftTime(isvalid) ;
216 AUXDATA(xprd, int, status) = isvalid;
217 AUXDATA(xprd, float, tot) = tot ;
218 AUXDATA(xprd, char, isHT) = prd->highLevel() ;
219 AUXDATA(xprd, float, T0) = m_trtcaldbTool->getT0(surfaceID) ;
220
221
222 // Save time info:
223 AUXDATA(xprd, float, leadingEdge) = prd->rawDriftTime();
224
225 //Drift Time corrections
226 AUXDATA(xprd, float, driftTimeToTCorrection) = m_driftFunctionTool->driftTimeToTCorrection(tot,surfaceID);
227 if(prd->highLevel()) {
228 AUXDATA(xprd, float, driftTimeHTCorrection) = m_driftFunctionTool->driftTimeHTCorrection(surfaceID);
229 }
230 else {
231 AUXDATA(xprd, float, driftTimeHTCorrection) = 0;
232 }
233
234
235 //HT Bit patterens
236 unsigned int theWord = word & 0x04020100; //HT bits mask
237 char highThreshold = 0;
238 //this is the agreed-upon binning for HT bit patterns...
239 if (theWord == 0x04000000) //pattern 1
240 highThreshold = 1;
241 else if (theWord == 0x00020000) //pattern 2
242 highThreshold = 2;
243 else if (theWord == 0x00000100) //pattern 3
244 highThreshold = 3;
245 else if (theWord == 0x04020000) //pattern 4
246 highThreshold = 4;
247 else if (theWord == 0x00020100) //pattern 5
248 highThreshold = 5;
249 else if (theWord == 0x04000100) //pattern 6
250 highThreshold = 6;
251 else if (theWord == 0x04020100) //pattern 7
252 highThreshold = 7;
253
254 AUXDATA(xprd, char, highThreshold) = highThreshold;
255
256 //Full bit patternword from the TRT
257 AUXDATA(xprd, unsigned int, bitPattern) = word;
258
259 char gas_type = kUnset;
260 if (!m_TRTStrawSummaryTool.empty()) {
261 int stat = m_TRTStrawSummaryTool->getStatusHT(surfaceID, Gaudi::Hive::currentContext());
262
263 if ( stat==1 || stat==4 ) { gas_type = kArgon; }
264 else if ( stat==5 ) { gas_type = kKrypton; }
265 else if ( stat==2 || stat==3 ) { gas_type = kXenon; }
266 else if ( stat==6 ) gas_type = kEmAr;
267 else if ( stat==7 ) gas_type = kEmKr;
268 }
269 AUXDATA(xprd, char, gasType) = gas_type;
270
271 // Use the MultiTruth Collection to get a list of all true particle contributing to the DC
272 if (m_useTruthInfo){
273 if(prdmtColl){
274 std::vector<int> uniqueIDs;
275 auto range = prdmtColl->equal_range(surfaceID);
276 for (auto i = range.first; i != range.second; ++i) {
277 uniqueIDs.push_back( HepMC::uniqueID(i->second) );
278 }
279 AUXDATA(xprd, std::vector<int> , truth_barcode) = uniqueIDs; // TODO rename variable to be consistent?
280 }
281 }
282 if (m_writeSDOs) {
283 if(sdoCollection){
284 // find hit
285 auto pos = sdoCollection->find(surfaceID);
286 int sdo_word = -1000000;
287 if( pos != sdoCollection->end() ) {
288 sdo_word = pos->second.word();
289 }
290 AUXDATA(xprd, int, sdo_word) = sdo_word;
291 }
292 }
293
294 }
295 }
296 ATH_MSG_DEBUG( " recorded TRT_PrepData obejcts: size " << xaod->size() );
297
298
299
300 // Code to test that something was added to SG:
301 StatusCode sc = StatusCode::SUCCESS;
302
303 // --- end of event. Disable one-time warnings
304 m_firstEventWarnings = false;
305
306 return sc;
307}
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_ERROR(x)
#define ATH_MSG_WARNING(x)
#define ATH_MSG_DEBUG(x)
static Double_t sc
#define AUXDATA(OBJ, TYP, NAME)
value_type get_compact() const
Get the compact id.
virtual const Amg::Vector3D & center() const override final
Element Surface: center of a straw layer.
ServiceHandle< ITRT_StrawNeighbourSvc > m_neighbourSvc
SG::ReadHandleKey< InDet::TRT_DriftCircleContainer > m_driftcirclecontainer
ToolHandle< ITRT_StrawStatusSummaryTool > m_TRTStrawSummaryTool
const TRT_ID * m_TRTHelper
const InDetDD::TRT_DetectorManager * m_trtman
Gaudi::Property< bool > m_writeSDOs
ToolHandle< ITRT_DriftFunctionTool > m_driftFunctionTool
Gaudi::Property< bool > m_useTruthInfo
SG::WriteHandleKey< xAOD::TrackMeasurementValidationContainer > m_xAodContainer
SG::ReadHandleKey< InDetSimDataCollection > m_SDOcontainer
ToolHandle< ITRT_CalDbTool > m_trtcaldbTool
SG::WriteHandleKey< std::vector< unsigned int > > m_xAodOffset
SG::ReadHandleKey< PRD_MultiTruthCollection > m_multiTruth
void setLocalPositionError(float localXError, float localYError, float localXYCorrelation)
Sets the local position error.
void setLocalPosition(float localX, float localY)
Sets the local position.
void setIdentifier(uint64_t identifier)
Sets the identifier.
void setGlobalPosition(float globalX, float globalY, float globalZ)
Sets the global position.
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic > MatrixX
Dynamic Matrix - dynamic allocation.
Eigen::Matrix< double, 2, 1 > Vector2D
Eigen::Matrix< double, 3, 1 > Vector3D
::StatusCode StatusCode
StatusCode definition for legacy code.
int uniqueID(const T &p)
@ locY
local cartesian
Definition ParamDefs.h:38
@ locX
Definition ParamDefs.h:37
TrackMeasurementValidation_v1 TrackMeasurementValidation
Reference the current persistent version:

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

◆ finalize()

StatusCode TRT_PrepDataToxAOD::finalize ( )
virtual

Definition at line 314 of file TRT_PrepDataToxAOD.cxx.

315{
316 return StatusCode::SUCCESS;
317}

◆ initialize()

StatusCode TRT_PrepDataToxAOD::initialize ( )
virtual

Definition at line 51 of file TRT_PrepDataToxAOD.cxx.

52{
53 ATH_MSG_DEBUG("Initialize");
54
55 //Initialize VarHandleKeys
57 ATH_CHECK(m_multiTruth.initialize(m_useTruthInfo && (not m_multiTruth.key().empty()) ));
58 ATH_CHECK(m_SDOcontainer.initialize(m_writeSDOs && (not m_SDOcontainer.key().empty()) ));
59 ATH_CHECK(m_xAodContainer.initialize());
60 ATH_CHECK(m_xAodOffset.initialize());
61
62 // --- Retrieve services and tools
63 CHECK ( detStore()->retrieve(m_TRTHelper, "TRT_ID") );
64
65 CHECK ( detStore()->retrieve(m_trtman, "TRT") );
66
67 CHECK ( m_neighbourSvc.retrieve() );
68
69 CHECK ( m_trtcaldbTool.retrieve() );
70
71 CHECK ( m_TRTStrawSummaryTool.retrieve() );
72
73 CHECK( m_driftFunctionTool.retrieve() );
74
75 return StatusCode::SUCCESS;
76}
#define CHECK(...)
Evaluate an expression and check for errors.
const ServiceHandle< StoreGateSvc > & detStore() const
retrieve(aClass, aKey=None)
Definition PyKernel.py:110

◆ 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()

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

Definition at line 24 of file AthCommonMsg.h.

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

◆ 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();
384 }
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)

◆ 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 {
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, AthHistogramAlgorithm, and PyAthena::Alg.

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}
virtual StatusCode sysInitialize() override
Override sysInitialize.
AthCommonDataStore(const std::string &name, T... args)
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override

◆ 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) {
313 for (auto k : keys) {
314 k->setOwner(this);
315 }
316 }
317 }
std::vector< SG::VarHandleKeyArray * > m_vhka

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_driftcirclecontainer

SG::ReadHandleKey<InDet::TRT_DriftCircleContainer> TRT_PrepDataToxAOD::m_driftcirclecontainer {this,"DriftCircleContainer","TRT_DriftCircles","RHK to retrieve the drift Circle Container"}
private

Definition at line 59 of file TRT_PrepDataToxAOD.h.

59{this,"DriftCircleContainer","TRT_DriftCircles","RHK to retrieve the drift Circle Container"};

◆ m_driftFunctionTool

ToolHandle< ITRT_DriftFunctionTool > TRT_PrepDataToxAOD::m_driftFunctionTool {this, "TRTDriftFunctionTool", "TRT_DriftFunctionTool", "DriftFunctionTool"}
private

Definition at line 67 of file TRT_PrepDataToxAOD.h.

67{this, "TRTDriftFunctionTool", "TRT_DriftFunctionTool", "DriftFunctionTool"};

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

bool TRT_PrepDataToxAOD::m_firstEventWarnings {true}
private

Definition at line 75 of file TRT_PrepDataToxAOD.h.

75{true};

◆ m_multiTruth

SG::ReadHandleKey<PRD_MultiTruthCollection> TRT_PrepDataToxAOD::m_multiTruth {this,"PRD_MultiTruth","PRD_MultiTruthTRT","RHK to retrieve PRD multitruth"}
private

Definition at line 60 of file TRT_PrepDataToxAOD.h.

60{this,"PRD_MultiTruth","PRD_MultiTruthTRT","RHK to retrieve PRD multitruth"};

◆ m_neighbourSvc

ServiceHandle<ITRT_StrawNeighbourSvc> TRT_PrepDataToxAOD::m_neighbourSvc {this, "NeighbourSvc", "TRT_StrawNeighbourSvc", ""}
private

Definition at line 69 of file TRT_PrepDataToxAOD.h.

69{this, "NeighbourSvc", "TRT_StrawNeighbourSvc", ""};

◆ m_SDOcontainer

SG::ReadHandleKey<InDetSimDataCollection> TRT_PrepDataToxAOD::m_SDOcontainer {this,"MC_TRTUncompressedHit","TRT_SDO_Map","RHK to retrieve TRT SDO map"}
private

Definition at line 61 of file TRT_PrepDataToxAOD.h.

61{this,"MC_TRTUncompressedHit","TRT_SDO_Map","RHK to retrieve TRT SDO map"};

◆ m_trtcaldbTool

ToolHandle<ITRT_CalDbTool> TRT_PrepDataToxAOD::m_trtcaldbTool {this, "TRTCalDbTool", "TRT_CalDbTool", ""}
private

Definition at line 68 of file TRT_PrepDataToxAOD.h.

68{this, "TRTCalDbTool", "TRT_CalDbTool", ""};

◆ m_TRTHelper

const TRT_ID* TRT_PrepDataToxAOD::m_TRTHelper {}
private

Definition at line 71 of file TRT_PrepDataToxAOD.h.

71{};

◆ m_trtman

const InDetDD::TRT_DetectorManager* TRT_PrepDataToxAOD::m_trtman {}
private

Definition at line 72 of file TRT_PrepDataToxAOD.h.

72{};

◆ m_TRTStrawSummaryTool

ToolHandle<ITRT_StrawStatusSummaryTool> TRT_PrepDataToxAOD::m_TRTStrawSummaryTool {this, "TRTStrawSummaryTool", "TRT_StrawStatusSummaryTool", ""}
private

Definition at line 70 of file TRT_PrepDataToxAOD.h.

70{this, "TRTStrawSummaryTool", "TRT_StrawStatusSummaryTool", ""};

◆ m_useTruthInfo

Gaudi::Property<bool> TRT_PrepDataToxAOD::m_useTruthInfo {this, "UseTruthInfo",false,"Use data object"}
private

Definition at line 55 of file TRT_PrepDataToxAOD.h.

55{this, "UseTruthInfo",false,"Use data object"};

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

◆ m_writeSDOs

Gaudi::Property<bool> TRT_PrepDataToxAOD::m_writeSDOs {this, "WriteSDOs", false,"Use data object"}
private

Definition at line 56 of file TRT_PrepDataToxAOD.h.

56{this, "WriteSDOs", false,"Use data object"};

◆ m_xAodContainer

SG::WriteHandleKey<xAOD::TrackMeasurementValidationContainer> TRT_PrepDataToxAOD::m_xAodContainer {this,"TRTxAodContainer","TRT_DriftCircles","WHK to write the TRT drift circle container"}
private

Definition at line 62 of file TRT_PrepDataToxAOD.h.

62{this,"TRTxAodContainer","TRT_DriftCircles","WHK to write the TRT drift circle container"};

◆ m_xAodOffset

SG::WriteHandleKey<std::vector<unsigned int> > TRT_PrepDataToxAOD::m_xAodOffset {this,"TRTxAodOffset","TRT_DriftCirclesOffsets","WHK to write the TRT drift circle offsets"}
private

Definition at line 63 of file TRT_PrepDataToxAOD.h.

63{this,"TRTxAodOffset","TRT_DriftCirclesOffsets","WHK to write the TRT drift circle offsets"};

The documentation for this class was generated from the following files: