Changeset 8471


Ignore:
Timestamp:
05/03/07 11:03:34 (18 years ago)
Author:
Daniela Dorner
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/Changelog

    r8470 r8471  
    1919                                                 -*-*- END OF LINE -*-*-
    2020
     21 2007/05/03 Daniel Hoehne
     22
     23   * datacenter/macros/fillsignal.C:
     24     - fixed bug which made fillsignal fail for the new MUX data:
     25       for sequences > 200000 hilooff and hilocal are not needed anymore
     26
     27
     28
    2129 2007/04/28 Daniela Dorner
    2230
  • trunk/MagicSoft/Mars/datacenter/macros/fillsignal.C

    r8302 r8471  
    131131    }
    132132*/
    133     MHCamera *hilooff = (MHCamera*)arr.FindObjectInCanvas("HiLoOff;avg", "MHCamera", "HiLoOff");
    134     if (!hilooff)
    135     {
    136         cout << "WARNING - Reading of HiLoOff failed." << endl;
    137         return 2;
    138     }
    139 
    140     MHCamera *hilocal = (MHCamera*)arr.FindObjectInCanvas("HiLoCal;avg", "MHCamera", "HiLoCal");
    141     if (!hilocal)
    142     {
    143         cout << "WARNING - Reading of HiLoCal failed." << endl;
    144         return 2;
     133
     134    //get sequence number from the filename
     135    TString sequence = fname(TRegexp("signal[0-9]+[.]root$"));
     136    if (sequence.IsNull())
     137    {
     138        cout << "WARNING - Sequ# empty" << endl;
     139        cout << "Sequ# " << sequence << endl;
     140        return 2;
     141    }
     142
     143    Int_t seq = atoi(sequence.Data()+6);
     144
     145    Double_t medoff;
     146    Double_t devoff;
     147
     148    Double_t medcal;
     149    Double_t devcal;
     150
     151    TString medpuloff;
     152    TString devpuloff;
     153    TString medhilocal;
     154    TString devhilocal;
     155
     156    if (seq > 200000)
     157    {
     158        cout << "INFO - HiLoOff not used anymore." << endl;
     159        cout << "INFO - HiLoCal not used anymore." << endl;
     160
     161        medpuloff.Form("NULL");
     162        devpuloff.Form("NULL");
     163        medhilocal.Form("NULL");
     164        devhilocal.Form("NULL");
     165
     166    }
     167
     168    else
     169    {
     170        MHCamera *hilooff = (MHCamera*)arr.FindObjectInCanvas("HiLoOff;avg", "MHCamera", "HiLoOff");
     171        if (!hilooff)
     172        {
     173            cout << "WARNING - Reading of HiLoOff failed." << endl;
     174            return 2;
     175        }
     176
     177        MHCamera *hilocal = (MHCamera*)arr.FindObjectInCanvas("HiLoCal;avg", "MHCamera", "HiLoCal");
     178        if (!hilocal)
     179        {
     180            cout << "WARNING - Reading of HiLoCal failed." << endl;
     181            return 2;
     182        }
     183
     184        medoff = TMath::Nint(hilooff->GetMedian()*10000)/10000.;
     185        devoff = TMath::Nint(hilooff->GetDev()   *10000)/10000.;
     186
     187        medcal = TMath::Nint(hilocal->GetMedian()*100)/100.;
     188        devcal = TMath::Nint(hilocal->GetDev()   *100)/100.;
     189
     190        medpuloff.Form("%7.4f", medoff);
     191        devpuloff.Form("%7.4f", devoff);
     192        medhilocal.Form("%6.2f", medcal);
     193        devhilocal.Form("%6.2f", devcal);
    145194    }
    146195
     
    217266    // USE MEDIAN INSTEAD? GetQuantiles(Int_t nprobSum, Double_t *q, const Double_t *probSum=0);
    218267
    219     Double_t medoff = TMath::Nint(hilooff->GetMedian()*10000)/10000.;
    220     Double_t devoff = TMath::Nint(hilooff->GetDev()   *10000)/10000.;
    221 
    222     Double_t medcal = TMath::Nint(hilocal->GetMedian()*100)/100.;
    223     Double_t devcal = TMath::Nint(hilocal->GetDev()   *100)/100.;
    224 
    225     //get sequence number from the filename
    226     TString sequence = fname(TRegexp("signal[0-9]+[.]root$"));
    227     if (sequence.IsNull())
    228     {
    229         cout << "WARNING - Sequ# empty" << endl;
    230         cout << "Sequ# " << sequence << endl;
    231         return 2;
    232     }
    233 
    234     Int_t seq = atoi(sequence.Data()+6);
     268
    235269    TString meanrmsinner =Form("%6.2f", meanrmsi);
    236270    TString meanrmsouter =Form("%6.2f", meanrmso);
     
    248282    TString rmspullo     =Form("%6.2f", rmslo);
    249283    */
    250     TString medpuloff    =Form("%7.4f", medoff);
    251     TString devpuloff    =Form("%7.4f", devoff);
    252     TString medhilocal   =Form("%6.2f", medcal);
    253     TString devhilocal   =Form("%6.2f", devcal);
    254284
    255285    if (meanextpul<0 && rmsextpul<0)
Note: See TracChangeset for help on using the changeset viewer.