Changeset 5030
- Timestamp:
- 09/15/04 14:53:06 (20 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 16 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r5029 r5030 20 20 -*-*- END OF LINE -*-*- 21 21 22 2004/09/15: Thomas Bretz 23 24 * callisto.rc: 25 - added new line for intensity calibration 26 - fixed MJPedestalY.ExtractPedestal.PedestalUpdate (should be 'no') 27 28 * mbase/MEvtLoop.cc: 29 - changed such that returning kCONTINUE in MTaskList::Process 30 is allowed 31 32 * mbase/MTaskList.cc: 33 - changed to return kCONTINUE if Task returned kCONTINUE 34 35 * mcalib/MCalibrate.cc, mcalib/MCalibrationChargeCalc.cc: 36 - cosmetics to output 37 38 * mcalib/MCalibrateData.[h,cc]: 39 - added an output/skip in case more than 90% of all pixels have 40 been skipped 41 42 * mjobs/MJCalibrateSignal.[h,cc]: 43 - fixed to read the MJCalibration output 44 - simplified reading container 45 46 * mjobs/MJCalibration.[h,cc]: 47 - simplified writing container 48 49 * mjobs/MJob.[h,cc]: 50 - added WriteContainer 51 - added ReadContainer 52 53 * mpedestal/MPedCalcFromLoGain.cc: 54 - initialize default number of dump events (500) 55 - log status of task in PreProcess 56 57 58 22 59 2004/09/15: Markus Gaug 23 60 24 61 * mjobs/MJCalibration.cc 25 - data che kcplot for the rel. time calibration62 - data check plot for the rel. time calibration 26 63 27 64 * mhcalib/MHCalibrationCam.cc … … 31 68 * mhcalib/MHCalibrationChargeCam.cc 32 69 - simply calls to IntensityCam somewhat 70 33 71 34 72 … … 40 78 Sorry! 41 79 80 81 42 82 2004/09/14: Antonio Stamerra 43 83 … … 51 91 - added readIPR 52 92 93 94 53 95 54 96 2004/09/14: Markus Gaug … … 83 125 84 126 * mhbase/MH.cc 85 - took out the search for histogram with the same name in86 ProjectARray. Always create new histogram whihc has to be87 deleted afterwards.88 127 - removed an infinite loop created some hours before. 89 90 128 91 129 * mhcalib/MHGausEvents.[h,cc] … … 95 133 * mhcalib/MHCalibrationPix.[h,cc] 96 134 - take out fEventFrequency 135 97 136 98 137 -
trunk/MagicSoft/Mars/callisto.rc
r4768 r5030 50 50 # Switch on relative time calibration 51 51 MJCalibration.RelTimeCalibration: Yes 52 # Switch on intensity calibration 53 #MJCalibration.IntensityCalibration: Yes 52 54 # Set color to be used 53 55 #MJCalibration.Color: … … 172 174 173 175 MJPedestalY.ExtractPedestal: MPedCalcFromLoGain 174 MJPedestalY.ExtractPedestal.PedestalUpdate: yes 175 MJPedestalY.ExtractPedestal.NumEventsDump: 500 176 MJPedestalY.ExtractPedestal.PedestalUpdate: no 176 177 177 178 # ------------------------------------------------------------------------- -
trunk/MagicSoft/Mars/mbase/MEvtLoop.cc
r4732 r5030 453 453 UInt_t dummy = maxcnt; 454 454 455 Int_t rc =kTRUE;455 Int_t rc=kTRUE; 456 456 if (maxcnt==0) 457 457 // process first and increment if sucessfull 458 while ( (rc=fTaskList->Process())==kTRUE)458 while (1) 459 459 { 460 rc=fTaskList->Process(); 461 if (rc!=kTRUE && rc!=kCONTINUE) 462 break; 463 460 464 numcnts++; 461 465 if (!ProcessGuiEvents(++dummy)) … … 464 468 else 465 469 // check for number and break if unsuccessfull 466 while (dummy-- && (rc=fTaskList->Process())==kTRUE)470 while (dummy--) 467 471 { 472 rc=fTaskList->Process(); 473 if (rc!=kTRUE && rc!=kCONTINUE) 474 break; 475 468 476 numcnts++; 469 477 if (!ProcessGuiEvents(maxcnt - dummy)) -
trunk/MagicSoft/Mars/mbase/MTaskList.cc
r4828 r5030 565 565 // loop over all tasks for processing 566 566 // 567 Bool_t rc = kTRUE;567 Int_t rc = kTRUE; 568 568 while ( (task=(MTask*)Next()) ) 569 569 { … … 610 610 // something occured: skip the rest of the tasks for this event 611 611 // 612 rc = k TRUE;612 rc = kCONTINUE; 613 613 break; 614 614 -
trunk/MagicSoft/Mars/mcalib/MCalibrate.cc
r4934 r5030 163 163 if(fCalibrationMode == kBlindPixel && !fQEs->IsBlindPixelMethodValid()) 164 164 { 165 *fLog << warn << GetDescriptor() 166 << "Warning: Blind pixel calibration method not valid, switching to F-factor method" << endl; 165 *fLog << warn << "WARNING - Blind pixel calibration method not valid, switching to F-factor method" << endl; 167 166 fCalibrationMode = kFfactor; 168 167 } … … 170 169 if(fCalibrationMode == kPinDiode && !fQEs->IsPINDiodeMethodValid()) 171 170 { 172 *fLog << warn << GetDescriptor() 173 << "Warning: PIN diode calibration method not valid, switching to F-factor method" << endl; 171 *fLog << warn << "WARNING - PIN diode calibration method not valid, switching to F-factor method" << endl; 174 172 fCalibrationMode = kFfactor; 175 173 } … … 177 175 if(fCalibrationMode == kCombined && !fQEs->IsCombinedMethodValid()) 178 176 { 179 *fLog << warn << GetDescriptor() 180 << "Warning: Combined calibration method not valid, switching to F-factor method" << endl; 177 *fLog << warn << "WARNING - Combined calibration method not valid, switching to F-factor method" << endl; 181 178 fCalibrationMode = kFfactor; 182 179 } … … 201 198 break; 202 199 case kPinDiode: 203 *fLog << err << GetDescriptor() 204 << ": PIN Diode Calibration mode not yet available " << endl; 200 *fLog << err << "PIN Diode Calibration mode not yet available " << endl; 205 201 return kFALSE; 206 202 break; 207 203 case kCombined: 208 *fLog << err << GetDescriptor() 209 << ": Combined Calibration mode not yet available " << endl; 204 *fLog << err << "Combined Calibration mode not yet available " << endl; 210 205 return kFALSE; 211 206 break; 212 207 case kFlatCharge: 213 *fLog << warn << GetDescriptor() 214 << ": WARNING: Flat-fielding charges - only for Keiichi!!" << endl; 208 *fLog << warn << "WARNING - Flat-fielding charges - only for Keiichi!!" << endl; 215 209 break; 216 210 case kDummy: 217 *fLog << warn << GetDescriptor() 218 << ": WARNING: Dummy calibration, no calibration applied!!" << endl; 211 *fLog << warn << "WARNING - Dummy calibration, no calibration applied!!" << endl; 219 212 break; 220 213 case kNone: 221 *fLog << warn << GetDescriptor() 222 << ": WARNING: No calibration applied!!" << endl; 214 *fLog << warn << "WARNING - No calibration applied!!" << endl; 223 215 break; 224 216 default: 225 *fLog << warn << GetDescriptor() 226 << ": WARNING: Calibration mode value (" 227 <<fCalibrationMode<<") not known" << endl; 217 *fLog << warn << "WARNING - Calibration mode value (" <<fCalibrationMode<<") not known" << endl; 228 218 return kFALSE; 229 219 } -
trunk/MagicSoft/Mars/mcalib/MCalibrateData.cc
r4766 r5030 356 356 hiloconverr= pix.GetConversionHiLoErr(); 357 357 358 if (fBadPixels) 359 { 360 MBadPixelsPix &bad = (*fBadPixels)[pixidx]; 361 if (bad.IsUnsuitable()) 362 return kFALSE; 363 } 358 if ((*fBadPixels)[pixidx].IsUnsuitable()) 359 return kFALSE; 364 360 365 361 calibConv = pix.GetMeanConvFADC2Phe(); … … 367 363 calibFFactor = pix.GetMeanFFactorFADC2Phot(); 368 364 369 MCalibrationQEPix &qe 365 MCalibrationQEPix &qe = (MCalibrationQEPix&) (*fQEs)[pixidx]; 370 366 371 367 switch(fCalibrationMode) … … 439 435 } 440 436 441 voidMCalibrateData::Calibrate(Bool_t data, Bool_t pedestal) const437 Int_t MCalibrateData::Calibrate(Bool_t data, Bool_t pedestal) const 442 438 { 443 439 if (!data && !pedestal) 444 return ;440 return kTRUE; 445 441 446 442 const UInt_t npix = fSignals->GetSize(); … … 454 450 Float_t calibFFactor; 455 451 452 UInt_t skip = 0; 456 453 for (UInt_t pixidx=0; pixidx<npix; pixidx++) 457 454 { 458 455 if (!GetConversionFactor(pixidx, hiloconv, hiloconverr, 459 456 calibConv, calibConvErr, calibFFactor)) 457 { 458 skip++; 460 459 continue; 460 } 461 461 462 462 if (data) … … 517 517 } 518 518 519 if (skip>npix*0.9) 520 { 521 *fLog << warn << "WARNING - GetConversionFactor has skipped more than 90% of the pixels... skip." << endl; 522 return kCONTINUE; 523 } 524 519 525 if (pedestal) 520 526 fPedPhot->SetReadyToSave(); … … 525 531 fCerPhotEvt->SetReadyToSave(); 526 532 } 533 return kTRUE; 527 534 } 528 535 … … 546 553 */ 547 554 548 Calibrate(fCalibrationMode!=kSkip, TestPedestalFlag(kEvent)); 549 return kTRUE; 555 return Calibrate(fCalibrationMode!=kSkip, TestPedestalFlag(kEvent)); 550 556 } 551 557 -
trunk/MagicSoft/Mars/mcalib/MCalibrateData.h
r4752 r5030 53 53 TString fNamePedPhotContainer; // name of fPedPhot 54 54 55 voidCalibrate(Bool_t data, Bool_t pedestal) const;55 Int_t Calibrate(Bool_t data, Bool_t pedestal) const; 56 56 57 57 Bool_t GetConversionFactor(UInt_t, Float_t &, Float_t &, Float_t &, Float_t &, Float_t &) const; … … 91 91 void EnablePedestalType(PedestalType_t i) { fPedestalFlag |= i; } 92 92 void SetPedestalFlag(PedestalType_t i=kRun) { fPedestalFlag = i; } 93 Bool_t TestPedestalFlag(PedestalType_t i) const { return fPedestalFlag & i; }93 Bool_t TestPedestalFlag(PedestalType_t i) const { return fPedestalFlag&i ? kTRUE : kFALSE; } 94 94 95 95 void SetCalibrationMode ( CalibrationMode_t calmode=kDefault ) { fCalibrationMode=calmode; } -
trunk/MagicSoft/Mars/mcalib/MCalibrationChargeCalc.cc
r5024 r5030 466 466 { 467 467 *fLog << endl; 468 *fLog << warn << GetDescriptor() 469 << ": No MCalibrationBlindCam found... no Blind Pixel method! " << endl; 468 *fLog << warn << "No MCalibrationBlindCam found... no Blind Pixel method! " << endl; 470 469 return kFALSE; 471 470 } … … 492 491 { 493 492 *fLog << endl; 494 *fLog << warn << GetDescriptor() 495 << ": MCalibrationChargePINDiode not found... no PIN Diode method! " << endl; 493 *fLog << "MCalibrationChargePINDiode not found... no PIN Diode method! " << endl; 496 494 } 497 495 -
trunk/MagicSoft/Mars/mcalib/MCalibrationIntensityCam.cc
r5020 r5030 66 66 fCams = new TObjArray; 67 67 fCams->SetOwner(); 68 69 } 70 68 } 71 69 72 70 // -------------------------------------------------------------------------- -
trunk/MagicSoft/Mars/mcalib/MCalibrationIntensityRelTimeCam.cc
r5020 r5030 56 56 fName = name ? name : "MCalibrationIntensityRelTimeCam"; 57 57 fTitle = title ? title : "Results of the Intensity Calibration"; 58 58 59 59 InitSize(1); 60 60 } -
trunk/MagicSoft/Mars/mjobs/MJCalibrateSignal.cc
r4906 r5030 54 54 #include "MPedestalCam.h" 55 55 #include "MBadPixelsCam.h" 56 57 #include "MCalibrationChargePINDiode.h" 58 56 59 #include "MCalibrationQECam.h" 60 #include "MCalibrationBlindCam.h" 57 61 #include "MCalibrationChargeCam.h" 58 62 #include "MCalibrationRelTimeCam.h" 59 63 /* 64 #include "MCalibrationIntensityQECam.h" 65 #include "MCalibrationIntensityBlindCam.h" 66 #include "MCalibrationIntensityChargeCam.h" 67 #include "MCalibrationIntensityRelTimeCam.h" 68 */ 60 69 #include "MReadReports.h" 61 70 #include "MReadMarsFile.h" … … 114 123 } 115 124 116 Bool_t MJCalibrateSignal::ReadCalibration(MCalibrationCam &calcam, 117 MCalibrationCam &qecam, 118 MCalibrationCam &tmcam, 119 MBadPixelsCam &badpix, MTask* &ext1, MTask* &ext2, TString &geom) const 125 Bool_t MJCalibrateSignal::ReadCalibration(TObjArray &l, MBadPixelsCam &cam, MTask* &ext1, MTask* &ext2, TString &geom) const 120 126 { 121 127 const TString fname = Form("%s/calib%06d.root", fPathIn.Data(), fSequence.GetSequence()); 122 128 129 *fLog << inf << "Reading from file: " << fname << endl; 130 123 131 TFile file(fname, "READ"); 124 132 if (!file.IsOpen()) … … 128 136 } 129 137 130 if (calcam.Read("MCalibrationChargeCam")<=0)131 {132 *fLog << err << dbginf << "ERROR - Unable to read MCalibrationChargeCam from file " << fname << endl;133 return kFALSE;134 }135 if (qecam.Read("MCalibrationQECam")<=0)136 {137 *fLog << err << dbginf << "ERROR - Unable to read MCalibrationQECam from file " << fname << endl;138 return kFALSE;139 }140 if (tmcam.Read("MCalibrationRelTimeCam")<=0)141 {142 *fLog << err << dbginf << "ERROR - Unable to read MCalibrationRelTimeCam from file " << fname << endl;143 return kFALSE;144 }145 if (badpix.Read("MBadPixelsCam")<=0)146 {147 *fLog << err << dbginf << "ERROR - Unable to read MBadPixelsCam from file " << fname << endl;148 return kFALSE;149 }150 151 138 TObject *o = file.Get("ExtractSignal"); 152 139 if (o && !o->InheritsFrom(MExtractor::Class())) … … 178 165 geom = o ? o->ClassName() : ""; 179 166 180 return kTRUE; 167 TObjArray cont(l); 168 cont.Add(&cam); 169 return ReadContainer(cont); 181 170 } 182 171 … … 219 208 220 209 // Read File 221 MCalibrationChargeCam calcam; 222 MCalibrationQECam qecam; 223 MCalibrationRelTimeCam tmcam; 224 MBadPixelsCam badpix; 210 /* 211 MCalibrationIntensityChargeCam calcam; 212 MCalibrationIntensityQECam qecam; 213 MCalibrationIntensityBlindCam bndcam; 214 MCalibrationIntensityRelTimeCam tmcam; 215 */ 216 MCalibrationChargeCam calcam; 217 MCalibrationQECam qecam; 218 MCalibrationBlindCam bndcam; 219 MCalibrationChargePINDiode pind; 220 MCalibrationRelTimeCam tmcam; 221 MBadPixelsCam badpix; 225 222 226 223 MTask *extractor1=0; … … 228 225 TString geom; 229 226 230 if (!ReadCalibration(calcam, qecam, tmcam, badpix, extractor1, extractor2, geom)) 231 return kFALSE; 227 TObjArray calibcont; 228 calibcont.Add(&calcam); 229 calibcont.Add(&qecam); 230 calibcont.Add(&bndcam); 231 calibcont.Add(&pind); 232 calibcont.Add(&tmcam); 233 234 if (!ReadCalibration(calibcont, badpix, extractor1, extractor2, geom)) 235 return kFALSE; 236 237 badpix.Print(); 232 238 233 239 *fLog << all; … … 261 267 MParList plist; 262 268 plist.AddToList(this); // take care of fDisplay! 263 plist.AddToList(&calcam);264 plist.AddToList(&qecam);265 plist.AddToList(&tmcam);266 269 plist.AddToList(&badcam); 267 270 plist.AddToList(&pedcam); 271 plist.AddToList(&calibcont); 268 272 269 273 // Setup Tasklist -
trunk/MagicSoft/Mars/mjobs/MJCalibrateSignal.h
r4906 r5030 7 7 8 8 class TEnv; 9 class TList; 9 10 10 11 class MTask; … … 14 15 class MPedestalCam; 15 16 class MBadPixelsCam; 16 class MCalibrationCam;17 class MCalibrationQECam;18 class MCalibrationRelTimeCam;19 class MCalibrationChargeCam;20 17 21 18 class MJCalibrateSignal : public MJob … … 23 20 private: 24 21 Bool_t WriteResult(); 25 Bool_t ReadCalibration(MCalibrationCam &calcam, 26 MCalibrationCam &qecam, MCalibrationCam &tmcam, 27 MBadPixelsCam &badpix, MTask* &ext1, MTask* &ext2, 28 TString &geom) const; 22 Bool_t ReadCalibration(TObjArray &o, MBadPixelsCam &bpix, 23 MTask* &ext1, MTask* &ext2, TString &geom) const; 29 24 30 25 public: -
trunk/MagicSoft/Mars/mjobs/MJCalibration.cc
r5028 r5030 1453 1453 1454 1454 SetRelTimeCalibration(GetEnv("RelTimeCalibration", IsRelTimes())); 1455 SetIntensity(GetEnv("IntensityCalibration", IsIntensity())); 1455 1456 SetDataCheck(GetEnv("Datacheck", IsDataCheck())); 1456 1457 SetDebug(GetEnv("Debug", IsDebug())); 1457 SetIntensity(GetEnv("Intensity", IsIntensity()));1458 1458 1459 1459 SetUseBlindPixel(GetEnv("UseBlindPixel", IsUseBlindPixel())); … … 1491 1491 if (run < gkSecondBlindPixelInstallation) 1492 1492 { 1493 1494 1493 MCalibrationBlindCamOneOldStyle blindresults; 1495 1494 if (IsIntensity()) … … 1505 1504 else if (run < gkThirdBlindPixelInstallation) 1506 1505 { 1507 1508 1506 MCalibrationBlindCamTwoNewStyle blindresults; 1509 1507 … … 2031 2029 *fLog << inf << "ok." << endl; 2032 2030 2031 TObjArray cont; 2033 2032 if (IsIntensity()) 2034 { 2035 *fLog << inf << " - MBadPixelsIntensityCam..." << flush; 2036 if (fIntensBadCam.Write()<=0) 2037 { 2038 *fLog << err << "Unable to write MBadPixelsIntensityCam to " << oname << endl; 2039 return kFALSE; 2040 } 2041 *fLog << inf << "ok." << endl; 2042 2043 *fLog << inf << " - MCalibrationIntensityChargeCam..." << flush; 2044 if (fIntensCalibCam.Write()<=0) 2045 { 2046 *fLog << err << "Unable to write MCalibrationIntensityChargeCam to " << oname << endl; 2047 return kFALSE; 2048 } 2049 *fLog << inf << "ok." << endl; 2050 2051 *fLog << inf << " - MCalibrationIntensityQECam..." << flush; 2052 if (fIntensQECam.Write()<=0) 2053 { 2054 *fLog << err << "Unable to write MCalibrationIntensityQECam to " << oname << endl; 2055 return kFALSE; 2056 } 2057 *fLog << inf << "ok." << endl; 2058 *fLog << inf << " - MCalibrationIntensityBlindCam..." << flush; 2059 if (fIntensBlindCam.Write()<=0) 2060 { 2061 *fLog << err << "Unable to write MCalibrationIntensityBlindCam to " << oname << endl; 2062 return kFALSE; 2063 } 2064 *fLog << inf << "ok." << endl; 2065 } 2033 { 2034 cont.Add(&fIntensBadCam); 2035 cont.Add(&fIntensCalibCam); 2036 cont.Add(&fIntensQECam); 2037 cont.Add(&fIntensBlindCam); 2038 } 2066 2039 else 2067 { 2068 *fLog << inf << " - MCalibrationChargeCam..." << flush; 2069 if (fCalibrationCam.Write()<=0) 2070 { 2071 *fLog << err << "Unable to write MCalibrationChargeCam to " << oname << endl; 2072 return kFALSE; 2073 } 2074 *fLog << inf << "ok." << endl; 2075 2076 *fLog << inf << " - MCalibrationQECam..." << flush; 2077 if (fQECam.Write()<=0) 2078 { 2079 *fLog << err << "Unable to write MCalibrationQECam to " << oname << endl; 2080 return kFALSE; 2081 } 2082 *fLog << inf << "ok." << endl; 2083 2084 *fLog << inf << " - MCalibrationBlindCam..." << flush; 2085 if (fCalibrationBlindCam.Write()<=0) 2086 { 2087 *fLog << err << "Unable to write MCalibrationBlindCam to " << oname << endl; 2088 return kFALSE; 2089 } 2090 *fLog << inf << "ok." << endl; 2091 } 2092 2093 *fLog << inf << " - MCalibrationChargePINDiode..." << flush; 2094 if (fCalibrationPINDiode.Write()<=0) 2095 { 2096 *fLog << err << "Unable to write MCalibrationChargePINDiode to " << oname << endl; 2097 return kFALSE; 2098 } 2099 *fLog << inf << "ok." << endl; 2100 2101 *fLog << inf << " - MBadPixelsCam..." << flush; 2102 if (fBadPixels.Write()<=0) 2103 { 2104 *fLog << err << "Unable to write MBadPixelsCam to " << oname << endl; 2105 return kFALSE; 2106 } 2107 *fLog << inf << "ok." << endl; 2040 { 2041 cont.Add(&fCalibrationCam); 2042 cont.Add(&fQECam); 2043 cont.Add(&fCalibrationBlindCam); 2044 } 2045 cont.Add(&fCalibrationPINDiode); 2046 cont.Add(&fBadPixels); 2047 if (IsRelTimes()) 2048 cont.Add(IsIntensity() ? (TObject*)&fIntensRelTimeCam : (TObject*)&fRelTimeCam); 2108 2049 2109 2050 if (!geom) 2110 *fLog << warn << " - WARNING: MGeomCam... not found!" << endl; 2111 { 2112 *fLog << inf << " - MGeomCam..." << flush; 2113 if (geom->Write()<=0) 2114 { 2115 *fLog << err << "Unable to write MGeomCam to " << oname << endl; 2116 return kFALSE; 2117 } 2118 *fLog << inf << "ok." << endl; 2119 } 2120 2121 if (IsRelTimes()) 2122 { 2123 if (IsIntensity()) 2124 { 2125 *fLog << inf << " - MCalibrationIntensityRelTimeCam..." << flush; 2126 if (fIntensRelTimeCam.Write()<=0) 2127 { 2128 *fLog << err << "Unable to write MCalibrationIntensityRelTimeCam to " << oname << endl; 2129 return kFALSE; 2130 } 2131 *fLog << inf << "ok." << endl; 2132 } 2133 else 2134 { 2135 *fLog << inf << " - MCalibrationRelTimeCam..." << flush; 2136 if (fRelTimeCam.Write()<=0) 2137 { 2138 *fLog << err << "Unable to write MCalibrationRelTimeCam to " << oname << endl; 2139 return kFALSE; 2140 } 2141 *fLog << inf << "ok." << endl; 2142 } 2143 2144 } 2051 *fLog << warn << " - WARNING - MGeomCam... not found!" << endl; 2052 else 2053 cont.Add(geom); 2054 2055 return WriteContainer(cont); 2145 2056 2146 2057 return kTRUE; 2147 2148 2058 } 2149 2059 -
trunk/MagicSoft/Mars/mjobs/MJob.cc
r4760 r5030 33 33 34 34 #include <TEnv.h> 35 #include <TFile.h> 35 36 #include <TSystem.h> 37 38 #include "MIter.h" 36 39 37 40 #include "MLog.h" … … 169 172 return loop.ReadEnv(*fEnv, fEnvPrefix, fEnvDebug) ? kTRUE : kFALSE; 170 173 } 174 175 Bool_t MJob::WriteContainer(TCollection &list) const 176 { 177 if (!gFile) 178 { 179 *fLog << err << dbginf << "ERROR - No file open (gFile==0)" << endl; 180 return kFALSE; 181 } 182 183 MIter Next(&list); 184 MParContainer *o=0; 185 while ((o=Next())) 186 { 187 *fLog << inf << " - Writing " << o->GetDescriptor() << "..." << flush; 188 if (o->Write()<=0) 189 { 190 *fLog << err << dbginf << "ERROR - Writing " << o->GetDescriptor() << " to file " << gFile->GetName() << endl; 191 return kFALSE; 192 } 193 *fLog << "done." << endl; 194 } 195 return kTRUE; 196 } 197 198 Bool_t MJob::ReadContainer(TCollection &list) const 199 { 200 if (!gFile) 201 { 202 *fLog << err << dbginf << "ERROR - No file open (gFile==0)" << endl; 203 return kFALSE; 204 } 205 206 MIter Next(&list); 207 MParContainer *o=0; 208 while ((o=Next())) 209 { 210 *fLog << inf << " - Reading " << o->GetDescriptor() << "..." << flush; 211 if (o->Read(o->GetName())<=0) 212 { 213 *fLog << err << dbginf << "ERROR - Writing " << o->GetDescriptor() << " to file " << gFile->GetName() << endl; 214 return kFALSE; 215 } 216 *fLog << "done." << endl; 217 } 218 return kTRUE; 219 } -
trunk/MagicSoft/Mars/mjobs/MJob.h
r4760 r5030 38 38 virtual Bool_t CheckEnvLocal() { return kTRUE; } 39 39 40 Bool_t WriteContainer(TCollection &list) const; 41 Bool_t ReadContainer(TCollection &list) const; 42 40 43 public: 41 44 MJob(const char *name=NULL, const char *title=NULL); -
trunk/MagicSoft/Mars/mpedestal/MPedCalcFromLoGain.cc
r4991 r5030 196 196 SetMaxHiGainVar(); 197 197 SetPedestalUpdate(kTRUE); 198 SetNumEventsDump(500); 198 199 199 200 Clear(); … … 362 363 fNumEventsDump=1000; 363 364 } 365 366 *fLog << inf << "Continous update switched " << (fPedestalUpdate?"on":"off"); 367 if (fPedestalUpdate) 368 *fLog << " (dump each " << fNumEventsDump << " events)" << endl; 369 *fLog << endl; 364 370 365 371 return kTRUE;
Note:
See TracChangeset
for help on using the changeset viewer.