How to define user RunAction with an object of EventAction and `vice versa in the UserActionInitialization class?

Hello everyone,
Sorry for a probably very obvious question.

Is it possible(and makes sense) to define “implicitly”, such that runaction constructor has eventaction constructor and vice versa in the Build() and BuildforMaster()methods of the UserActionInitialization class?

runaction* RunAction= new runaction(EventAction);
eventaction* EventAction= new eventaction(RunAction); 

Thank You in advance !

Not directly, no, because in the code snippet, the EventAction pointer isn’t defined. What could be done is the have methods in each to set the corresponding pointer, e.g.

runaction* RunAction= new runaction();
eventaction* EventAction= new eventaction();

1 Like

Thanks a lot for you answer.