File indexing completed on 2025-08-05 08:18:10
0001 #include "PHG4PhenixTrackingAction.h"
0002 #include "PHG4TrackingAction.h"
0003
0004 #include <iostream>
0005
0006 PHG4PhenixTrackingAction::~PHG4PhenixTrackingAction()
0007 {
0008 while (actions_.begin() != actions_.end())
0009 {
0010 delete actions_.back();
0011 actions_.pop_back();
0012 }
0013 }
0014
0015 void PHG4PhenixTrackingAction::PreUserTrackingAction(const G4Track* track)
0016 {
0017 if (Verbosity() > 0)
0018 {
0019 std::cout << "PHG4PhenixTrackingAction::PreUserTrackingAction" << std::endl;
0020 }
0021
0022
0023 for (ActionList::const_iterator iter = actions_.begin(); iter != actions_.end(); ++iter)
0024 {
0025 if (*iter)
0026 {
0027 if (Verbosity() > 0)
0028 {
0029 std::cout << "PHG4PhenixTrackingAction::PreUserTrackingAction - processing " << *iter << std::endl;
0030 }
0031 (*iter)->PreUserTrackingAction(track);
0032 }
0033 }
0034 }
0035
0036 void PHG4PhenixTrackingAction::PostUserTrackingAction(const G4Track* track)
0037 {
0038 if (Verbosity() > 0)
0039 {
0040 std::cout << "PHG4PhenixTrackingAction::PostUserTrackingAction" << std::endl;
0041 }
0042
0043
0044 for (ActionList::const_iterator iter = actions_.begin(); iter != actions_.end(); ++iter)
0045 {
0046 if (*iter)
0047 {
0048 if (Verbosity() > 0)
0049 {
0050 std::cout << "PHG4PhenixTrackingAction::PostUserTrackingAction - processing " << *iter << std::endl;
0051 }
0052 (*iter)->PostUserTrackingAction(track);
0053 }
0054 }
0055 }