Changeset 4992 for trunk/MagicSoft


Ignore:
Timestamp:
09/14/04 12:36:12 (20 years ago)
Author:
stamerra
Message:
*** empty log message ***
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/mtemp/mpisa/macros/readIPR.C

    r4972 r4992  
    4545    plist.AddToList(&geom);
    4646
    47     // First Task: Read ROOT file with REPORT data
    48     MReportFileRead read(fname);
    49     read.SetHasNoHeader();
    50     // The Trigger container is added to the list
    51     read.AddToList("MReportTrigger");
     47    // First Task: Read ROOT file with Trigger-REPORT data
     48    MReadTree read("Trigger", fname);
     49    read.DisableAutoScheme();
     50
    5251    tlist.AddToList(&read);
    5352
     53    // Create the container for the IPRs
     54    MTriggerIPR ipr;
     55    plist.AddToList(&ipr);
    5456
    55     MHCamEvent IPRcam("IPRcam","IPRs");
    56     plist.AddToList(&IPRcam);
    57     // create a task to fill a histogram
    58     //    MFillH fill("MHCamEvent", "MTriggerIPR");
    59 
    60     MFillH fillIPR(&IPRcam, "MTriggerIPR");
     57    // Create the histo to display the IPRs
     58    MHCamEvent IPRhist("IPRhist","IPRs");
     59    plist.AddToList(&IPRhist);
     60       
     61    // create a task to fill a histogram from the container
     62    MFillH fillIPR(&IPRhist, "MTriggerIPR");
    6163    tlist.AddToList(&fillIPR);
    6264
     
    6870
    6971    //
    70     // Execute your analysis
     72    // Execute the analysis
    7173    //
     74    if (!evtloop.PreProcess())
     75      return;
     76   
    7277    if (!evtloop.Eventloop())
    73         return;
     78      return;
    7479
    7580    tlist.PrintStatistics();
    7681
    77     //
     82    //-----------------------------------
    7883    // Now display the result of the loop
    7984    //
    8085
    81     //    MHCamEvent &h2 = *(MHCamEvent*)plist->FindObject("MHCamEvent");
    82     //    MHCamera &h = *(MHCamera*)h2.GetHistByName("sum");
    83     MHCamera &h = *(MHCamera*)IPRcam.GetHistByName("sum");
     86    // create a MHCamera histo where the sum off all events is filled
     87    MHCamera &h = *(MHCamera*)IPRhist.GetHistByName("sum");
    8488
    8589    TCanvas *c = MH::MakeDefCanvas();
     
    9296    disp3->SetCamContent(h, 2);
    9397
    94     disp1->SetYTitle("I [nA]");
    95     disp2->SetYTitle("\\sigma_{I} [\\mu A]");
    96     disp3->SetYTitle("\\sigma_{I} [%]");
     98    disp1->SetYTitle("Rate [Hz]");
     99    disp2->SetYTitle("\\sigma_{Rate} [Hz]");
     100    disp3->SetYTitle("\\sigma_{Rate} [%]");
    97101    disp1->SetName("IPRs;avg");
    98102    disp2->SetName("IPRs;err");
     
    139143
    140144    c->SaveAs(fname(0, fname.Last('.')+1) + "ps");
    141     c->SaveAs(fname(0, fname.Last('.')+1) + "root");
     145    //c->SaveAs(fname(0, fname.Last('.')+1) + "root");
    142146}
    143147
Note: See TracChangeset for help on using the changeset viewer.