/[PAMELA software]/PamelaLevel2/src/PamLevel2.cpp
ViewVC logotype

Diff of /PamelaLevel2/src/PamLevel2.cpp

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

revision 1.100 by mocchiut, Fri Oct 17 15:58:09 2014 UTC revision 1.103 by mocchiut, Fri Oct 17 16:18:31 2014 UTC
# Line 971  void PamLevel2::Reset() { Line 971  void PamLevel2::Reset() {
971    if (sel_tree)    if (sel_tree)
972      sel_tree->Delete();;      sel_tree->Delete();;
973    sel_tree = NULL;    sel_tree = NULL;
974    
975      if (proc_tree)
976        proc_tree->Delete();
977      proc_tree = NULL;
978    //    //
979    // Close file    // Close file
980    //    //
# Line 1201  void *PamLevel2::GetPointerTo(const char Line 1205  void *PamLevel2::GetPointerTo(const char
1205    if (!objname.CompareTo("SoftInfo"))    if (!objname.CompareTo("SoftInfo"))
1206      return &soft_obj; // Emiliano      return &soft_obj; // Emiliano
1207    
1208    if (!objname.CompareTo("ProcessingInfo")){    if (!objname.CompareTo("ProcInfo")){
1209      if (!proc_obj)      if (!proc_obj)
1210        proc_obj = new ProcInfo();            proc_obj = new ProcInfo();    
1211      return &proc_obj; // Emiliano      return &proc_obj; // Emiliano
# Line 3504  TChain *PamLevel2::GetPamTree(TList *fl, Line 3508  TChain *PamLevel2::GetPamTree(TList *fl,
3508      cout << ">>> Found ProcessingInfo <<<" << endl;      cout << ">>> Found ProcessingInfo <<<" << endl;
3509      //  L->SetBranchAddress("RunEntry",&irun);      //  L->SetBranchAddress("RunEntry",&irun);
3510      P->SetBranchAddress("ProcInfo", &proc_obj);//NEWNEW      P->SetBranchAddress("ProcInfo", &proc_obj);//NEWNEW
3511        proc_tree = P;
3512    }    }
3513    //  --------------------------------------------    //  --------------------------------------------
3514    //  return the pamela chain with all the friends    //  return the pamela chain with all the friends
3515    //  --------------------------------------------    //  --------------------------------------------
3516    
3517    pam_tree = Trout;    pam_tree = Trout;
   
3518    return Trout;    return Trout;
3519  }  }
3520    
# Line 5209  void PamLevel2::CreateCloneTrees(TFile * Line 5213  void PamLevel2::CreateCloneTrees(TFile *
5213      run_tree_clone->Fill();      run_tree_clone->Fill();
5214    }    }
5215    if ( PROC ){    if ( PROC ){
5216      proc_tree_clone->Branch("ProcessingInfo", "ProcInfo", GetPointerTo("ProcessingInfo"));      proc_tree_clone = new TTree("ProcessingInfo","Log of data processing");
5217        proc_tree_clone->Branch("ProcInfo", "ProcInfo", GetPointerTo("ProcInfo"));
5218      cout << "ProcessingInfo: branch ProcessingInfo" << endl;        cout << "ProcessingInfo: branch ProcessingInfo" << endl;  
5219      // ------------------      // ------------------
5220      // replicate processinginfo tree      // replicate processinginfo tree
# Line 5218  void PamLevel2::CreateCloneTrees(TFile * Line 5223  void PamLevel2::CreateCloneTrees(TFile *
5223      //    cout << "irun\t | RUN\t NEVENTS\t absolute time"<<endl;      //    cout << "irun\t | RUN\t NEVENTS\t absolute time"<<endl;
5224      for (Int_t i = 0; i < proc_tree->GetEntries(); i++) {      for (Int_t i = 0; i < proc_tree->GetEntries(); i++) {
5225        proc_tree->GetEntry(i);        proc_tree->GetEntry(i);
5226        //        cout << i<< "\t | "<<GetRunInfo()->ID<<"\t "<<GetRunInfo()->NEVENTS<< "\t "<<GetRunInfo()->RUNHEADER_TIME<<" <---> "<<GetRunInfo()->RUNTRAILER_TIME<<endl;        cout << i<< "\t | "<<endl;
5227        proc_tree_clone->Fill();        proc_tree_clone->Fill();
5228      }      }
5229      if ( SELLI != 2 || true ){            if ( SELLI != 2 || true ){      
5230          cout << "|| "<<endl;
5231        proc_obj->runID = 0;        proc_obj->runID = 0;
5232        TTimeStamp *dt = new TTimeStamp();        TTimeStamp *dt = new TTimeStamp();
5233        proc_obj->date = dt->AsString();        proc_obj->date = dt->AsString();
# Line 5231  void PamLevel2::CreateCloneTrees(TFile * Line 5237  void PamLevel2::CreateCloneTrees(TFile *
5237        proc_obj->localDir = gSystem->WorkingDirectory();        proc_obj->localDir = gSystem->WorkingDirectory();
5238        proc_obj->uname = gSystem->GetFromPipe("uname -a");        proc_obj->uname = gSystem->GetFromPipe("uname -a");
5239        proc_obj->DB = Form("mysql://%s/%s",dbc->GetHost(),dbc->GetDB());        proc_obj->DB = Form("mysql://%s/%s",dbc->GetHost(),dbc->GetDB());
5240          cout << "||| "<<endl;
5241        proc_tree_clone->Fill();        proc_tree_clone->Fill();
5242      }      }
5243      cout << "----------------------------------------------------" << endl;      cout << "----------------------------------------------------" << endl;

Legend:
Removed from v.1.100  
changed lines
  Added in v.1.103

  ViewVC Help
Powered by ViewVC 1.1.23