Changeset 6771
- Timestamp:
- 03/07/05 17:50:35 (20 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r6770 r6771 22 22 -*-*- END OF LINE -*-*- 23 23 2005/03/07 Markus Gaug 24 25 * mhcalib/MHCalibrationCam.h 26 - put the Draw-function into the *MENU* 24 27 25 28 * mjobs/MJCalibration.[h,cc] -
trunk/MagicSoft/Mars/mhcalib/MHCalibrationCam.h
r5864 r6771 165 165 166 166 // Draw 167 void Draw(const Option_t *opt); 167 void Draw(const Option_t *opt); // *MENU* 168 168 169 169 Bool_t GetPixelContent ( Double_t &val, Int_t idx, const MGeomCam &cam, Int_t type=0) const { return kTRUE; } -
trunk/MagicSoft/Mars/mjobs/MJCalibration.cc
r6699 r6771 122 122 #include "MCalibrationPatternDecode.h" 123 123 #include "MCalibrationCam.h" 124 #include "MCalibrationHiLoCam.h" 125 #include "MCalibrationHiLoPix.h" 124 126 #include "MCalibrationQECam.h" 125 127 #include "MCalibrationQEPix.h" … … 175 177 const Int_t MJCalibration::gkThirdBlindPixelInstallation = 43308; 176 178 const TString MJCalibration::fgReferenceFile = "mjobs/calibrationref.rc"; 179 const TString MJCalibration::fgHiLoCalibFile = "mjobs/hilocalib_df6.root"; 177 180 // -------------------------------------------------------------------------- 178 181 // … … 202 205 203 206 SetReferenceFile(); 207 SetHiLoCalibFile(); 204 208 205 209 fConvFADC2PheMin = 0.; … … 1463 1467 // -------------------------------------------------------------------------- 1464 1468 // 1469 // Read the following values from resource file: 1470 // 1471 // MCalibrationHiLoCam 1472 // 1473 Bool_t MJCalibration::ReadHiLoCalibFile() 1474 { 1475 1476 TFile file(fHiLoCalibFile,"READ"); 1477 1478 MCalibrationHiLoCam hilocam; 1479 1480 if (hilocam.Read()<=0) 1481 { 1482 *fLog << err << "Unable to read MCalibrationHiLoCam from " << fHiLoCalibFile << endl; 1483 return kFALSE; 1484 } 1485 1486 if (hilocam.GetSize() < 1) 1487 { 1488 *fLog << err << "MCalibationHiLoCam is un-initialized in file " << fHiLoCalibFile << endl; 1489 return kFALSE; 1490 } 1491 1492 if (fCalibrationCam.GetSize() < 1) 1493 fCalibrationCam.InitSize(hilocam.GetSize()); 1494 1495 if (fBadPixels.GetSize() < 1) 1496 fBadPixels.InitSize(hilocam.GetSize()); 1497 1498 if (fCalibrationCam.GetSize() != hilocam.GetSize()) 1499 { 1500 *fLog << err << "Size mismatch MCalibationHiLoCam and MCalibrationChargeCam " << endl; 1501 return kFALSE; 1502 } 1503 1504 for (Int_t i=0;i<hilocam.GetSize();i++) 1505 { 1506 const MCalibrationHiLoPix &pix = (MCalibrationHiLoPix&)hilocam[i]; 1507 1508 const Float_t ratio = pix.GetHiLoChargeRatio(); 1509 const Float_t sigma = pix.GetHiLoChargeRatioSigma(); 1510 1511 if (ratio < 0.) 1512 { 1513 fBadPixels[i].SetUncalibrated(MBadPixelsPix::kConversionHiLoNotValid); 1514 continue; 1515 } 1516 1517 MCalibrationChargePix &cpix = (MCalibrationChargePix&)fCalibrationCam[i]; 1518 1519 cpix.SetConversionHiLo(ratio); 1520 cpix.SetConversionHiLoErr(sigma); 1521 } 1522 return kTRUE; 1523 } 1524 1525 // -------------------------------------------------------------------------- 1526 // 1465 1527 // MJCalibration allows to setup several option by a resource file: 1466 1528 // MJCalibration.Display: full, datacheck, normal … … 1504 1566 ReadReferenceFile(); 1505 1567 1506 return kTRUE; 1568 fHiLoCalibFile = GetEnv("HiLoCalibFile",fHiLoCalibFile.Data()); 1569 1570 return ReadHiLoCalibFile(); 1507 1571 } 1508 1572 … … 1647 1711 // return kFALSE; 1648 1712 1649 CheckEnv(); 1713 if (!CheckEnv()) 1714 return kFALSE; 1650 1715 1651 1716 // -------------------------------------------------------------------------------- -
trunk/MagicSoft/Mars/mjobs/MJCalibration.h
r6699 r6771 64 64 65 65 static const TString fgReferenceFile; //! default for fReferenceFile ("mjobs/calibrationref.rc") 66 static const TString fgHiLoCalibFile; //! default for fHiLoCalibFile ("mjobs/hilocalib.root") 66 67 67 68 Double_t fConvFADC2PheMin; //! Histogram minimum for conversion factor to phes … … 94 95 95 96 TString fReferenceFile; // File name containing the reference values 97 TString fHiLoCalibFile; // File name containing the hi-lo calib. constants 96 98 97 99 MExtractor *fExtractor; // Signal extractor … … 165 167 166 168 void ReadReferenceFile(); 169 Bool_t ReadHiLoCalibFile(); 167 170 168 171 public: … … 206 209 void SetUsePINDiode(const Bool_t b=kTRUE); 207 210 208 // Storage211 // Files 209 212 void SetReferenceFile( const TString ref=fgReferenceFile ) { fReferenceFile = ref; } 213 void SetHiLoCalibFile( const TString ref=fgHiLoCalibFile ) { fHiLoCalibFile = ref; } 210 214 211 215 // Precessing
Note:
See TracChangeset
for help on using the changeset viewer.