Import Geant4 10.0.0 source tree
This commit is contained in:
@@ -27,12 +27,11 @@
|
||||
/// \brief Implementation of the F01EventAction class
|
||||
//
|
||||
//
|
||||
// $Id$
|
||||
// $Id: F01EventAction.cc 76248 2013-11-08 11:19:52Z gcosmo $
|
||||
//
|
||||
//
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
#include "F01EventAction.hh"
|
||||
|
||||
@@ -46,74 +45,64 @@
|
||||
#include "G4HCofThisEvent.hh"
|
||||
#include "G4VHitsCollection.hh"
|
||||
#include "G4SDManager.hh"
|
||||
#include "G4ios.hh"
|
||||
#include "G4UnitsTable.hh"
|
||||
#include "Randomize.hh"
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
F01EventAction::F01EventAction(F01RunAction* F01RA)
|
||||
F01EventAction::F01EventAction(F01RunAction* action)
|
||||
: G4UserEventAction(),
|
||||
fCalorimeterCollID(-1),
|
||||
fCalorimeterCollID(-1),
|
||||
fEventMessenger(0),
|
||||
fRunAction(F01RA),
|
||||
fRunAction(action),
|
||||
fVerboseLevel(0),
|
||||
fPrintModulo(10000)
|
||||
{
|
||||
fEventMessenger = new F01EventActionMessenger(this);
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
F01EventAction::~F01EventAction()
|
||||
{
|
||||
delete fEventMessenger;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void F01EventAction::BeginOfEventAction(const G4Event* evt)
|
||||
{
|
||||
G4int evtNb = evt->GetEventID();
|
||||
if (evtNb%fPrintModulo == 0)
|
||||
if (evtNb%fPrintModulo == 0)
|
||||
G4cout << "\n---> Begin of Event: " << evtNb << G4endl;
|
||||
|
||||
|
||||
if (fVerboseLevel>1)
|
||||
G4cout << "<<< Event " << evtNb << " started." << G4endl;
|
||||
|
||||
|
||||
if (fCalorimeterCollID==-1)
|
||||
{
|
||||
G4SDManager * SDman = G4SDManager::GetSDMpointer();
|
||||
fCalorimeterCollID = SDman->GetCollectionID("CalCollection");
|
||||
}
|
||||
G4SDManager * sdManager = G4SDManager::GetSDMpointer();
|
||||
fCalorimeterCollID = sdManager->GetCollectionID("CalCollection");
|
||||
}
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void F01EventAction::EndOfEventAction(const G4Event* evt)
|
||||
{
|
||||
if (fVerboseLevel>0)
|
||||
G4cout << "<<< Event " << evt->GetEventID() << " ended." << G4endl;
|
||||
|
||||
|
||||
//save rndm status
|
||||
|
||||
// save rndm status
|
||||
if (fRunAction->GetRndmFreq() == 2)
|
||||
{
|
||||
CLHEP::HepRandom::saveEngineStatus("endOfEvent.rndm");
|
||||
{
|
||||
G4Random::saveEngineStatus("endOfEvent.rndm");
|
||||
G4int evtNb = evt->GetEventID();
|
||||
if (evtNb%fPrintModulo == 0)
|
||||
{
|
||||
{
|
||||
G4cout << "\n---> End of Event: " << evtNb << G4endl;
|
||||
CLHEP::HepRandom::showEngineStatus();
|
||||
G4Random::showEngineStatus();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
void F01EventAction::SetEventVerbose(G4int level)
|
||||
{
|
||||
fVerboseLevel = level ;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
Reference in New Issue
Block a user