Changeset 3376


Ignore:
Timestamp:
03/02/04 08:50:21 (21 years ago)
Author:
wittek
Message:
*** empty log message ***
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/manalysis/MSourcePosfromStarPos.cc

    r3339 r3376  
    7979    fRuns  = 0;
    8080    fSize  = 100;
    81     fStars = 0;
    8281
    8382    fRunNr.Set(fSize);
     
    9594    fdyStar.ResizeTo(1,fSize);
    9695
     96    fStars = 0;
     97    fDecSource = 0.0;
     98    fRaSource  = 0.0;
    9799}
    98100
     
    255257    if (fDecSource == 0.0  ||  fRaSource == 0.0  ||  fStars == 0)
    256258    {
    257       *fLog << err << "MSourcePosfromStarPos::PreProcess; there are no sky coordinates defined for the source or from stars"
     259      *fLog << err << "MSourcePosfromStarPos::PreProcess; there are no sky coordinates defined for the source or from stars; fStars = " << fStars
    258260            << endl;
    259261    }
     
    603605    fdThetaTel.Set(fSize);
    604606    fdPhiTel.Set(fSize);
    605 
    606     fStars = fxStar.GetNrows();
    607     fxStar.ResizeTo(fStars, fSize);
    608     fyStar.ResizeTo(fStars, fSize);
    609     fdxStar.ResizeTo(fStars, fSize);
    610     fdyStar.ResizeTo(fStars, fSize);
     607   
     608    Int_t fRows = fxStar.GetNrows();
     609    fxStar.ResizeTo(fRows, fSize);
     610    fyStar.ResizeTo(fRows, fSize);
     611    fdxStar.ResizeTo(fRows, fSize);
     612    fdyStar.ResizeTo(fRows, fSize);
    611613  }
    612614
     
    641643  //      << fRunNr[fRuns-1] << ",  " << fRunNr[fRuns] << endl;
    642644
     645 
    643646  // read mjdS, hmsS, mjdE, hmsE
    644   *fIn >> val;
    645   *fIn >> val;
    646   *fIn >> val;
    647   *fIn >> val;
    648 
    649   *fIn >> val;
    650   *fIn >> val;
    651   *fIn >> val;
    652   *fIn >> val;
    653 
     647  // these data are present only for ON data (fStars > 0)
     648  if (fStars > 0)
     649  {
     650    *fIn >> val;
     651    *fIn >> val;
     652    *fIn >> val;
     653    *fIn >> val;
     654
     655    *fIn >> val;
     656    *fIn >> val;
     657    *fIn >> val;
     658    *fIn >> val;
     659  }
    654660
    655661  *fIn >> val;
    656662  fThetaTel.AddAt(val/kRad2Deg, fRuns-1);
    657663  //*fLog << "val, fThetaTel[fRuns-1] = " << val << ",  "
    658   //    << fThetaTel[fRuns-1] << endl;
     664  //      << fThetaTel[fRuns-1] << endl;
    659665
    660666
     
    671677
    672678  // input is in [deg], convert to [mm]
    673   fStars = fxStar.GetNrows();
     679
     680  //*fLog << "ReadData : fStars = " << fStars << endl;
    674681  for (Int_t i=0; i<fStars; i++)
    675682  {
Note: See TracChangeset for help on using the changeset viewer.