/[PAMELA software]/DarthVader/ToFLevel2/src/ToFCore.cpp
ViewVC logotype

Diff of /DarthVader/ToFLevel2/src/ToFCore.cpp

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

revision 1.54 by mocchiut, Mon Jul 28 15:42:09 2014 UTC revision 1.55 by mocchiut, Thu Aug 28 08:06:50 2014 UTC
# Line 263  int ToFCore(UInt_t run, TFile *file, GL_ Line 263  int ToFCore(UInt_t run, TFile *file, GL_
263    if ( !file->IsOpen() ){    if ( !file->IsOpen() ){
264      if ( verbose ) printf(" ToF - ERROR: cannot open file for writing\n");      if ( verbose ) printf(" ToF - ERROR: cannot open file for writing\n");
265      throw -301;          throw -301;    
266    };    }
267    
268      if ( debug ) file->ls();
269    
270    //    //
271    // Delete tree if requested    // Delete tree if requested
# Line 489  int ToFCore(UInt_t run, TFile *file, GL_ Line 491  int ToFCore(UInt_t run, TFile *file, GL_
491      toftclone = (TTree*)tempfile->Get("ToF-old");      toftclone = (TTree*)tempfile->Get("ToF-old");
492      //    toftclone->SetMaxVirtualSize(2500000000LL); // EM residual Tracker-new tree in level2 files when NEVENTS is big      //    toftclone->SetMaxVirtualSize(2500000000LL); // EM residual Tracker-new tree in level2 files when NEVENTS is big
493      toftclone->SetAutoSave(900000000000000LL);      toftclone->SetAutoSave(900000000000000LL);
494      if ( !l1only ) toftclone->SetBranchAddress("ToFLevel2",&tofclone);      toftclone->SetBranchAddress("ToFLevel2",&tofclone); // EM reprocessing bug fixed
495      //            //      
496      if ( nobefrun > 0 ){      if ( nobefrun > 0 ){
497        if ( verbose ) printf("\n Pre-processing: copying events from the old tree before the processed run\n");          if ( verbose ) printf("\n Pre-processing: copying events from the old tree before the processed run\n");  
# Line 502  int ToFCore(UInt_t run, TFile *file, GL_ Line 504  int ToFCore(UInt_t run, TFile *file, GL_
504          // copy tofclone to tof          // copy tofclone to tof
505          //          //
506          tof->Clear();          tof->Clear();
507          if ( !l1only ) memcpy(&tof,&tofclone,sizeof(tofclone));          //      if ( !l1only ) memcpy(&tof,&tofclone,sizeof(tofclone));
508            memcpy(&tof,&tofclone,sizeof(tofclone));
509          //          //
510          // Fill entry in the new tree          // Fill entry in the new tree
511          //          //
512          if ( !l1only ) toft->Fill();          toft->Fill();
513          //          //
514        };        };
515        if ( verbose ) printf(" Finished successful copying!\n");        if ( verbose ) printf(" Finished successful copying!\n");
# Line 787  int ToFCore(UInt_t run, TFile *file, GL_ Line 790  int ToFCore(UInt_t run, TFile *file, GL_
790        stm = tm;        stm = tm;
791        //      if ( jj > 0 ) memcpy(sdedx_corr_m,dedx_corr_m[jj-1],48*sizeof(Float_t)); // BUG sdedx should be the previous in time not the previous saved [absurd dE/dx for 8th reduction March and > March 2008 data - fixed on 2009/02/04        //      if ( jj > 0 ) memcpy(sdedx_corr_m,dedx_corr_m[jj-1],48*sizeof(Float_t)); // BUG sdedx should be the previous in time not the previous saved [absurd dE/dx for 8th reduction March and > March 2008 data - fixed on 2009/02/04
792        fin>>t1>>tm>>t2;        fin>>t1>>tm>>t2;
793        if ( verbose ) cout << setiosflags(ios::fixed)  << setw(10) << setprecision(3) << tm << endl;        if ( debug ) cout << setiosflags(ios::fixed)  << setw(10) << setprecision(3) << tm << endl;
794        if ( (tm >= (runinfo->RUNHEADER_TIME-window) && tm <= (runinfo->RUNTRAILER_TIME+window)) || (tm > (runinfo->RUNTRAILER_TIME+window) && last) ){        if ( (tm >= (runinfo->RUNHEADER_TIME-window) && tm <= (runinfo->RUNTRAILER_TIME+window)) || (tm > (runinfo->RUNTRAILER_TIME+window) && last) ){
795          if ( first ){          if ( first ){
796            mtime[jj]=stm;            mtime[jj]=stm;
# Line 1517  int ToFCore(UInt_t run, TFile *file, GL_ Line 1520  int ToFCore(UInt_t run, TFile *file, GL_
1520          // copy tofclone to tof          // copy tofclone to tof
1521          //          //
1522          tof->Clear();          tof->Clear();
1523          if ( !l1only ) memcpy(&tof,&tofclone,sizeof(tofclone));          memcpy(&tof,&tofclone,sizeof(tofclone));// EM reprocessing bug fixed
1524          //          //
1525          // Fill entry in the new tree          // Fill entry in the new tree
1526          //          //
1527          if ( !l1only ) toft->Fill();          toft->Fill();// EM reprocessing bug fixed
1528        };        };
1529        if ( verbose ) printf(" Finished successful copying!\n");        if ( verbose ) printf(" Finished successful copying!\n");
1530      };      };
# Line 1570  int ToFCore(UInt_t run, TFile *file, GL_ Line 1573  int ToFCore(UInt_t run, TFile *file, GL_
1573    if ( runinfo ) delete runinfo;    if ( runinfo ) delete runinfo;
1574    //    //
1575    if ( code < 0 ) throw code;    if ( code < 0 ) throw code;
1576      if ( debug ) file->ls();
1577    return(code);    return(code);
1578  }  }

Legend:
Removed from v.1.54  
changed lines
  Added in v.1.55

  ViewVC Help
Powered by ViewVC 1.1.23