Add a RunAction file

Hi! I’m building a new application using the files from an old one. I have in the apllication the files: Stepping Action, Primary Generator Action, Physics List, Event Action and Detector Construction. I want to get data from photon scaterring and for that I realised that I need a Run Action file in order to open and close a file, in the biggining and the end of a Run, to register the data on. Can someone tell me how can I add a RunAction file to my programme without creating any kind of entropy with my existing code?