Geant4  v4-10.4-release
 모두 클래스 네임스페이스들 파일들 함수 변수 타입정의 열거형 타입 열거형 멤버 Friends 매크로 그룹들 페이지들
F04EventAction.cc
이 파일의 문서화 페이지로 가기
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: F04EventAction.cc 90239 2015-05-21 09:07:05Z gcosmo $
27 //
30 //
31 
32 #include "F04EventAction.hh"
33 
34 #include "F04RunAction.hh"
35 
37 
38 #include "G4Event.hh"
39 #include "G4EventManager.hh"
40 #include "G4Trajectory.hh"
41 #include "G4TrajectoryContainer.hh"
42 #include "G4VVisManager.hh"
43 
44 #include "Randomize.hh"
45 
46 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
47 
49  : fRunaction(runAction), fVerboseLevel(0)
50 {
52 }
53 
54 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
55 
57 {
58  delete fEventMessenger;
59 }
60 
61 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
62 
64 {
65  G4int evtNb = evt->GetEventID();
66 
67  if(fVerboseLevel>0)
68  G4cout << "<<< Event " << evtNb << " started." << G4endl;
69 }
70 
71 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
72 
73 #include "G4Threading.hh"
74 
76 {
77  if (fVerboseLevel>0)
78  G4cout << "<<< Event " << evt->GetEventID() << " ended." << G4endl;
79 
80  if (fRunaction->GetRndmFreq() == 2)
81  {
82  std::ostringstream os;
83  os<<"endOfEvent_"<<G4Threading::G4GetThreadId()<<".rndm";
84  G4Random::saveEngineStatus(os.str().c_str());
85  }
86 }
87 
88 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
89 
91 {
93 }
94 
95 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
96 
98 {
99  fVerboseLevel = level ;
100 }
G4int GetEventID() const
Definition: G4Event.hh:151
G4int GetRndmFreq()
Definition: F04RunAction.hh:55
#define G4endl
Definition: G4ios.hh:61
Definition of the F04EventAction class.
virtual void BeginOfEventAction(const G4Event *)
F04RunAction * fRunaction
F04EventActionMessenger * fEventMessenger
F04EventAction(F04RunAction *)
void SetEventVerbose(G4int)
virtual void EndOfEventAction(const G4Event *)
Definition of the F04EventActionMessenger class.
G4EventManager * fpEventManager
const G4Event * GetConstCurrentEvent()
int G4int
Definition: G4Types.hh:78
virtual ~F04EventAction()
G4GLOB_DLL std::ostream G4cout
Definition of the F04RunAction class.
G4int G4GetThreadId()
Definition: G4Threading.cc:128