Changeset 5019 for trunk/MagicSoft/Mars/mcalib
- Timestamp:
- 09/14/04 20:59:35 (20 years ago)
- Location:
- trunk/MagicSoft/Mars/mcalib
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mcalib/MCalibColorSteer.cc
r4910 r5019 34 34 // MCalibrationIntensityChargeCam 35 35 // MCalibrationIntensityRelTimeCam 36 // MBadPixelsIntensityCam 36 37 // 37 38 // Output Containers: 38 39 // MCalibrationIntensityChargeCam 39 40 // MCalibrationIntensityRelTimeCam 41 // MBadPixelsIntensityCam 40 42 // 41 43 ////////////////////////////////////////////////////////////////////////////// … … 53 55 #include "MCalibrationIntensityRelTimeCam.h" 54 56 57 #include "MBadPixelsIntensityCam.h" 58 55 59 #include "MCalibrationChargeCalc.h" 56 60 #include "MCalibrationRelTimeCalc.h" … … 70 74 MCalibColorSteer::MCalibColorSteer(const char *name, const char *title) 71 75 : fHeader(NULL), fGeom(NULL), fParList(NULL), 72 fIntensCharge(NULL), fIntensRelTime(NULL), 76 fIntensCharge(NULL), fIntensRelTime(NULL), fIntensBad(NULL), 73 77 fChargeCalc(NULL), fRelTimeCalc(NULL), 74 78 fPattern(0) … … 111 115 112 116 // 117 // Look for the MBadPixels Intensity Cam 118 // 119 fIntensBad = (MBadPixelsIntensityCam*)pList->FindCreateObj("MBadPixelsIntensityCam"); 120 121 // 113 122 // Look for the MFillH name "FillChargeCam". In case yes, initialize the 114 123 // corresponding IntensityCam … … 116 125 if (pList->FindObject(AddSerialNumber("FillChargeCam"))) 117 126 { 127 118 128 fIntensCharge = (MCalibrationIntensityChargeCam*)pList->FindCreateObj("MCalibrationIntensityChargeCam"); 119 129 fIntensQE = (MCalibrationIntensityQECam*) pList->FindCreateObj("MCalibrationIntensityQECam"); … … 167 177 // -------------------------------------------------------------------------- 168 178 // 169 // Sets the pattern to MRawEvtHeader from outside, if fIsValid is set. 179 // Reads the pattern from MRawEvtHeader and initializes new containers in the 180 // Intensity Cams, if the pattern has changed 170 181 // 171 182 Int_t MCalibColorSteer::Process() … … 208 219 } 209 220 221 // -------------------------------------------------------------------------- 222 // 223 // Searches for name in the MParList and calls, if existing: 224 // - MHCalibrationCam::Finalize() 225 // - MHCalibrationCam::ResetHists() 226 // 210 227 Bool_t MCalibColorSteer::Finalize(const char* name) 211 228 { … … 223 240 } 224 241 242 // -------------------------------------------------------------------------- 243 // 244 // Re-Intitializes new containers inside the Intensity Cams. 245 // From now on, a call to the IntensityCam functions returns pointers 246 // to the newly created Containers. 247 // 225 248 Bool_t MCalibColorSteer::ReInitialize() 226 249 { 227 250 251 if (fIntensBad) 252 { 253 fIntensBad->AddToList(Form("MBadPixelsCam%s",GetNamePattern()),*fGeom); 254 *fLog << inf << "New MBadPixelsCam with " << GetNamePattern() << endl; 255 } 228 256 if (fIntensCharge) 229 257 { 230 258 fIntensCharge->AddToList(Form("MCalibrationChargeCam%s",GetNamePattern()),*fGeom); 231 *fLog << inf << "New MHCalibrationChargeCam with " << GetNamePattern() << endl; 232 } 233 else 234 *fLog << warn << GetDescriptor() 235 << ": No MCalibrationIntensityChargeCam loaded, but MHCalibrationChargeCam found " 236 << endl; 259 *fLog << inf << "New MCalibrationChargeCam with " << GetNamePattern() << endl; 260 } 237 261 if (fIntensQE) 238 262 { 239 263 fIntensQE->AddToList(Form("MCalibrationQECam%s",GetNamePattern()),*fGeom); 240 *fLog << inf << "New MHCalibrationQECam with " << GetNamePattern() << endl; 241 } 242 else 243 *fLog << warn << GetDescriptor() 244 << ": No MCalibrationIntensityQECam loaded, but MHCalibrationChargeCam found " 245 << endl; 264 *fLog << inf << "New MCalibrationQECam with " << GetNamePattern() << endl; 265 } 246 266 if (fIntensRelTime) 247 267 { 248 268 fIntensRelTime->AddToList(Form("MCalibrationRelTimeCam%s",GetNamePattern()),*fGeom); 249 *fLog << inf << "New MHCalibrationRelTimeCam with " << GetNamePattern() << endl; 250 } 251 else 252 *fLog << warn << GetDescriptor() 253 << ": No MCalibrationIntensityRelTimeCam loaded, but MHCalibrationRelTimeCam found " 254 << endl; 269 *fLog << inf << "New MCalibrationRelTimeCam with " << GetNamePattern() << endl; 270 } 255 271 256 272 return kTRUE; -
trunk/MagicSoft/Mars/mcalib/MCalibColorSteer.h
r4910 r5019 14 14 class MCalibrationIntensityQECam; 15 15 class MCalibrationIntensityRelTimeCam; 16 class MBadPixelsIntensityCam; 16 17 class MCalibColorSteer : public MTask 17 18 { 18 19 private: 19 20 20 MRawEvtHeader *fHeader; 21 MGeomCam *fGeom; 22 MParList *fParList; 23 MCalibrationIntensityChargeCam *fIntensCharge; 24 MCalibrationIntensityQECam *fIntensQE; 25 MCalibrationIntensityRelTimeCam *fIntensRelTime; 26 MCalibrationChargeCalc *fChargeCalc; 27 MCalibrationRelTimeCalc *fRelTimeCalc; 28 29 UInt_t fPattern; 30 31 Int_t PreProcess(MParList *pList); 32 Int_t Process(); 33 34 Bool_t ReInitialize(); 35 Bool_t Finalize(const char* name); 36 const char* GetNamePattern(); 37 21 MRawEvtHeader *fHeader; //! 22 MGeomCam *fGeom; //! 23 MParList *fParList; //! 24 MCalibrationIntensityChargeCam *fIntensCharge; //! 25 MCalibrationIntensityQECam *fIntensQE; //! 26 MCalibrationIntensityRelTimeCam *fIntensRelTime; //! 27 MBadPixelsIntensityCam *fIntensBad; //! 28 29 MCalibrationChargeCalc *fChargeCalc; //! 30 MCalibrationRelTimeCalc *fRelTimeCalc; //! 31 32 UInt_t fPattern; 33 34 Int_t PreProcess(MParList *pList); 35 Int_t Process(); 36 37 Bool_t ReInitialize(); 38 Bool_t Finalize(const char* name); 39 const char* GetNamePattern(); 40 38 41 public: 39 42 -
trunk/MagicSoft/Mars/mcalib/MCalibrationBlindCam.cc
r4989 r5019 30 30 // the actual values of the MCalibrationBlindPix's. 31 31 // 32 // Contains T ClonesArrays for the following objects:32 // Contains TObjArrays for the following objects: 33 33 // - fBlindPixels: Array of classes derived from MCalibrationBlindPix, one entry 34 34 // per blind pixel. 35 35 // 36 // All T ClonesArrays have to enlarged by the corresponding calls to (e.g. in MGeomApply):36 // All TObjArrays have to enlarged by the corresponding calls to (e.g. in MGeomApply): 37 37 // - InitSize() 38 38 // … … 43 43 #include "MCalibrationBlindPix.h" 44 44 45 #include <TObjArray.h> 46 45 47 #include "MLogManip.h" 46 47 #include <TClonesArray.h>48 48 49 49 ClassImp(MCalibrationBlindCam); … … 54 54 // Default constructor. 55 55 // 56 // Creates a TClonesArray of MCalibrationBlindPix containers for the TClonesArray's:57 // - fPixels58 //59 56 MCalibrationBlindCam::MCalibrationBlindCam(Int_t nblind,const char *name, const char *title) 60 57 { … … 63 60 fTitle = title ? title : "Calibration Information of blinded pixels in camera"; 64 61 65 fPixels = new TClonesArray("MCalibrationBlindPix",nblind); 62 InitSize(nblind); 63 } 66 64 67 InitSize(nblind); 65 void MCalibrationBlindCam::Add(const UInt_t a, const UInt_t b) 66 { 67 for (UInt_t i=a; i<b; i++) 68 (*fPixels)[i] = new MCalibrationBlindPix; 68 69 } 69 70 -
trunk/MagicSoft/Mars/mcalib/MCalibrationChargeCam.cc
r4986 r5019 82 82 #include "MCalibrationChargeCam.h" 83 83 84 #include <T ClonesArray.h>84 #include <TObjArray.h> 85 85 86 86 #include "MLog.h" … … 107 107 // Default constructor. 108 108 // 109 // Sets all pointers to 0110 //111 // Creates a TClonesArray of MCalibrationChargePix containers, initialized to 1 entry, destinated112 // to hold one container per pixel. Later, a call to MCalibrationChargeCam::InitSize()113 // has to be performed (in MGeomApply).114 //115 // Creates a TClonesArray of MCalibrationChargePix containers, initialized to 1 entry, destinated116 // to hold one container per pixel AREA. Later, a call to MCalibrationChargeCam::InitAreas()117 // has to be performed (in MGeomApply).118 //119 // Creates a TClonesArray of MCalibrationChargePix containers, initialized to 1 entry, destinated120 // to hold one container per camera SECTOR. Later, a call to MCalibrationChargeCam::InitSectors()121 // has to be performed (in MGeomApply).122 //123 109 // Calls: 124 110 // - Clear() … … 129 115 fTitle = title ? title : "Storage container for the Calibration Information in the camera"; 130 116 131 fPixels = new TClonesArray("MCalibrationChargePix",1);132 fAverageAreas = new TClonesArray("MCalibrationChargePix",1);133 fAverageSectors = new TClonesArray("MCalibrationChargePix",1);134 fAverageBadAreas = new TClonesArray("MBadPixelsPix",1);135 fAverageBadSectors = new TClonesArray("MBadPixelsPix",1);136 137 117 Clear(); 138 118 } 119 120 121 void MCalibrationChargeCam::Add(const UInt_t a, const UInt_t b) 122 { 123 for (UInt_t i=a; i<b; i++) 124 (*fPixels)[i] = new MCalibrationChargePix; 125 } 126 127 128 void MCalibrationChargeCam::AddArea(const UInt_t a, const UInt_t b) 129 { 130 for (UInt_t i=a; i<b; i++) 131 (*fAverageAreas)[i] = new MCalibrationChargePix; 132 } 133 134 void MCalibrationChargeCam::AddSector(const UInt_t a, const UInt_t b) 135 { 136 for (UInt_t i=a; i<b; i++) 137 (*fAverageSectors)[i] = new MCalibrationChargePix; 138 } 139 139 140 140 141 // -------------------------------------- -
trunk/MagicSoft/Mars/mcalib/MCalibrationChargeCam.h
r4882 r5019 26 26 enum { kFFactorMethodValid }; 27 27 28 void Add(const UInt_t a, const UInt_t b); 29 void AddArea(const UInt_t a, const UInt_t b); 30 void AddSector(const UInt_t a, const UInt_t b); 31 28 32 public: 29 33 … … 72 76 void SetNumPhotonsPINDiodeMethodErr ( const Float_t f ) { fNumPhotonsPINDiodeMethodErr = f; } 73 77 74 ClassDef(MCalibrationChargeCam, 4) // Container Charge Calibration Results Camera78 ClassDef(MCalibrationChargeCam, 5) // Container Charge Calibration Results Camera 75 79 }; 76 80 -
trunk/MagicSoft/Mars/mcalib/MCalibrationIntensityBlindCam.h
r5015 r5019 16 16 MCalibrationIntensityBlindCam(const char *name=NULL, const char *title=NULL); 17 17 18 void InitSize( const UInt_t n ); 18 void InitSize( const UInt_t n ); 19 19 20 20 ClassDef(MCalibrationIntensityBlindCam, 1) // Container Intensity Blind Calibration Results Camera -
trunk/MagicSoft/Mars/mcalib/MCalibrationRelTimeCam.cc
r4986 r5019 76 76 #include "MCalibrationCam.h" 77 77 78 #include <T ClonesArray.h>78 #include <TObjArray.h> 79 79 80 80 #include "MLog.h" … … 94 94 // Default constructor. 95 95 // 96 // Creates a TClonesArray of MCalibrationRelTimePix containers, initialized to 1 entry, destinated97 // to hold one container per pixel. Later, a call to MCalibrationRelTimeCam::InitSize()98 // has to be performed (in MGeomApply).99 //100 // Creates a TClonesArray of MCalibrationRelTimePix containers, initialized to 1 entry, destinated101 // to hold one container per pixel AREA. Later, a call to MCalibrationRelTimeCam::InitAreas()102 // has to be performed (in MGeomApply).103 //104 // Creates a TClonesArray of MCalibrationRelTimePix containers, initialized to 1 entry, destinated105 // to hold one container per camera SECTOR. Later, a call to MCalibrationRelTimeCam::InitSectors()106 // has to be performed (in MGeomApply).107 //108 96 MCalibrationRelTimeCam::MCalibrationRelTimeCam(const char *name, const char *title) 109 97 { … … 112 100 fTitle = title ? title : "Container for Relative Time Calibration Information"; 113 101 114 fPixels = new TClonesArray("MCalibrationRelTimePix",1); 115 fAverageAreas = new TClonesArray("MCalibrationRelTimePix",1); 116 fAverageSectors = new TClonesArray("MCalibrationRelTimePix",1); 117 fAverageBadAreas = new TClonesArray("MBadPixelsPix",1); 118 fAverageBadSectors = new TClonesArray("MBadPixelsPix",1); 119 102 } 103 104 void MCalibrationRelTimeCam::Add(const UInt_t a, const UInt_t b) 105 { 106 for (UInt_t i=a; i<b; i++) 107 (*fPixels)[i] = new MCalibrationRelTimePix; 108 } 109 110 111 void MCalibrationRelTimeCam::AddArea(const UInt_t a, const UInt_t b) 112 { 113 for (UInt_t i=a; i<b; i++) 114 (*fAverageAreas)[i] = new MCalibrationRelTimePix; 115 } 116 117 void MCalibrationRelTimeCam::AddSector(const UInt_t a, const UInt_t b) 118 { 119 for (UInt_t i=a; i<b; i++) 120 (*fAverageSectors)[i] = new MCalibrationRelTimePix; 120 121 } 121 122 -
trunk/MagicSoft/Mars/mcalib/MCalibrationRelTimeCam.h
r4882 r5019 8 8 class MCalibrationRelTimeCam : public MCalibrationCam 9 9 { 10 private: 11 12 void Add(const UInt_t a, const UInt_t b); 13 void AddArea(const UInt_t a, const UInt_t b); 14 void AddSector(const UInt_t a, const UInt_t b); 15 10 16 public: 11 17 … … 19 25 void DrawPixelContent(Int_t num) const; 20 26 21 ClassDef(MCalibrationRelTimeCam, 1) // Container Rel. Arrival Time Calibration Results Camera27 ClassDef(MCalibrationRelTimeCam, 2) // Container Rel. Arrival Time Calibration Results Camera 22 28 }; 23 29
Note:
See TracChangeset
for help on using the changeset viewer.