Geant4 11.1.1
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 40 of file G4ITModelHandler.cc.

41{
42 fIsInitialized = false;
45}

◆ G4ITModelHandler() [2/2]

G4ITModelHandler::G4ITModelHandler ( const G4ITModelHandler other)
delete

◆ ~G4ITModelHandler()

G4ITModelHandler::~G4ITModelHandler ( )
default

Member Function Documentation

◆ Finalize()

void G4ITModelHandler::Finalize ( )

Definition at line 120 of file G4ITModelHandler.cc.

121{
122 fFinalize = true;
123}

◆ GetActiveModels()

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

Definition at line 96 of file G4ITModelHandler.cc.

97{
99 {
100 return {};
101 }
102 return fpModelManager->GetActiveModels(globalTime);
103}
std::unique_ptr< G4ITModelManager > fpModelManager

Referenced by G4ITModelProcessor::InitializeStepper().

◆ GetReactionProcessFlag()

bool G4ITModelHandler::GetReactionProcessFlag ( )

Definition at line 110 of file G4ITModelHandler.cc.

111{
113}

Referenced by G4ITModelProcessor::Initialize().

◆ GetTimeStepComputerFlag()

bool G4ITModelHandler::GetTimeStepComputerFlag ( )

Definition at line 105 of file G4ITModelHandler.cc.

106{
108}

Referenced by G4ITModelProcessor::Initialize().

◆ Initialize()

void G4ITModelHandler::Initialize ( )

Definition at line 49 of file G4ITModelHandler.cc.

50{
51 fpModelManager->Initialize();
52 fIsInitialized = true;
53}

Referenced by G4ITModelProcessor::Initialize().

◆ operator=()

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

◆ RegisterModel()

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

Definition at line 55 of file G4ITModelHandler.cc.

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

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

◆ Reset()

void G4ITModelHandler::Reset ( )

Definition at line 115 of file G4ITModelHandler.cc.

116{
117 fpModelManager.reset();
118}

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: