![]() |
|
|||
File indexing completed on 2025-09-16 08:27:18
0001 //------------------------------- -*- C++ -*- -------------------------------// 0002 // Copyright Celeritas contributors: see top-level COPYRIGHT file for details 0003 // SPDX-License-Identifier: (Apache-2.0 OR MIT) 0004 //---------------------------------------------------------------------------// 0005 //! \file accel/FastSimulationIntegration.hh 0006 //---------------------------------------------------------------------------// 0007 #pragma once 0008 0009 #include "IntegrationBase.hh" 0010 0011 namespace celeritas 0012 { 0013 //---------------------------------------------------------------------------// 0014 /*! 0015 * Simple interface for G4VTrackingManager-based integration. 0016 * 0017 * This singleton integrates both thread-local and global data with the user 0018 * application. To use this class in your Geant4 application to offload tracks 0019 * to Celeritas: 0020 * 0021 * - Add the \c FastSimulationModel to regions of interest. 0022 * - Use \c SetOptions to set up options before \c G4RunManager::Initialize: 0023 * usually in \c main for simple applications. 0024 * - Call \c BeginOfRunAction and \c EndOfRunAction from \c UserRunAction 0025 * 0026 * The \c CELER_DISABLE environment variable, if set and non-empty, will 0027 * disable offloading so that Celeritas will not be built nor kill tracks. 0028 * 0029 * The method names correspond to methods in Geant4 User Actions and \em must 0030 * be called from all threads, both worker and master. 0031 */ 0032 class FastSimulationIntegration final : public IntegrationBase 0033 { 0034 public: 0035 // Access the public-facing integration singleton 0036 static FastSimulationIntegration& Instance(); 0037 0038 // Start the run 0039 void BeginOfRunAction(G4Run const* run) final; 0040 0041 private: 0042 // Tracking manager can only be created privately 0043 FastSimulationIntegration(); 0044 }; 0045 0046 //---------------------------------------------------------------------------// 0047 } // namespace celeritas
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
![]() ![]() |