Changeset 7359 for trunk/MagicSoft/Mars


Ignore:
Timestamp:
09/21/05 16:55:22 (19 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/Changelog

    r7358 r7359  
    2323     - changed some resolution values
    2424
     25   * datacenter/macros/fillsignal.C:
     26     - started support to fill mean interpolated signal into DB
     27
    2528   * mfileio/MWriteRootFile.cc:
    2629     - added a FIXME comment
     
    4447
    4548   * mjobs/MJob.[h,cc]:
    46      - new ststic functions: SortArray
     49     - new static functions: SortArray
    4750
    4851   * mjobs/MSequence.cc:
  • trunk/MagicSoft/Mars/datacenter/macros/fillsignal.C

    r7222 r7359  
    9898    Int_t s0[] = { 1, 2, 3, 4, 5, 6 };
    9999
    100     Stat_t meani = cam->GetMeanSectors(TArrayI(6, s0), inner);
    101     Stat_t meano = cam->GetMeanSectors(TArrayI(6, s0), outer);
     100    Stat_t meanrmsi = cam->GetMeanSectors(TArrayI(6, s0), inner);
     101    Stat_t meanrmso = cam->GetMeanSectors(TArrayI(6, s0), outer);
    102102
    103     if (meani<0 || meano<0)
     103    if (meanrmsi<0 || meanrmso<0)
    104104    {
    105105        cout << "WARNING - MeanPedRMS inner or outer < 0 " << endl;
    106         cout << "MeanPedRMS inner " << meani << endl;
    107         cout << "MeanPedRMS outer " << meano << endl;
     106        cout << "MeanPedRMS inner " << meanrmsi << endl;
     107        cout << "MeanPedRMS outer " << meanrmso << endl;
    108108        return 0;
    109109    }
    110110
    111     meani = TMath::Nint(meani*100)/100.;
    112     meano = TMath::Nint(meano*100)/100.;
     111    meanrmsi = TMath::Nint(meanrmsi*100)/100.;
     112    meanrmso = TMath::Nint(meanrmso*100)/100.;
     113
     114    cam = (MHCamera*)arr->FindObjectInCanvas("Interp'd;avg", "MHCamera", "Interp'd");
     115    if (!cam)
     116    {
     117        cout << "WARNING - Reading of Interp'd;avg failed." << endl;
     118        return 0;
     119    }
     120
     121    Stat_t meansigi = cam->GetMeanSectors(TArrayI(6, s0), inner);
     122    Stat_t meansigo = cam->GetMeanSectors(TArrayI(6, s0), outer);
     123
     124    if (meansigi<0 || meansigo<0)
     125    {
     126        cout << "WARNING - MeanInterp'd inner or outer < 0 " << endl;
     127        cout << "MeanInterp'd inner " << meansigi << endl;
     128        cout << "MeanInterp'd outer " << meansigo << endl;
     129        return 0;
     130    }
     131
     132    meansigi = TMath::Nint(meansigi*100)/100.;
     133    meansigo = TMath::Nint(meansigo*100)/100.;
    113134
    114135    TString sequence = fname(TRegexp("signal[0-9]+[.]root$"));
     
    121142
    122143    Int_t seq = atoi(sequence.Data()+6);
    123     TString meaninner=Form("%6.2f", meani);
    124     TString meanouter=Form("%6.2f", meano);
     144    TString meanrmsinner=Form("%6.2f", meanrmsi);
     145    TString meanrmsouter=Form("%6.2f", meanrmso);
     146    TString meansiginner=Form("%6.2f", meansigi);
     147    TString meansigouter=Form("%6.2f", meansigo);
    125148
    126149    cout << "Sequence #" << seq << endl;
    127     cout << "  Mean Ped RMS inner [phe] " << meaninner << endl;
    128     cout << "  Mean Ped RMS outer [phe] " << meanouter << endl;
     150    cout << "  Mean Ped RMS inner [phe] " << meanrmsinner << endl;
     151    cout << "  Mean Ped RMS outer [phe] " << meanrmsouter << endl;
     152    cout << "  Mean Signal  inner [phe] " << meansiginner << endl;
     153    cout << "  Mean Signal  outer [phe] " << meansigouter << endl;
    129154
     155    // Missing....    meansiginner, meansigouter
    130156    TString query = Form("UPDATE Calibration SET fMeanPedRmsInner=%s, "
    131157                         " fMeanPedRmsOuter=%s WHERE fSequenceFirst='%d' ",
    132                          meaninner.Data(), meanouter.Data(), seq);
     158                         meanrmsinner.Data(), meanrmsouter.Data(), seq);
    133159
    134160    if (dummy)
Note: See TracChangeset for help on using the changeset viewer.