/[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.24 by mocchiut, Fri Sep 7 21:14:18 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 399  int OrbitalInfoCore(UInt_t run, TFile *f Line 401  int OrbitalInfoCore(UInt_t run, TFile *f
401    //    //
402    // Loop over the run to be processed    // Loop over the run to be processed
403    //    //
     
404    for (UInt_t irun=0; irun < numbofrun; irun++){    for (UInt_t irun=0; irun < numbofrun; irun++){
405      //      //
406      // retrieve the first run ID to be processed using the RunInfo list      // retrieve the first run ID to be processed using the RunInfo list
# Line 551  int OrbitalInfoCore(UInt_t run, TFile *f Line 552  int OrbitalInfoCore(UInt_t run, TFile *f
552      //      //
553      if (verbose) printf("\n Ready to start! \n\n Processed events: \n\n");      if (verbose) printf("\n Ready to start! \n\n Processed events: \n\n");
554      //      //
555        //    if ( dbc ){
556        //      dbc->Close();
557          //      delete dbc;
558        //};
559        //
560      for ( re = runinfo->EV_FROM; re < (runinfo->EV_FROM+runinfo->NEVENTS); re++){      for ( re = runinfo->EV_FROM; re < (runinfo->EV_FROM+runinfo->NEVENTS); re++){
561            
562        //        //
# Line 935  int OrbitalInfoCore(UInt_t run, TFile *f Line 941  int OrbitalInfoCore(UInt_t run, TFile *f
941    //    //
942    if ( l0File ) l0File->Close();    if ( l0File ) l0File->Close();
943    if ( tempfile ) tempfile->Close();                if ( tempfile ) tempfile->Close();            
944    gSystem->Unlink(tempname.str().c_str());    if ( myfold ) gSystem->Unlink(tempname.str().c_str());
945    //    //
946    if ( runinfo ) runinfo->Close();        if ( runinfo ) runinfo->Close();    
947    if ( OrbitalInfotr ) OrbitalInfotr->SetName("OrbitalInfo");        if ( OrbitalInfotr ) OrbitalInfotr->SetName("OrbitalInfo");    
# Line 944  int OrbitalInfoCore(UInt_t run, TFile *f Line 950  int OrbitalInfoCore(UInt_t run, TFile *f
950      file->Write();      file->Write();
951    };    };
952    //    //
953    gSystem->Unlink(OrbitalInfofolder.str().c_str());    if ( myfold ) gSystem->Unlink(OrbitalInfofolder.str().c_str());
954    //    //
955    // the end    // the end
956    //    //

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

  ViewVC Help
Powered by ViewVC 1.1.23