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'), 'dpath':parameter.getParam('datapath'),
'dbase':parameter.getParam('database')} 'dbase':parameter.getParam('database')}
exf = ['root', 'dpath', 'dbase']
if parameter.hasParam('eventID'):
dsfields['eventID'] = parameter.getParam('eventID')
exf.append('eventID')
datastructure.modifyFields(**dsfields) datastructure.modifyFields(**dsfields)
datastructure.setExpandFields(['root', 'dpath', 'dbase']) datastructure.setExpandFields(exf)
# process each event in database # process each event in database
datapath = datastructure.expandDataPath() datapath = datastructure.expandDataPath()
for event in glob.glob(datapath): if not parameter.hasParam('eventID'):
data.setWFData(os.path.join(datapath, event, '*')) for event in glob.glob(datapath):
print data 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) cfP = METHOD[meth](data.getWFData(), (tnoise, tsignal), thosmw, order)