Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
gar::garg4::CustomPhysicsTable Class Reference

#include <CustomPhysicsTable.hh>

Public Member Functions

 CustomPhysicsTable (CustomPhysicsFactoryBase *)
 
 ~CustomPhysicsTable ()
 
std::vector< std::stringGetAvailablePhysicsList ()
 
bool IsPhysicsAvailable (std::string)
 
G4VPhysicsConstructor * GetPhysicsConstructor (std::string)
 
std::map< std::string, CustomPhysicsFactoryBase * > GetFullTable ()
 
void AddPhysics (CustomPhysicsFactoryBase *)
 

Protected Member Functions

 CustomPhysicsTable ()
 

Protected Attributes

std::map< std::string, CustomPhysicsFactoryBase * > theTable
 

Detailed Description

Definition at line 38 of file CustomPhysicsTable.hh.

Constructor & Destructor Documentation

gar::garg4::CustomPhysicsTable::CustomPhysicsTable ( CustomPhysicsFactoryBase Factory)

Definition at line 20 of file CustomPhysicsTable.cxx.

21  {
25  }
26  else{
28  }
29  }
static CustomPhysicsTable * TheCustomPhysicsTable
void AddPhysics(CustomPhysicsFactoryBase *)
gar::garg4::CustomPhysicsTable::~CustomPhysicsTable ( )
inline

Definition at line 43 of file CustomPhysicsTable.hh.

43 {};
gar::garg4::CustomPhysicsTable::CustomPhysicsTable ( )
inlineprotected

Definition at line 54 of file CustomPhysicsTable.hh.

54 {};

Member Function Documentation

void gar::garg4::CustomPhysicsTable::AddPhysics ( CustomPhysicsFactoryBase Factory)

Definition at line 65 of file CustomPhysicsTable.cxx.

66  {
67 
68  if(IsPhysicsAvailable(Factory->GetName()))
69  mf::LogWarning("CustomPhysicsTable") << "Physics constructor being overwritten"
70  << " in CustomPhysicsTable";
71  TheCustomPhysicsTable->theTable[Factory->GetName()]=Factory;
72  MF_LOG_DEBUG("CustomPhysicsTable")<<"CustomPhysicsTable : Physics Table registering new physics "
73  << Factory->GetName();
74  }
std::map< std::string, CustomPhysicsFactoryBase * > theTable
static CustomPhysicsTable * TheCustomPhysicsTable
MaybeLogger_< ELseverityLevel::ELsev_warning, false > LogWarning
#define MF_LOG_DEBUG(id)
std::vector< std::string > gar::garg4::CustomPhysicsTable::GetAvailablePhysicsList ( )

Definition at line 32 of file CustomPhysicsTable.cxx.

33  {
34  std::vector<std::string> ReturnVector;
36  ReturnVector.push_back((*i).first);
37  }
38  return ReturnVector;
39  }
std::map< std::string, CustomPhysicsFactoryBase * > theTable
intermediate_table::const_iterator const_iterator
static CustomPhysicsTable * TheCustomPhysicsTable
std::map<std::string,CustomPhysicsFactoryBase* > gar::garg4::CustomPhysicsTable::GetFullTable ( )
inline

Definition at line 47 of file CustomPhysicsTable.hh.

48  { return theTable;}
std::map< std::string, CustomPhysicsFactoryBase * > theTable
G4VPhysicsConstructor * gar::garg4::CustomPhysicsTable::GetPhysicsConstructor ( std::string  PhysicsName)

Definition at line 51 of file CustomPhysicsTable.cxx.

52  {
53  if(IsPhysicsAvailable(PhysicsName)){
54  G4VPhysicsConstructor * G4VPC = TheCustomPhysicsTable->theTable[PhysicsName]->Build();
55  return G4VPC;
56  }
57  else{
58  G4VPhysicsConstructor * G4VPC=0;
59  return G4VPC;
60  }
61 
62  }
std::map< std::string, CustomPhysicsFactoryBase * > theTable
static CustomPhysicsTable * TheCustomPhysicsTable
bool gar::garg4::CustomPhysicsTable::IsPhysicsAvailable ( std::string  PhysicsName)

Definition at line 42 of file CustomPhysicsTable.cxx.

43  {
44  if(!TheCustomPhysicsTable->theTable[PhysicsName])
45  return false;
46  else
47  return true;
48  }
std::map< std::string, CustomPhysicsFactoryBase * > theTable
static CustomPhysicsTable * TheCustomPhysicsTable

Member Data Documentation

std::map<std::string,CustomPhysicsFactoryBase* > gar::garg4::CustomPhysicsTable::theTable
protected

Definition at line 53 of file CustomPhysicsTable.hh.


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