Changeset 4073 for trunk/MagicSoft/Mars/mtemp/mifae/library
- Timestamp:
- 05/14/04 16:45:04 (21 years ago)
- Location:
- trunk/MagicSoft/Mars/mtemp/mifae/library
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mtemp/mifae/library/MCalibrateDC.cc
r4063 r4073 42 42 43 43 #include "MParList.h" 44 #include "MTaskList.h" 45 #include "MEvtLoop.h" 46 47 #include "MReadReports.h" 48 #include "MGeomApply.h" 44 49 45 50 ClassImp(MCalibrateDC); … … 82 87 } 83 88 89 // Initialization of objects that need the information from MGeomCam 90 fDisplay.SetGeometry(*fGeomCam); 91 fNumPixels = fGeomCam->GetNumPixels(); 92 84 93 fCurr = (MCameraDC*)pList->FindObject(AddSerialNumber("MCameraDC")); 85 94 … … 99 108 100 109 // Run over the continuos light run to get the DC intercalibration factors 101 fNumPixels = fGeomCam->GetNumPixels();102 110 fDCCalibrationFactor.Set(fNumPixels); 103 111 fDCCalibrationFactor.Reset(1.); … … 105 113 if ( fFileName != "" ) 106 114 { 107 // FIXME::Here it should be done the loop over the continuos light run115 ProcessFile(); 108 116 DCCalibrationCalc(); 109 117 … … 136 144 137 145 return kTRUE; 146 } 147 148 Bool_t MCalibrateDC::ProcessFile() 149 { 150 151 MParList plist; 152 MTaskList tlist; 153 plist.AddToList(&tlist); 154 155 MCameraDC dccam; 156 plist.AddToList(&dccam); 157 158 // Reads the trees of the root file and the analysed branches 159 MReadReports read; 160 read.AddTree("Currents"); 161 read.AddFile(fFileName); // after the reading of the trees!!! 162 read.AddToBranchList("MReportCurrents.*"); 163 164 MGeomApply geomapl; 165 166 tlist.AddToList(&geomapl); 167 tlist.AddToList(&read); 168 169 // Enable logging to file 170 //*fLog.SetOutputFile(lname, kTRUE); 171 172 // 173 // Execute the eventloop 174 // 175 MEvtLoop evtloop(fName); 176 evtloop.SetParList(&plist); 177 evtloop.SetLogStream(fLog); 178 179 // Execute first analysis 180 if (!evtloop.PreProcess()) 181 { 182 *fLog << err << GetDescriptor() << ": Failed." << endl; 183 return kFALSE; 184 } 185 186 while (tlist.Process()) 187 fDisplay.AddCamContent(dccam); 188 189 evtloop.PostProcess(); 190 191 tlist.PrintStatistics(); 192 193 UInt_t numexecutions = read.GetNumExecutions(); 194 UInt_t numPixels = fDisplay.GetNumPixels(); 195 for (UInt_t pix = 1; pix < numPixels; pix++) 196 fDisplay[pix] /= numexecutions; 197 198 199 *fLog << inf << GetDescriptor() << ": Done." << endl; 200 201 return kTRUE; 138 202 } 139 203 -
trunk/MagicSoft/Mars/mtemp/mifae/library/MCalibrateDC.h
r4061 r4073 2 2 #define MARS_MCalibrateDC 3 3 4 #ifndef ROOT_TArray F5 #include <TArray F.h>4 #ifndef ROOT_TArrayD 5 #include <TArrayD.h> 6 6 #endif 7 7 … … 44 44 45 45 UInt_t fNumPixels ; 46 TArray FfDCCalibrationFactor;47 Float_t fDCMissCalibrationFactor;46 TArrayD fDCCalibrationFactor; 47 Double_t fDCMissCalibrationFactor; 48 48 49 Float_t fDCCalibration; //[uA]50 Float_t fDCCalibrationRMS; //[uA]49 Double_t fDCCalibration; //[uA] 50 Double_t fDCCalibrationRMS; //[uA] 51 51 52 Bool_t ProcessFile(); 52 53 Bool_t DCCalibrationCalc(); 53 54 … … 63 64 void SetFileName(TString filename="") {fFileName=filename;} 64 65 65 ClassDef(MCalibrateDC, 0) // Taks to intercalibrate the DC of all pmts from a continuos light run 66 //Getters 67 MHCamera& GetDisplay() { return fDisplay; } 68 TArrayD& GetDCCalibrationFactor() { return fDCCalibrationFactor; } 69 70 ClassDef(MCalibrateDC, 0) // Taks to intercalibrate the DC of all pmts from a continuos light run 66 71 }; 67 72
Note:
See TracChangeset
for help on using the changeset viewer.