RootAnalysis.hh

Go to the documentation of this file.
00001 
00002 
00003 #ifndef RootAnalysis_h
00004 #define RootAnalysis_h 1
00005 
00006 #include "TROOT.h"
00007 #include "TFile.h"
00008 #include "TNtuple.h"
00009 #include "globals.hh"
00010 #include "G4ThreeVector.hh"
00011 #include "MollerDetectorHit.hh"
00012 
00013 
00014 class G4Event;
00015 class G4Run;
00016 class G4Step;
00017 
00018 class RootAnalysis;
00019 extern RootAnalysis *gRootAnalysis; //global RootAnalysis
00020 
00021 class RootAnalysis {
00022 
00023 public:
00024 
00025   TFile *hfile;
00026 
00027 public:
00028 
00029   RootAnalysis() {
00030     if (gRootAnalysis)
00031       delete gRootAnalysis;
00032     gRootAnalysis = this;
00033 
00034   }
00035 
00036   virtual ~RootAnalysis() {
00037     if (gRootAnalysis == this)
00038       gRootAnalysis = (RootAnalysis *)0;
00039   }
00040 
00041   // G4UserRunAction
00042   virtual void BeginOfRunAction(const G4Run* /*aRun*/) {;}
00043 
00044   virtual void EndOfRunAction(const G4Run* /*aRun*/) {;}
00045   
00046   // G4UserEventAction
00047   virtual void BeginOfEventAction(const G4Event* /*anEvent*/) {;}
00048   virtual void EndOfEventAction(const G4Event* /*anEvent*/) {;}
00049   
00050   // G4UserSteppingAction
00051   virtual void UserSteppingAction(const G4Step* /*aStep*/) {;}
00052 
00053   virtual void SetMomentum0(G4double /*E0*/, G4double /*p0*/,
00054           G4double /*E0*/, G4double /*p0*/) {
00055   }
00056   virtual void SetMomentum1(G4double /*E0*/, G4double /*p0*/,
00057           G4double /*E0*/, G4double /*p0*/) {
00058   }
00059   virtual void SetMomentum2(G4double /*E0*/, G4double /*p0*/,
00060           G4double /*E0*/, G4double /*p0*/) {
00061   }
00062 
00063   virtual void SetDiffXS(G4double) {
00064   }
00065   virtual void SetTotXS(G4double) {
00066   }
00067   virtual void SetRate(G4double) {
00068   }
00069 
00070   virtual void SetProcess(G4int) {
00071   }
00072 
00073   virtual void AddData(MollerDetectorHit* /*aHit*/) {
00074   }
00075 
00076   virtual void End() {
00077   }
00078 
00079 };
00080 
00081 #endif
00082 

Generated on 16 Jun 2013 for mollersim by  doxygen 1.6.1