Ignore:
Timestamp:
12/01/03 18:58:01 (21 years ago)
Author:
gaug
Message:
*** empty log message ***
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/macros/calibration.C

    r2570 r2581  
    2323\* ======================================================================== */
    2424
    25 void calibration(TString pedname="./20031102_02399_P_Unavailable_E.root",
    26                  TString calname="./20031102_02400_D_Flip500Hz_E.root")
     25void calibration(TString pedname="../../Mars-0.8.2/20031102_02399_P_Unavailable_E.root",
     26                 TString calname="../../Mars-0.8.2/20031102_02400_D_Flip500Hz_E.root")
    2727{
    2828
     
    4545
    4646    MGeomApply     geomapl;
     47    MPedCalcPedRun pedcalc;
    4748    MGeomCamMagic  geomcam;
    48     MGeomCam       geom;
    49     MPedCalcPedRun pedcalc;
    5049    MPedestalCam   pedcam;
    5150
     
    5756
    5857    MHCamEvent hist("Pedestal");
    59     hist.SetType(1);
     58    hist.SetType(0);
    6059    plist.AddToList(&hist);
    6160    MFillH fill(&hist, "MPedestalCam");
     
    6362    tlist.AddToList(&fill);
    6463
    65     //
    66     // Update frequency by default = 1Hz
    67     //
    68     MStatusDisplay *d = new MStatusDisplay;
     64    MStatusDisplay *d1 = new MStatusDisplay;
    6965 
    7066    // Set update time to 3s
    71     d->SetUpdateTime(3000);
     67    d1->SetUpdateTime(3000);
    7268 
    7369    //
     
    7672    MEvtLoop evtloop;
    7773    evtloop.SetParList(&plist);
    78     evtloop.SetDisplay(d);     
     74    evtloop.SetDisplay(d1);     
    7975
    8076    //
     
    8682    tlist.PrintStatistics();
    8783
     84    MPedestalCam *ped = plist.FindObject("MPedestalCam");
     85    ped.Print();
     86
    8887    //
    8988    // Create a empty Parameter List and an empty Task List
     
    9493    plist2.AddToList(&tlist2);
    9594
     95
    9696    plist2.AddToList((MPedestalCam*)plist.FindObject("MPedestalCam"));
    9797
    98     MGeomApply geomapl2;
     98//    MGeomApply geomapl2;
    9999    tlist2.AddToList(&geomapl);
    100100
     
    108108
    109109    MCalibrationCalc calcalc;
    110     calcalc.SetSkipTFits();
     110//    calcalc.SetSkipTFits();
    111111
    112112    plist2.AddToList(&geomcam);
     
    114114    //
    115115    // As long, as we don't have digital modules,
    116     // we have to set the color by hand
     116    // we have to set the color of the pulser LED by hand
    117117    //
    118118    calcalc.SetPulserColor(MCalibrationCalc::kEBlue);
     
    141141    tlist2.PrintStatistics();
    142142
    143  //   plist2.FindObject("MCalibrationCam")->Print();
    144 
    145143    //
    146144    // just one example how to get the plots of individual pixels
     
    148146    MCalibrationCam *cam = plist2.FindObject("MCalibrationCam");
    149147    MCalibrationPix *pix = cam->GetCalibrationPix(523);
    150     //pix->Draw();
    151 
     148    pix->Draw();
     149
     150    //
     151    // Here we are confronted to a serious bug in ROOT:
     152    // If we do not apply the next command, gPad will get
     153    // screwed up completely: (Thanks to tbretz for finding out
     154    // the reason during several hours!!!)
     155    //
    152156    gROOT->GetListOfCanvases()->Delete();
    153157
     
    193197    disp12.SetYTitle("\\Delta_{Q} [FADC counts]");
    194198
    195 //    TText text(0.1, 0.5, &fname[fname.Last('/')+1]);
    196 //    text.SetTextSize(0.015);
    197 //    text.DrawClone();
    198     TCanvas *c1 = &d->AddTab("Cal1");//MH::MakeDefCanvas("Calibration1","Plots of FADC Charges",700,900);
     199    MStatusDisplay *d2 = new MStatusDisplay;
     200 
     201    // Set update time to 1s
     202    d2->SetUpdateTime(1000);
     203
     204    TCanvas *c1 = &d2->AddTab("Fitted Charges");
    199205    c1->Divide(5, 2);
    200206
     
    241247    obj->Draw();
    242248
    243     TCanvas *c2 = &d->AddTab("Cal2");//MH::MakeDefCanvas("Calibration2","Plots of Arrival Times",700,900);
     249    TCanvas *c2 = &d2->AddTab("Fitted Times");
    244250    c2->Divide(3, 2);
    245251
     
    265271    obj->Draw();
    266272
    267     TCanvas *c3 = &d->AddTab("Cal3");//MH::MakeDefCanvas("Calibration3","Plots of Pedestals",700,900);
     273    TCanvas *c3 = &d2->AddTab("Pedestals");
    268274    c3->Divide(2, 2);
    269275
     
    282288    obj->Draw();
    283289
    284     TCanvas *c4 = &d->AddTab("Cal4");//MH::MakeDefCanvas("Calibration4","Plots of Reduced Charges",700,900);
     290    TCanvas *c4 = &d2->AddTab("Reduced Charges");
    285291    c4->Divide(2, 2);
    286292
     
    299305    obj->Draw();
    300306
    301 //    c->SaveAs(fname(0, fname.Last('.')+1) + "ps");
    302     //c->SaveAs(fname(0, fname.Last('.')+1) + "root");
     307#endif
    303308
    304309}
Note: See TracChangeset for help on using the changeset viewer.