--- PamelaLevel2/src/PamLevel2.cpp 2014/10/17 16:25:38 1.107 +++ PamelaLevel2/src/PamLevel2.cpp 2014/10/21 10:08:36 1.109 @@ -628,6 +628,8 @@ if (strcmp(pamdbpsw, "")) psw = pamdbpsw; + customString = ""; + // sorted_tracks = 0;//new TRefArray(); CAL0 = false; @@ -3509,6 +3511,12 @@ // L->SetBranchAddress("RunEntry",&irun); P->SetBranchAddress("ProcInfo", &proc_obj);//NEWNEW proc_tree = P; + } else { + // proc_tree = new TChain("ProcessingInfo","Log of data processing"); + // proc_tree->Branch("ProcInfo", "ProcInfo", &proc_obj); + cout << "----------------------------------------------------" << endl; + cout << ">>> ProcessingInfo not found, PROC set to false and continue (not 10RED files?)<<<" << endl; + PROC = false; } // -------------------------------------------- // return the pamela chain with all the friends @@ -5234,12 +5242,13 @@ TTimeStamp *dt = new TTimeStamp(); proc_obj->date = dt->AsString(); delete dt; - proc_obj->commandLine = Form("PamelaLevel2 was called"); - proc_obj->outputFilename = ""; + proc_obj->commandLine = Form("PamelaLevel2 was called: CAL2 %i CAL1 %i CAL0 %i TRK2 %i TRK1 %i TRKh %i TRK0 %i TOF %i TOF0 %i TRG %i \n S4 %i ND %i AC %i ORB %i GP %i EXT %i NUC %i RUN %i ISGP %i SELLI %i \n Custom string = %s",CAL2,CAL1,CAL0,TRK2,TRK1,TRKh,TRK0,TOF,TOF0,TRG,S4,ND,AC,ORB,GP,EXT,NUC,RUN,ISGP,SELLI,customString.Data()); + proc_obj->outputFilename = ofile->GetName(); proc_obj->localDir = gSystem->WorkingDirectory(); proc_obj->uname = gSystem->GetFromPipe("uname -a"); - // proc_obj->DB = Form("mysql://%s/%s",dbc->GetHost(),dbc->GetDB()); - proc_obj->DB = ""; + if (!dbc || (dbc && !dbc->IsConnected())) SetDBConnection(); + proc_obj->DB = Form("mysql://%s/%s",dbc->GetHost(),dbc->GetDB()); + dbc->Close(); proc_tree_clone->Fill(); } cout << "----------------------------------------------------" << endl;