18 #include "range/v3/view.hpp" 27 static std::string
const msgctg =
"ActionHolderService";
37 std::map<std::string, A*>& actionMap)
42 if (0 == actionMap.count(action->myName())) {
44 actionMap.try_emplace(action->myName(), action);
55 <<
"Duplicate action named " << action->myName() <<
".\n";
62 std::cerr <<
"registering to runActionsMap_\n";
69 std::cerr <<
"registering to eventActionsMap_\n";
76 std::cerr <<
"registering to trackingActionsMap_\n";
83 std::cerr <<
"registering to steppingActionsMap_\n";
90 std::cerr <<
"registering to stackingActionsMap_\n";
97 std::cerr <<
"registering to primaryGeneratorActionsMap_\n";
106 action->callArtProduces(collector);
114 action->initialize();
125 action->beginOfEventAction(theEvent);
133 action->endOfEventAction(theEvent);
142 action->preUserTrackingAction(theTrack);
150 action->postUserTrackingAction(theTrack);
159 action->userSteppingAction(theStep);
168 if (action->killNewTrack(newTrack)) {
180 action->generatePrimaries(theEvent);
void postUserTrackingAction(const G4Track *)
bool killNewTrack(const G4Track *)
std::map< std::string, StackingActionBase * > stackingActionsMap_
void generatePrimaries(G4Event *)
void doRegisterAction(A *const action, std::map< std::string, A * > &actionMap)
void endOfEventAction(const G4Event *)
decltype(auto) values(Coll &&coll)
Range-for loop helper iterating across the values of the specified collection.
void callArtProduces(art::ProducesCollector &prod)
static std::string const msgctg
std::map< std::string, ActionBase * > allActionsMap_
std::map< std::string, RunActionBase * > runActionsMap_
void registerAction(RunActionBase *const action)
MaybeLogger_< ELseverityLevel::ELsev_success, false > LogDebug
void preUserTrackingAction(const G4Track *)
ActionHolderService(fhicl::ParameterSet const &)
std::map< std::string, EventActionBase * > eventActionsMap_
void beginOfEventAction(const G4Event *)
std::map< std::string, SteppingActionBase * > steppingActionsMap_
void userSteppingAction(const G4Step *)
cet::coded_exception< error, detail::translate > exception
std::map< std::string, PrimaryGeneratorActionBase * > primaryGeneratorActionsMap_
std::map< std::string, TrackingActionBase * > trackingActionsMap_