Skip to content

Commit

Permalink
Celeritas initialization
Browse files Browse the repository at this point in the history
  • Loading branch information
SAKIB RAHMAN committed Dec 31, 2024
1 parent a1125d0 commit 1270f9f
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
8 changes: 8 additions & 0 deletions DDG4/celeritas/Celeritas.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -117,3 +117,11 @@ void CeleritasEventAction::begin(const G4Event* event){
void CeleritasEventAction::end(const G4Event* event){
CelerSimpleOffload().EndOfEventAction(event);
}

void CeleritasInitialization::build(){
CelerSimpleOffload().Build(&CelerSetupOptions(), &CelerSharedParams(), &CelerLocalTransporter());
}

void CeleritasInitialization::buildMaster(){
CelerSimpleOffload().BuildForMaster(&CelerSetupOptions(), &CelerSharedParams());
}
12 changes: 12 additions & 0 deletions DDG4/celeritas/Celeritas.h
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,18 @@ namespace dd4hep {
virtual void end(const G4Event* event) override;
}

class CeleritasInitialization : public Geant4Action
{
/// Standard constructor
CeleritasInitialization(Geant4Context* context, const std::string& nam);
/// Default destructor
virtual ~CeleritasInitialization();
/// Callback function to setup celeritas for the MT worker thread
virtual void build() const;
/// Callback function to setup celeritas for the MT master thread
virtual void buildMaster() const;
}

} /* End namespace sim */
} /* End namespace dd4hep*/

Expand Down

0 comments on commit 1270f9f

Please sign in to comment.