Changeset 6078 for trunk/MagicSoft/Mars/mjobs/MJPedestal.cc
- Timestamp:
- 01/28/05 11:18:44 (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mjobs/MJPedestal.cc
r6063 r6078 141 141 const char* MJPedestal::GetOutputFile() const 142 142 { 143 const TString name(GetOutputFileName()); 144 if (name.IsNull()) 145 return ""; 146 147 return Form("%s/%s", fPathOut.Data(), name.Data()); 148 } 149 150 const char* MJPedestal::GetOutputFileName() const 151 { 143 152 if (fSequence.IsValid()) 144 return Form(" %s/pedest%08d.root", (const char*)fPathOut, fSequence.GetSequence());153 return Form("pedest%08d.root", fSequence.GetSequence()); 145 154 146 155 if (!fRuns) 147 156 return ""; 148 157 149 return Form("%s /%s-F0.root", (const char*)fPathOut, (const char*)fRuns->GetRunsAsFileName());158 return Form("%s-F0.root", (const char*)fRuns->GetRunsAsFileName()); 150 159 } 151 160 … … 785 794 return kTRUE; 786 795 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 804 796 TObjArray cont; 805 806 if (fDisplay)807 cont.Add(fDisplay);808 797 809 798 cont.Add(&fPedestalCamOut); 810 799 cont.Add(&fBadPixels); 811 800 812 return WriteContainer(cont );801 return WriteContainer(cont, GetOutputFileName(), fOverwrite?"RECREATE":"NEW"); 813 802 } 814 803
Note:
See TracChangeset
for help on using the changeset viewer.