Ignore:
Timestamp:
01/28/05 11:18:44 (20 years ago)
Author:
tbretz
Message:
*** empty log message ***
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/mjobs/MJPedestal.cc

    r6063 r6078  
    141141const char* MJPedestal::GetOutputFile() const
    142142{
     143    const TString name(GetOutputFileName());
     144    if (name.IsNull())
     145        return "";
     146
     147    return Form("%s/%s", fPathOut.Data(), name.Data());
     148}
     149
     150const char* MJPedestal::GetOutputFileName() const
     151{
    143152    if (fSequence.IsValid())
    144         return Form("%s/pedest%08d.root", (const char*)fPathOut, fSequence.GetSequence());
     153        return Form("pedest%08d.root", fSequence.GetSequence());
    145154
    146155    if (!fRuns)
    147156        return "";
    148157
    149     return Form("%s/%s-F0.root", (const char*)fPathOut, (const char*)fRuns->GetRunsAsFileName());
     158    return Form("%s-F0.root", (const char*)fRuns->GetRunsAsFileName());
    150159}
    151160
     
    785794        return kTRUE;
    786795
    787     if (fPathOut.IsNull())
    788     {
    789         *fLog << inf << "No output path specified via SetPathOut - no output written." << endl;
    790         return kTRUE;
    791     }
    792 
    793     const TString oname(GetOutputFile());
    794 
    795     *fLog << inf << "Writing to file: " << oname << endl;
    796 
    797     TFile file(oname, "UPDATE", "File created by MJPedestal", 9);
    798     if (!file.IsOpen())
    799     {
    800         *fLog << err << "ERROR - Couldn't open file " << oname << " for writing..." << endl;
    801         return kFALSE;
    802     }
    803 
    804796    TObjArray cont;
    805 
    806     if (fDisplay)
    807         cont.Add(fDisplay);
    808797
    809798    cont.Add(&fPedestalCamOut);
    810799    cont.Add(&fBadPixels);
    811800
    812     return WriteContainer(cont);
     801    return WriteContainer(cont, GetOutputFileName(), fOverwrite?"RECREATE":"NEW");
    813802}
    814803
Note: See TracChangeset for help on using the changeset viewer.