BDSIM
BDSIM is a Geant4 extension toolkit for simulation of particle transport in accelerator beamlines.
Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes
BDSBLMRegistry Class Reference

Registry of all BLMs so we know each one uniquely. More...

#include <BDSBLMRegistry.hh>

Collaboration diagram for BDSBLMRegistry:
Collaboration graph

Public Member Functions

G4int RegisterBLM (G4String name, BDSBLM *blm, G4double SIn=-1000)
 
size_t size () const
 
G4int NBLMs () const
 
const std::set< BDSBLM * > & BLMs () const
 

Static Public Member Functions

static BDSBLMRegistryInstance ()
 Accessor for registry. More...
 

Private Member Functions

 BDSBLMRegistry ()
 Private constructor to enforce singleton pattern. More...
 

Private Attributes

G4int numberOfEntries
 
std::set< BDSBLM * > blms
 Cache of unique sampler objects for memory management. More...
 
std::vector< BDSBLM * > blmsVector
 
std::vector< G4String > names
 
std::vector< G4double > S
 

Static Private Attributes

static BDSBLMRegistryinstance = nullptr
 Singleton instance. More...
 

Detailed Description

Registry of all BLMs so we know each one uniquely.

Author
Laurie Nevay

Definition at line 35 of file BDSBLMRegistry.hh.

Constructor & Destructor Documentation

◆ ~BDSBLMRegistry()

BDSBLMRegistry::~BDSBLMRegistry ( )

Definition at line 39 of file BDSBLMRegistry.cc.

◆ BDSBLMRegistry()

BDSBLMRegistry::BDSBLMRegistry ( )
private

Private constructor to enforce singleton pattern.

Definition at line 35 of file BDSBLMRegistry.cc.

Referenced by Instance().

Here is the caller graph for this function:

Member Function Documentation

◆ BLMs()

const std::set< BDSBLM * > & BDSBLMRegistry::BLMs ( ) const
inline

Definition at line 49 of file BDSBLMRegistry.hh.

◆ Instance()

BDSBLMRegistry * BDSBLMRegistry::Instance ( )
static

Accessor for registry.

Definition at line 28 of file BDSBLMRegistry.cc.

References BDSBLMRegistry(), and instance.

Referenced by BDS::BuildBLMs(), BDSDetectorConstruction::BuildPhysicsBias(), and BDSOutput::CreateHistograms().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ NBLMs()

G4int BDSBLMRegistry::NBLMs ( ) const
inline

Definition at line 48 of file BDSBLMRegistry.hh.

◆ RegisterBLM()

G4int BDSBLMRegistry::RegisterBLM ( G4String  name,
BDSBLM blm,
G4double  SIn = -1000 
)

Definition at line 46 of file BDSBLMRegistry.cc.

◆ size()

size_t BDSBLMRegistry::size ( ) const
inline

Definition at line 47 of file BDSBLMRegistry.hh.

Field Documentation

◆ blms

std::set<BDSBLM*> BDSBLMRegistry::blms
private

Cache of unique sampler objects for memory management.

Definition at line 63 of file BDSBLMRegistry.hh.

◆ blmsVector

std::vector<BDSBLM*> BDSBLMRegistry::blmsVector
private

Definition at line 65 of file BDSBLMRegistry.hh.

◆ instance

BDSBLMRegistry * BDSBLMRegistry::instance = nullptr
staticprivate

Singleton instance.

Definition at line 56 of file BDSBLMRegistry.hh.

Referenced by Instance().

◆ names

std::vector<G4String> BDSBLMRegistry::names
private

Definition at line 66 of file BDSBLMRegistry.hh.

◆ numberOfEntries

G4int BDSBLMRegistry::numberOfEntries
private

Counter for easy checking of out of bounds and incrementing. Also the index in the member vectors, so zero counting.

Definition at line 60 of file BDSBLMRegistry.hh.

◆ S

std::vector<G4double> BDSBLMRegistry::S
private

Definition at line 67 of file BDSBLMRegistry.hh.


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