added option to process single event
This commit is contained in:
parent
4994168247
commit
b46f085a74
10
autoPyLoT.py
10
autoPyLoT.py
@ -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()
|
||||||
|
if not parameter.hasParam('eventID'):
|
||||||
for event in glob.glob(datapath):
|
for event in glob.glob(datapath):
|
||||||
data.setWFData(os.path.join(datapath, event, '*'))
|
data.setWFData(os.path.join(datapath, event, '*'))
|
||||||
print data
|
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)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user