File indexing completed on 2025-08-05 08:18:10
0001 #include "PHG4PhenixStackingAction.h"
0002 #include "PHG4StackingAction.h"
0003
0004 PHG4PhenixStackingAction::~PHG4PhenixStackingAction()
0005 {
0006 while (actions_.begin() != actions_.end())
0007 {
0008 delete actions_.back();
0009 actions_.pop_back();
0010 }
0011 }
0012
0013
0014 G4ClassificationOfNewTrack PHG4PhenixStackingAction::ClassifyNewTrack(const G4Track* aTrack)
0015 {
0016
0017 G4ClassificationOfNewTrack retcode = fUrgent;
0018 for (ActionList::const_iterator iter = actions_.begin(); iter != actions_.end(); ++iter)
0019 {
0020 if (*iter)
0021 {
0022 G4ClassificationOfNewTrack cret = (*iter)->ClassifyNewTrack(aTrack);
0023 if (cret != fUrgent)
0024 {
0025 retcode = cret;
0026 }
0027 }
0028 }
0029 return retcode;
0030 }
0031
0032
0033 void PHG4PhenixStackingAction::PrepareNewEvent()
0034 {
0035
0036 for (ActionList::const_iterator iter = actions_.begin(); iter != actions_.end(); ++iter)
0037 {
0038 if (*iter)
0039 {
0040 (*iter)->PrepareNewEvent();
0041 }
0042 }
0043 return;
0044 }