LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
artg4tk::PhysicsListHolderService Class Reference

#include "PhysicsListHolder_service.hh"

Public Member Functions

 PhysicsListHolderService (fhicl::ParameterSet const &)
 
void registerPhysicsListService (PhysicsListServiceBase *)
 
G4VUserPhysicsList * makePhysicsList () const
 
void initializePhysicsList () const
 

Private Attributes

PhysicsListServiceBasephysicsListService_ {nullptr}
 

Detailed Description

Definition at line 24 of file PhysicsListHolder_service.hh.

Constructor & Destructor Documentation

artg4tk::PhysicsListHolderService::PhysicsListHolderService ( fhicl::ParameterSet const &  )
inline

Member Function Documentation

void artg4tk::PhysicsListHolderService::initializePhysicsList ( ) const

Definition at line 30 of file PhysicsListHolder.cc.

References artg4tk::PhysicsListServiceBase::initializePhysicsList(), and physicsListService_.

Referenced by larg4::larg4Main::beginRun(), and PhysicsListHolderService().

31 {
32  // Make sure we have one
33  if (!physicsListService_) {
34  throw cet::exception("PhysicsListHolderService") << "No physics list has been registered.\n";
35  }
36 
38 }
cet::coded_exception< error, detail::translate > exception
Definition: exception.h:33
G4VUserPhysicsList * artg4tk::PhysicsListHolderService::makePhysicsList ( ) const

Definition at line 18 of file PhysicsListHolder.cc.

References artg4tk::PhysicsListServiceBase::makePhysicsList(), and physicsListService_.

Referenced by larg4::larg4Main::beginRun(), and PhysicsListHolderService().

19 {
20  // Make sure we have one
21  if (!physicsListService_) {
22  throw cet::exception("PhysicsListHolderService") << "No physics list has been registered.\n";
23  }
24 
25  // Return the physics list (Geant is going to delete it)
27 }
virtual G4VUserPhysicsList * makePhysicsList()=0
cet::coded_exception< error, detail::translate > exception
Definition: exception.h:33
void artg4tk::PhysicsListHolderService::registerPhysicsListService ( PhysicsListServiceBase pl)

Definition at line 7 of file PhysicsListHolder.cc.

References physicsListService_.

Referenced by PhysicsListHolderService().

8 {
9  // There can be only one
10  if (physicsListService_) {
11  throw cet::exception("PhysicsListHolderService") << "A physics list is already registered.\n";
12  }
13 
15 }
cet::coded_exception< error, detail::translate > exception
Definition: exception.h:33

Member Data Documentation

PhysicsListServiceBase* artg4tk::PhysicsListHolderService::physicsListService_ {nullptr}
private

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