231 |
|
print '@LOG: Kolmogorov test on background' |
232 |
|
print ks_bkg |
233 |
|
|
234 |
< |
#update the database |
234 |
> |
#!! update the database |
235 |
|
import sqlite3 as lite |
236 |
|
con = lite.connect(MVAdir+'Trainings.db',timeout=10000) #timeout in milliseconds. default 5 sec |
237 |
|
with con: # here DB is locked |
238 |
|
cur = con.cursor() |
239 |
|
cur.execute("create table if not exists trainings (Roc_integral real, Separation real, Significance real, Ks_signal real, Ks_background real, Roc_integral_train real, Separation_train real, MVASettings text)"); |
240 |
|
cur.execute("insert into trainings values(?,?,?,?,?,?,?,?)",(roc_integral_test,separation_test,significance,ks_signal,ks_bkg,roc_integral_train,separation_train,MVAsettings)); |
241 |
< |
#here is unlocked |
241 |
> |
#!! here is unlocked |
242 |
> |
|
243 |
> |
#!! Close the output file to avoid memory leak |
244 |
> |
output.Close() |
245 |
|
|
246 |
|
|
247 |
|
#WRITE INFOFILE |