DD4hep  1.28.0
Detector Description Toolkit for High Energy Physics
Public Member Functions | Static Public Member Functions | Private Types | Private Attributes | List of all members
dd4hep::detail::VolumeManager_Populator Class Reference

Helper class to populate the volume manager. More...

Public Member Functions

 VolumeManager_Populator (const Detector &description, VolumeManager vm)
 Default constructor. More...
 
size_t numNodes () const
 Access node count. More...
 
void populate (DetElement e)
 Populate the Volume manager. More...
 
size_t scanPhysicalVolume (DetElement &parent, DetElement e, PlacedVolume pv, Encoding parent_encoding, SensitiveDetector &sd, Chain &chain)
 Scan a single physical volume and look for sensitive elements below. More...
 
void add_entry (SensitiveDetector sd, DetElement parent, DetElement e, const TGeoNode *n, const Encoding &code, Chain &nodes)
 
void print_node (SensitiveDetector sd, DetElement parent, DetElement e, const TGeoNode *n, const Encoding &code, const Chain &nodes) const
 

Static Public Member Functions

static Encoding update_encoding (const IDDescriptor iddesc, const VolIDs &ids, const Encoding &initial)
 Compute the encoding for a set of VolIDs within a readout descriptor. More...
 
static Encoding encoding (const IDDescriptor iddesc, const VolIDs &ids)
 Compute the encoding for a set of VolIDs within a readout descriptor. More...
 

Private Types

typedef std::vector< TGeoNode * > Chain
 
typedef PlacedVolume::VolIDs VolIDs
 
typedef std::pair< VolumeID, VolumeIDEncoding
 

Private Attributes

const Detectorm_detDesc
 Reference to the Detector instance. More...
 
VolumeManager m_volManager
 Reference to the volume manager to be populated. More...
 
std::set< VolumeIDm_entries
 Set of already added entries. More...
 
bool m_debug = false
 Debug flag. More...
 
std::size_t m_numNodes = 0
 Node counter. More...
 

Detailed Description

Helper class to populate the volume manager.

Author
M.Frank
Version
1.0

Definition at line 45 of file VolumeManager.cpp.

Member Typedef Documentation

◆ Chain

typedef std::vector<TGeoNode*> dd4hep::detail::VolumeManager_Populator::Chain
private

Definition at line 46 of file VolumeManager.cpp.

◆ Encoding

Definition at line 48 of file VolumeManager.cpp.

◆ VolIDs

Definition at line 47 of file VolumeManager.cpp.

Constructor & Destructor Documentation

◆ VolumeManager_Populator()

dd4hep::detail::VolumeManager_Populator::VolumeManager_Populator ( const Detector description,
VolumeManager  vm 
)
inline

Default constructor.

Definition at line 62 of file VolumeManager.cpp.

Member Function Documentation

◆ add_entry()

void dd4hep::detail::VolumeManager_Populator::add_entry ( SensitiveDetector  sd,
DetElement  parent,
DetElement  e,
const TGeoNode *  n,
const Encoding code,
Chain nodes 
)
inline

Definition at line 238 of file VolumeManager.cpp.

◆ encoding()

static Encoding dd4hep::detail::VolumeManager_Populator::encoding ( const IDDescriptor  iddesc,
const VolIDs ids 
)
inlinestatic

Compute the encoding for a set of VolIDs within a readout descriptor.

Definition at line 224 of file VolumeManager.cpp.

◆ numNodes()

size_t dd4hep::detail::VolumeManager_Populator::numNodes ( ) const
inline

Access node count.

Definition at line 69 of file VolumeManager.cpp.

◆ populate()

void dd4hep::detail::VolumeManager_Populator::populate ( DetElement  e)
inline

Populate the Volume manager.

Definition at line 72 of file VolumeManager.cpp.

◆ print_node()

void dd4hep::detail::VolumeManager_Populator::print_node ( SensitiveDetector  sd,
DetElement  parent,
DetElement  e,
const TGeoNode *  n,
const Encoding code,
const Chain nodes 
) const
inline

Definition at line 277 of file VolumeManager.cpp.

◆ scanPhysicalVolume()

size_t dd4hep::detail::VolumeManager_Populator::scanPhysicalVolume ( DetElement parent,
DetElement  e,
PlacedVolume  pv,
Encoding  parent_encoding,
SensitiveDetector sd,
Chain chain 
)
inline

Scan a single physical volume and look for sensitive elements below.

Check if this particular volume is the placement of one of the children of this detector element. If the daughter placement is also a detector child, then we must reset the node chain.

Distinguish logically the two following cases for our understanding.... Though the treatment is identical

Definition at line 95 of file VolumeManager.cpp.

◆ update_encoding()

static Encoding dd4hep::detail::VolumeManager_Populator::update_encoding ( const IDDescriptor  iddesc,
const VolIDs ids,
const Encoding initial 
)
inlinestatic

Compute the encoding for a set of VolIDs within a readout descriptor.

Definition at line 210 of file VolumeManager.cpp.

Member Data Documentation

◆ m_debug

bool dd4hep::detail::VolumeManager_Populator::m_debug = false
private

Debug flag.

Definition at line 56 of file VolumeManager.cpp.

◆ m_detDesc

const Detector& dd4hep::detail::VolumeManager_Populator::m_detDesc
private

Reference to the Detector instance.

Definition at line 50 of file VolumeManager.cpp.

◆ m_entries

std::set<VolumeID> dd4hep::detail::VolumeManager_Populator::m_entries
private

Set of already added entries.

Definition at line 54 of file VolumeManager.cpp.

◆ m_numNodes

std::size_t dd4hep::detail::VolumeManager_Populator::m_numNodes = 0
private

Node counter.

Definition at line 58 of file VolumeManager.cpp.

◆ m_volManager

VolumeManager dd4hep::detail::VolumeManager_Populator::m_volManager
private

Reference to the volume manager to be populated.

Definition at line 52 of file VolumeManager.cpp.


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