Ignore:
Timestamp:
09/05/13 11:32:16 (11 years ago)
Author:
tbretz
Message:
Fixed a crash when no events were read; do not write a file when no events were processed; write the header to the output when only one file was processed.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Mars/fact/analysis/gain/extract_singles.C

    r17033 r17074  
    165165    Bool_t Finalize()
    166166    {
     167        if (!fPedestal)
     168            return kTRUE;
     169
    167170        fPedestal->InitSize(fBaseline.GetNbinsX());
    168171        fPedestal->SetNumEvents(GetNumExecutions());
     
    852855        return 7;
    853856
     857    if (fill.GetNumExecutions()==0)
     858        return 8;
     859
    854860    // =============================================================
    855861
     
    858864    MHSingles* h = (MHSingles*) plist.FindObject("MHSingles");
    859865    if (!h)
    860         return 8;
     866        return 9;
    861867
    862868    const TH2 *htime   = h->GetTime();
     
    889895    extract.GetExtractionRange().Write("ExtractionRange");
    890896
     897    if (firstRunID==lastRunID)
     898        header.Write();
     899
    891900    return 0;
    892901}
Note: See TracChangeset for help on using the changeset viewer.