|
||||
File indexing completed on 2025-01-18 09:59:17
0001 // 0002 // ******************************************************************** 0003 // * License and Disclaimer * 0004 // * * 0005 // * The Geant4 software is copyright of the Copyright Holders of * 0006 // * the Geant4 Collaboration. It is provided under the terms and * 0007 // * conditions of the Geant4 Software License, included in the file * 0008 // * LICENSE and available at http://cern.ch/geant4/license . These * 0009 // * include a list of copyright holders. * 0010 // * * 0011 // * Neither the authors of this software system, nor their employing * 0012 // * institutes,nor the agencies providing financial support for this * 0013 // * work make any representation or warranty, express or implied, * 0014 // * regarding this software system or assume any liability for its * 0015 // * use. Please see the license in the file LICENSE and URL above * 0016 // * for the full disclaimer and the limitation of liability. * 0017 // * * 0018 // * This code implementation is the result of the scientific and * 0019 // * technical work of the GEANT4 collaboration. * 0020 // * By using, copying, modifying or distributing the software (or * 0021 // * any work based on the software) you agree to acknowledge its * 0022 // * use in resulting scientific publications, and indicate your * 0023 // * acceptance of all terms of the Geant4 Software license. * 0024 // ******************************************************************** 0025 // 0026 // G4UserEventAction 0027 // 0028 // Class description: 0029 // 0030 // This is the base class of one of the user's optional action classes. 0031 // The two methods BeginOfEventAction() and EndOfEventAction() are invoked 0032 // at the beginning and the end of one event processing. These methods are 0033 // invoked by G4EventManager. 0034 // Be aware that BeginOfEventAction() is invoked when a G4Event object is 0035 // sent to G4EventManager. Thus the primary vertexes/particles have already 0036 // been made by the primary generator. In case the user wants to do something 0037 // before generating primaries (i.e., store random number status), do it in 0038 // the G4VUserPrimaryGeneratorAction concrete class 0039 0040 // Author: Makoto Asai (SLAC) 0041 // Adding MergeSubEvent - Sep/11/2023 Makoto Asai (JLab) 0042 // -------------------------------------------------------------------- 0043 #ifndef G4UserEventAction_hh 0044 #define G4UserEventAction_hh 1 0045 0046 class G4EventManager; 0047 class G4Event; 0048 0049 class G4UserEventAction 0050 { 0051 public: 0052 0053 G4UserEventAction(); 0054 virtual ~G4UserEventAction() = default; 0055 virtual void SetEventManager(G4EventManager* value); 0056 0057 virtual void BeginOfEventAction(const G4Event* anEvent); 0058 virtual void EndOfEventAction(const G4Event* anEvent); 0059 // Two virtual method the user can override. 0060 0061 virtual void MergeSubEvent(G4Event* masterEvent, const G4Event* subEvent); 0062 // A virtual method to merge the results of a sub-event into the master 0063 // event. The ownership of "subEvent" and its contents blong to the 0064 // worker thread. 0065 // Merging trajectories and scores are taken care by G4Event and 0066 // G4ScoringManager so the user does not need to take care of them. 0067 // But merging hits collections and UserEventInformation must be taken 0068 // care by this method. 0069 // This method is invoked only for the case of sub-event parallelism. 0070 0071 protected: 0072 0073 G4EventManager* fpEventManager = nullptr; // not owned 0074 }; 0075 0076 #endif
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |