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

virtual StatusCode initialize ()
virtual StatusCode execute (const EventContext &ctx)
 Execute method.
virtual StatusCode finalize ()
 AthAlgorithm (const std::string &name, ISvcLocator *pSvcLocator)
 Constructor.
virtual StatusCode sysInitialize () override
 Override sysInitialize.
virtual bool isClonable () const override
 Specify if the algorithm is clonable.
virtual StatusCode sysExecute (const EventContext &ctx) override
 Execute an algorithm.
virtual const DataObjIDColl & extraOutputDeps () const override
 Return the list of extra output dependencies.
virtual bool filterPassed (const EventContext &ctx) const
 Get filter decision:
virtual void setFilterPassed (bool state, const EventContext &ctx) const
 Set filter decision:
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

virtual bool isReEntrant () const override final
 Legacy algorithms are not thread-safe.
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
 Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks.
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< Gaudi::Algorithm > >::StoreGateSvc_t
privateinherited

Definition at line 388 of file AthCommonDataStore.h.

Member Enumeration Documentation

◆ EGasType

Member Function Documentation

◆ AthAlgorithm()

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

Constructor.

Definition at line 31 of file AthAlgorithm.cxx.

11 :
12 AthCommonAlgorithm<Gaudi::Algorithm>( name, pSvcLocator )
13{
14 // default cardinality for non-reentrant algorithms
15 setProperty( "Cardinality", 1 ).orThrow("Unable to set property 'Cardinality'", name);
16}
void setProperty(columnar::PythonToolHandle &self, const std::string &key, nb::object value)
AthCommonAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)

◆ declareGaudiProperty()

Gaudi::Details::PropertyBase & AthCommonDataStore< AthCommonMsg< Gaudi::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< Gaudi::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< Gaudi::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< Gaudi::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 ( const EventContext & ctx)
virtual

Execute method.

Implements AthAlgorithm.

Definition at line 74 of file TRT_PrepDataToxAOD.cxx.

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

Return the list of extra output dependencies.

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

Definition at line 89 of file AthCommonAlgorithm.cxx.

54{
55 // If we didn't find any symlinks to add, just return the collection
56 // from the base class. Otherwise, return the extended collection.
57 if (!m_extendedExtraObjects.empty()) {
59 }
61}
Common base class for algorithms.

◆ filterPassed()

virtual bool AthCommonAlgorithm< Gaudi::Algorithm >::filterPassed ( const EventContext & ctx) const
inlinevirtualinherited

Get filter decision:

Definition at line 93 of file AthCommonAlgorithm.h.

93 {
94 return execState( ctx ).filterPassed();
95 }
virtual bool filterPassed(const EventContext &ctx) const
Get filter decision:

◆ finalize()

StatusCode TRT_PrepDataToxAOD::finalize ( )
virtual

Definition at line 305 of file TRT_PrepDataToxAOD.cxx.

306{
307 return StatusCode::SUCCESS;
308}

◆ initialize()

StatusCode TRT_PrepDataToxAOD::initialize ( )
virtual

Definition at line 42 of file TRT_PrepDataToxAOD.cxx.

43{
44 ATH_MSG_DEBUG("Initialize");
45
46 //Initialize VarHandleKeys
48 ATH_CHECK(m_multiTruth.initialize(m_useTruthInfo && (not m_multiTruth.key().empty()) ));
49 ATH_CHECK(m_SDOcontainer.initialize(m_writeSDOs && (not m_SDOcontainer.key().empty()) ));
50 ATH_CHECK(m_xAodContainer.initialize());
51 ATH_CHECK(m_xAodOffset.initialize());
52
53 // --- Retrieve services and tools
54 CHECK ( detStore()->retrieve(m_TRTHelper, "TRT_ID") );
55
56 CHECK ( detStore()->retrieve(m_trtman, "TRT") );
57
58 CHECK ( m_neighbourSvc.retrieve() );
59
60 CHECK ( m_trtcaldbTool.retrieve() );
61
62 CHECK ( m_TRTStrawSummaryTool.retrieve() );
63
64 CHECK( m_driftFunctionTool.retrieve() );
65
66 return StatusCode::SUCCESS;
67}
#define CHECK(...)
Evaluate an expression and check for errors.
const ServiceHandle< StoreGateSvc > & detStore() const

◆ inputHandles()

virtual std::vector< Gaudi::DataHandle * > AthCommonDataStore< AthCommonMsg< Gaudi::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.

◆ isClonable()

virtual bool AthCommonAlgorithm< Gaudi::Algorithm >::isClonable ( ) const
inlineoverridevirtualinherited

Specify if the algorithm is clonable.

Only relevant for non-reentrant algorithms. Actual number of clones needs to be set via the "Cardinality" property.

Reimplemented in AFP_DigiTop, AlgB, AlgT, BCM_Digitization, CscDigitBuilder, CscDigitToCscRDO, G4AtlasAlg, G4RunAlg, HGTD_Digitization, HiveAlgBase, InDet::GNNSeedingTrackMaker, InDet::SCT_Clusterization, InDet::SiSPGNNTrackMaker, InDet::SiSPSeededTrackFinder, InDet::SiTrackerSpacePointFinder, ISF::SimKernelMT, ITk::StripDigitization, ITkPixelCablingAlg, ITkStripCablingAlg, LArHitEMapMaker, LArTTL1Maker, LUCID_DigiTop, LVL1::L1TopoSimulation, MergeCalibHits, MergeGenericMuonSimHitColl, MergeHijingPars, MergeMcEventCollection, MergeTrackRecordCollection, MergeTruthJets, MergeTruthParticles, MuonDigitizer, PileUpMTAlg, PixelDigitization, RoIBResultToxAOD, SCT_ByteStreamErrorsTestAlg, SCT_CablingCondAlgFromCoraCool, SCT_CablingCondAlgFromText, SCT_ConditionsParameterTestAlg, SCT_ConditionsSummaryTestAlg, SCT_ConfigurationConditionsTestAlg, SCT_Digitization, SCT_FlaggedConditionTestAlg, SCT_LinkMaskingTestAlg, SCT_MajorityConditionsTestAlg, SCT_ModuleVetoTestAlg, SCT_MonitorConditionsTestAlg, SCT_PrepDataToxAOD, SCT_RawDataToxAOD, SCT_ReadCalibChipDataTestAlg, SCT_ReadCalibDataTestAlg, SCT_RODVetoTestAlg, SCT_SensorsTestAlg, SCT_SiliconConditionsTestAlg, SCT_StripVetoTestAlg, SCT_TdaqEnabledTestAlg, SCT_TestCablingAlg, SCTEventFlagWriter, SCTRawDataProvider, SCTSiLorentzAngleTestAlg, SCTSiPropertiesTestAlg, SGInputLoader, Simulation::BeamEffectsAlg, TileHitVecToCnt, TileMuonFitter, TilePulseForTileMuonReceiver, TileRawChannelMaker, TRTDigitization, and ZDC_DigiTop.

Definition at line 68 of file AthCommonAlgorithm.h.

68 {
69 return true;
70 }

◆ isReEntrant()

virtual bool AthAlgorithm::isReEntrant ( ) const
inlinefinaloverrideprotectedvirtualinherited

Legacy algorithms are not thread-safe.

Definition at line 47 of file AthAlgorithm.h.

47{ return false; }

◆ msg()

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

Definition at line 24 of file AthCommonMsg.h.

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

◆ msgLvl()

bool AthCommonMsg< Gaudi::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< Gaudi::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< Gaudi::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< Gaudi::Algorithm > >::renounceArray ( SG::VarHandleKeyArray & handlesArray)
inlineprotectedinherited

remove all handles from I/O resolution

Definition at line 364 of file AthCommonDataStore.h.

364 {
366 }

◆ setFilterPassed()

virtual void AthCommonAlgorithm< Gaudi::Algorithm >::setFilterPassed ( bool state,
const EventContext & ctx ) const
inlinevirtualinherited

Set filter decision:

Reimplemented in AthFilterAlgorithm.

Definition at line 99 of file AthCommonAlgorithm.h.

99 {
101 }
virtual void setFilterPassed(bool state, const EventContext &ctx) const
Set filter decision:

◆ sysExecute()

StatusCode AthCommonAlgorithm< Gaudi::Algorithm >::sysExecute ( const EventContext & ctx)
overridevirtualinherited

Execute an algorithm.

We override this in order to work around an issue with the Algorithm base class storing the event context in a member variable that can cause crashes in MT jobs.

Reimplemented in AthAnalysisAlgorithm.

Definition at line 80 of file AthCommonAlgorithm.cxx.

41{
42 return BaseAlg::sysExecute (ctx);
43}

◆ sysInitialize()

StatusCode AthCommonAlgorithm< Gaudi::Algorithm >::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< Gaudi::Algorithm > >.

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

Definition at line 60 of file AthCommonAlgorithm.cxx.

71 {
73
74 if (sc.isFailure()) {
75 return sc;
76 }
77
78 ServiceHandle<ICondSvc> cs("CondSvc",name());
79 for (auto h : outputHandles()) {
80 if (h->isCondition() && h->mode() == Gaudi::DataHandle::Writer) {
81 // do this inside the loop so we don't create the CondSvc until needed
82 if ( cs.retrieve().isFailure() ) {
83 ATH_MSG_WARNING("no CondSvc found: won't autoreg WriteCondHandles");
85 }
86 if (cs->regHandle(this,*h).isFailure()) {
88 ATH_MSG_ERROR("unable to register WriteCondHandle " << h->fullKey()
89 << " with CondSvc");
90 }
91 }
92 }
93 return sc;
94}
virtual StatusCode sysInitialize() override
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override

◆ sysStart()

virtual StatusCode AthCommonDataStore< AthCommonMsg< Gaudi::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< Gaudi::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 }

Member Data Documentation

◆ m_detStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< Gaudi::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< Gaudi::Algorithm > >::m_evtStore
privateinherited

Pointer to StoreGate (event store by default).

Definition at line 390 of file AthCommonDataStore.h.

◆ m_extendedExtraObjects

DataObjIDColl AthCommonAlgorithm< Gaudi::Algorithm >::m_extendedExtraObjects
privateinherited

Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks.

Empty if no symlinks were found.

Definition at line 108 of file AthCommonAlgorithm.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< Gaudi::Algorithm > >::m_varHandleArraysDeclared
privateinherited

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vhka

std::vector<SG::VarHandleKeyArray*> AthCommonDataStore< AthCommonMsg< Gaudi::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: