Changeset 4887 for trunk/MagicSoft/Mars/mbadpixels
- Timestamp:
- 09/07/04 18:31:53 (20 years ago)
- Location:
- trunk/MagicSoft/Mars/mbadpixels
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mbadpixels/MHBadPixels.cc
r4874 r4887 35 35 #include "MBadPixelsCam.h" 36 36 #include "MGeomCam.h" 37 #include "MPedPhotCam.h"38 37 #include "MParList.h" 39 38 #include "MBinning.h" … … 51 50 // 52 51 MHBadPixels::MHBadPixels(const char *name, const char *title) 52 : fNamePedPhotCam("MPedPhotCam") 53 53 { 54 54 fName = name ? name : "MHBadPixels"; … … 67 67 fBadN.SetYTitle("number of bad pixels"); 68 68 69 fNamePedPhotCam = "MPedPhotCamFromData";70 69 } 71 70 … … 79 78 if (!fCam) 80 79 { 81 *fLog << err << "M HBadPixels::SetupFill; MGeomCam not found... aborting." << endl;80 *fLog << err << "MGeomCam not found... aborting." << endl; 82 81 return kFALSE; 83 82 } 84 *fLog << "MHBadPixels::SetupFill; fCam = " << fCam << endl;85 86 83 fPointPos = (MPointingPos*)plist->FindObject("MPointingPos"); 87 84 if (!fPointPos) … … 91 88 } 92 89 93 94 fPedPhot = (MPedPhotCam*)plist->FindObject(AddSerialNumber(fNamePedPhotCam), "MPedPhotCam");95 if (!fPedPhot)96 {97 *fLog << err << AddSerialNumber(fNamePedPhotCam)98 << "[MPedPhotCam] not found... aborting." << endl;99 return kFALSE;100 }101 fPedPhot->InitSize(fCam->GetNumPixels());102 103 90 //---------------------------------------------------- 104 91 // Get Theta Binning … … 106 93 if (!binstheta) 107 94 { 108 *fLog << err << " Object 'BinningTheta'[MBinning] not found... aborting" << endl;95 *fLog << err << "BinningTheta [MBinning] not found... aborting" << endl; 109 96 return kFALSE; 110 97 } 111 98 112 99 // Get binning for pixel number 113 const UInt_t npix1 = fPedPhot->GetSize()+1; 114 115 *fLog << "MHBadPixels::SetupFill; npix1 = " << npix1 << endl; 100 const UInt_t npix1 = fCam->GetNumPixels()+1; 116 101 117 102 MBinning binspix("BinningPixel"); … … 121 106 SetBinning(&fBadId, binstheta, &binspix); 122 107 SetBinning(&fBadN, binstheta, &binspix); 123 124 //----------------------------------------------------125 *fLog << inf << "Name of MPedPhotCam container : " << fNamePedPhotCam126 << endl;127 108 128 109 return kTRUE; … … 141 122 Double_t theta = fPointPos->GetZd(); 142 123 143 const MBadPixelsCam * fBadPixels = (MBadPixelsCam*)par;124 const MBadPixelsCam *badpixels = (MBadPixelsCam*)par; 144 125 145 const UInt_t entries = fPedPhot->GetSize(); 126 const UInt_t entries = badpixels->GetSize(); 127 146 128 UInt_t nb = 0; 147 129 for (UInt_t i=0; i<entries; i++) 148 130 { 149 //*fLog << "MHBadPixels::Fill; i = " << i << endl; 150 151 if ( (*fBadPixels)[i].IsUnsuitable() ) 152 { 153 //*fLog << "MHBadPixels::Fill; (UnSuitable) " << endl; 154 155 fBadId.Fill(theta, i, w); 156 nb++; 157 } 131 if ( (*badpixels)[i].IsUnsuitable() ) 132 { 133 fBadId.Fill(theta, i, w); 134 nb++; 135 } 158 136 } 159 137 fBadN.Fill(theta, nb, w); … … 204 182 pad->Update(); 205 183 } 206 //==========================================================================207 208 209 210 211 212 213 214 215 216 217 -
trunk/MagicSoft/Mars/mbadpixels/MHBadPixels.h
r4841 r4887 18 18 private: 19 19 MGeomCam *fCam; //! 20 MPedPhotCam *fPedPhot; //!21 20 MPointingPos *fPointPos; //! 22 21 … … 37 36 const TH2D *GetBadN() const { return &fBadN; } 38 37 39 TH2 *GetBadIdByName(const TString name) { return &fBadId; }40 TH2 *GetBadNByName(const TString name) { return &fBadN; }41 42 38 void Draw(Option_t* option = ""); 43 39 Bool_t SetupFill(const MParList *plist);
Note:
See TracChangeset
for help on using the changeset viewer.