Main Page | Class Hierarchy | Class List | File List | Class Members | File Members | Related Pages

MyEventAction_HBOOK.hh

Go to the documentation of this file.
00001 /**@file MyEventAction_HBOOK.hh
00002    provides example of HBOOK I/O with some extras just for fun.
00003    This is really more of a demo than something I expect people to use.
00004    @author G. Horton-Smith
00005 */
00006 
00007 // customized GLG4EventAction for HBOOK I/O
00008 class MyEventAction : public GLG4VEventAction {
00009 public:
00010   MyEventAction();
00011   
00012   void OpenFile(G4String fn, G4bool mode);
00013   void CloseFile();
00014   void FillData(const class G4Event* evt);
00015   void Clear();
00016 
00017 private:
00018   int file_open;
00019   static const char hbTopName[];
00020 };
00021 
00022 // custom_GLG4SteppingAction is where histos are booked and filled "on-the-fly"
00023 class custom_GLG4SteppingAction : public GLG4SteppingAction {
00024 public:
00025   custom_GLG4SteppingAction() {}
00026   void UserSteppingAction(const G4Step* aStep);
00027   inline int HID(int PDGcode, int htype)
00028     { return 100*PDGcode + (PDGcode>0 ? htype : -htype); }
00029   map <int,int> hids;
00030   map <G4String,int> noPDGcode_codes;
00031   static int max_noPDGcode_codes;
00032   enum { start_noPDGcode_codes= 9000 };
00033 };

Generated on Fri Jul 6 13:31:46 2007 for GLG4sim by  doxygen 1.3.9.1