Changeset 1653


Ignore:
Timestamp:
11/20/02 14:01:38 (22 years ago)
Author:
bigongia
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/Changelog

    r1649 r1653  
    11                                                                  -*-*- END -*-*-
     2 2002/11/20: Abelardo Moralejo
     3
     4   * macros/collarea.C:
     5     - Introduced check before opening output file to avoid annoying
     6       error message.
     7
    28 2002/11/19: Abelardo Moralejo
    39
     
    1824     - removed also the corresponding AddToList for the tasklist
    1925
    20 
    2126 2002/11/19: Abelardo Moralejo
    2227
     
    2429     - Added 2nd argument to write an output file containing the
    2530       collection area histogram.
    26 
    2731
    2832
  • trunk/MagicSoft/Mars/macros/collarea.C

    r1645 r1653  
    7070    // Write histogram to a file in case an output filename has been supplied:
    7171
    72     TFile* f = new TFile(outname,"recreate");
    73     if (f)
     72    if (strlen(outname) > 0)
    7473      {
    75         TH1D* hc = ((MHMcCollectionArea*)parlist.FindObject("MHMcCollectionArea"))->GetHist();
    76         hc->Write();
    77         f.Close();
     74        TFile* f = new TFile(outname,"recreate");
     75        if (f)
     76          {
     77            TH1D* hc = ((MHMcCollectionArea*)parlist.FindObject("MHMcCollectionArea"))->GetHist();
     78            hc->Write();
     79            f.Close();
     80          }
    7881      }
    7982}
Note: See TracChangeset for help on using the changeset viewer.