/[PAMELA software]/DarthVader/OrbitalInfo/src/OrbitalInfoCore.cpp
ViewVC logotype

Diff of /DarthVader/OrbitalInfo/src/OrbitalInfoCore.cpp

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

revision 1.22 by mocchiut, Tue May 22 08:15:07 2007 UTC revision 1.23 by mocchiut, Thu Sep 6 12:49:30 2007 UTC
# Line 184  int OrbitalInfoCore(UInt_t run, TFile *f Line 184  int OrbitalInfoCore(UInt_t run, TFile *f
184    TTree *tempOrbitalInfo = 0;    TTree *tempOrbitalInfo = 0;
185    stringstream tempname;    stringstream tempname;
186    stringstream OrbitalInfofolder;    stringstream OrbitalInfofolder;
187      Bool_t myfold = false;
188    tempname.str("");    tempname.str("");
189    tempname << outDir;    tempname << outDir;
190    tempname << "/" << processFolder.Data();    tempname << "/" << processFolder.Data();
191    OrbitalInfofolder.str("");    OrbitalInfofolder.str("");
192    OrbitalInfofolder << tempname.str().c_str();    OrbitalInfofolder << tempname.str().c_str();
   gSystem->MakeDirectory(OrbitalInfofolder.str().c_str());  
193    tempname << "/OrbitalInfotree_run";    tempname << "/OrbitalInfotree_run";
194    tempname << run << ".root";      tempname << run << ".root";  
195    //    //
# Line 337  int OrbitalInfoCore(UInt_t run, TFile *f Line 337  int OrbitalInfoCore(UInt_t run, TFile *f
337        //        //
338        // copying old tree to a new file        // copying old tree to a new file
339        //        //
340          gSystem->MakeDirectory(OrbitalInfofolder.str().c_str());
341          myfold = true;
342        tempfile = new TFile(tempname.str().c_str(),"RECREATE");        tempfile = new TFile(tempname.str().c_str(),"RECREATE");
343        tempOrbitalInfo = OrbitalInfotrclone->CloneTree(-1,"fast");        tempOrbitalInfo = OrbitalInfotrclone->CloneTree(-1,"fast");
344        tempOrbitalInfo->SetName("OrbitalInfo-old");        tempOrbitalInfo->SetName("OrbitalInfo-old");
# Line 935  int OrbitalInfoCore(UInt_t run, TFile *f Line 937  int OrbitalInfoCore(UInt_t run, TFile *f
937    //    //
938    if ( l0File ) l0File->Close();    if ( l0File ) l0File->Close();
939    if ( tempfile ) tempfile->Close();                if ( tempfile ) tempfile->Close();            
940    gSystem->Unlink(tempname.str().c_str());    if ( myfold ) gSystem->Unlink(tempname.str().c_str());
941    //    //
942    if ( runinfo ) runinfo->Close();        if ( runinfo ) runinfo->Close();    
943    if ( OrbitalInfotr ) OrbitalInfotr->SetName("OrbitalInfo");        if ( OrbitalInfotr ) OrbitalInfotr->SetName("OrbitalInfo");    
# Line 944  int OrbitalInfoCore(UInt_t run, TFile *f Line 946  int OrbitalInfoCore(UInt_t run, TFile *f
946      file->Write();      file->Write();
947    };    };
948    //    //
949    gSystem->Unlink(OrbitalInfofolder.str().c_str());    if ( myfold ) gSystem->Unlink(OrbitalInfofolder.str().c_str());
950    //    //
951    // the end    // the end
952    //    //

Legend:
Removed from v.1.22  
changed lines
  Added in v.1.23

  ViewVC Help
Powered by ViewVC 1.1.23