DD4hep  1.30.0
Detector Description Toolkit for High Energy Physics
Public Member Functions | Private Attributes | List of all members
LazyEncodingExtraction Struct Reference

Public Member Functions

 LazyEncodingExtraction (Geant4HitCollection *coll)
 
 operator std::string () const
 

Private Attributes

Geant4HitCollectionm_coll {nullptr}
 

Detailed Description

Helper struct that can be used together with map::try_emplace to construct the encoding only once per collection (name).

Definition at line 488 of file Geant4Output2EDM4hep.cpp.

Constructor & Destructor Documentation

◆ LazyEncodingExtraction()

LazyEncodingExtraction::LazyEncodingExtraction ( Geant4HitCollection coll)
inline

Constructor that does effectively nothing. This will be called in every try_emplace call

Definition at line 491 of file Geant4Output2EDM4hep.cpp.

Member Function Documentation

◆ operator std::string()

LazyEncodingExtraction::operator std::string ( ) const
inline

Defer the real work to the implicit conversion to std::string that will only be called if the value is actually emplaced into the map

Definition at line 494 of file Geant4Output2EDM4hep.cpp.

Member Data Documentation

◆ m_coll

Geant4HitCollection* LazyEncodingExtraction::m_coll {nullptr}
private

Definition at line 499 of file Geant4Output2EDM4hep.cpp.


The documentation for this struct was generated from the following file: