GGEMS  1.1
GPU GEant4-based Monte Carlo Simulations
GGEMSSourceManager Class Reference

GGEMS class handling the source(s) More...

#include "GGEMSSourceManager.hh"

Collaboration diagram for GGEMSSourceManager:
Collaboration graph

Public Member Functions

 GGEMSSourceManager (GGEMSSourceManager const &source_manager)=delete
 Avoid copy of the class by reference. More...
 
GGEMSSourceManageroperator= (GGEMSSourceManager const &source_manager)=delete
 Avoid assignement of the class by reference. More...
 
 GGEMSSourceManager (GGEMSSourceManager const &&source_manager)=delete
 Avoid copy of the class by rvalue reference. More...
 
GGEMSSourceManageroperator= (GGEMSSourceManager const &&source_manager)=delete
 Avoid copy of the class by rvalue reference. More...
 
void Store (GGEMSSource *source)
 storing the source pointer to source manager More...
 
void PrintInfos (void) const
 Printing infos about the sources. More...
 
GGsize GetNumberOfSources (void) const
 Get the number of sources. More...
 
void Initialize (GGuint const &seed, bool const &is_tracking=false, GGint const &particle_tracking_id=0) const
 Initialize a GGEMS source. More...
 
std::string GetNameOfSource (GGsize const &source_index) const
 get the name of the source More...
 
GGsize GetNumberOfBatchs (GGsize const &source_index, GGsize const &device_index) const
 method returning the number of particles by batch More...
 
GGsize GetNumberOfParticlesInBatch (GGsize const &source_index, GGsize const &device_index, GGsize const &batch_index)
 method returning the number of particles in a specific batch More...
 
GGEMSParticlesGetParticles (void) const
 method returning the OpenCL stack on particles More...
 
GGEMSPseudoRandomGeneratorGetPseudoRandomGenerator (void) const
 method returning the OpenCL stack on pseudo random numbers More...
 
void GetPrimaries (GGsize const &source_index, GGsize const &thread_index, GGsize const &number_of_particles) const
 Generate primary particles for a specific source. More...
 
bool IsAlive (GGsize const &thread_index) const
 check if some particles are alive in OpenCL particle buffer More...
 
void Clean (void)
 clean OpenCL data More...
 

Static Public Member Functions

static GGEMSSourceManagerGetInstance (void)
 Create at first time the Singleton. More...
 

Private Member Functions

 GGEMSSourceManager (void)
 Unable the constructor for the user. More...
 
 ~GGEMSSourceManager (void)
 Unable the destructor for the user. More...
 

Private Attributes

GGEMSSource ** sources_
 
GGsize number_of_sources_
 
GGEMSParticlesparticles_
 
GGEMSPseudoRandomGeneratorpseudo_random_generator_
 

Detailed Description

GGEMS class handling the source(s)

Definition at line 48 of file GGEMSSourceManager.hh.

Constructor & Destructor Documentation

◆ GGEMSSourceManager() [1/3]

GGEMSSourceManager::GGEMSSourceManager ( void  )
private

Unable the constructor for the user.

Definition at line 39 of file GGEMSSourceManager.cc.

◆ ~GGEMSSourceManager()

GGEMSSourceManager::~GGEMSSourceManager ( void  )
private

Unable the destructor for the user.

Definition at line 58 of file GGEMSSourceManager.cc.

◆ GGEMSSourceManager() [2/3]

GGEMSSourceManager::GGEMSSourceManager ( GGEMSSourceManager const &  source_manager)
delete

Avoid copy of the class by reference.

Parameters
source_manager- reference on the source manager

◆ GGEMSSourceManager() [3/3]

GGEMSSourceManager::GGEMSSourceManager ( GGEMSSourceManager const &&  source_manager)
delete

Avoid copy of the class by rvalue reference.

Parameters
source_manager- rvalue reference on the source manager

Member Function Documentation

◆ Clean()

void GGEMSSourceManager::Clean ( void  )

clean OpenCL data

Definition at line 69 of file GGEMSSourceManager.cc.

◆ GetInstance()

static GGEMSSourceManager & GGEMSSourceManager::GetInstance ( void  )
inlinestatic

Create at first time the Singleton.

Returns
Object of type GGEMSSourceManager

Definition at line 67 of file GGEMSSourceManager.hh.

◆ GetNameOfSource()

std::string GGEMSSourceManager::GetNameOfSource ( GGsize const &  source_index) const
inline

get the name of the source

Parameters
source_index- index of the source
Returns
name of the source

Definition at line 136 of file GGEMSSourceManager.hh.

◆ GetNumberOfBatchs()

GGsize GGEMSSourceManager::GetNumberOfBatchs ( GGsize const &  source_index,
GGsize const &  device_index 
) const
inline

method returning the number of particles by batch

Parameters
source_index- index of the source
device_index- index of activated device
Returns
the number of batch of particle

Definition at line 145 of file GGEMSSourceManager.hh.

◆ GetNumberOfParticlesInBatch()

GGsize GGEMSSourceManager::GetNumberOfParticlesInBatch ( GGsize const &  source_index,
GGsize const &  device_index,
GGsize const &  batch_index 
)
inline

method returning the number of particles in a specific batch

Parameters
source_index- index of the source
device_index- index of activated device
batch_index- index of the source
Returns
the number of particle for a specific batch

Definition at line 155 of file GGEMSSourceManager.hh.

◆ GetNumberOfSources()

GGsize GGEMSSourceManager::GetNumberOfSources ( void  ) const
inline

Get the number of sources.

Returns
the number of sources

Definition at line 119 of file GGEMSSourceManager.hh.

◆ GetParticles()

GGEMSParticles * GGEMSSourceManager::GetParticles ( void  ) const
inline

method returning the OpenCL stack on particles

Returns
pointer on particle stack

Definition at line 162 of file GGEMSSourceManager.hh.

◆ GetPrimaries()

void GGEMSSourceManager::GetPrimaries ( GGsize const &  source_index,
GGsize const &  thread_index,
GGsize const &  number_of_particles 
) const
inline

Generate primary particles for a specific source.

Parameters
source_index- index of the source
thread_index- index of activated device (thread index)
number_of_particles- number of particles to simulate

Definition at line 178 of file GGEMSSourceManager.hh.

◆ GetPseudoRandomGenerator()

GGEMSPseudoRandomGenerator * GGEMSSourceManager::GetPseudoRandomGenerator ( void  ) const
inline

method returning the OpenCL stack on pseudo random numbers

Returns
pointer on pseudo random stack

Definition at line 169 of file GGEMSSourceManager.hh.

◆ Initialize()

void GGEMSSourceManager::Initialize ( GGuint const &  seed,
bool const &  is_tracking = false,
GGint const &  particle_tracking_id = 0 
) const

Initialize a GGEMS source.

Parameters
seed- seed of the random
is_tracking- boolean value for tracking
particle_tracking_id- id of particle to track

Definition at line 130 of file GGEMSSourceManager.cc.

◆ IsAlive()

bool GGEMSSourceManager::IsAlive ( GGsize const &  thread_index) const

check if some particles are alive in OpenCL particle buffer

Parameters
thread_index- index of activated device (thread index)
Returns
true if source is still alive, otherwize false

Definition at line 171 of file GGEMSSourceManager.cc.

◆ operator=() [1/2]

GGEMSSourceManager & GGEMSSourceManager::operator= ( GGEMSSourceManager const &&  source_manager)
delete

Avoid copy of the class by rvalue reference.

Parameters
source_manager- rvalue reference on the source manager

◆ operator=() [2/2]

GGEMSSourceManager & GGEMSSourceManager::operator= ( GGEMSSourceManager const &  source_manager)
delete

Avoid assignement of the class by reference.

Parameters
source_manager- reference on the source manager

◆ PrintInfos()

void GGEMSSourceManager::PrintInfos ( void  ) const

Printing infos about the sources.

Definition at line 117 of file GGEMSSourceManager.cc.

◆ Store()

void GGEMSSourceManager::Store ( GGEMSSource source)

storing the source pointer to source manager

Parameters
source- pointer to GGEMS source

Definition at line 90 of file GGEMSSourceManager.cc.

Member Data Documentation

◆ number_of_sources_

GGsize GGEMSSourceManager::number_of_sources_
private

Number of sources

Definition at line 200 of file GGEMSSourceManager.hh.

◆ particles_

GGEMSParticles* GGEMSSourceManager::particles_
private

Pointer on particle management

Definition at line 201 of file GGEMSSourceManager.hh.

◆ pseudo_random_generator_

GGEMSPseudoRandomGenerator* GGEMSSourceManager::pseudo_random_generator_
private

Pointer on pseudo random generator

Definition at line 202 of file GGEMSSourceManager.hh.

◆ sources_

GGEMSSource** GGEMSSourceManager::sources_
private

Pointer on GGEMS sources

Definition at line 199 of file GGEMSSourceManager.hh.


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