SToGS
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros
SToGS_PrintOut.hh
Go to the documentation of this file.
1 //
2 // ********************************************************************
3 // * License and Disclaimer *
4 // * *
5 // * The Geant4 software is copyright of the Copyright Holders of *
6 // * the Geant4 Collaboration. It is provided under the terms and *
7 // * conditions of the Geant4 Software License, included in the file *
8 // * LICENSE and available at http://cern.ch/geant4/license . These *
9 // * include a list of copyright holders. *
10 // * *
11 // * Neither the authors of this software system, nor their employing *
12 // * institutes,nor the agencies providing financial support for this *
13 // * work make any representation or warranty, express or implied, *
14 // * regarding this software system or assume any liability for its *
15 // * use. Please see the license in the file LICENSE and URL above *
16 // * for the full disclaimer and the limitation of liability. *
17 // * *
18 // * This code implementation is the result of the scientific and *
19 // * technical work of the GEANT4 collaboration. *
20 // * By using, copying, modifying or distributing the software (or *
21 // * any work based on the software) you agree to acknowledge its *
22 // * use in resulting scientific publications, and indicate your *
23 // * acceptance of all terms of the Geant4 Software license. *
24 // ********************************************************************
25 //
26 //----------------------------------------------------------------------------
27 
28 #ifndef SToGS_PrintOut_h
29 #define SToGS_PrintOut_h 1
30 
32 #include "G4Run.hh"
33 
35 namespace SToGS {
37 
39  class PrintOutRun : public G4Run
40  {
41  protected:
43  G4int collcaloID;
44 
45  public:
46  PrintOutRun();
47  virtual ~PrintOutRun();
48 
49  virtual void RecordEvent(const G4Event* evt);
50  //virtual void Merge(const G4Run*);
51  };
53 
55  class PrintOutAction : public AllActions
56  {
57  public:
58  PrintOutAction(G4String option = "") : AllActions(option)
59  {;}
60  virtual ~PrintOutAction()
61  {;}
62 
63  virtual G4Run* GenerateRun();
64 
65  virtual void BeginOfRunAction(const G4Run * /*therun*/);
66  virtual void EndOfRunAction(const G4Run * /*therun*/);
67  virtual void BeginOfEventAction(const G4Event * /*event*/);
68  virtual void EndOfEventAction(const G4Event * /*event*/);
69  virtual void PreUserTrackingAction(const G4Track * /*atrack*/);
70  virtual void PostUserTrackingAction(const G4Track * /*atrack*/);
71  virtual void UserSteppingAction(const G4Step * /*step*/);
72  };
74 
76  class PrintOut : public AllInOneUserActionInitialization<PrintOutAction>
77  {
78  public:
79  PrintOut(G4String option = "run;event;track;step", G4String which_gene = "GPS", G4String which_gene_opt = "G4Macros/GPSPointLike.mac") :
80  AllInOneUserActionInitialization<PrintOutAction>(option,which_gene,which_gene_opt)
81  {;}
82  virtual ~PrintOut()
83  {;}
84 
85  virtual G4UserRunAction *GetRunAction() const;
86  virtual G4UserEventAction *GetEventAction() const;
87  virtual G4UserTrackingAction *GetTrackingAction() const;
88  virtual G4UserSteppingAction *GetSteppingAction() const;
89 
90  virtual void Build () const;
91  };
92 
93 
94 } // SToGS Namespace
95 
96 #endif /* SToGS_PrintOut.hh */
97 
98 
99 
100 
virtual void RecordEvent(const G4Event *evt)
At any steps, it prints out some informations regarding run, event, step ...
virtual G4UserTrackingAction * GetTrackingAction() const
a G4 user's action manage by a single AllAction class
PrintOutAction(G4String option="")
virtual G4UserEventAction * GetEventAction() const
virtual void BeginOfRunAction(const G4Run *)
virtual void EndOfRunAction(const G4Run *)
virtual void Build() const
PrintOut(G4String option="run;event;track;step", G4String which_gene="GPS", G4String which_gene_opt="G4Macros/GPSPointLike.mac")
virtual ~PrintOut()
virtual void BeginOfEventAction(const G4Event *)
virtual void UserSteppingAction(const G4Step *)
This is the ActionInitialization class to handle PrintOut at different levels (run, events ...) from a unique AllAction event Class.
virtual void PostUserTrackingAction(const G4Track *)
virtual void PreUserTrackingAction(const G4Track *)
virtual G4UserRunAction * GetRunAction() const
depending on one string, select a given gun
virtual G4Run * GenerateRun()
Base class that regroups in the same space all user's hooks. Convenient for sharing similar data...
virtual G4UserSteppingAction * GetSteppingAction() const
virtual void EndOfEventAction(const G4Event *)