ATLAS Offline Software
Loading...
Searching...
No Matches
MaterialTrackReader.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef ACTSMATERIAL_MATERIALTRACKREADER_H
6#define ACTSMATERIAL_MATERIALTRACKREADER_H
7
9#include "GaudiKernel/ServiceHandle.h"
11
14
15#include <ActsPlugins/Root/RootMaterialTrackIo.hpp>
16
17#include "TChain.h"
18
19#include <mutex>
20
21
22namespace ActsTrk {
23
30
32 public:
33 MaterialTrackReader(const std::string &name, ISvcLocator *pSvcLocator);
34 virtual StatusCode initialize() override;
35 virtual StatusCode execute (const EventContext& ctx) const override;
36 virtual ~MaterialTrackReader();
37
38 private:
40 mutable std::mutex m_readMutex;
42 std::size_t m_events = 0;
44 std::size_t m_batchSize = 0;
46 Gaudi::Property<std::vector<std::string>> m_fileNames{this, "FileNames", {}, "The list of input file names"};
48 Gaudi::Property<std::string> m_treeName{this, "TreeName", "material-tracks", "The input tree name"};
50 Gaudi::Property<bool> m_readCachedSurfaceInformation{this, "ReadCachedSurface", false, "Read surface information for the root file"};
52 ActsPlugins::RootMaterialTrackIo m_accessor;
54 std::unique_ptr<TChain> m_inputChain ATLAS_THREAD_SAFE = {};
56 SG::WriteHandleKey<RecordedMaterialTrackCollection> m_materialTrackCollectionKey {this, "MaterialTrackCollectionKey", "InputMaterialTracks", "Name of the RecordedMaterialTrackCollection"};
57 };
58}
59
60#endif
61
Property holding a SG store/key/clid from which a ReadHandle is made.
std::unique_ptr< TChain > m_inputChain ATLAS_THREAD_SAFE
The input chain of entries.
virtual StatusCode execute(const EventContext &ctx) const override
ActsPlugins::RootMaterialTrackIo m_accessor
The read - write payload.
virtual StatusCode initialize() override
MaterialTrackReader(const std::string &name, ISvcLocator *pSvcLocator)
std::mutex m_readMutex
mutex used to protect multi-threaded reads
Gaudi::Property< std::vector< std::string > > m_fileNames
The list of input filenames.
Gaudi::Property< std::string > m_treeName
The name of the input tree.
std::size_t m_events
The number of events.
std::size_t m_batchSize
The batch size (number of track per events)
SG::WriteHandleKey< RecordedMaterialTrackCollection > m_materialTrackCollectionKey
The RecordedMaterialTrackCollection to write.
Gaudi::Property< bool > m_readCachedSurfaceInformation
Read surface information for the root file.
An algorithm that can be simultaneously executed in multiple threads.
Property holding a SG store/key/clid from which a WriteHandle is made.
The AlignStoreProviderAlg loads the rigid alignment corrections and pipes them through the readout ge...