Hi,
Is there a simple way with EventLoop to pass arguments from the steering macro (written with pyroot) to the algorithm (cxx)?
Something similar to tree.Process(“test.C”,some_string) with the MakeSelector, or from a config file? Both would be useful.
For clarity I’m sharing here my function to run a job. I’d like it to pass an argument to the alg elCounter().
Cheers, Mattias
def runCounter(job,max_events=False):
sh=SH.SampleHandler()
SH.readFileList(sh,job,“runs/%s/joblists/%s.txt”%(runtag,job))
sh.setMetaString(“nc_tree”,“CollectionTree”)
sh.printContent()
## Initialize job
eventjob=EL.Job()
eventjob.sampleHandler(sh)
if max_events:
eventjob.options().setDouble(EL.Job.optMaxEvents,max_events);
## Add alg
alg=elCounter()
eventjob.algsAdd(alg)
## Set driver
driver=EL.DirectDriver()
driver.submit(eventjob,“runs/%s/outputs/%s”%(runtag,job))