LArSoft  v06_85_00
Liquid Argon Software toolkit - http://larsoft.org/
larg4::CustomPhysicsTable Class Reference

#include "CustomPhysicsTable.hh"

Public Member Functions

 CustomPhysicsTable (CustomPhysicsFactoryBase *)
 
 ~CustomPhysicsTable ()
 
std::vector< std::string > GetAvailablePhysicsList ()
 
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 37 of file CustomPhysicsTable.hh.

Constructor & Destructor Documentation

larg4::CustomPhysicsTable::CustomPhysicsTable ( CustomPhysicsFactoryBase Factory)

Definition at line 20 of file CustomPhysicsTable.cxx.

References AddPhysics(), and CustomPhysicsTable().

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

Definition at line 53 of file CustomPhysicsTable.hh.

Referenced by CustomPhysicsTable().

53 {};

Member Function Documentation

void larg4::CustomPhysicsTable::AddPhysics ( CustomPhysicsFactoryBase Factory)

Definition at line 65 of file CustomPhysicsTable.cxx.

References larg4::CustomPhysicsFactoryBase::GetName(), IsPhysicsAvailable(), LOG_DEBUG, and theTable.

Referenced by CustomPhysicsTable(), and GetFullTable().

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  LOG_DEBUG("CustomPhysicsTable")<<"CustomPhysicsTable : Physics Table registering new physics "
73  << Factory->GetName();
74  }
bool IsPhysicsAvailable(std::string)
std::map< std::string, CustomPhysicsFactoryBase * > theTable
MaybeLogger_< ELseverityLevel::ELsev_warning, false > LogWarning
#define LOG_DEBUG(id)
static CustomPhysicsTable * TheCustomPhysicsTable
std::vector< std::string > larg4::CustomPhysicsTable::GetAvailablePhysicsList ( )

Definition at line 32 of file CustomPhysicsTable.cxx.

References theTable.

Referenced by ~CustomPhysicsTable().

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* > larg4::CustomPhysicsTable::GetFullTable ( )
inline

Definition at line 46 of file CustomPhysicsTable.hh.

References AddPhysics(), and theTable.

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

Definition at line 51 of file CustomPhysicsTable.cxx.

References IsPhysicsAvailable(), and theTable.

Referenced by ~CustomPhysicsTable().

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  }
bool IsPhysicsAvailable(std::string)
std::map< std::string, CustomPhysicsFactoryBase * > theTable
static CustomPhysicsTable * TheCustomPhysicsTable
bool larg4::CustomPhysicsTable::IsPhysicsAvailable ( std::string  PhysicsName)

Definition at line 42 of file CustomPhysicsTable.cxx.

References theTable.

Referenced by AddPhysics(), GetPhysicsConstructor(), and ~CustomPhysicsTable().

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* > larg4::CustomPhysicsTable::theTable
protected

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