/[PAMELA software]/PamelaDigitizer/DigitizeTOF.cxx
ViewVC logotype

Diff of /PamelaDigitizer/DigitizeTOF.cxx

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

revision 1.4 by mocchiut, Thu Dec 18 17:11:47 2008 UTC revision 1.5 by pamelats, Tue May 5 14:17:37 2009 UTC
# Line 463  void Digitizer::LoadTOFCalib(int np,floa Line 463  void Digitizer::LoadTOFCalib(int np,floa
463    Int_t error = 0,temp=0;    Int_t error = 0,temp=0;
464    GL_PARAM *glparam = new GL_PARAM();    GL_PARAM *glparam = new GL_PARAM();
465    error = glparam->Query_GL_PARAM(3,202,fDbc);    error = glparam->Query_GL_PARAM(3,202,fDbc);
466    calfile.str("");    if(!error){
467    calfile << glparam->PATH.Data() << "/";      calfile.str("");
468    calfile << glparam->NAME.Data();      calfile << glparam->PATH.Data() << "/";
469    printf("\n Using TOF calibration file: \n %s\n",calfile.str().c_str());      calfile << glparam->NAME.Data();
470    ifstream fileTriggerCalib;      printf("\n Using TOF calibration file: \n %s\n",calfile.str().c_str());
471    fileTriggerCalib.open(calfile.str().c_str());      ifstream fileTriggerCalib;
472    if(!fileTriggerCalib)printf("debug: no trigger calib file!\n");      fileTriggerCalib.open(calfile.str().c_str());
473    // correct readout WM Oct '07      for(Int_t i=0; i<np; i++){
474    for(Int_t i=0; i<np; i++){        fileTriggerCalib >> temp;
475      fileTriggerCalib >> temp;        fileTriggerCalib >> atte1[i];
476      fileTriggerCalib >> atte1[i];        fileTriggerCalib >> lambda1[i];
477      fileTriggerCalib >> lambda1[i];        fileTriggerCalib >> atte2[i];
478      fileTriggerCalib >> atte2[i];        fileTriggerCalib >> lambda2[i];
479      fileTriggerCalib >> lambda2[i];        fileTriggerCalib >> temp;
480      fileTriggerCalib >> temp;      }
481        fileTriggerCalib.close();
482      }
483      else{
484        cout<<endl<<"                        *********** ATTENTION ***********"<<endl;
485        cout<<endl<<"                           TOF: NO trigger calib file!"<<endl<<endl;
486        cout<<endl<<"                        TOF digitized data will be wrong!"<<endl<<endl;
487        for(Int_t i=0; i<np; i++){
488          atte1[i]=0.;
489          lambda1[i]=0.;
490          atte2[i]=0.;
491          lambda2[i]=0.;
492        }
493    }    }
   fileTriggerCalib.close();  
494    //end tof calib    //end tof calib
495  }  }

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

  ViewVC Help
Powered by ViewVC 1.1.23