CMS 3D CMS Logo

VisG4ExampleEventAction.cc

Go to the documentation of this file.
00001 //<<<<<< INCLUDES                                                       >>>>>>
00002 
00003 #include "VisExamples/VisG4ExN02/src/VisG4ExampleEventAction.h"
00004 #include <G4Event.hh>
00005 #include <G4TrajectoryContainer.hh>
00006 
00007 //<<<<<< PRIVATE DEFINES                                                >>>>>>
00008 //<<<<<< PRIVATE CONSTANTS                                              >>>>>>
00009 //<<<<<< PRIVATE TYPES                                                  >>>>>>
00010 //<<<<<< PRIVATE VARIABLE DEFINITIONS                                   >>>>>>
00011 //<<<<<< PUBLIC VARIABLE DEFINITIONS                                    >>>>>>
00012 //<<<<<< CLASS STRUCTURE INITIALIZATION                                 >>>>>>
00013 //<<<<<< PRIVATE FUNCTION DEFINITIONS                                   >>>>>>
00014 //<<<<<< PUBLIC FUNCTION DEFINITIONS                                    >>>>>>
00015 //<<<<<< MEMBER FUNCTION DEFINITIONS                                    >>>>>>
00016 
00017 void
00018 VisG4ExampleEventAction::EndOfEventAction (const G4Event *event)
00019 {
00020     int                         eventId = event->GetEventID ();
00021     G4TrajectoryContainer       *trajs = event->GetTrajectoryContainer ();
00022     int                         n = trajs ? trajs->entries () : 0;
00023 
00024     if (eventId < 100 || eventId % 100 == 0) 
00025         std::cout << "*** Event " << eventId << ": "
00026                   << n << " trajectories stored in this event.\n";
00027 }

Generated on Tue Jun 9 17:49:46 2009 for CMSSW by  doxygen 1.5.4