|
||||
File indexing completed on 2025-01-18 09:59:08
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 // Class description: 0027 // 0028 // This is a stack class used by G4StackManager. This class object 0029 // stores G4StackedTrack class objects into G4SubEvent 0030 0031 // Author: Makoto Asai (JLab) - 23/Aug/23 0032 // -------------------------------------------------------------------- 0033 #ifndef G4SubEventTrackStack_hh 0034 #define G4SubEventTrackStack_hh 1 0035 0036 #include "G4Types.hh" 0037 #include "G4SubEvent.hh" 0038 0039 class G4Event; 0040 class G4StackedTrack; 0041 0042 class G4SubEventTrackStack 0043 { 0044 public: 0045 0046 G4SubEventTrackStack() = default; 0047 explicit G4SubEventTrackStack(G4int ty, std::size_t maxEnt) 0048 : fSubEventType(ty), fMaxEnt(maxEnt) {;} 0049 ~G4SubEventTrackStack(); 0050 0051 G4SubEventTrackStack& operator=(const G4SubEventTrackStack&) = delete; 0052 G4bool operator==(const G4SubEventTrackStack&) const = delete; 0053 G4bool operator!=(const G4SubEventTrackStack&) const = delete; 0054 0055 void PushToStack(const G4StackedTrack& aStackedTrack); 0056 void ReleaseSubEvent(); 0057 //G4StackedTrack PopFromStack(); 0058 0059 void PrepareNewEvent(G4Event* ev); 0060 void clearAndDestroy(); 0061 0062 inline G4int GetSubEventType() const { return fSubEventType; } 0063 inline G4int GetNTrack() const 0064 { 0065 if(fCurrentSE==nullptr) return 0; 0066 return (G4int)fCurrentSE->size(); 0067 } 0068 inline std::size_t GetMaxNTrack() const { return fMaxEnt; } 0069 inline void SetVerboseLevel(G4int val) { verboseLevel = val; } 0070 0071 private: 0072 0073 G4int fSubEventType = -1; 0074 std::size_t fMaxEnt = 1000; 0075 G4SubEvent* fCurrentSE = nullptr; 0076 G4Event* fCurrentEvent = nullptr; 0077 G4int verboseLevel = 0; 0078 }; 0079 0080 #endif
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |