![]() |
|
|||
File indexing completed on 2025-09-16 08:27:19
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/TrackingManagerIntegration.hh 0006 //---------------------------------------------------------------------------// 0007 #pragma once 0008 0009 #include <vector> 0010 0011 #include "IntegrationBase.hh" 0012 0013 namespace celeritas 0014 { 0015 //---------------------------------------------------------------------------// 0016 /*! 0017 * Simple interface for G4VTrackingManager-based integration. 0018 * 0019 * This singleton integrates both thread-local and global data with the user 0020 * application. To use this class in your Geant4 application to offload tracks 0021 * to Celeritas: 0022 * 0023 * - Use the \c TrackingManagerConstructor class to add the Celeritas tracking 0024 * manager to your physics list. 0025 * - Use \c SetOptions to set up options before \c G4RunManager::Initialize: 0026 * usually in \c main for simple applications. 0027 * - Call \c BeginOfRunAction and \c EndOfRunAction from \c UserRunAction 0028 * 0029 * The \c CELER_DISABLE environment variable, if set and non-empty, will 0030 * disable offloading so that Celeritas will not be built nor kill tracks. 0031 * 0032 * The method names correspond to methods in Geant4 User Actions and \em must 0033 * be called from all threads, both worker and master. 0034 * 0035 * \todo Provide default minimal action initialization classes for user 0036 */ 0037 class TrackingManagerIntegration final : public IntegrationBase 0038 { 0039 public: 0040 // Access the public-facing integration singleton 0041 static TrackingManagerIntegration& Instance(); 0042 0043 // Start the run 0044 void BeginOfRunAction(G4Run const* run) final; 0045 0046 private: 0047 // Tracking manager can only be created privately 0048 TrackingManagerIntegration(); 0049 }; 0050 0051 //---------------------------------------------------------------------------// 0052 } // 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 |
![]() ![]() |