~durga/maus/rel709

« back to all changes in this revision

Viewing changes to src/common_cpp/Simulation/MAUSEventAction.cc

  • Committer: Durga Rajaram
  • Date: 2013-10-01 00:19:57 UTC
  • mfrom: (659.1.74 rc)
  • Revision ID: durga@fnal.gov-20131001001957-iswih60vis9rodw0
Tags: MAUS-v0.7.1
MAUS-v0.7.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
 
18
18
#include <vector>
19
19
 
 
20
#include "src/common_cpp/Utils/Exception.hh"
 
21
 
 
22
#include "src/common_cpp/Simulation/DetectorConstruction.hh"
20
23
#include "src/common_cpp/Simulation/MAUSEventAction.hh"
21
24
#include "src/common_cpp/Simulation/MAUSGeant4Manager.hh"
22
25
#include "src/common_cpp/Simulation/MAUSTrackingAction.hh"
31
34
}
32
35
 
33
36
void MAUSEventAction::BeginOfEventAction(const G4Event *anEvent) {
 
37
    if (_virtPlanes == NULL ||
 
38
        _tracking == NULL ||
 
39
        _stepping == NULL ||
 
40
        _geometry == NULL)
 
41
        throw(Exception(Exception::recoverable,
 
42
                        "EventAction::SetEvents not called",
 
43
                        "EventAction::BeginOfEventAction"));
34
44
    _virtPlanes->StartOfEvent();
35
45
    if (_tracking->GetWillKeepTracks())
36
46
        _tracking->SetTracks(Json::Value(Json::arrayValue));