--- PamelaLevel2/src/PamLevel2.cpp 2014/10/17 15:58:09 1.100 +++ PamelaLevel2/src/PamLevel2.cpp 2014/10/17 16:25:38 1.107 @@ -971,6 +971,10 @@ if (sel_tree) sel_tree->Delete();; sel_tree = NULL; + + if (proc_tree) + proc_tree->Delete(); + proc_tree = NULL; // // Close file // @@ -1201,7 +1205,7 @@ if (!objname.CompareTo("SoftInfo")) return &soft_obj; // Emiliano - if (!objname.CompareTo("ProcessingInfo")){ + if (!objname.CompareTo("ProcInfo")){ if (!proc_obj) proc_obj = new ProcInfo(); return &proc_obj; // Emiliano @@ -3504,13 +3508,13 @@ cout << ">>> Found ProcessingInfo <<<" << endl; // L->SetBranchAddress("RunEntry",&irun); P->SetBranchAddress("ProcInfo", &proc_obj);//NEWNEW + proc_tree = P; } // -------------------------------------------- // return the pamela chain with all the friends // -------------------------------------------- pam_tree = Trout; - return Trout; } @@ -5208,8 +5212,12 @@ // cout << i<< "\t | "<ID<<"\t "<NEVENTS<< "\t "<RUNHEADER_TIME<<" <---> "<RUNTRAILER_TIME<Fill(); } - if ( PROC ){ - proc_tree_clone->Branch("ProcessingInfo", "ProcInfo", GetPointerTo("ProcessingInfo")); + // + // replicate processinginfo tree + // + if ( PROC ){ // EMEMEM + proc_tree_clone = new TTree("ProcessingInfo","Log of data processing"); + proc_tree_clone->Branch("ProcInfo", "ProcInfo", GetPointerTo("ProcInfo")); cout << "ProcessingInfo: branch ProcessingInfo" << endl; // ------------------ // replicate processinginfo tree @@ -5218,10 +5226,10 @@ // cout << "irun\t | RUN\t NEVENTS\t absolute time"<GetEntries(); i++) { proc_tree->GetEntry(i); - // cout << i<< "\t | "<ID<<"\t "<NEVENTS<< "\t "<RUNHEADER_TIME<<" <---> "<RUNTRAILER_TIME<Fill(); } - if ( SELLI != 2 || true ){ + if ( SELLI != 2 ){ proc_obj->runID = 0; TTimeStamp *dt = new TTimeStamp(); proc_obj->date = dt->AsString(); @@ -5230,7 +5238,8 @@ proc_obj->outputFilename = ""; 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 = Form("mysql://%s/%s",dbc->GetHost(),dbc->GetDB()); + proc_obj->DB = ""; proc_tree_clone->Fill(); } cout << "----------------------------------------------------" << endl; @@ -5453,7 +5462,7 @@ }; } - if ( PROC ){ + if ( PROC ){//EMEMEMEM proc_tree_clone->Write("ProcessingInfo",TObject::kOverwrite); } cout << "+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+" << endl;