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

Algorithm to dump some Event data to JSON. More...

#include <DumpEventDataToJsonAlg.h>

Inheritance diagram for DumpEventDataToJsonAlg:

Public Member Functions

 DumpEventDataToJsonAlg (const std::string &name, ISvcLocator *pService)
 Algorithm constructor.
virtual ~DumpEventDataToJsonAlg ()=default
virtual StatusCode initialize () override
 inherited from Algorithm
virtual StatusCode execute (const EventContext &ctx) override
 Execute method.
virtual StatusCode finalize () override
template<>
nlohmann::json getData (const xAOD::Jet &jet)
template<>
nlohmann::json getData (const xAOD::CaloCluster &clust)
template<>
nlohmann::json getData (const CaloCell &cell)
template<>
nlohmann::json getData (const xAOD::TrackParticle &tp)
template<>
nlohmann::json getData (const Trk::Track &track)
template<>
nlohmann::json getData (const xAOD::Muon &muon)
template<>
nlohmann::json getData (const xAOD::TauJet &tauJet)
template<>
nlohmann::json getData (const xAOD::Electron &electron)
template<>
nlohmann::json getData (const xAOD::Photon &photon)
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

void prependTestEvent ()
 Dumps a dummy event with some objects at specific eta/phi coordinates for calibration.
template<class TYPE>
StatusCode getAndFillArrayOfContainers (nlohmann::json &event, const SG::ReadHandleKeyArray< TYPE > &keys, const std::string &jsonType)
template<class TYPE>
StatusCode getAndFillContainer (nlohmann::json &event, const SG::ReadHandleKey< TYPE > &key, const std::string &jsonType)
template<class TYPE>
nlohmann::json getData (const TYPE &object)
nlohmann::json getActsData (const typename ActsTrk::TrackContainer::ConstTrackProxy &track, const Acts::GeometryContext &gctx)
template<class TYPE>
void addLink (const TYPE &link, nlohmann::json &data)
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.

Protected Attributes

SG::ReadHandleKey< xAOD::EventInfom_eventInfoKey {this, "EventInfoKey", "EventInfo", "Key for the Event Info"}
SG::ReadHandleKeyArray< xAOD::TrackParticleContainerm_trackParticleKeys {this, "TrackParticleContainerKeys", {"InDetTrackParticles", "CombinedMuonTrackParticles"}, "Keys for TrackParticle Containers"}
SG::ReadHandleKeyArray< xAOD::JetContainerm_jetKeys {this, "JetContainerKeys", {"AntiKt4EMTopoJets"}, "Keys for Jet Containers"}
SG::ReadHandleKeyArray< xAOD::MuonContainerm_muonKeys {this, "MuonContainerKeys", {"Muons"}, "Keys for Muon Containers"}
SG::ReadHandleKeyArray< xAOD::TauJetContainerm_tauJetKeys {this, "TauJetContainerKeys", {"TauJets"}, "Keys for Tau Containers"}
SG::ReadHandleKeyArray< xAOD::ElectronContainerm_electronKeys {this, "ElectronContainerKeys", {"Electrons"}, "Keys for Electron Containers"}
SG::ReadHandleKeyArray< xAOD::PhotonContainerm_photonKeys {this, "PhotonContainerKeys", {"Photons"}, "Keys for Photon Containers"}
SG::ReadHandleKeyArray< xAOD::CaloClusterContainerm_caloClustersKeys {this, "CaloClusterContainerKeys", {"CaloCalTopoClusters"}, "Keys for CaloClusters Containers"}
SG::ReadHandleKeyArray< CaloCellContainerm_caloCellKey {this, "CaloCellContainerKey", {"AllCalo"}, "Key for CaloCell Container"}
SG::ReadHandleKeyArray< TrackCollectionm_trackCollectionKeys {this, "TrackCollectionKeys", {"CombinedInDetTracks", "CombinedMuonTracks", "MuonSpectrometerTracks"}, "Keys for Track Containers"}
SG::ReadHandleKeyArray< ActsTrk::TrackContainerm_trackContainerKeys {this, "TrackContainerKeys", {"ConvertedTracks"}, "Location of the converted Acts TrackContainer"}
SG::ReadHandleKey< Muon::CscPrepDataContainerm_cscPrepRawDataKey {this, "CscPrepRawDataKey", "CSC_Clusters", "Key for CSC PRD Container"}
SG::ReadHandleKey< Muon::MdtPrepDataContainerm_mdtPrepRawDataKey {this, "MdtPrepRawDataKey", "MDT_DriftCircles", "Key for MDT PRD Container"}
SG::ReadHandleKey< Muon::RpcPrepDataContainerm_rpcPrepRawDataKey {this, "RpcPrepRawDataKey", "RPC_Measurements", "Key for RPC PRD Container"}
SG::ReadHandleKey< Muon::TgcPrepDataContainerm_tgcPrepRawDataKey {this, "TgcPrepRawDataKey", "TGC_MeasurementsAllBCs", "Key for TGC PRD Container"}
SG::ReadHandleKey< Muon::MMPrepDataContainerm_mmPrepRawDataKey {this, "MMPrepRawDataKey", "MM_Measurements", "Key for MM PRD Container"}
SG::ReadHandleKey< Muon::sTgcPrepDataContainerm_stgcPrepRawDataKey {this, "sTgcPrepRawDataKey", "STGC_Measurements", "Key for sTGC PRD Container"}
SG::ReadHandleKey< InDet::PixelClusterContainer > m_pixelPrepRawDataKey {this, "PixelPrepRawDataKey", "PixelClusters", "Key for Pixel PRD Container"}
SG::ReadHandleKey< InDet::SCT_ClusterContainer > m_sctPrepRawDataKey {this, "SctPrepRawDataKey", "SCT_Clusters", "Key for SCT PRD Container"}
SG::ReadHandleKey< InDet::TRT_DriftCircleContainer > m_trtPrepRawDataKey {this, "TrtPrepRawDataKey", "TRT_DriftCircles", "Key for TRT PRD Container"}
ToolHandle< Trk::IExtrapolationEnginem_extrapolator {this, "Extrapolator", "Trk::ExtrapolationEngine/AtlasExtrapolation"}
ActsTrk::GeoContextReadKey_t m_geometryContextKey
Gaudi::Property< std::string > m_outputJSON_Name {this, "OutputLocation", "EventData.json", "Default filename for "}
Gaudi::Property< bool > m_dumpTestEvent {this, "DumpTestEvent", false, "If true, prepend a test event with some calibration data in it."}
Gaudi::Property< bool > m_physlite {this, "PHYSLITE", false, "If true, do not try to access data which is not available in PHYSLITE files."}
nlohmann::json m_eventData

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

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

Algorithm to dump some Event data to JSON.

Definition at line 48 of file DumpEventDataToJsonAlg.h.

Member Typedef Documentation

◆ StoreGateSvc_t

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

Definition at line 388 of file AthCommonDataStore.h.

Constructor & Destructor Documentation

◆ DumpEventDataToJsonAlg()

DumpEventDataToJsonAlg::DumpEventDataToJsonAlg ( const std::string & name,
ISvcLocator * pService )

Algorithm constructor.

Definition at line 30 of file DumpEventDataToJsonAlg.cxx.

32 : AthAlgorithm(name, pSvcLocator) {}
AthAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Constructor.

◆ ~DumpEventDataToJsonAlg()

virtual DumpEventDataToJsonAlg::~DumpEventDataToJsonAlg ( )
virtualdefault

Member Function Documentation

◆ addLink()

template<class TYPE>
void DumpEventDataToJsonAlg::addLink ( const TYPE & link,
nlohmann::json & data )
protected

Definition at line 487 of file DumpEventDataToJsonAlg.cxx.

487 {
488 if (link.isValid()) {
489 data.push_back(link.dataID() + ":" + std::to_string(link.index()));
490 }
491}
pointer & link(pointer p) const
Return a reference to the link for an element.

◆ 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 DumpEventDataToJsonAlg::execute ( const EventContext & ctx)
overridevirtual

Execute method.

Implements AthAlgorithm.

Definition at line 126 of file DumpEventDataToJsonAlg.cxx.

126 {
127 SG::ReadHandle<xAOD::EventInfo> eventInfo(m_eventInfoKey, ctx);
128 if (!eventInfo.isValid()) {
129 ATH_MSG_WARNING("Did not find xAOD::EventInfo at " << m_eventInfoKey);
130 return StatusCode::SUCCESS;
131 }
132
133 if (m_dumpTestEvent) {
135 m_dumpTestEvent = false;
136 }
137
138 ATH_MSG_VERBOSE("Run num :" << eventInfo->runNumber()
139 << " Event num: " << eventInfo->eventNumber());
140
141 nlohmann::json j;
142 j["event number"] = eventInfo->eventNumber();
143 j["run number"] = eventInfo->runNumber();
144
154
155 // ACTS
156 if (!m_geometryContextKey.empty()){
157 auto tcHandles = m_trackContainerKeys.makeHandles(ctx);
158 const ActsTrk::GeometryContext* gctx{};
160
161 for ( SG::ReadHandle<ActsTrk::TrackContainer>& tcHandle: tcHandles ) {
162 // Temporary debugging information
163 ATH_MSG_VERBOSE("TrackStateContainer has "<< tcHandle->size() << " elements");
164
165 ATH_MSG_VERBOSE("Trying to load " << tcHandle.key() << " with " << tcHandle->size() << " tracks");
166 const ActsTrk::TrackContainer* tc = tcHandle.get();
167 for (auto track : *tc) {
168 nlohmann::json tmp = getActsData(track, gctx->context());
169 j["TrackContainers"][tcHandle.key()].push_back(tmp);
170 }
171 }
172 }
173
174 // hits
183 // ATH_CHECK(getAndFillContainer(j, m_trtPrepRawDataKey, "Hits")); // Need
184 // specialisation. TODO.
185
186 // For the moment the label is just the event/run number again, but can be
187 // manually overwritten in the output file
188 std::string label = std::to_string(eventInfo->eventNumber()) + "/" +
189 std::to_string(eventInfo->runNumber());
191
192 return StatusCode::SUCCESS;
193}
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_VERBOSE(x)
#define ATH_MSG_WARNING(x)
static Double_t tc
Acts::GeometryContext context() const
SG::ReadHandleKeyArray< xAOD::TauJetContainer > m_tauJetKeys
SG::ReadHandleKey< Muon::MdtPrepDataContainer > m_mdtPrepRawDataKey
SG::ReadHandleKey< xAOD::EventInfo > m_eventInfoKey
SG::ReadHandleKeyArray< xAOD::CaloClusterContainer > m_caloClustersKeys
SG::ReadHandleKeyArray< xAOD::TrackParticleContainer > m_trackParticleKeys
SG::ReadHandleKey< Muon::MMPrepDataContainer > m_mmPrepRawDataKey
SG::ReadHandleKey< Muon::TgcPrepDataContainer > m_tgcPrepRawDataKey
Gaudi::Property< bool > m_dumpTestEvent
SG::ReadHandleKey< InDet::PixelClusterContainer > m_pixelPrepRawDataKey
SG::ReadHandleKeyArray< xAOD::PhotonContainer > m_photonKeys
StatusCode getAndFillContainer(nlohmann::json &event, const SG::ReadHandleKey< TYPE > &key, const std::string &jsonType)
SG::ReadHandleKeyArray< xAOD::MuonContainer > m_muonKeys
SG::ReadHandleKeyArray< ActsTrk::TrackContainer > m_trackContainerKeys
SG::ReadHandleKeyArray< TrackCollection > m_trackCollectionKeys
SG::ReadHandleKeyArray< xAOD::ElectronContainer > m_electronKeys
void prependTestEvent()
Dumps a dummy event with some objects at specific eta/phi coordinates for calibration.
SG::ReadHandleKey< Muon::CscPrepDataContainer > m_cscPrepRawDataKey
ActsTrk::GeoContextReadKey_t m_geometryContextKey
StatusCode getAndFillArrayOfContainers(nlohmann::json &event, const SG::ReadHandleKeyArray< TYPE > &keys, const std::string &jsonType)
SG::ReadHandleKeyArray< CaloCellContainer > m_caloCellKey
SG::ReadHandleKeyArray< xAOD::JetContainer > m_jetKeys
nlohmann::json getActsData(const typename ActsTrk::TrackContainer::ConstTrackProxy &track, const Acts::GeometryContext &gctx)
SG::ReadHandleKey< Muon::sTgcPrepDataContainer > m_stgcPrepRawDataKey
SG::ReadHandleKey< Muon::RpcPrepDataContainer > m_rpcPrepRawDataKey
SG::ReadHandleKey< InDet::SCT_ClusterContainer > m_sctPrepRawDataKey
std::string label(const std::string &format, int i)
Definition label.h:19
const T * get(const ReadCondHandleKey< T > &key, const EventContext &ctx)
Convenience function to retrieve an object given a ReadCondHandleKey.
float j(const xAOD::IParticle &, const xAOD::TrackMeasurementValidation &hit, const Eigen::Matrix3d &jab_inv)

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

Definition at line 493 of file DumpEventDataToJsonAlg.cxx.

493 {
494 std::ofstream outputFile(m_outputJSON_Name);
495 if (!outputFile.is_open()) {
496 ATH_MSG_WARNING("Unable to open " << m_outputJSON_Name << " for writing.");
497 return StatusCode::FAILURE;
498 }
500 return StatusCode::SUCCESS;
501}
Gaudi::Property< std::string > m_outputJSON_Name

◆ getActsData()

nlohmann::json DumpEventDataToJsonAlg::getActsData ( const typename ActsTrk::TrackContainer::ConstTrackProxy & track,
const Acts::GeometryContext & gctx )
protected

Definition at line 70 of file DumpEventDataToJsonAlg.cxx.

71 {
72 nlohmann::json data;
73
74 // ACTS units are GeV, whilst ATLAS is MeV. So we need to convert.
75 data["dparams"] = {track.loc0(), track.loc1(), track.phi(), track.theta(), track.qOverP() * 0.001};
76 ATH_MSG_VERBOSE(" Track has dparams"<<data["dparams"][0]<<", "<<data["dparams"][1]<<", "<<data["dparams"][2]<<", "<<data["dparams"][3]<<", "<<data["dparams"][4]);
77 ATH_MSG_VERBOSE(track.referenceSurface().toString(gctx));
78
79 // Add dparams positions to the output
80 const Acts::BoundTrackParameters trackparams(track.referenceSurface().getSharedPtr(),
81 track.parameters(), std::nullopt, Acts::ParticleHypothesis::pion());
82 auto trackPosition = trackparams.position(gctx);;
83 data["pos"].push_back(trackPosition.x());
84 data["pos"].push_back(trackPosition.y());
85 data["pos"].push_back(trackPosition.z());
86
87 unsigned int nTrackStates = track.nTrackStates();
88 ATH_MSG_VERBOSE("Track has " << nTrackStates << " states.");
89 // Unfortunately actsTracks are stored in reverse order, so we need to do some gymnastics
90 // (There is certainly a more elegant way to do this, but since this will all be changed soon I don't think it matters)
91 std::vector<typename ActsTrk::TrackContainer::ConstTrackStateProxy> trackStates;
92 trackStates.reserve(nTrackStates);
93 for (auto trackstate : track.trackStatesReversed()) {
94 trackStates.push_back(trackstate);
95 }
96
97 std::reverse(trackStates.begin(), trackStates.end());
98
99 unsigned int count = 0;
100 for (auto trackstate : trackStates) {
101 // Currently only converting smoothed states, but we will extend this later.
102 if (trackstate.hasSmoothed() && trackstate.hasReferenceSurface()) {
103 const Acts::BoundTrackParameters params(trackstate.referenceSurface().getSharedPtr(),
104 trackstate.smoothed(),
105 trackstate.smoothedCovariance(),
106 Acts::ParticleHypothesis::pion());
107 ATH_MSG_VERBOSE("Track parameters: "<<params.parameters());
108
109 auto pos = params.position(gctx);
110 data["pos"].push_back(pos.x());
111 data["pos"].push_back(pos.y());
112 data["pos"].push_back(pos.z());
113 ATH_MSG_VERBOSE("TrackState "<<count<<" has smoothed state and reference surface. Position is "<<pos.x()<<", "<<pos.y()<<", "<<pos.z());
114 ATH_MSG_VERBOSE(params.referenceSurface().toString(gctx));
115 ATH_MSG_VERBOSE("GeometryId "<<params.referenceSurface().geometryId().value());
116 } else {
117 ATH_MSG_WARNING("TrackState "<<count<<" does not have smoothed state ["<<trackstate.hasSmoothed()<<"] or reference surface ["<<trackstate.hasReferenceSurface()<<"]. Skipping.");
118 }
119 // TODO: Add measurements etc
120 count++;
121 }
122
123 return data;
124}
int count(std::string s, const std::string &regx)
count how many occurances of a regx are in a string
Definition hcg.cxx:148
void reverse(typename DataModel_detail::iterator< DVL > beg, typename DataModel_detail::iterator< DVL > end)
Specialization of reverse for DataVector/List.

◆ getAndFillArrayOfContainers()

template<class TYPE>
StatusCode DumpEventDataToJsonAlg::getAndFillArrayOfContainers ( nlohmann::json & event,
const SG::ReadHandleKeyArray< TYPE > & keys,
const std::string & jsonType )
protected

Definition at line 255 of file DumpEventDataToJsonAlg.cxx.

257 {
258 for (SG::ReadHandle<TYPE> handle : keys.makeHandles()) {
259 ATH_MSG_VERBOSE("Trying to load " << handle.key());
260 ATH_CHECK(handle.isValid());
261 ATH_MSG_VERBOSE("Got back " << handle->size());
262
263 for (auto object : *handle) {
264 nlohmann::json tmp = getData(*object);
265 event[jsonType][handle.key()].push_back(tmp);
266 }
267 }
268 return StatusCode::SUCCESS;
269}
nlohmann::json getData(const TYPE &object)
virtual void handle(const Incident &inc)
Handle end of run incidents to save the metadata at that point.

◆ getAndFillContainer()

template<class TYPE>
StatusCode DumpEventDataToJsonAlg::getAndFillContainer ( nlohmann::json & event,
const SG::ReadHandleKey< TYPE > & key,
const std::string & jsonType )
protected

Definition at line 504 of file DumpEventDataToJsonAlg.cxx.

506 {
507 if (key.empty()) {
508 return StatusCode::SUCCESS;
509 }
510 SG::ReadHandle<TYPE> handle(key);
511
512 ATH_MSG_VERBOSE("Trying to load " << handle.key());
513 ATH_CHECK(handle.isValid());
514 ATH_MSG_VERBOSE("Which has " << handle->numberOfCollections()
515 << " collections: ");
516
517 nlohmann::json tmp = getData(*handle);
518 if (!tmp.is_null()) {
519 ATH_MSG_VERBOSE("Writing " << jsonType << " : " << handle.key() << " with"
520 << tmp.size() << " elements:");
521 event[jsonType][handle.key()] = tmp;
522 }
523 return StatusCode::SUCCESS;
524}

◆ getData() [1/10]

template<>
nlohmann::json DumpEventDataToJsonAlg::getData ( const CaloCell & cell)

Definition at line 295 of file DumpEventDataToJsonAlg.cxx.

295 {
296 nlohmann::json data;
297 data["phi"] = cell.phi();
298 data["eta"] = cell.eta();
299 data["energy"] = cell.e();
300 // data["etaSize"] = clust.getClusterEtaSize(); // empty
301 // data["phiSize"] = clust.getClusterPhiSize(); // empty
302 return data;
303}

◆ getData() [2/10]

template<>
nlohmann::json DumpEventDataToJsonAlg::getData ( const Trk::Track & track)

Definition at line 373 of file DumpEventDataToJsonAlg.cxx.

373 {
374 nlohmann::json data;
375 const Trk::FitQuality *quality = track.fitQuality();
376
377 data["chi2"] = (quality ? quality->chiSquared() : 0.0);
378 data["dof"] = (quality ? quality->doubleNumberDoF() : 0.0);
379
380 const Trk::Perigee *peri = track.perigeeParameters();
381 if (peri) {
382 data["dparams"] = {peri->parameters()[Trk::d0], peri->parameters()[Trk::z0],
383 peri->parameters()[Trk::phi0],
384 peri->parameters()[Trk::theta],
385 peri->parameters()[Trk::qOverP]};
386
387 } else {
388 data["pos"] = {};
389 }
390
391 const DataVector<const Trk::TrackParameters> *parameters =
392 track.trackParameters();
393 if (parameters) {
394 for (const Trk::TrackParameters *param : *parameters) {
395 data["pos"].push_back(param->position().x());
396 data["pos"].push_back(param->position().y());
397 data["pos"].push_back(param->position().z());
398 }
399 } else {
400 const DataVector<const Trk::MeasurementBase> *measurements =
401 track.measurementsOnTrack();
402 if (measurements) {
403 for (const Trk::MeasurementBase *meas : *measurements) {
404 data["pos"].push_back(meas->globalPosition().x());
405 data["pos"].push_back(meas->globalPosition().y());
406 data["pos"].push_back(meas->globalPosition().z());
407 }
408 }
409 }
410
411 return data;
412}
double chiSquared() const
returns the of the overall track fit
Definition FitQuality.h:56
double doubleNumberDoF() const
returns the number of degrees of freedom of the overall track or vertex fit as double
Definition FitQuality.h:68
ParametersT< TrackParametersDim, Charged, PerigeeSurface > Perigee
@ phi0
Definition ParamDefs.h:65
@ theta
Definition ParamDefs.h:66
@ qOverP
perigee
Definition ParamDefs.h:67
@ d0
Definition ParamDefs.h:63
@ z0
Definition ParamDefs.h:64
ParametersBase< TrackParametersDim, Charged > TrackParameters

◆ getData() [3/10]

template<class TYPE>
nlohmann::json DumpEventDataToJsonAlg::getData ( const TYPE & object)
protected

Definition at line 528 of file DumpEventDataToJsonAlg.cxx.

528 {
529
530 nlohmann::json colldata = {};
531 for (const auto &coll : container) {
532 for (const auto &prd : *coll) {
533 nlohmann::json data;
534 data["pos"] = {prd->globalPosition().x(), prd->globalPosition().y(),
535 prd->globalPosition().z()};
536 Identifier id = prd->identify();
537 data["id"] = id.get_compact();
538 colldata.push_back(data);
539 }
540 }
541
542 return colldata;
543}

◆ getData() [4/10]

template<>
nlohmann::json DumpEventDataToJsonAlg::getData ( const xAOD::CaloCluster & clust)

Definition at line 283 of file DumpEventDataToJsonAlg.cxx.

283 {
284 nlohmann::json data;
285 data["phi"] = clust.phi();
286 data["eta"] = clust.eta();
287 data["energy"] = clust.e();
288 // data["etaSize"] = clust.getClusterEtaSize(); // empty
289 // data["phiSize"] = clust.getClusterPhiSize(); // empty
290 return data;
291}
virtual double eta() const
The pseudorapidity ( ) of the particle.
virtual double e() const
The total energy of the particle.
virtual double phi() const
The azimuthal angle ( ) of the particle.

◆ getData() [5/10]

template<>
nlohmann::json DumpEventDataToJsonAlg::getData ( const xAOD::Electron & electron)

Definition at line 463 of file DumpEventDataToJsonAlg.cxx.

463 {
464 nlohmann::json data;
465 data["phi"] = electron.phi();
466 data["eta"] = electron.eta();
467 data["energy"] = electron.e();
468 addLink(electron.caloClusterLink(), data["LinkedClusters"]);
469 addLink(electron.trackParticleLink(), data["LinkedTracks"]);
470
471 return data;
472}
void addLink(const TYPE &link, nlohmann::json &data)

◆ getData() [6/10]

template<>
nlohmann::json DumpEventDataToJsonAlg::getData ( const xAOD::Jet & jet)

Definition at line 273 of file DumpEventDataToJsonAlg.cxx.

273 {
274 nlohmann::json data;
275 data["phi"] = jet.phi();
276 data["eta"] = jet.eta();
277 data["energy"] = jet.e();
278 return data;
279}
virtual double phi() const
The azimuthal angle ( ) of the particle.
Definition Jet_v1.cxx:54
virtual double eta() const
The pseudorapidity ( ) of the particle.
Definition Jet_v1.cxx:49
virtual double e() const
The total energy of the particle.
Definition Jet_v1.cxx:63

◆ getData() [7/10]

template<>
nlohmann::json DumpEventDataToJsonAlg::getData ( const xAOD::Muon & muon)

Definition at line 416 of file DumpEventDataToJsonAlg.cxx.

416 {
417 nlohmann::json data;
418 data["Phi"] = muon.phi();
419 data["Eta"] = muon.eta();
420
421 data["Quality"] = muon.toString(muon.quality());
422 data["Type"] = muon.toString(muon.muonType());
423
424 ElementLink<xAOD::CaloClusterContainer> clusterLink{};
425 if (const xAOD::CaloCluster* cluster = muon.cluster(); cluster != nullptr) {
426 clusterLink = {static_cast<const xAOD::CaloClusterContainer&>(*cluster->container()),
427 cluster->index()};
428 }
429 addLink(clusterLink, data["LinkedClusters"]);
430
431 using Track_t = xAOD::Muon::TrackParticleType;
432 using Link_t = ElementLink<xAOD::TrackParticleContainer>;
433 auto makeMuonLink = [&muon](const Track_t tType) -> Link_t {
434 const xAOD::TrackParticle* trk = muon.trackParticle(tType);
435 if (!trk) {
436 return Link_t{};
437 }
438 return Link_t{static_cast<const xAOD::TrackParticleContainer&>(*trk->container()),
439 trk->index()};
440 };
441
442
443 addLink(makeMuonLink(Track_t::InnerDetectorTrackParticle), data["LinkedTracks"]);
444 addLink(makeMuonLink(Track_t::MuonSpectrometerTrackParticle), data["LinkedTracks"]);
445 addLink(makeMuonLink(Track_t::ExtrapolatedMuonSpectrometerTrackParticle),
446 data["LinkedTracks"]);
447
448 return data;
449}
ElementLink< xAOD::TruthParticleContainer > Link_t
CaloCluster_v1 CaloCluster
Define the latest version of the calorimeter cluster class.
TrackParticle_v1 TrackParticle
Reference the current persistent version:
TrackParticleContainer_v1 TrackParticleContainer
Definition of the current "TrackParticle container version".
CaloClusterContainer_v1 CaloClusterContainer
Define the latest version of the calorimeter cluster container.

◆ getData() [8/10]

template<>
nlohmann::json DumpEventDataToJsonAlg::getData ( const xAOD::Photon & photon)

Definition at line 476 of file DumpEventDataToJsonAlg.cxx.

476 {
477 nlohmann::json data;
478 data["phi"] = photon.phi();
479 data["eta"] = photon.eta();
480 data["energy"] = photon.e();
481 addLink(photon.caloClusterLink(), data["LinkedClusters"]);
482
483 return data;
484}

◆ getData() [9/10]

template<>
nlohmann::json DumpEventDataToJsonAlg::getData ( const xAOD::TauJet & tauJet)

Definition at line 453 of file DumpEventDataToJsonAlg.cxx.

453 {
454 nlohmann::json data;
455 data["phi"] = tauJet.phi();
456 data["eta"] = tauJet.eta();
457 data["energy"] = tauJet.e();
458 return data;
459}
virtual double phi() const
The azimuthal angle ( ) of the particle.
virtual double e() const
The total energy of the particle.
Definition TauJet_v3.cxx:87
virtual double eta() const
The pseudorapidity ( ) of the particle.

◆ getData() [10/10]

template<>
nlohmann::json DumpEventDataToJsonAlg::getData ( const xAOD::TrackParticle & tp)

Definition at line 307 of file DumpEventDataToJsonAlg.cxx.

307 {
308 nlohmann::json data;
309 data["chi2"] = tp.chiSquared();
310 data["dof"] = tp.numberDoF();
311 data["dparams"] = {tp.d0(), tp.z0(), tp.phi0(), tp.theta(), tp.qOverP()};
312
313 if (m_physlite) {
314 ATH_MSG_VERBOSE("Physlite mode enabled. Not adding track parameters.");
315 return data;
316 }
317
318 if (m_extrapolator.empty()) {
319 data["pos"] = {tp.perigeeParameters().position().x(),
320 tp.perigeeParameters().position().y(),
321 tp.perigeeParameters().position().z()};
322 for (unsigned int i = 0; i < tp.numberOfParameters(); ++i) {
323 data["pos"].push_back(tp.parameterX(i));
324 data["pos"].push_back(tp.parameterY(i));
325 data["pos"].push_back(tp.parameterZ(i));
326 }
327 } else {
328 std::vector<Amg::Vector3D> positions;
329 const Trk::Perigee &peri = tp.perigeeParameters();
330 positions.push_back(Amg::Vector3D(peri.position().x(), peri.position().y(),
331 peri.position().z()));
332
333 Trk::CurvilinearParameters startParameters(peri.position(), peri.momentum(),
334 peri.charge());
335 Trk::ExtrapolationCell<Trk::TrackParameters> ecc(startParameters);
336 ecc.addConfigurationMode(Trk::ExtrapolationMode::StopAtBoundary);
337 ecc.addConfigurationMode(Trk::ExtrapolationMode::CollectPassive);
338 ecc.addConfigurationMode(Trk::ExtrapolationMode::CollectSensitive);
339 Trk::ExtrapolationCode eCode = m_extrapolator->extrapolate(ecc);
340 if (eCode.isSuccess()) {
341 // loop over the collected information
342 for (auto &es : ecc.extrapolationSteps) {
343
344 // continue if we have parameters
345 const Trk::TrackParameters *parameters = es.parameters;
346 if (parameters) {
347 Amg::Vector3D pos = parameters->position();
348 positions.push_back(pos);
349 delete parameters;
350 }
351 }
352 positions.push_back(ecc.endParameters->position());
353
354 // Now add the positions to the output
355 for (auto pos : positions) {
356 data["pos"].push_back(pos.x());
357 data["pos"].push_back(pos.y());
358 data["pos"].push_back(pos.z());
359 }
360
361 } else {
363 "Failure in extrapolation for Track with start parameters "
364 << startParameters);
365 }
366 }
367
368 return data;
369}
Gaudi::Property< bool > m_physlite
ToolHandle< Trk::IExtrapolationEngine > m_extrapolator
bool isSuccess() const
return success
const Amg::Vector3D & momentum() const
Access method for the momentum.
const Amg::Vector3D & position() const
Access method for the position.
double charge() const
Returns the charge.
float z0() const
Returns the parameter.
float theta() const
Returns the parameter, which has range 0 to .
float numberDoF() const
Returns the number of degrees of freedom of the overall track or vertex fit as float.
const Trk::Perigee & perigeeParameters() const
Returns the Trk::MeasuredPerigee track parameters.
float parameterX(unsigned int index) const
Returns the parameter x position, for 'index'.
float parameterZ(unsigned int index) const
Returns the parameter z position, for 'index'.
float d0() const
Returns the parameter.
size_t numberOfParameters() const
Returns the number of additional parameters stored in the TrackParticle.
float qOverP() const
Returns the parameter.
float parameterY(unsigned int index) const
Returns the parameter y position, for 'index'.
float chiSquared() const
Returns the of the overall track fit.
float phi0() const
Returns the parameter, which has range to .
Eigen::Matrix< double, 3, 1 > Vector3D
CurvilinearParametersT< TrackParametersDim, Charged, PlaneSurface > CurvilinearParameters

◆ initialize()

StatusCode DumpEventDataToJsonAlg::initialize ( )
overridevirtual

inherited from Algorithm

Definition at line 34 of file DumpEventDataToJsonAlg.cxx.

34 {
35 ATH_CHECK(m_eventInfoKey.initialize());
37 ATH_CHECK(m_jetKeys.initialize(!m_jetKeys.empty()));
39 ATH_CHECK(m_caloCellKey.initialize(!m_caloCellKey.empty()));
40 ATH_CHECK(m_muonKeys.initialize(!m_muonKeys.empty()));
41 ATH_CHECK(m_tauJetKeys.initialize(!m_tauJetKeys.empty()));
42 ATH_CHECK(m_electronKeys.initialize(!m_electronKeys.empty()));
43 ATH_CHECK(m_photonKeys.initialize(!m_photonKeys.empty()));
45
46 // ACTS
47 ATH_CHECK(m_trackContainerKeys.initialize());
57
58 ATH_CHECK(m_extrapolator.retrieve( DisableTool{m_extrapolator.empty()} ));
59 if (m_extrapolator.empty()) {
60 ATH_MSG_WARNING("No extrapolator found. Will not be able to extrapolate tracks.");
61 } else {
62 ATH_MSG_INFO("Extrapolator found. Will be able to extrapolate tracks.");
63 }
64
66
67 return StatusCode::SUCCESS;
68}
#define ATH_MSG_INFO(x)
SG::ReadHandleKey< InDet::TRT_DriftCircleContainer > m_trtPrepRawDataKey

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

◆ prependTestEvent()

void DumpEventDataToJsonAlg::prependTestEvent ( )
protected

Dumps a dummy event with some objects at specific eta/phi coordinates for calibration.

Definition at line 195 of file DumpEventDataToJsonAlg.cxx.

195 {
196 ATH_MSG_VERBOSE("Prepending a test event.");
197 nlohmann::json j;
198
199 // FIXME - this
200 auto writeEtaPhiLabel = [](float eta, float phi) {
201 return std::to_string(eta) + "/" + std::to_string(phi);
202 };
203
204 j["event number"] = 999;
205 j["run number"] = 999;
206
207 // Here we want to draw some tracks at predefined positons
208 unsigned int maxSteps = 3;
209 Amg::Vector3D trackPos;
210 float phi, eta;
211 for (unsigned int nPhi = 0; nPhi < maxSteps; ++nPhi) {
212 phi = static_cast<float>(nPhi) / static_cast<float>(maxSteps) *
213 M_PI; // Want to range from 0 to M_PI
214 for (unsigned int nEta = 0; nEta < maxSteps; ++nEta) {
215 eta = static_cast<float>(nEta) / static_cast<float>(maxSteps) *
216 3.0; // Want to range from 0 to 3.0
217
218 // Create a calo cluster at each value
219 nlohmann::json cluster;
220 cluster["phi"] = phi;
221 cluster["eta"] = eta;
222 cluster["energy"] = 999.9;
223 cluster["label"] = writeEtaPhiLabel(eta, phi);
224
225 j["CaloClusters"]["TestClusters"].push_back(cluster);
226
227 // create a jet at each value
228 nlohmann::json jet;
229 jet["phi"] = phi;
230 jet["eta"] = eta;
231 jet["energy"] = 99999.9;
232 jet["label"] = writeEtaPhiLabel(eta, phi);
233 j["Jets"]["TestJets"].push_back(jet);
234
235 nlohmann::json track;
236 track["chi2"] = 0.0;
237 track["dof"] = 0.0;
238
239 double theta = 2 * std::atan(std::exp(-eta));
240 // d0, z0, phi, theta, qOverP
241 track["dparams"] = {0.0, 0.0, phi, theta, 0.0};
242 // Add three positions (less than this might not count as a)
243 for (unsigned int i = 0; i < 4; ++i) {
244 Amg::setRThetaPhi(trackPos, i * 1000., theta, phi);
245 track["pos"].push_back({trackPos.x(), trackPos.y(), trackPos.z()});
246 }
247 track["label"] = writeEtaPhiLabel(eta, phi);
248 j["Tracks"]["TestTracks"].push_back(track);
249 }
250 }
251 m_eventData["Test"] = j;
252}
#define M_PI
Scalar eta() const
pseudorapidity method
Scalar phi() const
phi method
Scalar theta() const
theta method
void setRThetaPhi(Amg::Vector3D &v, double r, double theta, double phi)
sets radius, the theta and phi angle of a vector.
constexpr int nEta
Default bin number of eta for vertex map.
constexpr int nPhi
Default bin number of phi for vertex map.

◆ 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}
#define ATH_MSG_ERROR(x)
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_caloCellKey

SG::ReadHandleKeyArray<CaloCellContainer> DumpEventDataToJsonAlg::m_caloCellKey {this, "CaloCellContainerKey", {"AllCalo"}, "Key for CaloCell Container"}
protected

Definition at line 98 of file DumpEventDataToJsonAlg.h.

98{this, "CaloCellContainerKey", {"AllCalo"}, "Key for CaloCell Container"};

◆ m_caloClustersKeys

SG::ReadHandleKeyArray<xAOD::CaloClusterContainer> DumpEventDataToJsonAlg::m_caloClustersKeys {this, "CaloClusterContainerKeys", {"CaloCalTopoClusters"}, "Keys for CaloClusters Containers"}
protected

Definition at line 96 of file DumpEventDataToJsonAlg.h.

96{this, "CaloClusterContainerKeys", {"CaloCalTopoClusters"}, "Keys for CaloClusters Containers"};

◆ m_cscPrepRawDataKey

SG::ReadHandleKey<Muon::CscPrepDataContainer> DumpEventDataToJsonAlg::m_cscPrepRawDataKey {this, "CscPrepRawDataKey", "CSC_Clusters", "Key for CSC PRD Container"}
protected

Definition at line 105 of file DumpEventDataToJsonAlg.h.

105{this, "CscPrepRawDataKey", "CSC_Clusters", "Key for CSC PRD Container"};

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

Gaudi::Property<bool> DumpEventDataToJsonAlg::m_dumpTestEvent {this, "DumpTestEvent", false, "If true, prepend a test event with some calibration data in it."}
protected

Definition at line 122 of file DumpEventDataToJsonAlg.h.

122{this, "DumpTestEvent", false, "If true, prepend a test event with some calibration data in it."};

◆ m_electronKeys

SG::ReadHandleKeyArray<xAOD::ElectronContainer> DumpEventDataToJsonAlg::m_electronKeys {this, "ElectronContainerKeys", {"Electrons"}, "Keys for Electron Containers"}
protected

Definition at line 92 of file DumpEventDataToJsonAlg.h.

92{this, "ElectronContainerKeys", {"Electrons"}, "Keys for Electron Containers"};

◆ m_eventData

nlohmann::json DumpEventDataToJsonAlg::m_eventData
protected

Definition at line 125 of file DumpEventDataToJsonAlg.h.

◆ m_eventInfoKey

SG::ReadHandleKey<xAOD::EventInfo> DumpEventDataToJsonAlg::m_eventInfoKey {this, "EventInfoKey", "EventInfo", "Key for the Event Info"}
protected

Definition at line 82 of file DumpEventDataToJsonAlg.h.

82{this, "EventInfoKey", "EventInfo", "Key for the Event Info"};

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

ToolHandle<Trk::IExtrapolationEngine> DumpEventDataToJsonAlg::m_extrapolator {this, "Extrapolator", "Trk::ExtrapolationEngine/AtlasExtrapolation"}
protected

Definition at line 115 of file DumpEventDataToJsonAlg.h.

115{this, "Extrapolator", "Trk::ExtrapolationEngine/AtlasExtrapolation"};

◆ m_geometryContextKey

ActsTrk::GeoContextReadKey_t DumpEventDataToJsonAlg::m_geometryContextKey
protected
Initial value:
{
this, "ActsAlignmentKey", "ActsAlignment", "cond read key for the alignment"}

Definition at line 117 of file DumpEventDataToJsonAlg.h.

117 {
118 this, "ActsAlignmentKey", "ActsAlignment", "cond read key for the alignment"};

◆ m_jetKeys

SG::ReadHandleKeyArray<xAOD::JetContainer> DumpEventDataToJsonAlg::m_jetKeys {this, "JetContainerKeys", {"AntiKt4EMTopoJets"}, "Keys for Jet Containers"}
protected

Definition at line 86 of file DumpEventDataToJsonAlg.h.

86{this, "JetContainerKeys", {"AntiKt4EMTopoJets"}, "Keys for Jet Containers"};

◆ m_mdtPrepRawDataKey

SG::ReadHandleKey<Muon::MdtPrepDataContainer> DumpEventDataToJsonAlg::m_mdtPrepRawDataKey {this, "MdtPrepRawDataKey", "MDT_DriftCircles", "Key for MDT PRD Container"}
protected

Definition at line 106 of file DumpEventDataToJsonAlg.h.

106{this, "MdtPrepRawDataKey", "MDT_DriftCircles", "Key for MDT PRD Container"};

◆ m_mmPrepRawDataKey

SG::ReadHandleKey<Muon::MMPrepDataContainer> DumpEventDataToJsonAlg::m_mmPrepRawDataKey {this, "MMPrepRawDataKey", "MM_Measurements", "Key for MM PRD Container"}
protected

Definition at line 109 of file DumpEventDataToJsonAlg.h.

109{this, "MMPrepRawDataKey", "MM_Measurements", "Key for MM PRD Container"};

◆ m_muonKeys

SG::ReadHandleKeyArray<xAOD::MuonContainer> DumpEventDataToJsonAlg::m_muonKeys {this, "MuonContainerKeys", {"Muons"}, "Keys for Muon Containers"}
protected

Definition at line 88 of file DumpEventDataToJsonAlg.h.

88{this, "MuonContainerKeys", {"Muons"}, "Keys for Muon Containers"};

◆ m_outputJSON_Name

Gaudi::Property<std::string> DumpEventDataToJsonAlg::m_outputJSON_Name {this, "OutputLocation", "EventData.json", "Default filename for "}
protected

Definition at line 120 of file DumpEventDataToJsonAlg.h.

120{this, "OutputLocation", "EventData.json", "Default filename for "};

◆ m_photonKeys

SG::ReadHandleKeyArray<xAOD::PhotonContainer> DumpEventDataToJsonAlg::m_photonKeys {this, "PhotonContainerKeys", {"Photons"}, "Keys for Photon Containers"}
protected

Definition at line 94 of file DumpEventDataToJsonAlg.h.

94{this, "PhotonContainerKeys", {"Photons"}, "Keys for Photon Containers"};

◆ m_physlite

Gaudi::Property<bool> DumpEventDataToJsonAlg::m_physlite {this, "PHYSLITE", false, "If true, do not try to access data which is not available in PHYSLITE files."}
protected

Definition at line 123 of file DumpEventDataToJsonAlg.h.

123{this, "PHYSLITE", false, "If true, do not try to access data which is not available in PHYSLITE files."};

◆ m_pixelPrepRawDataKey

SG::ReadHandleKey<InDet::PixelClusterContainer> DumpEventDataToJsonAlg::m_pixelPrepRawDataKey {this, "PixelPrepRawDataKey", "PixelClusters", "Key for Pixel PRD Container"}
protected

Definition at line 111 of file DumpEventDataToJsonAlg.h.

111{this, "PixelPrepRawDataKey", "PixelClusters", "Key for Pixel PRD Container"};

◆ m_rpcPrepRawDataKey

SG::ReadHandleKey<Muon::RpcPrepDataContainer> DumpEventDataToJsonAlg::m_rpcPrepRawDataKey {this, "RpcPrepRawDataKey", "RPC_Measurements", "Key for RPC PRD Container"}
protected

Definition at line 107 of file DumpEventDataToJsonAlg.h.

107{this, "RpcPrepRawDataKey", "RPC_Measurements", "Key for RPC PRD Container"};

◆ m_sctPrepRawDataKey

SG::ReadHandleKey<InDet::SCT_ClusterContainer> DumpEventDataToJsonAlg::m_sctPrepRawDataKey {this, "SctPrepRawDataKey", "SCT_Clusters", "Key for SCT PRD Container"}
protected

Definition at line 112 of file DumpEventDataToJsonAlg.h.

112{this, "SctPrepRawDataKey", "SCT_Clusters", "Key for SCT PRD Container"};

◆ m_stgcPrepRawDataKey

SG::ReadHandleKey<Muon::sTgcPrepDataContainer> DumpEventDataToJsonAlg::m_stgcPrepRawDataKey {this, "sTgcPrepRawDataKey", "STGC_Measurements", "Key for sTGC PRD Container"}
protected

Definition at line 110 of file DumpEventDataToJsonAlg.h.

110{this, "sTgcPrepRawDataKey", "STGC_Measurements", "Key for sTGC PRD Container"};

◆ m_tauJetKeys

SG::ReadHandleKeyArray<xAOD::TauJetContainer> DumpEventDataToJsonAlg::m_tauJetKeys {this, "TauJetContainerKeys", {"TauJets"}, "Keys for Tau Containers"}
protected

Definition at line 90 of file DumpEventDataToJsonAlg.h.

90{this, "TauJetContainerKeys", {"TauJets"}, "Keys for Tau Containers"};

◆ m_tgcPrepRawDataKey

SG::ReadHandleKey<Muon::TgcPrepDataContainer> DumpEventDataToJsonAlg::m_tgcPrepRawDataKey {this, "TgcPrepRawDataKey", "TGC_MeasurementsAllBCs", "Key for TGC PRD Container"}
protected

Definition at line 108 of file DumpEventDataToJsonAlg.h.

108{this, "TgcPrepRawDataKey", "TGC_MeasurementsAllBCs", "Key for TGC PRD Container"};

◆ m_trackCollectionKeys

SG::ReadHandleKeyArray<TrackCollection> DumpEventDataToJsonAlg::m_trackCollectionKeys {this, "TrackCollectionKeys", {"CombinedInDetTracks", "CombinedMuonTracks", "MuonSpectrometerTracks"}, "Keys for Track Containers"}
protected

Definition at line 100 of file DumpEventDataToJsonAlg.h.

100{this, "TrackCollectionKeys", {"CombinedInDetTracks", "CombinedMuonTracks", "MuonSpectrometerTracks"}, "Keys for Track Containers"};

◆ m_trackContainerKeys

SG::ReadHandleKeyArray<ActsTrk::TrackContainer> DumpEventDataToJsonAlg::m_trackContainerKeys {this, "TrackContainerKeys", {"ConvertedTracks"}, "Location of the converted Acts TrackContainer"}
protected

Definition at line 103 of file DumpEventDataToJsonAlg.h.

103{this, "TrackContainerKeys", {"ConvertedTracks"}, "Location of the converted Acts TrackContainer"};

◆ m_trackParticleKeys

SG::ReadHandleKeyArray<xAOD::TrackParticleContainer> DumpEventDataToJsonAlg::m_trackParticleKeys {this, "TrackParticleContainerKeys", {"InDetTrackParticles", "CombinedMuonTrackParticles"}, "Keys for TrackParticle Containers"}
protected

Definition at line 84 of file DumpEventDataToJsonAlg.h.

84{this, "TrackParticleContainerKeys", {"InDetTrackParticles", "CombinedMuonTrackParticles"}, "Keys for TrackParticle Containers"};

◆ m_trtPrepRawDataKey

SG::ReadHandleKey<InDet::TRT_DriftCircleContainer> DumpEventDataToJsonAlg::m_trtPrepRawDataKey {this, "TrtPrepRawDataKey", "TRT_DriftCircles", "Key for TRT PRD Container"}
protected

Definition at line 113 of file DumpEventDataToJsonAlg.h.

113{this, "TrtPrepRawDataKey", "TRT_DriftCircles", "Key for TRT PRD Container"};

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


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