GEMC  1.8
Geant4 Monte-Carlo Framework
MOutputBaseClass.h
Go to the documentation of this file.
1 #ifndef MOUTBASECLASS_H
10 #define MOUTBASECLASS_H 1
11 
12 // %%%%%%%%%%%%%
13 // gemc headers
14 // %%%%%%%%%%%%%
15 #include "MBankdefs.h"
16 #include "evioFileChannel.hxx"
17 #include "usage.h"
18 
19 // %%%%
20 // EVIO
21 // %%%%
22 #include "evioUtil.hxx"
23 #include "evioUtil.hxx"
24 using namespace evio;
25 
26 
33 {
34  public:
37 
38  G4ThreeVector vertex;
39  G4ThreeVector momentum;
40  int PID;
41 };
42 
43 
44 class header
45 {
46  public:
47 
48  int evn;
49  int type;
50  double beamPol;
54  double targetPol;
55  double time;
56 };
57 
58 
62 class MOutputs
63 {
64  public:
66  ~MOutputs();
67 
69  string outType;
70  string outFile;
71 
72  ofstream *txtoutput;
73  evioFileChannel *pchan;
74 };
75 
83 {
84  public:
85  virtual void SaveSimConditions(MOutputs*, map<string, string>) = 0;
86  virtual void ProcessOutput(PH_output, MOutputs*, MBank) = 0;
87  virtual void SetBankHeader(int, string, MOutputs*) = 0;
88  virtual void SetOutpHeader(header, MOutputs*) = 0;
89  virtual void RecordAndClear(MOutputs*, MBank) = 0;
90  virtual void WriteGenerated(MOutputs*, vector<MGeneratedParticle>) = 0;
91  virtual void WriteEvent(MOutputs*) = 0;
92  string outputType;
93 
94  virtual ~MOutputBaseClass(){;}
95 };
96 
97 typedef MOutputBaseClass *(*MOutput_Factory)();
98 
99 MOutputBaseClass *GetMOutputClass (map<string, MOutput_Factory> *MOutput, string);
100 
101 
102 #endif
G4ThreeVector momentum
MOutputBaseClass * GetMOutputClass(map< string, MOutput_Factory > *MOutput, string)
Instantiates MOutputBaseClass.
string outFile
G4ThreeVector vertex
ofstream * txtoutput
string outType
double targetPol
Target Polarization.
gemc_opts gemcOpt
evioFileChannel * pchan
virtual ~MOutputBaseClass()
double time
Event Time.
int evn
Event number.