Changeset 2440
- Timestamp:
- 10/29/03 13:35:42 (21 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r2438 r2440 1 1 -*-*- END OF LINE -*-*- 2 3 2003/10/29: Thomas Bretz 4 5 * manalysis/AnalysisLinkDef.h, manalysis/Makefile: 6 - removed MMcPedestalRead 7 8 * manalysis/MMcPedestalCopy.[h,cc]: 9 - merged functionality of MMcPedestalRead into it 10 - do not remove itself from the tasklist, but check 11 the file type for each file again. 12 13 * manalysis/MMcPedestalNSBAdd.cc: 14 - don't do something if camera file version is < 0.7 15 - do not remove itself from the tasklist, but check 16 the file type for each file again. 17 18 * mgui/MCamEvent.cc: 19 - added a comment 20 21 * mimage/MHillasCalc.[h,cc]: 22 - replaced the fixed size array fErrors by a dynamic size array 23 (TArrayC) to make sure, that people get a warning on the 24 screen if the reprogram the error handling and write 25 into an unallowed index. 26 27 2 28 3 29 2003/10/28: Thomas Bretz -
trunk/MagicSoft/Mars/manalysis/AnalysisLinkDef.h
r2437 r2440 8 8 #pragma link C++ class MCerPhotEvt+; 9 9 #pragma link C++ class MCerPhotAnal+; 10 #pragma link C++ class MCerPhotAnal2+; 10 11 #pragma link C++ class MCerPhotCalc+; 12 13 //#pragma link C++ class MRelSignal+; 11 14 12 15 #pragma link C++ class MBlindPixels+; … … 57 60 #pragma link C++ class MMinuitInterface+; 58 61 #pragma link C++ class MFiltercutsCalc+; 59 #pragma link C++ class MMcPedestalRead+;60 61 62 62 63 #endif 63 64 65 66 67 68 69 70 71 72 73 74 -
trunk/MagicSoft/Mars/manalysis/MMcPedestalCopy.cc
r2399 r2440 16 16 ! 17 17 ! 18 ! Author(s): Thomas Bretz 12/2000 <mailto:tbretz@uni-sw.gwdg.de>18 ! Author(s): Thomas Bretz, 12/2000 <mailto:tbretz@astro.uni-wuerzburg.de> 19 19 ! 20 ! Copyright: MAGIC Software Development, 2000-200 120 ! Copyright: MAGIC Software Development, 2000-2003 21 21 ! 22 22 ! … … 24 24 25 25 ///////////////////////////////////////////////////////////////////////////// 26 // //27 // MMcPedestalCopy //28 // //29 // This task looks for the ìnformation about FADC pedestals in //30 // MMcFadcHeader and translates it to the pedestal values in //31 // MPedestalCam //32 // //33 // Input Containers: //34 // MMcFadcHeader //35 // //36 // Output Containers: //37 // MPedestalCam //38 // //26 // 27 // MMcPedestalCopy 28 // 29 // This task looks for the ìnformation about FADC pedestals in 30 // MMcFadcHeader and translates it to the pedestal values in 31 // MPedestalCam 32 // 33 // Input Containers: 34 // MMcFadcHeader 35 // 36 // Output Containers: 37 // MPedestalCam 38 // 39 39 ///////////////////////////////////////////////////////////////////////////// 40 41 40 #include "MMcPedestalCopy.h" 42 41 … … 50 49 51 50 #include "MRawRunHeader.h" 51 #include "MMcRunHeader.hxx" 52 52 #include "MMcFadcHeader.hxx" 53 53 … … 89 89 // -------------------------------------------------------------------------- 90 90 // 91 // Check runtype and search for MPedestalCam and MMcFadcHeader. 92 // If the runtype check fails the task is removed from the task list. 91 // Search for MPedestalCam and MMcFadcHeader. 93 92 // 94 93 Int_t MMcPedestalCopy::PreProcess(MParList *pList) 95 94 { 96 if (!CheckRunType(pList)) 97 { 98 *fLog << warn << dbginf << " MMcPedestalCopy is for Monte Carlo files only... "; 99 *fLog << "removing task from list." << endl; 100 return kSKIP; 101 } 95 fMcRun = (MMcRunHeader*)pList->FindObject("MMcRunHeader"); 96 if (!fMcRun) 97 *fLog << warn << dbginf << "MMcRunHeader not found... assuming camera<0.7" << endl; 102 98 103 99 fPedCam = (MPedestalCam*)pList->FindCreateObj("MPedestalCam"); … … 108 104 if (!fMcPed) 109 105 { 110 *fLog << warn<< dbginf << "MMcFadcHeader not found... aborting." << endl;106 *fLog << err << dbginf << "MMcFadcHeader not found... aborting." << endl; 111 107 return kFALSE; 112 108 } … … 128 124 const int num = fPedCam->GetSize(); 129 125 126 const Bool_t camver70 = fMcRun && fMcRun->GetCamVersion()>=70; 127 130 128 for (int i=0; i<num; i++) 131 129 { … … 136 134 137 135 const Float_t pedest = fMcPed->GetPedestal(i); 138 //const Float_t pedrms = pedest/sqrt((float)num);136 const Float_t sigma = camver70 ? fMcPed->GetPedestalRmsHigh(i) : fMcPed->GetElecNoise(i); 139 137 140 const Float_t sigma = fMcPed->GetElecNoise(i);141 //const Float_t sigrms = sigma/sqrt(num*2.);142 143 //pix.SetPedestalRms(pedrms, sigrms);144 138 pix.Set(pedest, sigma); 145 139 } 146 140 141 if (camver70) 142 fPedCam->SetReadyToSave(); 143 147 144 return kTRUE; 148 145 } 149 -
trunk/MagicSoft/Mars/manalysis/MMcPedestalCopy.h
r2206 r2440 7 7 8 8 class MMcFadcHeader; 9 class MMcRunHeader; 9 10 class MPedestalCam; 10 11 … … 13 14 private: 14 15 const MMcFadcHeader *fMcPed; 16 const MMcRunHeader *fMcRun; 17 15 18 MPedestalCam *fPedCam; 16 19 17 20 Bool_t CheckRunType(MParList *pList) const; 18 21 19 Int_t PreProcess(MParList *pList);22 Int_t PreProcess(MParList *pList); 20 23 Bool_t ReInit(MParList *pList); 21 24 -
trunk/MagicSoft/Mars/manalysis/MMcPedestalNSBAdd.cc
r2377 r2440 111 111 // -------------------------------------------------------------------------- 112 112 // 113 // Check for the camera version. This class should not be used with 114 // camera files >= 0.7 115 // 116 Bool_t MMcPedestalNSBAdd::CheckCamVersion(MParList *pList) const 117 { 118 const MMcRunHeader *run = (MMcRunHeader*)pList->FindObject("MMcRunHeader"); 119 if (!run) 120 *fLog << warn << dbginf << "MMcRunHeader not found... assuming camera<0.7" << endl; 121 122 return !run || run->GetCamVersion()<70; 123 } 124 125 // -------------------------------------------------------------------------- 126 // 113 127 // - check whether we have a monte carlo file. if not skip this task 114 128 // - try to get MMcFadcHeader, MGeomCam and MPedestalCam from the parameter … … 118 132 Int_t MMcPedestalNSBAdd::PreProcess(MParList *pList) 119 133 { 120 if (!CheckRunType(pList))121 {122 *fLog << warn << dbginf << "Warning - MMcPedestalNSB is for Monte Carlo files only... removing this task from list." << endl;123 return kSKIP;124 }125 126 134 fFadc = (MMcFadcHeader*)pList->FindObject("MMcFadcHeader"); 127 135 if (!fFadc) … … 141 149 if (!fPedCam) 142 150 return kFALSE; 143 144 const MMcRunHeader *mcrunheader = (MMcRunHeader*)pList->FindObject("MMcRunHeader");145 if (!mcrunheader && fDnsbPixel<0)146 {147 *fLog << err << dbginf << "Using the default argument only ";148 *fLog << "allowed if MMcRunHeader is available... aborting." << endl;149 return kFALSE;150 }151 151 152 152 return kTRUE; … … 202 202 return kFALSE; 203 203 204 if (!CheckCamVersion(pList)) 205 return kTRUE; 206 204 207 const Float_t dnsbpix = GetDnsb(pList) * 50.0/15.0; 205 208 … … 220 223 } 221 224 225 fPedCam->SetReadyToSave(); 226 222 227 return kTRUE; 223 228 } -
trunk/MagicSoft/Mars/manalysis/Makefile
r2437 r2440 49 49 MCerPhotEvt.cc \ 50 50 MCerPhotAnal.cc \ 51 MCerPhotAnal2.cc \ 51 52 MCerPhotCalc.cc \ 52 53 MPedCalcPedRun.cc \ … … 66 67 MMinuitInterface.cc \ 67 68 MFiltercutsCalc.cc \ 68 MCT1PadONOFF.cc \ 69 MMcPedestalRead.cc 69 MCT1PadONOFF.cc 70 70 71 # MRelSignal.cc \ 71 72 72 73 SRCS = $(SRCFILES) -
trunk/MagicSoft/Mars/mgui/MCamEvent.cc
r2264 r2440 29 29 // A base class describing an event in the camera. 30 30 // 31 // If GetPixelContent returns kFALSE, it must not touch 'val'. 32 // 31 33 ////////////////////////////////////////////////////////////////////////////// 32 34 #include "MCamEvent.h" 33 35 34 36 ClassImp(MCamEvent); 35 -
trunk/MagicSoft/Mars/mimage/MHillasCalc.cc
r2209 r2440 77 77 MHillasCalc::MHillasCalc(const char *name, const char *title) 78 78 : fHilName("MHillas"), fHilExtName("MHillasExt"), 79 fImgParName("MNewImagePar"), f Flags(0xff)79 fImgParName("MNewImagePar"), fErrors(5), fFlags(0xff) 80 80 { 81 81 fName = name ? name : "MHillasCalc"; … … 135 135 } 136 136 137 memset(fErrors , 0, sizeof(fErrors));137 memset(fErrors.GetArray(), 0, sizeof(Char_t)*fErrors.GetSize()); 138 138 139 139 return kTRUE; -
trunk/MagicSoft/Mars/mimage/MHillasCalc.h
r2209 r2440 12 12 #ifndef MARS_MTask 13 13 #include "MTask.h" 14 #endif 15 #ifndef ROOT_TArrayC 16 #include <TArrayC.h> 14 17 #endif 15 18 … … 33 36 TString fImgParName; 34 37 35 Int_t fErrors[5];38 TArrayC fErrors; 36 39 37 40 Int_t fFlags;
Note:
See TracChangeset
for help on using the changeset viewer.