Changeset 7062


Ignore:
Timestamp:
05/19/05 14:49:32 (20 years ago)
Author:
Daniela Dorner
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/Changelog

    r7061 r7062  
    2121
    2222                                                 -*-*- END OF LINE -*-*-
     23 2005/05/19 Daniela Dorner
     24
     25   * datacenter/macros/fillstar.C:
     26     - add new parameter
     27
     28   * datacenter/macros/setupdb.C:
     29     - adapted to new column in db
     30
     31
     32
    2333 2005/05/19 Thomas Bretz
    2434
  • trunk/MagicSoft/Mars/datacenter/macros/fillstar.C

    r7019 r7062  
    108108    TString PSF = Form("%5.1f", psf);
    109109
     110    TProfile *h2 = (TProfile*)arr.FindObjectInCanvas("SizeVsRadius", "TProfile", "MHMuonPar");
     111    if (!h1)
     112    {
     113        cout << "WARNING - Reading of SizeVsRadius failed." << endl;
     114        return 0;
     115    }
     116
     117    Float_t integral = h2->Integral(5, 14);
     118    Float_t integralmc = -35.6*psf + 11000;
     119    Float_t ratiodatamc = (integral/integralmc)*100;
     120    TString ratio = Form("%5.1f", ratiodatamc);
     121
     122
    110123    TH1 *h = (TH1*)arr.FindObjectInCanvas("Islands", "TH1F", "MHImagePar");
    111124    if (!h)
     
    129142
    130143    cout << "Sequence #" << seq << endl;
    131     cout << "  PSF [mm]       " << Form("%5.1f", psf)     << endl;
    132     cout << "  Island Quality " << Form("%5.1f", quality) << endl;
     144    cout << "  PSF [mm]       " << Form("%5.1f", psf)         << endl;
     145    cout << "  Island Quality " << Form("%5.1f", quality)     << endl;
     146    cout << "  Ratio [%]      " << Form("%5.1f", ratiodatamc) << endl;
    133147
    134148    TString query;
     
    138152                     " fSequenceFirst=%d,"
    139153                     " fMeanNumberIslands=%s, "
     154                     " fRatio=%s, "
    140155                     " fPSF=%s ",
    141                      seq, islands.Data(), PSF.Data());
     156                     seq, islands.Data(), ratio.Data(), PSF.Data());
    142157    }
    143158    else
     
    145160        query = Form("UPDATE MyMagic.Star SET"
    146161                     " fMeanNumberIslands=%s, "
     162                     " fRatio=%s, "
    147163                     " fPSF=%s "
    148164                     " WHERE fSequenceFirst=%d ",
    149                      islands.Data(), PSF.Data(), seq);
     165                     islands.Data(), ratio.Data(), PSF.Data(), seq);
    150166    }
    151167
  • trunk/MagicSoft/Mars/datacenter/macros/setupdb.C

    r7042 r7062  
    530530         "  fMeanNumberIslands  FLOAT(5,1)            NOT NULL,"
    531531         "  fPSF                FLOAT(5,1)            NOT NULL,"
     532         "  fRatio              FLOAT(5,1)            NOT NULL,"
    532533         "  fLastUpdate         TIMESTAMP"
    533534         ")"));
Note: See TracChangeset for help on using the changeset viewer.