SLIC  6.1.1
Simulation for the Linear Collider (SLIC) - Geant4 simulation application
DummySimPlugin.cc
Go to the documentation of this file.
1 
7 // LDMX
8 #include "UserActionPlugin.hh"
9 
10 namespace slic {
11 
17 
18  public:
19 
21  std::cout << "DummySimPlugin::DummySimPlugin - Hello!" << std::endl;
22  }
23 
24  virtual ~DummySimPlugin() {
25  std::cout << "DummySimPlugin::~DummySimPlugin - Goodbye!" << std::endl;
26  }
27 
28  virtual std::string getName() {
29  return "DummySimPlugin";
30  }
31 
32  bool hasRunAction() {
33  return true;
34  }
35 
37  return true;
38  }
39 
41  return true;
42  }
43 
44  bool hasEventAction() {
45  return true;
46  }
47 
49  return true;
50  }
51 
53  return true;
54  }
55 
56  void beginRun(const G4Run* run) {
57  std::cout << "DummySimPlugin::beginRun - run " << run->GetRunID() << std::endl;
58  }
59 
60  void endRun(const G4Run* run) {
61  std::cout << "DummySimPlugin::endRun - run " << run->GetRunID() << std::endl;
62  }
63 
64  void stepping(const G4Step* step) {
65  std::cout << "DummySimPlugin::stepping - pre-point: " << step->GetPreStepPoint()->GetPosition() << ", post-point: ";
66  if (step->GetPostStepPoint()) {
67  std::cout << step->GetPostStepPoint()->GetPosition();
68  } else {
69  std::cout << "NONE";
70  }
71  std::cout << std::endl;
72  }
73 
74  void preTracking(const G4Track* track) {
75  std::cout << "DummySimPlugin::preTracking - track ID " << track->GetTrackID() << std::endl;
76  }
77 
78  void postTracking(const G4Track* track) {
79  std::cout << "DummySimPlugin::postTracking - track ID " << track->GetTrackID() << std::endl;
80  }
81 
82  void beginEvent(const G4Event* event) {
83  std::cout << "DummySimPlugin::beginEvent - event " << event->GetEventID() << std::endl;
84  }
85 
86  void endEvent(const G4Event* event) {
87  std::cout << "DummySimPlugin::endEvent - event " << event->GetEventID() << std::endl;
88  }
89 
90  G4ClassificationOfNewTrack stackingClassifyNewTrack(const G4Track* aTrack, const G4ClassificationOfNewTrack& currentTrackClass) {
91  std::cout << "DummySimPlugin::stackingClassifyNewTrack - track ID " << aTrack->GetTrackID() << " classified as " << currentTrackClass << std::endl;
92  return currentTrackClass;
93  }
94 
96  std::cout << "DummySimPlugin::stackingNewStage" << std::endl;
97  }
98 
100  std::cout << "DummySimPlugin::stackingPrepareNewEvent" << std::endl;
101  }
102 
103  void generatePrimary(G4Event* event) {
104  std::cout << "DummySimPlugin::generatorPrimary - event " << event->GetEventID() << std::endl;
105  }
106  };
107 }
108 
109 DECLARE_PLUGIN(slic, DummySimPlugin)
#define DECLARE_PLUGIN(NS, NAME)
Dummy implementation of UserActionPlugin.
void generatePrimary(G4Event *event)
void endRun(const G4Run *run)
virtual std::string getName()
void preTracking(const G4Track *track)
G4ClassificationOfNewTrack stackingClassifyNewTrack(const G4Track *aTrack, const G4ClassificationOfNewTrack &currentTrackClass)
void stepping(const G4Step *step)
void beginRun(const G4Run *run)
void beginEvent(const G4Event *event)
void postTracking(const G4Track *track)
void endEvent(const G4Event *event)
User simulation plugin.
@ endl
Definition: LogStream.hh:26