ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Tracking
Acts
ActsMaterial
src
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
8
#include "
AthenaBaseComps/AthAlgorithm.h
"
9
#include "GaudiKernel/ServiceHandle.h"
10
#include "
StoreGate/ReadHandleKey.h
"
11
12
#include "
ActsGeometryInterfaces/ITrackingGeometrySvc.h
"
13
#include "
ActsGeometry/RecordedMaterialTrackCollection.h
"
15
#include <ActsPlugins/Root/RootMaterialTrackIo.hpp>
16
17
#include "TChain.h"
18
19
#include <mutex>
20
21
22
namespace
ActsTrk
{
23
30
31
class
MaterialTrackReader
:
public
AthAlgorithm
{
32
public
:
33
34
using
AthAlgorithm::AthAlgorithm
;
35
virtual
StatusCode
initialize
()
override
;
36
virtual
StatusCode
execute
(
const
EventContext& ctx)
override
;
37
virtual
StatusCode
finalize
()
override
;
38
virtual
unsigned
cardinality
()
const override
{
return
1; }
39
virtual
~MaterialTrackReader
();
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
ITrackingGeometrySvc.h
AthAlgorithm.h
RecordedMaterialTrackCollection.h
ReadHandleKey.h
Property holding a SG store/key/clid from which a ReadHandle is made.
ActsTrk::MaterialTrackReader
Writes out RecordedMaterialTrackCollection to a root file.
Definition
MaterialTrackReader.h:31
ActsTrk::MaterialTrackReader::execute
virtual StatusCode execute(const EventContext &ctx) override
Execute method.
Definition
MaterialTrackReader.cxx:82
ActsTrk::MaterialTrackReader::m_inputChain
std::unique_ptr< TChain > m_inputChain
The input chain of entries.
Definition
MaterialTrackReader.h:63
ActsTrk::MaterialTrackReader::m_batchSize
Gaudi::Property< std::size_t > m_batchSize
The batch size (number of track per events).
Definition
MaterialTrackReader.h:47
ActsTrk::MaterialTrackReader::cardinality
virtual unsigned cardinality() const override
Definition
MaterialTrackReader.h:38
ActsTrk::MaterialTrackReader::m_accessor
ActsPlugins::RootMaterialTrackIo m_accessor
The read - write payload.
Definition
MaterialTrackReader.h:61
ActsTrk::MaterialTrackReader::m_skipEvents
Gaudi::Property< std::size_t > m_skipEvents
The number of events in the file to skip.
Definition
MaterialTrackReader.h:45
ActsTrk::MaterialTrackReader::initialize
virtual StatusCode initialize() override
Definition
MaterialTrackReader.cxx:16
ActsTrk::MaterialTrackReader::m_maxEvents
Gaudi::Property< std::size_t > m_maxEvents
The number of events in the processed.
Definition
MaterialTrackReader.h:43
ActsTrk::MaterialTrackReader::finalize
virtual StatusCode finalize() override
Definition
MaterialTrackReader.cxx:72
ActsTrk::MaterialTrackReader::m_fileNames
Gaudi::Property< std::vector< std::string > > m_fileNames
The list of input filenames.
Definition
MaterialTrackReader.h:55
ActsTrk::MaterialTrackReader::m_treeName
Gaudi::Property< std::string > m_treeName
The name of the input tree.
Definition
MaterialTrackReader.h:57
ActsTrk::MaterialTrackReader::~MaterialTrackReader
virtual ~MaterialTrackReader()
ActsTrk::MaterialTrackReader::m_nTreeEntries
std::size_t m_nTreeEntries
The number of entries in the tree to read.
Definition
MaterialTrackReader.h:49
ActsTrk::MaterialTrackReader::m_materialTrackCollectionKey
SG::WriteHandleKey< RecordedMaterialTrackCollection > m_materialTrackCollectionKey
The RecordedMaterialTrackCollection to write.
Definition
MaterialTrackReader.h:65
ActsTrk::MaterialTrackReader::m_readCachedSurfaceInformation
Gaudi::Property< bool > m_readCachedSurfaceInformation
Read surface information for the root file.
Definition
MaterialTrackReader.h:59
ActsTrk::MaterialTrackReader::m_currEntry
std::size_t m_currEntry
The current processed tree entry.
Definition
MaterialTrackReader.h:51
ActsTrk::MaterialTrackReader::AthAlgorithm
AthAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Constructor.
Definition
AthAlgorithm.cxx:10
ActsTrk::MaterialTrackReader::m_procEvents
std::size_t m_procEvents
The number of processed tree events.
Definition
MaterialTrackReader.h:53
AthAlgorithm::AthAlgorithm
AthAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Constructor.
Definition
AthAlgorithm.cxx:10
SG::WriteHandleKey
Property holding a SG store/key/clid from which a WriteHandle is made.
Definition
StoreGate/StoreGate/WriteHandleKey.h:40
ActsTrk
The AlignStoreProviderAlg loads the rigid alignment corrections and pipes them through the readout ge...
Definition
MdtCalibInput.h:31
Generated on
for ATLAS Offline Software by
1.17.0