Parameter eventID uses wildcard (*) if all events of database supposed to be processed.
This commit is contained in:
parent
53089a3279
commit
a8bfc3c68f
10
autoPyLoT.py
10
autoPyLoT.py
@ -98,8 +98,8 @@ def autoPyLoT(input_dict=None, parameter=None, inputfile=None, fnames=None, even
|
|||||||
|
|
||||||
exf = ['root', 'dpath', 'dbase']
|
exf = ['root', 'dpath', 'dbase']
|
||||||
|
|
||||||
if parameter.hasParam('eventID') and fnames == 'None':
|
if parameter['eventID'] is not '*' and fnames == 'None':
|
||||||
dsfields['eventID'] = parameter.get('eventID')
|
dsfields['eventID'] = parameter['eventID']
|
||||||
exf.append('eventID')
|
exf.append('eventID')
|
||||||
|
|
||||||
datastructure.modifyFields(**dsfields)
|
datastructure.modifyFields(**dsfields)
|
||||||
@ -133,13 +133,13 @@ def autoPyLoT(input_dict=None, parameter=None, inputfile=None, fnames=None, even
|
|||||||
if not input_dict:
|
if not input_dict:
|
||||||
# started in production mode
|
# started in production mode
|
||||||
datapath = datastructure.expandDataPath()
|
datapath = datastructure.expandDataPath()
|
||||||
if fnames == 'None' and not parameter['eventID']:
|
if fnames == 'None' and parameter['eventID'] is '*':
|
||||||
# multiple event processing
|
# multiple event processing
|
||||||
# read each event in database
|
# read each event in database
|
||||||
events = [events for events in glob.glob(os.path.join(datapath, '*')) if os.path.isdir(events)]
|
events = [events for events in glob.glob(os.path.join(datapath, '*')) if os.path.isdir(events)]
|
||||||
elif fnames == 'None' and parameter['eventID']:
|
elif fnames == 'None' and parameter['eventID'] is not '*':
|
||||||
# single event processing
|
# single event processing
|
||||||
events = glob.glob(os.path.join(datapath, parameter.get('eventID')))
|
events = glob.glob(os.path.join(datapath, parameter['eventID']))
|
||||||
else:
|
else:
|
||||||
# autoPyLoT was initialized from GUI
|
# autoPyLoT was initialized from GUI
|
||||||
events = []
|
events = []
|
||||||
|
Loading…
Reference in New Issue
Block a user