1556 |
if ( glrun->GetNEVENTS() > (UInt_t)atoll(row->GetField(1)) ){ |
if ( glrun->GetNEVENTS() > (UInt_t)atoll(row->GetField(1)) ){ |
1557 |
// |
// |
1558 |
if ( IsDebug() ) printf(" The new run has more events than the old one \n"); |
if ( IsDebug() ) printf(" The new run has more events than the old one \n"); |
1559 |
oss.str(""); |
glrun->DeleteRun(conn,(UInt_t)atoll(row->GetField(0)),"GL_RUN"); |
1560 |
oss << "DELETE FROM GL_RUN WHERE ID=" << row->GetField(0) <<";"; |
// oss.str(""); |
1561 |
if ( IsDebug() ) printf(" delete the run entry: query is \n %s \n",oss.str().c_str()); |
// oss << "DELETE FROM GL_RUN WHERE ID=" << row->GetField(0) <<";"; |
1562 |
conn->Query(oss.str().c_str()); |
// if ( IsDebug() ) printf(" delete the run entry: query is \n %s \n",oss.str().c_str()); |
1563 |
|
// conn->Query(oss.str().c_str()); |
1564 |
if ( signal ) signal = false; |
if ( signal ) signal = false; |
1565 |
goto gonext; |
goto gonext; |
1566 |
// |
// |
1574 |
// |
// |
1575 |
if ( IsDebug() ) printf(" The new run has the same number of events and the runheader the old one miss the runheader \n"); |
if ( IsDebug() ) printf(" The new run has the same number of events and the runheader the old one miss the runheader \n"); |
1576 |
// |
// |
1577 |
oss.str(""); |
glrun->DeleteRun(conn,(UInt_t)atoll(row->GetField(0)),"GL_RUN"); |
1578 |
oss << "DELETE FROM GL_RUN WHERE ID=" << row->GetField(0) <<";"; |
// oss.str(""); |
1579 |
if ( IsDebug() ) printf(" delete the run entry: query is \n %s \n",oss.str().c_str()); |
// oss << "DELETE FROM GL_RUN WHERE ID=" << row->GetField(0) <<";"; |
1580 |
conn->Query(oss.str().c_str()); |
// if ( IsDebug() ) printf(" delete the run entry: query is \n %s \n",oss.str().c_str()); |
1581 |
|
// conn->Query(oss.str().c_str()); |
1582 |
// |
// |
1583 |
if ( signal ) signal = false; |
if ( signal ) signal = false; |
1584 |
goto gonext; |
goto gonext; |
1592 |
// |
// |
1593 |
if ( IsDebug() ) printf(" The new run has the same number of events, the runheader and the runtrailer the old one miss the runtrailer \n"); |
if ( IsDebug() ) printf(" The new run has the same number of events, the runheader and the runtrailer the old one miss the runtrailer \n"); |
1594 |
// |
// |
1595 |
oss.str(""); |
glrun->DeleteRun(conn,(UInt_t)atoll(row->GetField(0)),"GL_RUN"); |
1596 |
oss << "DELETE FROM GL_RUN WHERE ID=" << row->GetField(0) <<";"; |
// oss.str(""); |
1597 |
if ( IsDebug() ) printf(" delete the run entry: query is \n %s \n",oss.str().c_str()); |
// oss << "DELETE FROM GL_RUN WHERE ID=" << row->GetField(0) <<";"; |
1598 |
conn->Query(oss.str().c_str()); |
// if ( IsDebug() ) printf(" delete the run entry: query is \n %s \n",oss.str().c_str()); |
1599 |
|
// conn->Query(oss.str().c_str()); |
1600 |
if ( signal ) signal = false; |
if ( signal ) signal = false; |
1601 |
// |
// |
1602 |
}; |
}; |
1891 |
// |
// |
1892 |
// delete old entry in fragment table |
// delete old entry in fragment table |
1893 |
// |
// |
1894 |
oss.str(""); |
glrun->DeleteRun(conn,idfrag,"GL_RUN_FRAGMENTS"); |
1895 |
// |
// oss.str(""); |
1896 |
oss << " DELETE FROM GL_RUN_FRAGMENTS WHERE ID = " << idfrag << ";"; |
// // |
1897 |
// |
// oss << " DELETE FROM GL_RUN_FRAGMENTS WHERE ID = " << idfrag << ";"; |
1898 |
if ( IsDebug() ) printf(" Delete from frag table the old run :\n query is \n %s \n",oss.str().c_str()); |
// // |
1899 |
result = conn->Query(oss.str().c_str()); |
// if ( IsDebug() ) printf(" Delete from frag table the old run :\n query is \n %s \n",oss.str().c_str()); |
1900 |
if ( !result ) throw -4; |
// result = conn->Query(oss.str().c_str()); |
1901 |
|
// if ( !result ) throw -4; |
1902 |
// |
// |
1903 |
return; |
return; |
1904 |
// |
// |
2111 |
// |
// |
2112 |
// delete old entry in fragment table |
// delete old entry in fragment table |
2113 |
// |
// |
2114 |
oss.str(""); |
glrun->DeleteRun(conn,idfrag,"GL_RUN_FRAGMENTS"); |
2115 |
// |
// oss.str(""); |
2116 |
oss << " DELETE FROM GL_RUN_FRAGMENTS WHERE ID = " << idfrag << ";"; |
// // |
2117 |
// |
// oss << " DELETE FROM GL_RUN_FRAGMENTS WHERE ID = " << idfrag << ";"; |
2118 |
if ( IsDebug() ) printf(" Delete from frag table the old run :\n query is \n %s \n",oss.str().c_str()); |
// // |
2119 |
result = conn->Query(oss.str().c_str()); |
// if ( IsDebug() ) printf(" Delete from frag table the old run :\n query is \n %s \n",oss.str().c_str()); |
2120 |
if ( !result ) throw -4; |
// result = conn->Query(oss.str().c_str()); |
2121 |
|
// if ( !result ) throw -4; |
2122 |
// |
// |
2123 |
// |
// |
2124 |
return; |
return; |
3429 |
if ( IsDebug() ) printf(" Delete run %s from the GL_RUN_FRAGMENTS table \n",row->GetField(0)); |
if ( IsDebug() ) printf(" Delete run %s from the GL_RUN_FRAGMENTS table \n",row->GetField(0)); |
3430 |
// |
// |
3431 |
// |
// |
3432 |
oss.str(""); |
glrun->DeleteRun(conn,(UInt_t)atoll(row->GetField(0)),"GL_RUN_FRAGMENTS"); |
3433 |
oss << " DELETE from GL_RUN_FRAGMENTS where ID = " << row->GetField(0); |
// oss.str(""); |
3434 |
if ( IsDebug() ) printf(" Clean the GL_RUN_FRAGMENTS table: query is \n %s \n",oss.str().c_str()); |
// oss << " DELETE from GL_RUN_FRAGMENTS where ID = " << row->GetField(0); |
3435 |
result2 = conn->Query(oss.str().c_str()); |
// if ( IsDebug() ) printf(" Clean the GL_RUN_FRAGMENTS table: query is \n %s \n",oss.str().c_str()); |
3436 |
// |
// result2 = conn->Query(oss.str().c_str()); |
3437 |
if ( !result2 ) throw -4; |
// // |
3438 |
// |
// if ( !result2 ) throw -4; |
3439 |
|
// // |
3440 |
row = result->Next(); |
row = result->Next(); |
3441 |
}; |
}; |
3442 |
}; |
}; |