/[PAMELA software]/DarthVader/RunInfo/src/RunInfo.cpp
ViewVC logotype

Diff of /DarthVader/RunInfo/src/RunInfo.cpp

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

revision 1.2 by mocchiut, Tue May 30 14:59:40 2006 UTC revision 1.4 by mocchiut, Mon Jul 17 12:14:30 2006 UTC
# Line 302  Int_t ItoRunInfo::Update(ULong64_t run, Line 302  Int_t ItoRunInfo::Update(ULong64_t run,
302      file->cd();      file->cd();
303      //    file->Write("Run");      //    file->Write("Run");
304      //newtree->Delete();      //newtree->Delete();
305        delete newver;
306        delete newrun;
307        delete oldver;
308        delete oldrun;
309      //      //
310      return(0);      return(0);
311      //      //
# Line 441  Int_t ItoRunInfo::Update(ULong64_t run, Line 445  Int_t ItoRunInfo::Update(ULong64_t run,
445              newver->ND_ver = oldver->ND_ver;              newver->ND_ver = oldver->ND_ver;
446              newver->AC_ver = oldver->AC_ver;              newver->AC_ver = oldver->AC_ver;
447              newver->ORB_ver = version->ORB_ver;              newver->ORB_ver = version->ORB_ver;
448              if ( strcmp(oldver->TRK_ver.Data(),"") ) reprocessing = true;              if ( strcmp(oldver->ORB_ver.Data(),"") ) reprocessing = true;
449            };            };
450            if ( !strcmp(Detector.Data(),"CALO") ){            if ( !strcmp(Detector.Data(),"CALO") ){
451              newver->TRIG_ver = oldver->TRIG_ver;              newver->TRIG_ver = oldver->TRIG_ver;
# Line 497  Int_t ItoRunInfo::Update(ULong64_t run, Line 501  Int_t ItoRunInfo::Update(ULong64_t run,
501      newtree->SetName("Run");      newtree->SetName("Run");
502      //    file->Write("Run");      //    file->Write("Run");
503      //    newtree->Delete();      //    newtree->Delete();
504        delete newver;
505        delete newrun;
506        delete oldver;
507        delete oldrun;
508      //      //
509      if ( !found ){      if ( !found ){
510        if ( debug ) printf("\n RUNINFO - ERROR: no run with ID_RUN = %llu \n",idRun);        if ( debug ) printf("\n RUNINFO - ERROR: no run with ID_RUN = %llu \n",idRun);
# Line 580  Int_t ItoRunInfo::Read(ULong64_t idRun){ Line 588  Int_t ItoRunInfo::Read(ULong64_t idRun){
588    if ( debug ) printf("norun %i \n",(int)norun);    if ( debug ) printf("norun %i \n",(int)norun);
589    Int_t error = 0;    Int_t error = 0;
590    error = GetRunInfo(idRun);    error = GetRunInfo(idRun);
591      delete newver;
592      delete newrun;
593    if ( error ) return(error);    if ( error ) return(error);
594    return(0);    return(0);
595  }      }    
# Line 602  void ItoRunInfo::Clear(){ Line 612  void ItoRunInfo::Clear(){
612    
613  UInt_t ItoRunInfo::GetRunForEntry(UInt_t entry){  UInt_t ItoRunInfo::GetRunForEntry(UInt_t entry){
614    //    //
615    ItoRunInfo *run = new ItoRunInfo();    //  ItoRunInfo *run = new ItoRunInfo(file);
616    //    //
617    for ( UInt_t nrun = 0; nrun < norun; nrun++){      for ( UInt_t nrun = 0; nrun < norun; nrun++){  
618      run->GetRunInfo((ULong64_t)nrun);      //    run->GetRunInfo((ULong64_t)nrun);    
619      if ( entry >= (UInt_t)run->first_file_entry && entry <= (UInt_t)run->last_file_entry ){      //    printf("nrun = %i runlist = %llu \n",nrun,(ULong64_t)runlist->At(nrun));
620        run->newtree->Delete();      GetRunInfo((ULong64_t)runlist->At(nrun));
621        return(nrun);      //    printf("entry %i first %i last %i \n",entry,(UInt_t)first_file_entry,(UInt_t)last_file_entry );
622        if ( entry >= (UInt_t)first_file_entry && entry <= (UInt_t)last_file_entry ){
623          //      run->newtree->Delete();
624          //      delete run;
625          //printf("nrun is %i \n",nrun);
626          return((UInt_t)runlist->At(nrun));
627      };      };
628    };    };
629    run->newtree->Delete();    //  run->newtree->Delete();
630      //  delete run;
631    return(0);    return(0);
632  }  }
633    
# Line 660  Int_t ItoRunInfo::GetRunInfo(ULong64_t r Line 676  Int_t ItoRunInfo::GetRunInfo(ULong64_t r
676      };      };
677      if ( !found ) first_file_entry += (nwrun->EV_REG_PHYS_TO - nwrun->EV_REG_PHYS_FROM + 1);      if ( !found ) first_file_entry += (nwrun->EV_REG_PHYS_TO - nwrun->EV_REG_PHYS_FROM + 1);
678    };    };
679      delete nwver;
680      delete nwrun;
681    if ( found ) return(0);    if ( found ) return(0);
682    return(-800);    return(-800);
683  }  }

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.4

  ViewVC Help
Powered by ViewVC 1.1.23