# File: prune.mac # Brief: Macro showing how to prune RAT DS output root files # # Date: 2015-01-08 # Contact: P G Jones, # Revisions: # # This macro demostrates how to prune various parts of the DS that would # otherwise be writen to the root file. /run/initialize # BEGIN EVENT LOOP /rat/proc count # An example processor /rat/procset update 5 # Prune the entire MC side of the DS /rat/proc prune /rat/procset prune "mc" # Prune the MC particle branch /rat/proc prune /rat/procset prune "mc.particles" # Prune the MC parents branch /rat/proc prune /rat/procset prune "mc.parents" # Prune the MC tracks branch /rat/proc prune /rat/procset prune "mc.tracks" # Prune the MC Track Steps sub branch /rat/proc prune /rat/procset prune "mc.tracks.steps" # Prune the MC PMTs branch /rat/proc prune /rat/procset prune "mc.pmts" # Prune the MC PMT Photons sub branch /rat/proc prune /rat/procset prune "mc.pmts.photons" # Prune the MC PMT Photoelectrons sub branch /rat/proc prune /rat/procset prune "mc.pmts.photoelectrons" # Prune the MC EVs branch /rat/proc prune /rat/procset prune "mcevs" # Prune the entire EVs /rat/proc prune /rat/procset prune "evs" # Prune the uncalibrated PMTs /rat/proc prune /rat/procset prune "ev.uncalPMTs" # Prune the calibrated PMTs /rat/proc prune /rat/procset prune "ev.calPMTs" # Prune the intermediate/partially calibrated PMTs /rat/proc prune /rat/procset prune "ev.intermedCalPMTs" # Prune the all the PMTs /rat/proc prune /rat/procset prune "ev.pmt" /rat/proc outroot /rat/procset file "output.root" # END EVENT LOOP # Generate something to prune, 1MeV electrons /generator/add combo gun:point /generator/vtx/set e- 0 0 0 1.0 /generator/pos/set 0 0 0 /generator/rate/set 1 /rat/run/start 10 exit # Note that you could remove more than one part of the data structure at once, # with a comma separated list: # /rat/proc prune # /rat/procset prune "mc.particles,mcevs,mc.pmts.photons"