source: trunk/examples/novice/gemc/src/MOutputBaseClass.h @ 807

Last change on this file since 807 was 807, checked in by garnier, 16 years ago

update

File size: 1.3 KB
Line 
1
2
3
4
5
6
7
8
9#ifndef MOUTBASECLASS_H
10#define MOUTBASECLASS_H 1
11
12// %%%%%%%%%%%%%
13// gemc headers
14// %%%%%%%%%%%%%
15#include "MBankdefs.h"
16#include "MPHBaseClass.h"
17#include "usage.h"
18
19// %%%%
20// EVIO
21// %%%%
22//#include "evioUtil.hxx"
23//using namespace evio;
24
25
26class MGeneratedParticle
27{
28 public:
29   MGeneratedParticle(){;}
30  ~MGeneratedParticle(){;}
31
32   G4ThreeVector vertex;
33   G4ThreeVector momentum;
34   int PID;
35};
36
37
38
39class MOutputs
40{
41 public:
42    MOutputs(gemc_opts);
43   ~MOutputs();
44
45   gemc_opts gemcOpt;
46   string outType;
47   string outFile;
48
49   ofstream        *txtoutput;
50   //   evioFileChannel *pchan;
51};
52
53class MOutputBaseClass
54{
55 public:
56   virtual void ProcessOutput(int, PH_output, MOutputs*, MBank)              = 0; 
57   virtual void SetBankHeader(int, string, MOutputs*)                        = 0; 
58   virtual void SetOutpHeader(int, MOutputs*)                                = 0; 
59   virtual void RecordAndClear(MOutputs*, MBank)                             = 0; 
60   virtual void WriteGenerated(MOutputs*, vector<MGeneratedParticle>)        = 0; 
61   virtual void WriteEvent(MOutputs*)                                        = 0; 
62   string outputType;
63};
64
65typedef MOutputBaseClass *(*MOutput_Factory)();                           
66
67MOutputBaseClass *GetMOutputClass (map<string, MOutput_Factory>, string); 
68
69
70#endif
Note: See TracBrowser for help on using the repository browser.