1 |
//============================================================================ |
//============================================================================ |
2 |
// $Id: PacketUser.cpp,v 1.15 2010/01/15 14:31:17 mocchiut Exp $ |
// $Id: PacketUser.cpp,v 1.16 2010/02/02 15:26:09 mocchiut Exp $ |
3 |
// Description : |
// Description : |
4 |
//============================================================================ |
//============================================================================ |
5 |
#include "PacketUser.h" |
#include "PacketUser.h" |
457 |
//if(!table){table=Table_GL_RESURS_OFFSET} |
//if(!table){table=Table_GL_RESURS_OFFSET} |
458 |
|
|
459 |
if (!single_connection) { |
if (!single_connection) { |
460 |
OpenDBConnection(table);//Nota qui ho deciso di lockare solo questa tabella e non tutte |
OpenDBConnection(NULL);// no, locak tutto Nota qui ho deciso di lockare solo questa tabella e non tutte |
461 |
} |
} |
462 |
|
|
463 |
UInt_t t0 = 0;//toffset |
UInt_t t0 = 0;//toffset |
632 |
msg = err.str(); |
msg = err.str(); |
633 |
mainLogUtil->logInfo(msg); |
mainLogUtil->logInfo(msg); |
634 |
|
|
635 |
TString qu = Form("select ID_N from ROOT_TABLE_BAD order by INSERT_TIME desc limit 1;"); |
// TString qu = Form("select ID_N from ROOT_TABLE_BAD order by INSERT_TIME desc limit 1;"); // <========================= |
636 |
|
TString qu = Form("select ID_N from ROOT_TABLE_BAD where FILE_NAME='%s' and PKT_NUMBER_INIT=%i and INSERTED_BY='%s';",filename,pkt_number_init,tag_value); // <========================= |
637 |
TSQLResult *result = sqlServer->Query(qu.Data()); |
TSQLResult *result = sqlServer->Query(qu.Data()); |
638 |
TSQLRow *row = result->Next(); |
TSQLRow *row = result->Next(); |
639 |
Int_t eid = -1; |
Int_t eid = -1; |
832 |
|
|
833 |
}//pRun |
}//pRun |
834 |
} |
} |
835 |
|
|
836 |
|
|
837 |
void PacketUser::CleanDisk(){ |
void PacketUser::CleanDisk(){ |
838 |
if ( !candelete ) return; |
if ( !candelete ) return; |
1388 |
TSQLResult* res = NULL; |
TSQLResult* res = NULL; |
1389 |
stringstream oss; |
stringstream oss; |
1390 |
oss.str(""); |
oss.str(""); |
1391 |
if (!tableTobeLocked) |
// if (!tableTobeLocked) |
1392 |
oss << "lock table " << Table_ROOT_Good << " write, " << Table_ROOT_Bad << " write, " << Table_GL_RESURS_OFFSET |
oss << "lock table " << Table_ROOT_Good << " write, " << Table_ROOT_Bad << " write, " << Table_GL_RESURS_OFFSET |
1393 |
<< " write, " << Table_ROOT_Merging << " write;"; |
<< " write, " << Table_ROOT_Merging << " write;"; |
1394 |
else |
// else |
1395 |
oss << "lock table " << tableTobeLocked << " write; "; |
// oss << "lock table " << tableTobeLocked << " write; "; |
1396 |
|
|
1397 |
string msg = oss.str(); |
string msg = oss.str(); |
1398 |
mainLogUtil->logAll(msg); |
mainLogUtil->logAll(msg); |