Changeset 892


Ignore:
Timestamp:
07/20/01 16:51:53 (23 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/Changelog

    r891 r892  
    1515     - Added FindCreateObjList
    1616     - Added CreateObjList
     17
     18   * mhist/MHMcEnergies.[h,cc]:
     19     - deleted
     20
     21   * mhist/MHMcEnergy.[h,cc]:
     22     - rewrote constructor in a way that MHMcEnergies isn't needed anymore
     23     - added a SetName function which replaces the old constructor somehow
     24
     25   * macros/getThreshold.C:
     26     - make use of some new features
    1727
    1828
  • trunk/MagicSoft/Mars/macros/getThreshold.C

    r861 r892  
    1 void getThreshold( char* filename = "/hdb1/users/jlopez/temp_loop.root")
     1void getThreshold(char* filename="data/CrabNebula_dnsb_09_loop.root")
    22{
    33    //
     
    1818    //      taking only the trigger information from MMcTrig
    1919    //
    20     const UInt_t numtriggerconditions = 5;
     20    const UInt_t numtriggerconditions = 4;
    2121
    22     MHMcEnergies *hists = new MHMcEnergies(numtriggerconditions);
    23     hists->AddEntriesToList(&parlist);
     22    //
     23    // Create numtriggerconditions histograms of type MHMcEnergy
     24    // and store the histograms in an TObjArray
     25    //
     26    TObjArray *hists = new TObjArray(MParList::CreateObjList("MHMcEnergy", numtriggerconditions));
     27
     28    //
     29    // Check if the list really contains the right number of histograms
     30    //
     31    if (hists->GetEntriesFast() != numtriggerconditions)
     32        return;
     33
     34    //
     35    // Add the histograms to the paramater list.
     36    //
     37    parlist.AddToList(hists);
    2438
    2539    //
     
    3246    //      like one dimension MMcThresholdCalc
    3347    //
    34     MReadTree        read("Events", filename);
     48    MReadTree        read("Events;7", filename);
    3549    MMcThresholdCalc calc(numtriggerconditions);
    3650
     
    4256
    4357    //
    44     // Begin the loop
     58    // Begin the loop (if the loop wasn't succesfull
     59    // don't try to draw the results
    4560    //
    46     evtloop.Eventloop();
     61    if (!evtloop.Eventloop())
     62        return;
    4763
    4864    //
    4965    // Now you can display the results
    5066    //
    51     for (UInt_t i=0; i<numtriggerconditions; i++) {
    52         ((*hists)[i]).Draw();
    53         if (getchar()=='q') break;
    54     }
     67    for (UInt_t i=0; i<numtriggerconditions; i++)
     68        ((*hists)[i])->Draw();
    5569}
Note: See TracChangeset for help on using the changeset viewer.