Geant4 11.2.2
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4ITModelHandler Class Reference

#include <G4ITModelHandler.hh>

Public Member Functions

 G4ITModelHandler ()
 
 G4ITModelHandler (const G4ITModelHandler &other)=delete
 
G4ITModelHandleroperator= (const G4ITModelHandler &rhs)=delete
 
 ~G4ITModelHandler ()
 
void Initialize ()
 
void RegisterModel (G4VITStepModel *pModel, G4double globalTime)
 
void Reset ()
 
void Finalize ()
 
std::vector< G4VITStepModel * > GetActiveModels (G4double globalTime) const
 
bool GetTimeStepComputerFlag ()
 
bool GetReactionProcessFlag ()
 

Protected Attributes

G4bool fIsInitialized
 
std::unique_ptr< G4ITModelManagerfpModelManager
 
G4bool fTimeStepComputerFlag
 
G4bool fReactionProcessFlag
 
G4bool fFinalize = false
 

Detailed Description

G4ITModelHandler holds for two IT types the corresponding model manager

Deprecated
This class will be removed

Definition at line 60 of file G4ITModelHandler.hh.

Constructor & Destructor Documentation

◆ G4ITModelHandler() [1/2]

G4ITModelHandler::G4ITModelHandler ( )

Definition at line 43 of file G4ITModelHandler.cc.

44{
45 fIsInitialized = false;
48}

◆ G4ITModelHandler() [2/2]

G4ITModelHandler::G4ITModelHandler ( const G4ITModelHandler & other)
delete

◆ ~G4ITModelHandler()

G4ITModelHandler::~G4ITModelHandler ( )
default

Member Function Documentation

◆ Finalize()

void G4ITModelHandler::Finalize ( )

Definition at line 123 of file G4ITModelHandler.cc.

124{
125 fFinalize = true;
126}

◆ GetActiveModels()

std::vector< G4VITStepModel * > G4ITModelHandler::GetActiveModels ( G4double globalTime) const

Definition at line 99 of file G4ITModelHandler.cc.

100{
101 if(!fpModelManager)
102 {
103 return {};
104 }
105 return fpModelManager->GetActiveModels(globalTime);
106}
std::unique_ptr< G4ITModelManager > fpModelManager

Referenced by G4ITModelProcessor::InitializeStepper().

◆ GetReactionProcessFlag()

bool G4ITModelHandler::GetReactionProcessFlag ( )

Definition at line 113 of file G4ITModelHandler.cc.

114{
116}

Referenced by G4ITModelProcessor::Initialize().

◆ GetTimeStepComputerFlag()

bool G4ITModelHandler::GetTimeStepComputerFlag ( )

Definition at line 108 of file G4ITModelHandler.cc.

109{
111}

Referenced by G4ITModelProcessor::Initialize().

◆ Initialize()

void G4ITModelHandler::Initialize ( )

Definition at line 52 of file G4ITModelHandler.cc.

53{
54 fpModelManager->Initialize();
55 fIsInitialized = true;
56}

Referenced by G4ITModelProcessor::Initialize().

◆ operator=()

G4ITModelHandler & G4ITModelHandler::operator= ( const G4ITModelHandler & rhs)
delete

◆ RegisterModel()

void G4ITModelHandler::RegisterModel ( G4VITStepModel * pModel,
G4double globalTime )

Definition at line 58 of file G4ITModelHandler.cc.

60{
61 if(fFinalize)
62 {
63 return;
64 }
65 assert(pModel != nullptr);
66
67 G4ITType type1;
68 G4ITType type2;
69
70 pModel->GetApplicable(type1, type2);
71
72 if (type1 != type2)
73 {
74 G4Exception("G4ITModelHandler::RegisterModel",
75 "FeatureDisabled",
77 "Models for different type ids are not supported anymore. This feature will be superseded.");
78 }
79
81 {
82 fpModelManager = std::make_unique<G4ITModelManager>();
83 }
84
85 fpModelManager->SetModel(pModel, startingTime);
86
87 //________________________________________________
88 // Setup ITStepManager
89 if (pModel->GetTimeStepper() != nullptr)
90 {
92 }
93 if (pModel->GetReactionProcess() != nullptr)
94 {
96 }
97}
@ FatalException
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
void GetApplicable(G4ITType &type1, G4ITType &type2)
G4VITTimeStepComputer * GetTimeStepper()
G4VITReactionProcess * GetReactionProcess()

Referenced by G4ITModelProcessor::RegisterModel(), and G4Scheduler::RegisterModel().

◆ Reset()

void G4ITModelHandler::Reset ( )

Definition at line 118 of file G4ITModelHandler.cc.

119{
120 fpModelManager.reset();
121}

Member Data Documentation

◆ fFinalize

G4bool G4ITModelHandler::fFinalize = false
protected

Definition at line 95 of file G4ITModelHandler.hh.

Referenced by Finalize(), and RegisterModel().

◆ fIsInitialized

G4bool G4ITModelHandler::fIsInitialized
protected

Definition at line 90 of file G4ITModelHandler.hh.

Referenced by G4ITModelHandler(), and Initialize().

◆ fpModelManager

std::unique_ptr<G4ITModelManager> G4ITModelHandler::fpModelManager
protected

Definition at line 91 of file G4ITModelHandler.hh.

Referenced by GetActiveModels(), Initialize(), RegisterModel(), and Reset().

◆ fReactionProcessFlag

G4bool G4ITModelHandler::fReactionProcessFlag
protected

Definition at line 94 of file G4ITModelHandler.hh.

Referenced by G4ITModelHandler(), GetReactionProcessFlag(), and RegisterModel().

◆ fTimeStepComputerFlag

G4bool G4ITModelHandler::fTimeStepComputerFlag
protected

Definition at line 93 of file G4ITModelHandler.hh.

Referenced by G4ITModelHandler(), GetTimeStepComputerFlag(), and RegisterModel().


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