ACTS
Experiment-independent tracking
Loading...
Searching...
No Matches
ActsPlugins::RootMaterialMapIo Class Reference

Simple payload class that can be wrapped for reading and writing. More...

#include <ActsPlugins/Root/RootMaterialMapIo.hpp>

Classes

struct  Config
 Configuration for the accessor Contains the tags used for writing and reading, tag names are configuration, as they are not very likely to change. More...
struct  MaterialTreePayload
struct  Options
 Options for writing the material maps Folder names are optional as it allows to write more maps into one file, e.g. More...

Public Member Functions

 RootMaterialMapIo (const Config &cfg, std::unique_ptr< const Acts::Logger > mLogger=Acts::getDefaultLogger("RootMaterialMapIo", Acts::Logging::INFO))
 Constructor from config struct.
 ~RootMaterialMapIo ()=default
 Destructor.
Acts::TrackingGeometryMaterial read (TFile &rFile, const Options &options)
 Read the detector maps.
void write (TFile &rFile, const Acts::GeometryIdentifier &geoID, const Acts::ISurfaceMaterial &surfaceMaterial, const Options &options)
 Write the material to file.
void write (TFile &rFile, const Acts::TrackingGeometryMaterial &detectorMaterial, const Options &options)
 Write the detector maps.

Detailed Description

Simple payload class that can be wrapped for reading and writing.

Constructor & Destructor Documentation

◆ RootMaterialMapIo()

ActsPlugins::RootMaterialMapIo::RootMaterialMapIo ( const Config & cfg,
std::unique_ptr< const Acts::Logger > mLogger = Acts::getDefaultLogger("RootMaterialMapIo",                                                        Acts::Logging::INFO) )
explicit

Constructor from config struct.

Parameters
cfgthe configuration for the accessor
mLoggerthe logger to use, default is INFO level

◆ ~RootMaterialMapIo()

ActsPlugins::RootMaterialMapIo::~RootMaterialMapIo ( )
default

Destructor.

Member Function Documentation

◆ read()

Acts::TrackingGeometryMaterial ActsPlugins::RootMaterialMapIo::read ( TFile & rFile,
const Options & options )

Read the detector maps.

Parameters
rFilethe file to read from
optionsthe options for reading

◆ write() [1/2]

void ActsPlugins::RootMaterialMapIo::write ( TFile & rFile,
const Acts::GeometryIdentifier & geoID,
const Acts::ISurfaceMaterial & surfaceMaterial,
const Options & options )

Write the material to file.

Parameters
rFilethe file to write to
geoIDthe geometry identifier for the surface
surfaceMaterialis the surface associated with the material
optionsthe options for writing

◆ write() [2/2]

void ActsPlugins::RootMaterialMapIo::write ( TFile & rFile,
const Acts::TrackingGeometryMaterial & detectorMaterial,
const Options & options )

Write the detector maps.

Parameters
rFilethe file to write to
detectorMaterialthe detector material maps
optionsthe options for writing