DD4hep - The AIDA detector description toolkit for high energy physics experiments
DD4hep  Rev:Unversioneddirectory
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Geant4PrimaryHandler.cpp
Go to the documentation of this file.
1 // $Id: $
2 //==========================================================================
3 // AIDA Detector description implementation for LCD
4 //--------------------------------------------------------------------------
5 // Copyright (C) Organisation europeenne pour la Recherche nucleaire (CERN)
6 // All rights reserved.
7 //
8 // For the licensing terms see $DD4hepINSTALL/LICENSE.
9 // For the list of contributors see $DD4hepINSTALL/doc/CREDITS.
10 //
11 // Author : M.Frank
12 //
13 //==========================================================================
14 
15 // Framework include files
16 #include "DD4hep/Printout.h"
17 #include "DD4hep/InstanceCount.h"
20 
21 using namespace DD4hep::Simulation;
22 
25  : Geant4GeneratorAction(ctxt,nam)
26 {
28 }
29 
33 }
34 
36 void Geant4PrimaryHandler::operator()(G4Event* event) {
37  generatePrimaries(this, context(), event);
38 }
virtual void operator()(G4Event *event)
Event generation action callback.
static void decrement(T *)
Decrement count according to type information.
Geant4Context * context() const
Access the context.
Definition: Geant4Action.h:261
Geant4PrimaryHandler(Geant4Context *context, const std::string &nam)
Standard constructor.
virtual ~Geant4PrimaryHandler()
Default destructor.
Concrete implementation of the Geant4 generator action base class.
int generatePrimaries(const Geant4Action *caller, const Geant4Context *context, G4Event *event)
Generate all primary vertices corresponding to the merged interaction.
static void increment(T *)
Increment count according to type information.
Definition: InstanceCount.h:98
Generic context to extend user, run and event information.