Changeset 6751 for trunk/MagicSoft/Mars/mjobs
- Timestamp:
- 03/04/05 16:41:53 (20 years ago)
- Location:
- trunk/MagicSoft/Mars/mjobs
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mjobs/MJPedestal.cc
r6730 r6751 228 228 229 229 return o ? (MExtractor*)o->Clone("ExtractSignal") : NULL; 230 } 231 232 Bool_t MJPedestal::WriteExtractor() const 233 { 234 235 const TString name = Form("pedy%08d.root",fSequence.GetSequence()); 236 const TString fname = Form("%s/%s",fPathIn.Data(),name.Data()); 237 238 *fLog << inf << "Updating extractor in file: " << fname << endl; 239 240 TFile file(fname, "UPDATE"); 241 if (!file.IsOpen()) 242 { 243 *fLog << err << dbginf << "ERROR - Could not open file " << fname << endl; 244 return kFALSE; 245 } 246 247 TObjArray cont; 248 cont.Add(fExtractor); 249 250 return WriteContainer(cont,name, fOverwrite?"RECREATE":"NEW"); 230 251 } 231 252 … … 859 880 cont.Add(&fBadPixels); 860 881 861 return WriteContainer(cont, GetOutputFileName(), 882 return WriteContainer(cont, GetOutputFileName(),fOverwrite?"RECREATE":"NEW"); 862 883 } 863 884 … … 1215 1236 ? (Int_t)(meanpulsetime-1.5*rmspulsetime) 1216 1237 : (Int_t)(meanpulsetime-3.); 1217 constInt_t wshigain = fExtractor->InheritsFrom("MExtractTimeAndCharge")1218 ? ((MExtractTimeAndCharge*)fExtractor)->GetWindowSizeHiGain()1238 Int_t wshigain = fExtractor->InheritsFrom("MExtractTimeAndCharge") 1239 ? ((MExtractTimeAndCharge*)fExtractor)->GetWindowSizeHiGain() 1219 1240 : 6; 1241 if (wshigain > 6) 1242 wshigain = 6; 1220 1243 const Int_t wslogain = fExtractor->InheritsFrom("MExtractTimeAndCharge") 1221 1244 ? ((MExtractTimeAndCharge*)fExtractor)->GetWindowSizeLoGain() … … 1243 1266 } 1244 1267 fExtractor->SetRange(newfirst,newlast+wshigain,newfirst,data->GetNumLoGainSamples()); 1268 if (!WriteExtractor()) 1269 { 1270 *fLog << err << "Could not write the changes to disk, abort... " << endl; 1271 return kFALSE; 1272 } 1245 1273 } 1246 1274 else -
trunk/MagicSoft/Mars/mjobs/MJPedestal.h
r6699 r6751 83 83 84 84 void ReadReferenceFile(); 85 86 Bool_t WriteExtractor() const; 85 87 86 88 public:
Note:
See TracChangeset
for help on using the changeset viewer.