Changeset 19842 for trunk


Ignore:
Timestamp:
10/31/19 09:56:39 (5 years ago)
Author:
tbretz
Message:
Added a lot of comments.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Mars/hawc/plot_cleaned.C

    r19820 r19842  
    3838///////////////////////////////////////////////////////////////////////////
    3939
     40// ==========================================================================
     41// ============ see plot_cleaned function at the end of the file ============
     42// ==========================================================================
    4043Bool_t HandleInput()
    4144{
    42     // This must be there to get accesss to the GUI while the macro
    43     // is still running!
    44 
     45    // This is a pure man's command line interface to wait for a key input
     46    // and allow exit but at the same time allow interaction with the GUI
    4547    TTimer timer("gSystem->ProcessEvents();", 50, kFALSE);
    4648    while (1)
    4749    {
    48         //
    4950        // While reading the input process gui events asynchronously
    50         //
    5151        timer.TurnOn();
    5252        const char *gl = Getline("Type 'q' to exit, <return> to go on: ");
     
    6464}
    6565
    66 //
    67 // Setup the data-members of your 'virtual' class
    68 //
     66// Create four camera histograms
    6967MHCamera display[4];
    7068
     69// All 'data members' that are required globally
    7170TCanvas   *c;
    7271MParList  *fParList;
     
    9291    for (int i=0; i<4; i++)
    9392    {
     93        // Tell all histograms which is the geometry to use
    9494        display[i].SetGeometry(*geomcam);
     95
     96        // Add the camera object to the pads
    9597        c->cd(i+1);
    9698        display[i].Draw();
     99
     100        // Add the MHillas object (which pains the ellipse)
    97101        gPad->cd(1);
    98102        plist->FindObject("MHillas")->Draw();
     
    155159    delete c;
    156160}
     161
     162// ==========================================================================
     163//
     164// Run the macro with
     165//
     166//      root hawc/plot_cleaned.C\(\"00000001.003_Y_MonteCarlo003_Events.root\"\)
     167//
     168// The default file name is a Y-file (either as Monte Carlo-truth from ceres
     169// or from the callisto)
     170//
     171// From within root, the escape characters can be omitted, e.g.
     172//
     173//      root
     174//      [0] .x hawc/plot_cleaned.C("00000001.003_Y_MonteCarlo003_Events.root")
     175//
     176// ==========================================================================
    157177
    158178void plot_cleaned(const char *fname)
Note: See TracChangeset for help on using the changeset viewer.