Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
ActsExamples::JsonSurfacesWriter Class Reference

#include <acts/blob/sPHENIX/Examples/Io/Json/include/ActsExamples/Io/Json/JsonSurfacesWriter.hpp>

+ Inheritance diagram for ActsExamples::JsonSurfacesWriter:
+ Collaboration diagram for ActsExamples::JsonSurfacesWriter:

Classes

struct  Config
 

Public Member Functions

 JsonSurfacesWriter (const Config &config, Acts::Logging::Level level)
 
std::string name () const override
 The algorithm name.
 
ProcessCode write (const AlgorithmContext &ctx) override
 Write geometry using the per-event context (optional).
 
ProcessCode finalize () override
 Write geometry using the default context.
 
const Configconfig () const
 Readonly access to config.
 
- Public Member Functions inherited from ActsExamples::IWriter
ProcessCode internalExecute (const AlgorithmContext &context) final
 
ProcessCode initialize () override
 Fulfil the algorithm interface.
 
- Public Member Functions inherited from ActsExamples::SequenceElement
virtual ~SequenceElement ()=default
 
const std::vector< const
DataHandleBase * > & 
writeHandles () const
 
const std::vector< const
DataHandleBase * > & 
readHandles () const
 

Private Member Functions

const Acts::Loggerlogger () const
 

Private Attributes

Config m_cfg
 
const Acts::TrackingVolumem_world = nullptr
 
std::unique_ptr< const
Acts::Logger
m_logger
 

Detailed Description

Write out the geometry for detector surfaces.

This writes a detectors.json file at the end of the run using the default context to determine the geometry. If configured, it also writes an additional file for each event using the following schema

event000000001-detectors.json
event000000002-detectors.json
...

that uses the per-event context to determine the geometry.

Definition at line 40 of file JsonSurfacesWriter.hpp.

View newest version in sPHENIX GitHub at line 40 of file JsonSurfacesWriter.hpp

Constructor & Destructor Documentation

JsonSurfacesWriter::JsonSurfacesWriter ( const Config config,
Acts::Logging::Level  level 
)

Construct the geometry writer.

Parameters
configis the configuration object
levelis the logging level

Definition at line 40 of file JsonSurfacesWriter.cpp.

View newest version in sPHENIX GitHub at line 40 of file JsonSurfacesWriter.cpp

References m_cfg, m_world, and ActsExamples::JsonSurfacesWriter::Config::trackingGeometry.

Member Function Documentation

const Config& ActsExamples::JsonSurfacesWriter::config ( ) const
inline

Readonly access to config.

Definition at line 78 of file JsonSurfacesWriter.hpp.

View newest version in sPHENIX GitHub at line 78 of file JsonSurfacesWriter.hpp

References m_cfg.

ProcessCode JsonSurfacesWriter::finalize ( )
overridevirtual

Write geometry using the default context.

Implements ActsExamples::SequenceElement.

Definition at line 155 of file JsonSurfacesWriter.cpp.

View newest version in sPHENIX GitHub at line 155 of file JsonSurfacesWriter.cpp

References j, ActsExamples::joinPaths(), m_cfg, m_world, out, ActsExamples::JsonSurfacesWriter::Config::outputDir, ActsExamples::JsonSurfacesWriter::Config::outputPrecision, SUCCESS, ActsExamples::JsonSurfacesWriter::Config::writeApproach, ActsExamples::JsonSurfacesWriter::Config::writeBoundary, ActsExamples::JsonSurfacesWriter::Config::writeLayer, and ActsExamples::JsonSurfacesWriter::Config::writeSensitive.

+ Here is the call graph for this function:

const Acts::Logger& ActsExamples::JsonSurfacesWriter::logger ( ) const
inlineprivate

Definition at line 85 of file JsonSurfacesWriter.hpp.

View newest version in sPHENIX GitHub at line 85 of file JsonSurfacesWriter.hpp

References m_logger.

std::string JsonSurfacesWriter::name ( ) const
overridevirtual

The algorithm name.

Implements ActsExamples::SequenceElement.

Definition at line 53 of file JsonSurfacesWriter.cpp.

View newest version in sPHENIX GitHub at line 53 of file JsonSurfacesWriter.cpp

Member Data Documentation

Config ActsExamples::JsonSurfacesWriter::m_cfg
private

Definition at line 81 of file JsonSurfacesWriter.hpp.

View newest version in sPHENIX GitHub at line 81 of file JsonSurfacesWriter.hpp

Referenced by config(), finalize(), JsonSurfacesWriter(), and write().

std::unique_ptr<const Acts::Logger> ActsExamples::JsonSurfacesWriter::m_logger
private

Definition at line 83 of file JsonSurfacesWriter.hpp.

View newest version in sPHENIX GitHub at line 83 of file JsonSurfacesWriter.hpp

Referenced by logger().

const Acts::TrackingVolume* ActsExamples::JsonSurfacesWriter::m_world = nullptr
private

Definition at line 82 of file JsonSurfacesWriter.hpp.

View newest version in sPHENIX GitHub at line 82 of file JsonSurfacesWriter.hpp

Referenced by finalize(), JsonSurfacesWriter(), and write().


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