Changeset 4870
- Timestamp:
- 09/06/04 11:15:43 (20 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 1 added
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r4862 r4870 20 20 -*-*- END OF LINE -*-*- 21 21 22 2004/09/06: Thomas Bretz 23 24 * mjobs/MJCalibrateSignal.[h,cc]: 25 - read camera geometry from calib-file 26 27 * mjobs/MJCalibration.[h,cc]: 28 - write camera geometry to calib-file 29 30 * macros/sql/filldotraw.C, macros/sql/fillcalib.C: 31 - added 32 33 * macros/sql/filldot*.C 34 - fixed some comments 35 36 37 22 38 2004/09/05: Markus Gaug 23 39 24 40 * mcalib/MCalibColorSet.[h,cc] 25 41 - finished setting of the asumed pulse pattern 42 26 43 27 44 … … 59 76 - new class derived from MCalibrationQECam which intialized the 60 77 cornings for the Magic camera 78 61 79 62 80 -
trunk/MagicSoft/Mars/macros/sql/filldotraw.C
r4869 r4870 46 46 // 47 47 // Remark: Running it from the commandline looks like this: 48 // root -q -l -b filldotr bk.C+\(\"path\"\,kFALSE\) 2>&1 | tee filldotrbk.log48 // root -q -l -b filldotraw.C+\(\"filename\"\,kFALSE\) 2>&1 | tee filldotraw.log 49 49 // 50 50 // Make sure, that database and password are corretly set in the macro. -
trunk/MagicSoft/Mars/mjobs/MJCalibrateSignal.cc
r4828 r4870 50 50 #include "MStatusDisplay.h" 51 51 52 #include "MGeomCam.h" 52 53 #include "MHCamEvent.h" 53 54 #include "MPedestalCam.h" … … 115 116 MCalibrationCam &qecam, 116 117 MCalibrationCam &tmcam, 117 MBadPixelsCam &badpix, MTask* &ext1, MTask* &ext2 ) const118 MBadPixelsCam &badpix, MTask* &ext1, MTask* &ext2, TString &geom) const 118 119 { 119 120 const TString fname = Form("%s/calib%06d.root", fPathIn.Data(), fSequence.GetSequence()); … … 148 149 149 150 TObject *o = file.Get("ExtractSignal"); 150 // if (!o)151 // {152 // *fLog << err << dbginf << "ERROR - Unable to read ExtractSignal from file " << fname << endl;153 // return kFALSE;154 // }155 151 if (o && !o->InheritsFrom(MExtractor::Class())) 156 152 { … … 161 157 162 158 o = file.Get("ExtractTime"); 163 // if (!o)164 // {165 // *fLog << err << dbginf << "ERROR - Unable to read ExtractTime from file " << fname << endl;166 // return kFALSE;167 // }168 159 if (o && !o->InheritsFrom(MExtractor::Class())) 169 160 { … … 172 163 } 173 164 ext2 = o ? (MTask*)o->Clone() : NULL; 174 175 165 if (!ext1 && !ext2) 176 166 { … … 178 168 return kFALSE; 179 169 } 170 171 o = file.Get("MGeomCam"); 172 if (o && !o->InheritsFrom(MGeomCam::Class())) 173 { 174 *fLog << err << dbginf << "ERROR - MGeomCam read from " << fname << " doesn't inherit from MGeomCam!" << endl; 175 return kFALSE; 176 } 177 geom = o ? o->ClassName() : ""; 180 178 181 179 return kTRUE; … … 227 225 MTask *extractor1=0; 228 226 MTask *extractor2=0; 229 230 if (!ReadCalibration(calcam, qecam, tmcam, badpix, extractor1, extractor2)) 227 TString geom; 228 229 if (!ReadCalibration(calcam, qecam, tmcam, badpix, extractor1, extractor2, geom)) 231 230 return kFALSE; 232 231 … … 249 248 else 250 249 *fLog << inf << "No Time Extractor: ExtractTime in file." << endl; 250 251 if (!geom.IsNull()) 252 *fLog << inf << "Camera geometry found in file: " << geom.ClassName() << endl; 253 else 254 *fLog << inf << "No Camera geometry found using default <MGeomCamMagic>" << endl; 251 255 252 256 // This is necessary for the case in which it is not in the files … … 278 282 //read.AddFiles(fnamein); 279 283 280 MGeomApply apply; // Only necessary to craete geometry 284 MGeomApply apply; // Only necessary to create geometry 285 if (!geom.IsNull()) 286 apply.SetGeometry(geom); 281 287 MBadPixelsMerge merge(&badpix); 282 288 MPedCalcFromLoGain pedlo; -
trunk/MagicSoft/Mars/mjobs/MJCalibrateSignal.h
r4729 r4870 10 10 class MTask; 11 11 class MParList; 12 class MGeomCam; 12 13 class MSequence; 13 14 class MPedestalCam; … … 24 25 Bool_t ReadCalibration(MCalibrationCam &calcam, 25 26 MCalibrationCam &qecam, MCalibrationCam &tmcam, 26 MBadPixelsCam &badpix, MTask* &ext1, MTask* &ext2) const; 27 MBadPixelsCam &badpix, MTask* &ext1, MTask* &ext2, 28 TString &geom) const; 27 29 28 30 public: -
trunk/MagicSoft/Mars/mjobs/MJCalibration.cc
r4855 r4870 191 191 : fRuns(0), fExtractor(NULL), fTimeExtractor(NULL), 192 192 fColor(MCalibrationCam::kNONE), fDisplayType(kNormalDisplay), 193 fRelTimes(kFALSE), fDataCheck(kFALSE), fDebug(kFALSE) 193 fRelTimes(kFALSE), fDataCheck(kFALSE), fDebug(kFALSE), fGeometry("MGeomCamMagic") 194 194 { 195 195 fName = name ? name : "MJCalibration"; … … 1337 1337 // MJCalibration.UseBlindPixel: yes,no 1338 1338 // MJCalibration.UsePINDiode: yes,no 1339 // MJCalibration.Geometry: MGeomCamMagic, MGeomCamECO1000 1339 1340 // 1340 1341 // For more details see the class description and the corresponding Getters … … 1360 1361 SetUseBlindPixel(GetEnv("UseBlindPixel", IsUseBlindPixel())); 1361 1362 SetUsePINDiode(GetEnv("UsePINDiode", IsUsePINDiode())); 1363 SetGeometry(GetEnv("Geometry", fGeometry)); 1362 1364 1363 1365 return kTRUE; … … 1552 1554 1553 1555 MGeomApply apply; 1556 apply.SetGeometry(fGeometry); 1554 1557 MBadPixelsMerge merge(&fBadPixels); 1555 1558 MExtractPINDiode pinext; … … 1682 1685 // TOO MANY DAYS TRYING TO FIND THIS REASON! 1683 1686 // 1687 // There is NO BUG-REPORT! And no code has been deleted! And 1688 // there is NO hint who wrote this work around and should 1689 // be informed! Maybe the author of a WORKAROUND should contact 1690 // the author of a class which he/she identified not working 1691 // correctly instead of vice versa! 1692 // 1684 1693 if (fDisplay) 1685 1694 { 1695 /* 1686 1696 if (IsUsePINDiode()) 1687 1697 { … … 1707 1717 (MHCalibrationChargeCam*)plist.FindObject("MHCalibrationChargeCam"); 1708 1718 cam->DrawClone(Form("nonew %s",drawoption.Data())); 1709 } 1719 } */ 1710 1720 } 1711 1721 1712 1722 DisplayResult(plist); 1713 1723 1714 if (!WriteResult( ))1724 if (!WriteResult(plist.FindObject("MGeomCam"))) 1715 1725 return kFALSE; 1716 1726 … … 1862 1872 // - MBadPixelsCam 1863 1873 // 1864 Bool_t MJCalibration::WriteResult( )1874 Bool_t MJCalibration::WriteResult(TObject *geom) 1865 1875 { 1866 1876 if (fPathOut.IsNull()) … … 1925 1935 } 1926 1936 *fLog << inf << "ok." << endl; 1937 1938 if (!geom) 1939 *fLog << warn << " - WARNING: MGeomCam... not found!" << endl; 1940 { 1941 *fLog << inf << " - MGeomCam..." << flush; 1942 if (geom->Write()<=0) 1943 { 1944 *fLog << err << "Unable to write MGeomCam to " << oname << endl; 1945 return kFALSE; 1946 } 1947 *fLog << inf << "ok." << endl; 1948 } 1927 1949 1928 1950 if (fRelTimes) -
trunk/MagicSoft/Mars/mjobs/MJCalibration.h
r4795 r4870 100 100 Bool_t fDataCheck; // Flag if the data check is run on raw data 101 101 Bool_t fDebug; // Flag if debug option is passed onto cal. classes 102 103 TString fGeometry; 102 104 103 105 void DisplayResult ( MParList &plist ); … … 108 110 void FixDataCheckHist ( TH1D *hist ) const; 109 111 110 Bool_t WriteResult( );112 Bool_t WriteResult(TObject *geom); 111 113 Bool_t WriteEventloop(MEvtLoop &evtloop) const; 112 114 Bool_t WriteTasks(MTask *t1, MTask *t2) const; … … 142 144 void SetDataCheckDisplay() { fDisplayType = kDataCheckDisplay; } 143 145 void SetNormalDisplay() { fDisplayType = kNormalDisplay; } 146 147 // Camera Geomtry 148 void SetGeometry(const char *geom) { fGeometry = geom; } 144 149 145 150 // Rel. Time
Note:
See TracChangeset
for help on using the changeset viewer.