added option to process single event

This commit is contained in:
Sebastian Wehling-Benatelli 2015-05-20 09:59:06 +02:00
parent 4994168247
commit b46f085a74

View File

@ -55,15 +55,23 @@ def autoPyLoT(inputfile):
'dpath':parameter.getParam('datapath'),
'dbase':parameter.getParam('database')}
exf = ['root', 'dpath', 'dbase']
if parameter.hasParam('eventID'):
dsfields['eventID'] = parameter.getParam('eventID')
exf.append('eventID')
datastructure.modifyFields(**dsfields)
datastructure.setExpandFields(['root', 'dpath', 'dbase'])
datastructure.setExpandFields(exf)
# process each event in database
datapath = datastructure.expandDataPath()
for event in glob.glob(datapath):
data.setWFData(os.path.join(datapath, event, '*'))
print data
if not parameter.hasParam('eventID'):
for event in glob.glob(datapath):
data.setWFData(os.path.join(datapath, event, '*'))
print data
else:
data.setWFData(os.path.join(datapath, '*'))
cfP = METHOD[meth](data.getWFData(), (tnoise, tsignal), thosmw, order)