ATLAS Offline Software
Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Types | Private Attributes | List of all members
CaloG4::EscapedEnergyRegistry Class Reference

Keeps track of which types of volumes use which VEscapedEnergyProcessing objects. More...

#include <EscapedEnergyRegistry.h>

Collaboration diagram for CaloG4::EscapedEnergyRegistry:

Public Member Functions

 ~EscapedEnergyRegistry ()=default
 
void AddAndAdoptProcessing (const G4String &name, std::unique_ptr< VEscapedEnergyProcessing > process)
 
VEscapedEnergyProcessingGetProcessing (const G4String &volumeName) const
 

Static Public Member Functions

static EscapedEnergyRegistryGetInstance ()
 

Protected Member Functions

 EscapedEnergyRegistry ()=default
 

Private Types

typedef std::map< const G4String, std::unique_ptr< VEscapedEnergyProcessing > > m_processingMap_t
 
typedef m_processingMap_t::iterator m_processingMap_ptr_t
 
typedef m_processingMap_t::const_iterator m_processingMap_const_ptr_t
 

Private Attributes

m_processingMap_t m_processingMap
 

Detailed Description

Keeps track of which types of volumes use which VEscapedEnergyProcessing objects.

15-Jul-2004 William Seligman

The types volumes are categorized by volume name. I anticipate that there will be only two entries in this registry, one for "LAr::" and one for "Tile::", but there may be others in the future.

In other words, LAr volumes will use one VEscapedEnergyProcessing object, and Tile volumes will another VEscapedEnergyProcessing object, and this class keeps track of which is which.

Since there's only one registry, this class uses the singleton pattern.

UPDATE:

12-Apr-2019 Marilena Bandieramonte

This singleton class was not thread-safe. Added the #ifdef G4MULTITHREADED directive to handle the multithreaded case. One instance of the class will be created per each thread and stored in a tbb::concurrent_unordered_map that is hashed with the threadID number.

Definition at line 51 of file EscapedEnergyRegistry.h.

Member Typedef Documentation

◆ m_processingMap_const_ptr_t

typedef m_processingMap_t::const_iterator CaloG4::EscapedEnergyRegistry::m_processingMap_const_ptr_t
private

Definition at line 76 of file EscapedEnergyRegistry.h.

◆ m_processingMap_ptr_t

typedef m_processingMap_t::iterator CaloG4::EscapedEnergyRegistry::m_processingMap_ptr_t
private

Definition at line 75 of file EscapedEnergyRegistry.h.

◆ m_processingMap_t

typedef std::map< const G4String, std::unique_ptr<VEscapedEnergyProcessing> > CaloG4::EscapedEnergyRegistry::m_processingMap_t
private

Definition at line 74 of file EscapedEnergyRegistry.h.

Constructor & Destructor Documentation

◆ ~EscapedEnergyRegistry()

CaloG4::EscapedEnergyRegistry::~EscapedEnergyRegistry ( )
default

◆ EscapedEnergyRegistry()

CaloG4::EscapedEnergyRegistry::EscapedEnergyRegistry ( )
protecteddefault

Member Function Documentation

◆ AddAndAdoptProcessing()

void CaloG4::EscapedEnergyRegistry::AddAndAdoptProcessing ( const G4String &  name,
std::unique_ptr< VEscapedEnergyProcessing process 
)

◆ GetInstance()

static EscapedEnergyRegistry* CaloG4::EscapedEnergyRegistry::GetInstance ( )
static

◆ GetProcessing()

VEscapedEnergyProcessing* CaloG4::EscapedEnergyRegistry::GetProcessing ( const G4String &  volumeName) const

Member Data Documentation

◆ m_processingMap

m_processingMap_t CaloG4::EscapedEnergyRegistry::m_processingMap
private

Definition at line 77 of file EscapedEnergyRegistry.h.


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