Changeset 4167 for trunk/MagicSoft/Mars/mjobs
- Timestamp:
- 05/25/04 11:13:08 (21 years ago)
- Location:
- trunk/MagicSoft/Mars/mjobs
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mjobs/MJExtractSignal.cc
r3524 r4167 47 47 #include "MPedestalCam.h" 48 48 #include "MCalibrationChargeCam.h" 49 #include "MCalibrationQECam.h" 49 50 #include "MHCamEvent.h" 50 51 … … 139 140 Bool_t MJExtractSignal::ProcessFileD(MPedestalCam &pedcam) 140 141 { 141 if (!fRuns) 142 { 143 *fLog << err << "No Runs choosen... abort." << endl; 144 return kFALSE; 145 } 146 if (fRuns->GetNumRuns() != fRuns->GetNumEntries()) 142 143 if (!fRuns) 144 { 145 *fLog << err << "No Runs choosen... abort." << endl; 146 return kFALSE; 147 } 148 if (fRuns->GetNumRuns() != fRuns->GetNumEntries()) 147 149 { 148 150 *fLog << err << "Number of files found doesn't match number of runs... abort." << endl; 149 151 return kFALSE; 150 152 } 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 { 209 210 211 } 212 213 214 215 216 217 218 219 220 221 222 153 154 *fLog << inf; 155 fLog->Separator(GetDescriptor()); 156 *fLog << "Calculate MExtractedSignalCam from Runs " << fRuns->GetRunsAsString() << endl; 157 *fLog << endl; 158 159 // Setup Lists 160 MParList plist; 161 plist.AddToList(&pedcam); 162 163 MTaskList tlist; 164 plist.AddToList(&tlist); 165 166 // Setup Parameters 167 168 // Make sure, that at least an empty MBadPixelsCam is available 169 // This is necessary for input which don't contain a MBadPixelsCam 170 MBadPixelsCam badcam; 171 plist.AddToList(&badcam); 172 173 // Setup Task-lists 174 MReadMarsFile read("Events"); 175 read.DisableAutoScheme(); 176 static_cast<MRead&>(read).AddFiles(*fRuns); 177 178 MGeomApply apply; // Only necessary to craete geometry 179 MBadPixelsMerge merge(&fBadPixels); 180 MExtractSignal extract; 181 182 MHCamEvent evt("ExtSignal"); 183 evt.SetType(0); 184 MFillH fill(&evt, "MExtractedSignalCam"); 185 186 MWriteRootFile write(GetOutputFileD(), "RECREATE", fRuns->GetRunsAsString(), 2); 187 write.AddContainer("MExtractedSignalCam", "Events"); 188 write.AddContainer("MTime", "Events"); 189 write.AddContainer("MRawEvtHeader", "Events"); 190 write.AddContainer("MPedestalCam", "RunHeaders"); 191 write.AddContainer("MRawRunHeader", "RunHeaders"); 192 write.AddContainer("MBadPixelsCam", "RunHeaders"); 193 194 tlist.AddToList(&read); 195 tlist.AddToList(&apply); 196 tlist.AddToList(&merge); 197 tlist.AddToList(&extract); 198 if (TestBit(kEnableGraphicalOutput)) 199 tlist.AddToList(&fill); 200 tlist.AddToList(&write); 201 202 // Create and setup the eventloop 203 MEvtLoop evtloop(fName); 204 evtloop.SetParList(&plist); 205 evtloop.SetDisplay(fDisplay); 206 evtloop.SetLogStream(fLog); 207 208 // Execute first analysis 209 if (!evtloop.Eventloop()) 210 { 211 *fLog << err << GetDescriptor() << ": Failed." << endl; 212 return kFALSE; 213 } 214 215 tlist.PrintStatistics(); 216 217 //DisplayResult(plist); 218 219 //if (!WriteResult()) 220 // return kFALSE; 221 222 *fLog << inf << GetDescriptor() << ": Done." << endl; 223 224 return kTRUE; 223 225 } 224 226 … … 259 261 } 260 262 261 Bool_t MJExtractSignal::ProcessP(MPedestalCam &pedcam, MCalibrationChargeCam &calcam )263 Bool_t MJExtractSignal::ProcessP(MPedestalCam &pedcam, MCalibrationChargeCam &calcam, MCalibrationQECam &qecam) 262 264 { 263 265 if (!ReadPedPhotCam()) 264 return ProcessFileP(pedcam, calcam );265 266 return kTRUE; 267 } 268 269 Bool_t MJExtractSignal::ProcessFileP(MPedestalCam &pedcam, MCalibrationChargeCam &calcam )266 return ProcessFileP(pedcam, calcam, qecam); 267 268 return kTRUE; 269 } 270 271 Bool_t MJExtractSignal::ProcessFileP(MPedestalCam &pedcam, MCalibrationChargeCam &calcam, MCalibrationQECam &qecam) 270 272 { 271 273 if (!fRuns) … … 293 295 plist.AddToList(&pedcam); 294 296 plist.AddToList(&calcam); 297 plist.AddToList(&qecam); 295 298 plist.AddToList(&fPedPhotCam); 296 299 plist.AddToList(&fBadPixels); -
trunk/MagicSoft/Mars/mjobs/MJExtractSignal.h
r3445 r4167 16 16 class MPedestalCam; 17 17 class MCalibrationChargeCam; 18 class MCalibrationQECam; 18 19 19 20 class MJExtractSignal : public MParContainer … … 33 34 34 35 Bool_t ProcessFileD(MPedestalCam &pedcam); 35 Bool_t ProcessFileP(MPedestalCam &pedcam, MCalibrationChargeCam &calcam );36 Bool_t ProcessFileP(MPedestalCam &pedcam, MCalibrationChargeCam &calcam, MCalibrationQECam &qecam); 36 37 37 38 public: … … 50 51 51 52 Bool_t ProcessD(MPedestalCam &pedcam); 52 Bool_t ProcessP(MPedestalCam &pedcam, MCalibrationChargeCam &calcam );53 Bool_t ProcessP(MPedestalCam &pedcam, MCalibrationChargeCam &calcam, MCalibrationQECam &qecam); 53 54 54 55 ClassDef(MJExtractSignal, 0) // Tool to create a pedestal file (MPedestalCam)
Note:
See TracChangeset
for help on using the changeset viewer.