/[PAMELA software]/chewbacca/PamOffLineSW/PacketUser.cpp
ViewVC logotype

Diff of /chewbacca/PamOffLineSW/PacketUser.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.16 by mocchiut, Tue Feb 2 15:26:09 2010 UTC revision 1.17 by mocchiut, Wed Feb 3 14:11:38 2010 UTC
# Line 1  Line 1 
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"
# Line 457  unsigned long int PacketUser::retrieveTi Line 457  unsigned long int PacketUser::retrieveTi
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
# Line 632  void PacketUser::FinishGroup(char * file Line 632  void PacketUser::FinishGroup(char * file
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;
# Line 831  void PacketUser::FinishGroup(char * file Line 832  void PacketUser::FinishGroup(char * file
832    
833    }//pRun    }//pRun
834  }  }
835      
836        
837    void PacketUser::CleanDisk(){    void PacketUser::CleanDisk(){
838      if ( !candelete ) return;      if ( !candelete ) return;
# Line 1387  int PacketUser::LockTables(const char* t Line 1388  int PacketUser::LockTables(const char* t
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);

Legend:
Removed from v.1.16  
changed lines
  Added in v.1.17

  ViewVC Help
Powered by ViewVC 1.1.23