Geant4 Cross Reference |
1 // 1 // 2 // ******************************************* 2 // ******************************************************************** 3 // * License and Disclaimer 3 // * License and Disclaimer * 4 // * 4 // * * 5 // * The Geant4 software is copyright of th 5 // * The Geant4 software is copyright of the Copyright Holders of * 6 // * the Geant4 Collaboration. It is provided 6 // * the Geant4 Collaboration. It is provided under the terms and * 7 // * conditions of the Geant4 Software License 7 // * conditions of the Geant4 Software License, included in the file * 8 // * LICENSE and available at http://cern.ch/ 8 // * LICENSE and available at http://cern.ch/geant4/license . These * 9 // * include a list of copyright holders. 9 // * include a list of copyright holders. * 10 // * 10 // * * 11 // * Neither the authors of this software syst 11 // * Neither the authors of this software system, nor their employing * 12 // * institutes,nor the agencies providing fin 12 // * institutes,nor the agencies providing financial support for this * 13 // * work make any representation or warran 13 // * work make any representation or warranty, express or implied, * 14 // * regarding this software system or assum 14 // * regarding this software system or assume any liability for its * 15 // * use. Please see the license in the file 15 // * use. Please see the license in the file LICENSE and URL above * 16 // * for the full disclaimer and the limitatio 16 // * for the full disclaimer and the limitation of liability. * 17 // * 17 // * * 18 // * This code implementation is the result 18 // * This code implementation is the result of the scientific and * 19 // * technical work of the GEANT4 collaboratio 19 // * technical work of the GEANT4 collaboration. * 20 // * By using, copying, modifying or distri 20 // * By using, copying, modifying or distributing the software (or * 21 // * any work based on the software) you ag 21 // * any work based on the software) you agree to acknowledge its * 22 // * use in resulting scientific publicati 22 // * use in resulting scientific publications, and indicate your * 23 // * acceptance of all terms of the Geant4 Sof 23 // * acceptance of all terms of the Geant4 Software license. * 24 // ******************************************* 24 // ******************************************************************** 25 // 25 // 26 /// \file hadronic/Hadr01/include/EventAction. << 26 // $Id: EventAction.hh,v 1.3 2006/06/29 17:23:34 gunter Exp $ 27 /// \brief Definition of the EventAction class << 27 // GEANT4 tag $Name: geant4-09-01 $ 28 // << 29 // 28 // 30 ////////////////////////////////////////////// 29 ///////////////////////////////////////////////////////////////////////// 31 // 30 // 32 // EventAction 31 // EventAction 33 // 32 // 34 // Created: 21.06.2008 V.Ivanchenko << 33 // Created: 31.04.2006 V.Ivanchenko 35 // 34 // 36 // Modified: 35 // Modified: >> 36 // 04.06.2006 Adoptation of hadr01 (V.Ivanchenko) 37 // 37 // 38 ////////////////////////////////////////////// 38 //////////////////////////////////////////////////////////////////////// 39 // << 39 // 40 40 41 #ifndef EventAction_h 41 #ifndef EventAction_h 42 #define EventAction_h 1 42 #define EventAction_h 1 43 << 43 44 #include "G4UserEventAction.hh" 44 #include "G4UserEventAction.hh" 45 #include "globals.hh" 45 #include "globals.hh" 46 << 47 #include <vector> 46 #include <vector> 48 47 49 //....oooOO0OOooo........oooOO0OOooo........oo 48 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 50 49 51 class G4Event; 50 class G4Event; 52 class EventActionMessenger; 51 class EventActionMessenger; 53 class G4UImanager; 52 class G4UImanager; 54 53 55 class EventAction : public G4UserEventAction 54 class EventAction : public G4UserEventAction 56 { 55 { 57 public: // Without description << 56 public: // Without description 58 EventAction(); << 57 59 ~EventAction() override; << 58 EventAction(); 60 << 59 virtual ~EventAction(); 61 void BeginOfEventAction(const G4Event*) ov << 60 62 void EndOfEventAction(const G4Event*) over << 61 void BeginOfEventAction(const G4Event*); 63 << 62 void EndOfEventAction(const G4Event*); 64 void SetPrintModulo(G4int val) { fPrintMod << 63 65 void AddEventToDebug(G4int val) { fSelecte << 64 void SetPrintModulo(G4int val) {printModulo = val;}; 66 << 65 void SetDrawFlag(G4String val) {drawFlag = val;}; 67 EventAction& operator=(const EventAction& << 66 void AddEventToDebug(G4int val) {selectedEvents.push_back(val); 68 EventAction(const EventAction&) = delete; << 67 nSelected++;}; 69 << 68 70 private: << 69 private: 71 EventActionMessenger* fEventMessenger; << 70 72 G4UImanager* fUI; << 71 EventActionMessenger* eventMessenger; 73 std::vector<G4int> fSelectedEvents; << 72 G4UImanager* UI; >> 73 std::vector<G4int> selectedEvents; >> 74 >> 75 G4int printModulo; >> 76 G4int nSelected; >> 77 >> 78 // drawFlags = all, charged, neutral, charged+n >> 79 G4String drawFlag; >> 80 G4bool debugStarted; 74 81 75 G4int fPrintModulo{100}; << 76 G4bool fDebugStarted{false}; << 77 }; 82 }; 78 83 79 #endif 84 #endif >> 85 >> 86 80 87