source: trunk/source/geometry/solids/test/OpticalEscape/src/AXPETEventAction.cc@ 1347

Last change on this file since 1347 was 1316, checked in by garnier, 15 years ago

update geant4-09-04-beta-cand-01 interfaces-V09-03-09 vis-V09-03-08

File size: 3.0 KB
Line 
1//
2// ********************************************************************
3// * License and Disclaimer *
4// * *
5// * The Geant4 software is copyright of the Copyright Holders of *
6// * the Geant4 Collaboration. It is provided under the terms and *
7// * conditions of the Geant4 Software License, included in the file *
8// * LICENSE and available at http://cern.ch/geant4/license . These *
9// * include a list of copyright holders. *
10// * *
11// * Neither the authors of this software system, nor their employing *
12// * institutes,nor the agencies providing financial support for this *
13// * work make any representation or warranty, express or implied, *
14// * regarding this software system or assume any liability for its *
15// * use. Please see the license in the file LICENSE and URL above *
16// * for the full disclaimer and the limitation of liability. *
17// * *
18// * This code implementation is the result of the scientific and *
19// * technical work of the GEANT4 collaboration. *
20// * By using, copying, modifying or distributing the software (or *
21// * any work based on the software) you agree to acknowledge its *
22// * use in resulting scientific publications, and indicate your *
23// * acceptance of all terms of the Geant4 Software license. *
24// ********************************************************************
25//
26// $Id: AXPETEventAction.cc,v 1.1 2008/09/03 13:34:03 gcosmo Exp $
27// ------------------------------------------------------------
28// Geant4 class implementation file
29//
30// 03/09/2008, by T.Nikitina
31// ------------------------------------------------------------
32
33#include "AXPETEventAction.hh"
34
35#include "AXPETRunAction.hh"
36
37#include "G4Event.hh"
38#include "G4EventManager.hh"
39#include "G4TrajectoryContainer.hh"
40#include "G4Trajectory.hh"
41#include "G4VVisManager.hh"
42#include "G4ios.hh"
43#include "G4UnitsTable.hh"
44#include "Randomize.hh"
45
46AXPETEventAction::AXPETEventAction(AXPETRunAction* RA)
47 :runaction(RA), verboselevel(1),
48 drawFlag("all"), printModulo(10000)
49{
50 ;
51}
52
53AXPETEventAction::~AXPETEventAction()
54{
55 ;
56}
57
58void AXPETEventAction::BeginOfEventAction(const G4Event* evt)
59{
60 if(verboselevel>1){
61 G4int evtNb = evt->GetEventID();
62
63 if (evtNb%printModulo == 0) {
64 G4cout << "\n---> Begin of Event: " << evtNb << G4endl;
65
66 G4cout << "<<< Event " << evtNb << " started." << G4endl;
67 }
68 }
69}
70
71void AXPETEventAction::EndOfEventAction(const G4Event* evt)
72{
73
74
75 if(verboselevel>0)
76 G4cout << "<<< Event " << evt->GetEventID() << " ended." << G4endl;
77
78}
79
80G4int AXPETEventAction::GetEventno()
81{
82 G4int evno = fpEventManager->GetConstCurrentEvent()->GetEventID() ;
83 return evno ;
84}
85
86void AXPETEventAction::setEventVerbose(G4int level)
87{
88 verboselevel = level ;
89}
Note: See TracBrowser for help on using the repository browser.