/// @file AllPixRunAction.hh /// @brief Header file for the Allpix run action class. #ifndef AllPixRunAction_h #define AllPixRunAction_h 1 // GEANT4 include statements. #include "globals.hh" #include "G4UserRunAction.hh" #include "G4RunManager.hh" // ROOT include statements. #include #include #include #include // Standard include statements. #include #include // Allpix include statements. #include "AllPixRun.hh" #include "Frames.h" using namespace std; class G4Timer; class G4Run; class AllPixRun; class AllPixDetectorConstruction; /// @brief Simplified hits. typedef struct { float edep; float stepL; float x; float y; float z; } simplifiedHitsInfo; /// @brief The Allpix run action class. /// /// @author J. Idarraga (principle author - idarraga@cern.ch) /// @author T. Whyntie (editor, CERN\@school - t.whyntie@qmul.ac.uk) /// @date Ed. February 2014 class AllPixRunAction : public G4UserRunAction { public: /// @brief The constructor. /// /// @param [in] det Pointer to the detector construction object. /// @param [in] dsid The dataset ID. /// @param [in] outputdir The output directory. /// @param [in] epf The number of events to store per frame. /// @param [in] fpf The number of frames per ROOT file. AllPixRunAction( AllPixDetectorConstruction * det, TString dsid, TString outputdir, G4int epf, G4int fpf //TString of1, //TString of2 ); /// @brief The destructor. ~AllPixRunAction(); public: /// @brief Method carried out at the start of the run. void BeginOfRunAction(const G4Run* aRun); void EndOfRunAction(const G4Run* aRun); G4Run * GenerateRun(); /// @brief Get the number of events to store per frame. /// /// @return The number of events per frame. inline G4int GetEventsPerFrame() { return m_eventsPerFrame; } inline G4int GetFramesPerFile() { return m_framesPerFile; } inline void IncrementFrameNumber() { m_currentFrameNumber++; } inline G4long GetCurrentFrameNum() { return m_currentFrameNumber; } inline AllPixRun * GetAllPixRun() { return m_AllPixRun; } private: /// @brief Pointer to the detector construction object. AllPixDetectorConstruction * m_detectorPtr; /// @brief The dataset ID. TString m_dataset; /// @brief The output directory. TString m_tempdir; /// @brief The number of source particle events to store per frame. G4int m_eventsPerFrame; /// @brief The number of frames to save per ROOT file. G4int m_framesPerFile; /// @brief The current frame number. G4long m_currentFrameNumber; G4Timer * timer; AllPixRun * m_AllPixRun; // TW commented out for now - 2014-02-17 // // file for lcio // ofstream * m_lciobridge_f; // ofstream * m_lciobridge_dut_f; // /TW };//end of AllPixRunAction class definition. #endif // ~AllPixRunAction_h