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
15#include <ActsPlugins/Root/RootMaterialTrackIo.hpp>
16
17#include "TChain.h"
18
19#include <mutex>
20
21
22namespace ActsTrk {
23
30
32 public:
33
35 virtual StatusCode initialize() override;
36 virtual StatusCode execute () override;
37 virtual StatusCode finalize() override;
38 virtual unsigned cardinality() const override { return 1; }
40
41 private:
43 Gaudi::Property<std::size_t> m_maxEvents{this, "maxEvents", std::numeric_limits<std::size_t>::max()};
45 Gaudi::Property<std::size_t> m_skipEvents{this, "skipEvents", 0ul};
47 Gaudi::Property<std::size_t> m_batchSize{this, "batchSize", 1000ul};
49 std::size_t m_nTreeEntries{0ul};
51 std::size_t m_currEntry{0ul};
53 std::size_t m_procEvents{0ul};
55 Gaudi::Property<std::vector<std::string>> m_fileNames{this, "FileNames", {}, "The list of input file names"};
57 Gaudi::Property<std::string> m_treeName{this, "TreeName", "material-tracks", "The input tree name"};
59 Gaudi::Property<bool> m_readCachedSurfaceInformation{this, "ReadCachedSurface", false, "Read surface information for the root file"};
61 ActsPlugins::RootMaterialTrackIo m_accessor{{false, m_readCachedSurfaceInformation}};
63 std::unique_ptr<TChain> m_inputChain{};
65 SG::WriteHandleKey<RecordedMaterialTrackCollection> m_materialTrackCollectionKey {this, "MaterialTrackCollectionKey", "InputMaterialTracks", "Name of the RecordedMaterialTrackCollection"};
66 };
67}
68
69#endif
70
Property holding a SG store/key/clid from which a ReadHandle is made.
Writes out RecordedMaterialTrackCollection to a root file.
std::unique_ptr< TChain > m_inputChain
The input chain of entries.
Gaudi::Property< std::size_t > m_batchSize
The batch size (number of track per events).
virtual unsigned cardinality() const override
ActsPlugins::RootMaterialTrackIo m_accessor
The read - write payload.
Gaudi::Property< std::size_t > m_skipEvents
The number of events in the file to skip.
virtual StatusCode initialize() override
Gaudi::Property< std::size_t > m_maxEvents
The number of events in the processed.
virtual StatusCode finalize() override
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.
virtual StatusCode execute() override
std::size_t m_nTreeEntries
The number of entries in the tree to read.
SG::WriteHandleKey< RecordedMaterialTrackCollection > m_materialTrackCollectionKey
The RecordedMaterialTrackCollection to write.
Gaudi::Property< bool > m_readCachedSurfaceInformation
Read surface information for the root file.
std::size_t m_currEntry
The current processed tree entry.
AthAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Constructor with parameters:
std::size_t m_procEvents
The number of processed tree events.
AthAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Constructor with parameters:
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...