src/tools/geant4/WorkerRunManager.hpp
The WorkerRunManager class, run manager for Geant4 that works on separate thread. More…
Namespaces
Name |
---|
allpix Helper class to hold support layers for a detector model. |
Classes
Name | |
---|---|
class | allpix::WorkerRunManager Run manager for Geant4 that can be used by multiple threads where each thread will have its own instance. |
Detailed Description
The WorkerRunManager class, run manager for Geant4 that works on separate thread.
Copyright: Copyright (c) 2019-2024 CERN and the Allpix Squared authors. This software is distributed under the terms of the MIT License, copied verbatim in the file “LICENSE.md”. In applying this license, CERN does not waive the privileges and immunities granted to it by virtue of its status as an Intergovernmental Organization or submit itself to any jurisdiction. SPDX-License-Identifier: MIT
Source code
#ifndef ALLPIX_WORKER_RUN_MANAGER_H
#define ALLPIX_WORKER_RUN_MANAGER_H
#include <G4WorkerRunManager.hh>
namespace allpix {
class MTRunManager;
class WorkerRunManager : public G4WorkerRunManager {
friend class MTRunManager;
public:
~WorkerRunManager() override;
void BeamOn(G4int n_event, const char* macroFile = nullptr, G4int n_select = -1) override; // NOLINT
void InitializeGeometry() override;
void AbortRun(G4bool softAbort) override; // NOLINT
static WorkerRunManager* GetNewInstanceForThread(); // NOLINT
protected:
WorkerRunManager();
void DoEventLoop(G4int n_event, const char* macroFile = nullptr, G4int n_select = -1) override; // NOLINT
void DoWork() override {}
G4Event* GenerateEvent(G4int i_event) override;
void MergePartialResults() override {}
};
} // namespace allpix
#endif /* ALLPIX_WORKER_RUN_MANAGER_H */
Updated on 2024-12-13 at 08:31:37 +0000