Ignore:
Timestamp:
11/19/02 10:01:14 (22 years ago)
Author:
bigongia
Message:
*** empty log message ***
File:
1 edited

Legend:

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

    r1543 r1645  
    2323\* ======================================================================== */
    2424
    25 void collarea(char *filename = "data/camera.root")
     25
     26void collarea(char *filename = "data/camera.root", char *outname = "")
    2627{
    2728    //
     
    6263    //
    6364    // Now the histogram we wanted to get out of the data is
    64     // filled and can be displayd
     65    // filled and can be displayed
    6566    //
    6667    parlist.FindObject("MHMcCollectionArea")->DrawClone();
     68
     69
     70    // Write histogram to a file in case an output filename has been supplied:
     71
     72    TFile* f = new TFile(outname,"recreate");
     73    if (f)
     74      {
     75        TH1D* hc = ((MHMcCollectionArea*)parlist.FindObject("MHMcCollectionArea"))->GetHist();
     76        hc->Write();
     77        f.Close();
     78      }
    6779}
Note: See TracChangeset for help on using the changeset viewer.