Changeset 7428 for trunk/MagicSoft


Ignore:
Timestamp:
11/25/05 11:29:14 (19 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/Changelog

    r7427 r7428  
    1818
    1919                                                 -*-*- END OF LINE -*-*-
     20 2005/11/25 Thomas Bretz
     21
     22   * datacenter/macros/fillsignal.C:
     23     - added filling of PulsePos used for seeting the extractor window
     24
     25
     26
    2027 2005/11/25 Daniela Dorner
    2128
  • trunk/MagicSoft/Mars/datacenter/macros/fillsignal.C

    r7394 r7428  
    6565#include "MHCamera.h"
    6666
     67#include "MCalibrationPulseTimeCam.h"
     68#include "MCalibrationPix.h"
     69
    6770using namespace std;
    6871
     
    7679    }
    7780
    78     MStatusArray *arr = (MStatusArray*)file.Get("MStatusDisplay");
    79     if (!arr)
     81    Float_t meanextpul = -1;
     82    Float_t rmsextpul  = -1;
     83
     84    MCalibrationPulseTimeCam *pt;
     85    file.GetObject("MCalibrationPulseTimeCam", pt);
     86    if (pt)
     87    {
     88        meanextpul = pt->GetAverageArea(0).GetHiGainMean();
     89        rmsextpul  = pt->GetAverageArea(0).GetHiGainRms();
     90
     91        meanextpul = TMath::Nint(meanextpul*100)/100.;
     92        rmsextpul  = TMath::Nint(rmsextpul*100)/100.;
     93    }
     94
     95    MStatusArray arr;
     96    if (arr.Read()<=0)
    8097    {
    8198        cout << "ERROR - Reading of MStatusDisplay failed." << endl;
     
    83100    }
    84101
    85     MHCamera *cam = (MHCamera*)arr->FindObjectInCanvas("PedRMS;avg", "MHCamera", "PedRMS");
     102    MHCamera *cam = (MHCamera*)arr.FindObjectInCanvas("PedRMS;avg", "MHCamera", "PedRMS");
    86103    if (!cam)
    87104    {
     
    90107    }
    91108
    92     MHCamera *pul = (MHCamera*)arr->FindObjectInCanvas("PulsePos;avg", "MHCamera", "PulsePos");
     109    MHCamera *pul = (MHCamera*)arr.FindObjectInCanvas("PulsePos;avg", "MHCamera", "PulsePos");
    93110    if (!pul)
    94111    {
     
    119136    meanrmso = TMath::Nint(meanrmso*100)/100.;
    120137
    121     cam = (MHCamera*)arr->FindObjectInCanvas("Interp'd;avg", "MHCamera", "Interp'd");
     138    cam = (MHCamera*)arr.FindObjectInCanvas("Interp'd;avg", "MHCamera", "Interp'd");
    122139    if (!cam)
    123140    {
     
    163180
    164181    Int_t seq = atoi(sequence.Data()+6);
    165     TString meanrmsinner=Form("%6.2f", meanrmsi);
    166     TString meanrmsouter=Form("%6.2f", meanrmso);
    167     TString meansiginner=Form("%6.2f", meansigi);
    168     TString meansigouter=Form("%6.2f", meansigo);
    169     TString meanpulpos  =Form("%6.2f", meanpul);
    170     TString rmspulpos   =Form("%6.2f", rmspul);
     182    TString meanrmsinner =Form("%6.2f", meanrmsi);
     183    TString meanrmsouter =Form("%6.2f", meanrmso);
     184    TString meansiginner =Form("%6.2f", meansigi);
     185    TString meansigouter =Form("%6.2f", meansigo);
     186    TString meanpulpos   =Form("%6.2f", meanpul);
     187    TString rmspulpos    =Form("%6.2f", rmspul);
     188    TString meanextpulpos=Form("%6.2f", meanextpul);
     189    TString rmsextpulpos =Form("%6.2f", rmsextpul);
     190
     191    if (meanextpul<0 && rmsextpul<0)
     192    {
     193        meanextpulpos = "NULL";
     194        rmsextpulpos  = "NULL";
     195    }
    171196
    172197    cout << "Sequence #" << seq << endl;
     
    175200    cout << "  Mean Signal  inner [phe] " << meansiginner << endl;
    176201    cout << "  Mean Signal  outer [phe] " << meansigouter << endl;
    177     cout << "  Mean PulsePos            " << meanpulpos   << endl;
    178     cout << "  Rms  PulsePos            " << rmspulpos    << endl;
     202    cout << "  Mean calibrated PulsePos " << meanpulpos   << endl;
     203    cout << "  Rms  calibrated PulsePos " << rmspulpos    << endl;
     204    cout << "  Mean extracted  PulsePos " << meanextpulpos   << endl;
     205    cout << "  Rms  extracted  PulsePos " << rmsextpulpos    << endl;
    179206
    180207    TString query = Form("UPDATE Calibration SET "
    181                          " fMeanPedRmsInner=%s, fMeanPedRmsOuter=%s, "
    182                          " fMeanSignalInner=%s, fMeanSignalOuter=%s, "
    183                          " fPulsePosMean=%s,    fPulsePosRms=%s      "
     208                         " fMeanPedRmsInner=%s,   fMeanPedRmsOuter=%s, "
     209                         " fMeanSignalInner=%s,   fMeanSignalOuter=%s, "
     210                         " fPulsePosMean=%s,      fPulsePosRms=%s,     "
     211                         " fPulsePosCheckMean=%s, fPulsePosCheckRms=%s "
    184212                         " WHERE fSequenceFirst='%d' ",
    185                          meanrmsinner.Data(), meanrmsouter.Data(),
    186                          meansiginner.Data(), meansigouter.Data(),
    187                          meanpulpos.Data(),   rmspulpos.Data(),
     213                         meanrmsinner.Data(),  meanrmsouter.Data(),
     214                         meansiginner.Data(),  meansigouter.Data(),
     215                         meanpulpos.Data(),    rmspulpos.Data(),
     216                         meanextpulpos.Data(), rmsextpulpos.Data(),
    188217                         seq);
    189218
Note: See TracChangeset for help on using the changeset viewer.