DD4hep  1.28.0
Detector Description Toolkit for High Energy Physics
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
DD4hepRootPersistency Class Reference

Helper class to support ROOT persistency of Detector objects. More...

#include <DD4hepRootPersistency.h>

Inheritance diagram for DD4hepRootPersistency:
TNamed

Public Types

typedef std::map< std::string, dd4hep::Handle< dd4hep::NamedObject > > HandleMap
 

Public Member Functions

 DD4hepRootPersistency ()
 Default constructor. More...
 
virtual ~DD4hepRootPersistency ()
 Default destructor. More...
 
TGeoManager & manager () const
 Access the geometry manager of this instance. More...
 
dd4hep::Material air () const
 Return handle to material describing air. More...
 
dd4hep::Material vacuum () const
 Return handle to material describing vacuum. More...
 
dd4hep::VisAttr invisible () const
 Return handle to "invisible" visualization attributes. More...
 
dd4hep::DetElement world () const
 Return reference to the top-most (world) detector element. More...
 
dd4hep::DetElement trackers () const
 Return reference to detector element with all tracker devices. More...
 
dd4hep::Volume worldVolume () const
 Return handle to the world volume containing everything. More...
 
dd4hep::Volume trackingVolume () const
 Return handle to the world volume containing the volume with the tracking devices. More...
 
dd4hep::VolumeManager volumeManager () const
 Return handle to the VolumeManager. More...
 
dd4hep::OverlayedField field () const
 Return handle to the combined electromagentic field description. More...
 
dd4hep::Header header () const
 Accessor to the header entry. More...
 
const HandleMapconstants () const
 Accessor to the map of constants. More...
 
const HandleMapvisAttributes () const
 Accessor to the map of visualisation attributes. More...
 
const HandleMaplimitsets () const
 Accessor to the map of limit settings. More...
 
const HandleMapregions () const
 Accessor to the map of region settings. More...
 
const HandleMapreadouts () const
 Accessor to the map of readout structures. More...
 
const HandleMapdetectors () const
 Accessor to the map of sub-detectors. More...
 
const HandleMapsensitiveDetectors () const
 Retrieve a sensitive detector by its name from the detector description. More...
 
const HandleMapfields () const
 Accessor to the map of field entries, which together form the global field. More...
 
const HandleMapidSpecifications () const
 Accessor to the map of ID specifications. More...
 
 ClassDef (DD4hepRootPersistency, 1)
 ROOT implementation macro. More...
 

Static Public Member Functions

static int save (dd4hep::Detector &description, const char *fname, const char *instance="Geometry")
 Save an existing detector description in memory to a ROOT file. More...
 
static int load (dd4hep::Detector &description, const char *fname, const char *instance="Geometry")
 Load an detector description from a ROOT file to memory. More...
 

Public Attributes

dd4hep::DetectorDatam_data = 0
 The main data block. More...
 
std::map< dd4hep::Readout, std::pair< dd4hep::IDDescriptor, dd4hep::DDSegmentation::Segmentation * > > m_segments
 Helper since plain segmentations cannot be saved. More...
 
std::map< dd4hep::DetElement, dd4hep::AlignmentConditionnominals
 Helper to save alignment conditions from the DetElement nominals. More...
 

Detailed Description

Helper class to support ROOT persistency of Detector objects.

Author
M.Frank
Version
1.0

Definition at line 26 of file DD4hepRootPersistency.h.

Member Typedef Documentation

◆ HandleMap

Definition at line 28 of file DD4hepRootPersistency.h.

Constructor & Destructor Documentation

◆ DD4hepRootPersistency()

DD4hepRootPersistency::DD4hepRootPersistency ( )

Default constructor.

Definition at line 40 of file DD4hepRootPersistency.cpp.

◆ ~DD4hepRootPersistency()

DD4hepRootPersistency::~DD4hepRootPersistency ( )
virtual

Default destructor.

Definition at line 44 of file DD4hepRootPersistency.cpp.

Member Function Documentation

◆ air()

dd4hep::Material DD4hepRootPersistency::air ( ) const
inline

Return handle to material describing air.

Definition at line 51 of file DD4hepRootPersistency.h.

◆ ClassDef()

DD4hepRootPersistency::ClassDef ( DD4hepRootPersistency  ,
 
)

ROOT implementation macro.

◆ constants()

const HandleMap& DD4hepRootPersistency::constants ( ) const
inline

Accessor to the map of constants.

Definition at line 71 of file DD4hepRootPersistency.h.

◆ detectors()

const HandleMap& DD4hepRootPersistency::detectors ( ) const
inline

Accessor to the map of sub-detectors.

Definition at line 81 of file DD4hepRootPersistency.h.

◆ field()

dd4hep::OverlayedField DD4hepRootPersistency::field ( ) const
inline

Return handle to the combined electromagentic field description.

Definition at line 67 of file DD4hepRootPersistency.h.

◆ fields()

const HandleMap& DD4hepRootPersistency::fields ( ) const
inline

Accessor to the map of field entries, which together form the global field.

Definition at line 85 of file DD4hepRootPersistency.h.

◆ header()

dd4hep::Header DD4hepRootPersistency::header ( ) const
inline

Accessor to the header entry.

Definition at line 69 of file DD4hepRootPersistency.h.

◆ idSpecifications()

const HandleMap& DD4hepRootPersistency::idSpecifications ( ) const
inline

Accessor to the map of ID specifications.

Definition at line 87 of file DD4hepRootPersistency.h.

◆ invisible()

dd4hep::VisAttr DD4hepRootPersistency::invisible ( ) const
inline

Return handle to "invisible" visualization attributes.

Definition at line 55 of file DD4hepRootPersistency.h.

◆ limitsets()

const HandleMap& DD4hepRootPersistency::limitsets ( ) const
inline

Accessor to the map of limit settings.

Definition at line 75 of file DD4hepRootPersistency.h.

◆ load()

int DD4hepRootPersistency::load ( dd4hep::Detector description,
const char *  fname,
const char *  instance = "Geometry" 
)
static

Load an detector description from a ROOT file to memory.

Definition at line 113 of file DD4hepRootPersistency.cpp.

◆ manager()

TGeoManager& DD4hepRootPersistency::manager ( ) const
inline

Access the geometry manager of this instance.

Definition at line 49 of file DD4hepRootPersistency.h.

◆ readouts()

const HandleMap& DD4hepRootPersistency::readouts ( ) const
inline

Accessor to the map of readout structures.

Definition at line 79 of file DD4hepRootPersistency.h.

◆ regions()

const HandleMap& DD4hepRootPersistency::regions ( ) const
inline

Accessor to the map of region settings.

Definition at line 77 of file DD4hepRootPersistency.h.

◆ save()

int DD4hepRootPersistency::save ( dd4hep::Detector description,
const char *  fname,
const char *  instance = "Geometry" 
)
static

Save an existing detector description in memory to a ROOT file.

Now we write the object

Definition at line 47 of file DD4hepRootPersistency.cpp.

◆ sensitiveDetectors()

const HandleMap& DD4hepRootPersistency::sensitiveDetectors ( ) const
inline

Retrieve a sensitive detector by its name from the detector description.

Definition at line 83 of file DD4hepRootPersistency.h.

◆ trackers()

dd4hep::DetElement DD4hepRootPersistency::trackers ( ) const
inline

Return reference to detector element with all tracker devices.

Definition at line 59 of file DD4hepRootPersistency.h.

◆ trackingVolume()

dd4hep::Volume DD4hepRootPersistency::trackingVolume ( ) const
inline

Return handle to the world volume containing the volume with the tracking devices.

Definition at line 63 of file DD4hepRootPersistency.h.

◆ vacuum()

dd4hep::Material DD4hepRootPersistency::vacuum ( ) const
inline

Return handle to material describing vacuum.

Definition at line 53 of file DD4hepRootPersistency.h.

◆ visAttributes()

const HandleMap& DD4hepRootPersistency::visAttributes ( ) const
inline

Accessor to the map of visualisation attributes.

Definition at line 73 of file DD4hepRootPersistency.h.

◆ volumeManager()

dd4hep::VolumeManager DD4hepRootPersistency::volumeManager ( ) const
inline

Return handle to the VolumeManager.

Definition at line 65 of file DD4hepRootPersistency.h.

◆ world()

dd4hep::DetElement DD4hepRootPersistency::world ( ) const
inline

Return reference to the top-most (world) detector element.

Definition at line 57 of file DD4hepRootPersistency.h.

◆ worldVolume()

dd4hep::Volume DD4hepRootPersistency::worldVolume ( ) const
inline

Return handle to the world volume containing everything.

Definition at line 61 of file DD4hepRootPersistency.h.

Member Data Documentation

◆ m_data

dd4hep::DetectorData* DD4hepRootPersistency::m_data = 0

The main data block.

Definition at line 31 of file DD4hepRootPersistency.h.

◆ m_segments

std::map<dd4hep::Readout,std::pair<dd4hep::IDDescriptor,dd4hep::DDSegmentation::Segmentation*> > DD4hepRootPersistency::m_segments

Helper since plain segmentations cannot be saved.

Definition at line 33 of file DD4hepRootPersistency.h.

◆ nominals

std::map<dd4hep::DetElement,dd4hep::AlignmentCondition> DD4hepRootPersistency::nominals

Helper to save alignment conditions from the DetElement nominals.

Definition at line 35 of file DD4hepRootPersistency.h.


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