Changeset 3374
- Timestamp:
- 03/01/04 17:18:18 (21 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 16 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r3372 r3374 13 13 - fixed an include (from MArrivalTime.h to MArrivalTimeCam.h) 14 14 15 16 15 17 2004/03/01: Wolfgang Wittek 16 18 … … 46 48 * mhist/MHStarMap.[h,cc]: 47 49 - changes to use MObservatory member function 50 51 * manalysis/MCerPhotAnal.cc, manalysis/MCerPhotAnal2.cc, 52 manalysis/MCerPhotCalc.cc, manalysis/MMcCalibrationUpdate.cc, 53 manalysis/MMcPedestalCopy.cc, manalysis/MMcPedestalNSBAdd.cc, 54 manalysis/MPedCalcPedRun.cc, manalysis/MPedPhotCalc.cc, 55 mcalib/MCalibrationChargeCalc.cc, mcalib/MMcCalibrationCalc.cc 56 - changed to use IsMonteCarloRun() now 57 58 * manalysis/MMcCalibrationUpdate.cc: 59 - unified output to log-stream 60 - replaced sqrt by TMath::Sqrt 61 62 * mcalib/MCalibrationChargeCalc.cc: 63 - unified output to log-stream 64 - removed .Data() from TString where obsolete 65 - fixed memory leak using gSystem->ExpandPathName 66 67 * mpointing/MPointingPosCalc.cc, mraw/MRawFileWrite.cc: 68 - adde class name to used kRT*/kTT* enums 69 70 * mraw/MRawEvtHeader.h: 71 - made enum data member of class 72 73 * mraw/MRawRunHeader.[h,cc]: 74 - made kMagicNumber and kMaxFormatVersion a static data 75 member of the class 76 - added IsMonteCarloRun member function 48 77 49 78 -
trunk/MagicSoft/Mars/manalysis/MCerPhotAnal.cc
r2942 r3374 103 103 return kFALSE; 104 104 105 fPedestals = NULL; 106 105 107 const MRawRunHeader *runheader = (MRawRunHeader*)pList->FindObject("MRawRunHeader"); 106 108 if (!runheader) 107 109 *fLog << warn << dbginf << "Warning - cannot check file type, MRawRunHeader not found." << endl; 108 110 else 109 if (runheader->GetRunType() == kRTMonteCarlo) 110 { 111 fPedestals=NULL; 111 if (runheader->IsMonteCarloRun()) 112 112 return kTRUE; 113 }114 113 115 114 fPedestals = (MPedestalCam*)pList->FindCreateObj("MPedestalCam"); -
trunk/MagicSoft/Mars/manalysis/MCerPhotAnal2.cc
r2946 r3374 106 106 return kFALSE; 107 107 108 fPedestals=NULL; 109 108 110 const MRawRunHeader *runheader = (MRawRunHeader*)pList->FindObject("MRawRunHeader"); 109 111 if (!runheader) 110 112 *fLog << warn << dbginf << "Warning - cannot check file type, MRawRunHeader not found." << endl; 111 113 else 112 if (runheader->GetRunType() == kRTMonteCarlo) 113 { 114 fPedestals=NULL; 114 if (runheader->IsMonteCarloRun()) 115 115 return kTRUE; 116 }117 116 118 117 fPedestals = (MPedPhotCam*)pList->FindCreateObj("MPedPhotCam"); -
trunk/MagicSoft/Mars/manalysis/MCerPhotCalc.cc
r2942 r3374 154 154 } 155 155 156 Bool_t fIsMcFile = runheader->GetRunType() == kRTMonteCarlo; 157 if (!fIsMcFile) 156 if (!runheader->IsMonteCarloRun()) 158 157 return kTRUE; 159 158 -
trunk/MagicSoft/Mars/manalysis/MMcCalibrationUpdate.cc
r3344 r3374 99 99 } 100 100 101 return run->GetRunType() == kRTMonteCarlo;101 return run->IsMonteCarloRun(); 102 102 } 103 103 … … 108 108 Int_t MMcCalibrationUpdate::PreProcess(MParList *pList) 109 109 { 110 fCalCam = (MCalibrationChargeCam*) pList->FindObject(AddSerialNumber("MCalibrationChargeCam")); 111 if ( !fCalCam ) 112 { 113 *fLog << inf << dbginf << AddSerialNumber("MCalibrationChargeCam") << " does not exist... Creating." << endl; 114 115 fCalCam = (MCalibrationChargeCam*) pList->FindCreateObj(AddSerialNumber("MCalibrationChargeCam")); 116 if ( !fCalCam ) 117 { 118 *fLog << err << dbginf << "Cannot create " << AddSerialNumber("MCalibrationChargeCam") << "... aborting." << endl; 119 return kFALSE; 120 } 121 } 122 else 123 { 124 fFillCalibrationCam = kFALSE; 125 *fLog << inf << AddSerialNumber("MCalibrationChargeCam") << " already exists... " << endl; 126 } 127 128 fPedPhotCam = (MPedPhotCam*) pList->FindCreateObj(AddSerialNumber("MPedPhotCam")); 129 if ( ! fPedPhotCam) 130 { 131 *fLog << err << dbginf << "Cannot create " << AddSerialNumber("MPedPhotCam") << "... aborting." << endl; 132 return kFALSE; 133 } 134 135 fSignalCam = (MExtractedSignalCam*) pList->FindObject(AddSerialNumber("MExtractedSignalCam")); 136 if ( ! fSignalCam) 137 { 138 *fLog << err << dbginf << "Cannot find " << AddSerialNumber("MExtractedSignalCam") << "... aborting." << endl; 139 return kFALSE; 140 } 141 142 return kTRUE; 143 110 fCalCam = (MCalibrationChargeCam*) pList->FindObject(AddSerialNumber("MCalibrationChargeCam")); 111 if (!fCalCam) 112 { 113 fCalCam = (MCalibrationChargeCam*) pList->FindCreateObj(AddSerialNumber("MCalibrationChargeCam")); 114 if (!fCalCam) 115 return kFALSE; 116 } 117 else 118 { 119 fFillCalibrationCam = kFALSE; 120 *fLog << inf << AddSerialNumber("MCalibrationChargeCam") << " already exists... " << endl; 121 } 122 123 fPedPhotCam = (MPedPhotCam*) pList->FindCreateObj(AddSerialNumber("MPedPhotCam")); 124 if (!fPedPhotCam) 125 return kFALSE; 126 127 fSignalCam = (MExtractedSignalCam*) pList->FindObject(AddSerialNumber("MExtractedSignalCam")); 128 if (!fSignalCam) 129 { 130 *fLog << err << AddSerialNumber("MExtractedSignalCam") << " not found... aborting." << endl; 131 return kFALSE; 132 } 133 134 return kTRUE; 144 135 } 145 136 … … 156 147 // 157 148 if (!CheckRunType(pList)) 158 159 149 { 150 *fLog << inf << "This is no MC file... skipping." << endl; 160 151 return kTRUE; 161 152 } 162 153 163 154 // 164 155 // Now check the existence of all necessary containers. 165 156 // 166 167 157 fGeom = (MGeomCam*) pList->FindObject(AddSerialNumber("MGeomCam")); 168 if ( ! fGeom)169 170 *fLog << err << dbginf << "Cannot find " << AddSerialNumber("MGeomCam") << "... aborting." << endl;171 172 158 if (!fGeom) 159 { 160 *fLog << err << AddSerialNumber("MGeomCam") << " not found... aborting." << endl; 161 return kFALSE; 162 } 173 163 174 164 fHeaderFadc = (MMcFadcHeader*)pList->FindObject(AddSerialNumber("MMcFadcHeader")); 175 165 if (!fHeaderFadc) 176 166 { 177 *fLog << err << dbginf<< AddSerialNumber("MMcFadcHeader") << " not found... aborting." << endl;167 *fLog << err << AddSerialNumber("MMcFadcHeader") << " not found... aborting." << endl; 178 168 return kFALSE; 179 169 } … … 182 172 // Initialize Fadc simulation parameters: 183 173 // 184 if ( fAmplitude < 0.)185 174 if (fAmplitude < 0) 175 { 186 176 fAmplitude = fHeaderFadc->GetAmplitud(); 187 177 fAmplitudeOuter = fHeaderFadc->GetAmplitudOuter(); 188 178 fConversionHiLo = fHeaderFadc->GetLow2HighGain(); 189 179 } 190 180 else // Check that following files have all the same FADC parameters 191 192 if ( fabs(fHeaderFadc->GetAmplitud()-fAmplitude) > 1.e-6 ||181 { 182 if ( fabs(fHeaderFadc->GetAmplitud()-fAmplitude) > 1.e-6 || 193 183 fabs(fHeaderFadc->GetAmplitudOuter()-fAmplitudeOuter) > 1.e-6 || 194 fabs(fConversionHiLo-fHeaderFadc->GetLow2HighGain()) > 1.e-6 )184 fabs(fConversionHiLo-fHeaderFadc->GetLow2HighGain()) > 1.e-6 ) 195 185 { 196 *fLog << err << endl << endl << dbginf << "Parameters of MMcFadcHeader are not the same for all the read files. Aborting..." << endl<< endl;197 198 199 186 *fLog << err << "Parameters of MMcFadcHeader are not the same for all files... aborting." << endl; 187 return kFALSE; 188 } 189 } 200 190 201 191 // … … 205 195 // else has to be done in ReInit: 206 196 // 207 if ( !fFillCalibrationCam)208 return kTRUE;197 if (!fFillCalibrationCam) 198 return kTRUE; 209 199 210 200 // … … 278 268 // counts for the RMS per slice: 279 269 // 280 281 const Float_t pedestrms = sigpix.IsLoGainUsed()? 282 sqrt((Double_t)(fSignalCam->GetNumUsedLoGainFADCSlices())) * 283 (fHeaderFadc->GetPedestalRmsLow(i)>0.? fHeaderFadc->GetPedestalRmsLow(i): 0.01) 284 : 285 sqrt((Double_t)(fSignalCam->GetNumUsedHiGainFADCSlices())) * 286 (fHeaderFadc->GetPedestalRmsHigh(i)>0.? fHeaderFadc->GetPedestalRmsHigh(i) : 0.01); 270 const Double_t used = (Double_t)(sigpix.IsLoGainUsed() ? 271 fSignalCam->GetNumUsedLoGainFADCSlices() : 272 fSignalCam->GetNumUsedHiGainFADCSlices()); 273 274 const Float_t rms0 = sigpix.IsLoGainUsed() ? 275 fHeaderFadc->GetPedestalRmsLow(i) : 276 fHeaderFadc->GetPedestalRmsHigh(i); 277 278 const Float_t pedestrms = TMath::Sqrt(used) * (rms0>0 ? rms0 : 0.01); 287 279 288 280 // … … 297 289 298 290 if (sigpix.IsLoGainUsed()) 299 pedpix.Set(adc2phot*hi2lo*pedestmean, 300 adc2phot*hi2lo*pedestrms); 291 pedpix.Set(adc2phot*hi2lo*pedestmean, adc2phot*hi2lo*pedestrms); 301 292 else 302 293 pedpix.Set(adc2phot*pedestmean, adc2phot*pedestrms); 303 294 304 295 } -
trunk/MagicSoft/Mars/manalysis/MMcPedestalCopy.cc
r3004 r3374 86 86 } 87 87 88 return run-> GetRunType() == kRTMonteCarlo;88 return run->IsMonteCarloRun(); 89 89 } 90 90 -
trunk/MagicSoft/Mars/manalysis/MMcPedestalNSBAdd.cc
r2470 r3374 106 106 } 107 107 108 return runheader-> GetRunType() == kRTMonteCarlo;108 return runheader->IsMonteCarloRun(); 109 109 } 110 110 -
trunk/MagicSoft/Mars/manalysis/MPedCalcPedRun.cc
r3199 r3374 175 175 } 176 176 else 177 if (runheader-> GetRunType() == kRTMonteCarlo)177 if (runheader->IsMonteCarloRun()) 178 178 return kTRUE; 179 179 -
trunk/MagicSoft/Mars/manalysis/MPedPhotCalc.cc
r2850 r3374 109 109 const MRawRunHeader *runheader = (MRawRunHeader*)pList->FindObject("MRawRunHeader"); 110 110 if (!runheader) 111 111 { 112 112 *fLog << warn << dbginf; 113 113 *fLog << "Warning - cannot check file type, MRawRunHeader not found." << endl; 114 114 } 115 115 else 116 if (runheader->GetRunType() == kRTMonteCarlo)117 return kTRUE;116 if (runheader->IsMonteCarloRun()) 117 return kTRUE; 118 118 119 119 120 120 // Initialize arrays 121 121 if(fSumx.GetSize()==0) 122 123 122 { 123 const UShort_t num = fPedestals->GetSize(); 124 124 125 126 125 fSumx.Set(num); 126 fSumx2.Set(num); 127 127 128 129 130 128 memset(fSumx.GetArray(), 0, sizeof(Float_t)*num); 129 memset(fSumx2.GetArray(), 0, sizeof(Float_t)*num); 130 } 131 131 132 132 return kTRUE; 133 133 } 134 134 … … 140 140 Int_t MPedPhotCalc::Process() 141 141 { 142 for(UInt_t i=0;i<fCerPhot->GetNumPixels();i++)142 for(UInt_t i=0;i<fCerPhot->GetNumPixels();i++) 143 143 { 144 const MCerPhotPix &pix = (*fCerPhot)[i];144 const MCerPhotPix &pix = (*fCerPhot)[i]; 145 145 146 const Float_t nphot = pix.GetNumPhotons();147 const Int_t idx = pix.GetPixId();148 149 fSumx[idx] += nphot;150 fSumx2[idx] += nphot*nphot;146 const Float_t nphot = pix.GetNumPhotons(); 147 const Int_t idx = pix.GetPixId(); 148 149 fSumx[idx] += nphot; 150 fSumx2[idx] += nphot*nphot; 151 151 } 152 153 fPedestals->SetReadyToSave();154 155 return kTRUE;152 153 fPedestals->SetReadyToSave(); 154 155 return kTRUE; 156 156 } 157 157 … … 161 161 // 162 162 Int_t MPedPhotCalc::PostProcess() 163 163 { 164 164 // Compute pedestals and rms from fSumx and fSumx2 arrays 165 165 const Int_t n = GetNumExecutions(); … … 167 167 168 168 for(Int_t i=0; i<npix; i++) 169 169 { 170 170 const Float_t sum = fSumx[i]; 171 171 const Float_t sum2 = fSumx2[i]; 172 172 173 173 const Float_t photped = sum/n; 174 174 const Float_t photrms = TMath::Sqrt((sum2-sum*sum/n)/(n-1.)); 175 175 176 (*fPedestals)[i].Set(photped,photrms); 177 178 176 (*fPedestals)[i].Set(photped,photrms); 177 } 178 179 179 return kTRUE; 180 180 } -
trunk/MagicSoft/Mars/mcalib/MCalibrationChargeCalc.cc
r3353 r3374 164 164 if (!fRawEvt) 165 165 { 166 *fLog << err << dbginf <<"MRawEvtData not found... aborting." << endl;166 *fLog << err << "MRawEvtData not found... aborting." << endl; 167 167 return kFALSE; 168 168 } … … 170 170 const MRawRunHeader *runheader = (MRawRunHeader*)pList->FindObject("MRawRunHeader"); 171 171 if (!runheader) 172 *fLog << warn << dbginf <<"Warning - cannot check file type, MRawRunHeader not found." << endl;172 *fLog << warn << "Warning - cannot check file type, MRawRunHeader not found." << endl; 173 173 else 174 if (runheader->GetRunType() == kRTMonteCarlo) 175 { 174 if (runheader->IsMonteCarloRun()) 176 175 return kTRUE; 177 }178 176 179 177 fCam = (MCalibrationChargeCam*)pList->FindCreateObj("MCalibrationChargeCam"); 180 178 if (!fCam) 181 { 182 *fLog << err << dbginf << "MCalibrationChargeCam could not be created ... aborting." << endl; 183 return kFALSE; 184 } 179 return kFALSE; 185 180 186 181 fPINDiode = (MCalibrationChargePINDiode*)pList->FindCreateObj("MCalibrationChargePINDiode"); 187 182 if (!fPINDiode) 188 { 189 *fLog << err << dbginf << "MCalibrationChargePINDiode could not be created ... aborting." << endl; 190 return kFALSE; 191 } 183 return kFALSE; 192 184 193 185 fCam->SetPINDiode(fPINDiode); … … 195 187 fBlindPixel = (MCalibrationChargeBlindPix*)pList->FindCreateObj("MCalibrationChargeBlindPix"); 196 188 if (!fBlindPixel) 197 { 198 *fLog << err << dbginf << "MCalibrationChargeBlindPix could not be created ... aborting." << endl; 199 return kFALSE; 200 } 189 return kFALSE; 201 190 202 191 fCam->SetBlindPixel(fBlindPixel); 203 192 204 fEvtTime 193 fEvtTime = (MTime*)pList->FindObject("MTime"); 205 194 206 195 fPedestals = (MPedestalCam*)pList->FindObject("MPedestalCam"); 207 196 if (!fPedestals) 208 { 209 *fLog << err << dbginf << "Cannot find MPedestalCam ... aborting" << endl; 210 return kFALSE; 211 } 212 197 { 198 *fLog << err << "MPedestalCam not found... aborting" << endl; 199 return kFALSE; 200 } 213 201 214 202 fSignals = (MExtractedSignalCam*)pList->FindObject("MExtractedSignalCam"); 215 203 if (!fSignals) 216 217 *fLog << err << dbginf << "Cannot find MExtractedSignalCam... aborting" << endl;218 return kFALSE; 219 204 { 205 *fLog << err << "MExtractedSignalCam not found... aborting" << endl; 206 return kFALSE; 207 } 220 208 221 209 return kTRUE; … … 230 218 Bool_t MCalibrationChargeCalc::ReInit(MParList *pList ) 231 219 { 232 233 220 fRunHeader = (MRawRunHeader*)pList->FindObject("MRawRunHeader"); 234 221 if (!fRunHeader) 235 222 { 236 *fLog << err << dbginf << ":MRawRunHeader not found... aborting." << endl;223 *fLog << err << "MRawRunHeader not found... aborting." << endl; 237 224 return kFALSE; 238 225 } 239 240 226 241 227 fGeom = (MGeomCam*)pList->FindObject("MGeomCam"); 242 228 if (!fGeom) 243 229 { 244 *fLog << err << GetDescriptor() << ":No MGeomCam found... aborting." << endl;245 return kFALSE;230 *fLog << err << "No MGeomCam found... aborting." << endl; 231 return kFALSE; 246 232 } 247 233 … … 255 241 256 242 for (UInt_t i=0; i<npixels; i++) 257 { 258 243 { 259 244 MCalibrationChargePix &pix = (*fCam)[i]; 260 245 pix.DefinePixId(i); … … 264 249 pix.SetAbsTimeBordersLoGain(fSignals->GetFirstUsedSliceLoGain(), 265 250 fSignals->GetLastUsedSliceLoGain()); 266 267 } 251 } 268 252 253 if (fExcludedPixelsFile.IsNull()) 254 return kTRUE; 255 269 256 // 270 257 // Look for file to exclude pixels from analysis 271 258 // 272 if (!fExcludedPixelsFile.IsNull()) 273 { 274 275 fExcludedPixelsFile = gSystem->ExpandPathName(fExcludedPixelsFile.Data()); 276 259 gSystem->ExpandPathName(fExcludedPixelsFile); 260 261 // 262 // Initialize reading the file 263 // 264 ifstream in(fExcludedPixelsFile); 265 if (!in) 266 { 267 *fLog << warn << "Cannot open file '" << fExcludedPixelsFile << "'" << endl; 268 return kTRUE; 269 } 270 271 *fLog << inf << "Use excluded pixels from file: '" << fExcludedPixelsFile << "'" << endl; 272 273 // 274 // Read the file and count the number of entries 275 // 276 UInt_t pixel = 0; 277 278 while (++fNumExcludedPixels) 279 { 280 in >> pixel; 281 if (!in) 282 break; 283 277 284 // 278 // Initialize reading the file285 // Check for out of range 279 286 // 280 ifstream in(fExcludedPixelsFile.Data(),ios::in); 281 282 if (in) 283 { 284 *fLog << inf << "Use excluded pixels from file: '" << fExcludedPixelsFile.Data() << "'" << endl; 285 // 286 // Read the file and count the number of entries 287 // 288 UInt_t pixel = 0; 289 290 while (++fNumExcludedPixels) 291 { 292 293 in >> pixel; 294 295 if (!in.good()) 296 break; 297 // 298 // Check for out of range 299 // 300 if (pixel > npixels) 301 { 302 *fLog << warn << "WARNING: To be excluded pixel: " << pixel 303 << " is out of range " << endl; 304 continue; 305 } 306 // 307 // Exclude pixel 308 // 309 MCalibrationChargePix &pix = (*fCam)[pixel]; 310 pix.SetExcluded(); 311 312 *fLog << GetDescriptor() << inf << ": Exclude Pixel: " << pixel << endl; 313 314 } 315 316 if (--fNumExcludedPixels == 0) 317 *fLog << warn << "WARNING: File '" << fExcludedPixelsFile.Data() 318 << "'" << " is empty " << endl; 319 else 320 fCam->SetNumPixelsExcluded(fNumExcludedPixels); 321 322 } 323 else 324 *fLog << warn << dbginf << "Cannot open file '" << fExcludedPixelsFile.Data() << "'" << endl; 325 } 326 287 if (pixel > npixels) 288 { 289 *fLog << warn << "WARNING: To be excluded pixel: " << pixel << " is out of range " << endl; 290 continue; 291 } 292 // 293 // Exclude pixel 294 // 295 MCalibrationChargePix &pix = (*fCam)[pixel]; 296 pix.SetExcluded(); 297 298 *fLog << GetDescriptor() << inf << ": Exclude Pixel: " << pixel << endl; 299 300 } 301 302 if (--fNumExcludedPixels == 0) 303 *fLog << warn << "WARNING: File '" << fExcludedPixelsFile << "'" << " is empty " << endl; 304 else 305 fCam->SetNumPixelsExcluded(fNumExcludedPixels); 306 327 307 return kTRUE; 328 308 } … … 513 493 return kTRUE; 514 494 } 515 516 517 518 519 520 521 -
trunk/MagicSoft/Mars/mcalib/MMcCalibrationCalc.cc
r3265 r3374 87 87 } 88 88 89 return run-> GetRunType() == kRTMonteCarlo;89 return run->IsMonteCarloRun(); 90 90 } 91 91 -
trunk/MagicSoft/Mars/mpointing/MPointingPosCalc.cc
r2601 r3374 80 80 switch (fRunType) 81 81 { 82 case kRTData:82 case MRawRunHeader::kRTData: 83 83 fReport = (MReportDrive*)plist->FindObject("MReportDrive"); 84 84 if (!fReport) … … 89 89 return kTRUE; 90 90 91 case kRTMonteCarlo:91 case MRawRunHeader::kRTMonteCarlo: 92 92 fMcEvt = (MMcEvt*)plist->FindObject("MMcEvt"); 93 93 if (!fMcEvt) … … 98 98 return kTRUE; 99 99 100 case kRTPedestal:100 case MRawRunHeader::kRTPedestal: 101 101 *fLog << err << "Cannot work in a pedestal Run!... aborting." << endl; 102 102 return kFALSE; 103 103 104 case kRTCalibration:104 case MRawRunHeader::kRTCalibration: 105 105 *fLog << err << "Cannot work in a calibration Run!... aborting." << endl; 106 106 return kFALSE; … … 132 132 switch (fRunType) 133 133 { 134 case kRTData:134 case MRawRunHeader::kRTData: 135 135 fPosition->SetLocalPosition(fReport->GetNominalZd(), fReport->GetNominalAz()); 136 136 return kTRUE; 137 137 138 case kRTMonteCarlo:138 case MRawRunHeader::kRTMonteCarlo: 139 139 fPosition->SetLocalPosition(fMcEvt->GetTelescopeTheta()*TMath::RadToDeg(), fMcEvt->GetTelescopePhi()*TMath::RadToDeg()); 140 140 return kTRUE; -
trunk/MagicSoft/Mars/mraw/MRawEvtHeader.h
r3338 r3374 14 14 class MRawRunHeader; 15 15 16 //17 // Trigger Type (TT)18 //19 enum {20 kTTEvent = 0,21 kTTPedestal = 1,22 kTTCalibration = 223 };24 25 16 class MRawEvtHeader : public MParContainer 26 17 { 18 public: 19 // 20 // Trigger Type (TT) 21 // 22 enum { 23 kTTEvent = 0, 24 kTTPedestal = 1, 25 kTTCalibration = 2 26 }; 27 27 28 private: 28 29 MTime *fTime; //! object to store the time in (ReadEvt) -
trunk/MagicSoft/Mars/mraw/MRawFileWrite.cc
r3183 r3374 247 247 switch (type) 248 248 { 249 case kTTEvent:249 case MRawEvtHeader::kTTEvent: 250 250 fTData->Fill(); 251 251 return kTRUE; 252 252 253 case kTTPedestal:253 case MRawEvtHeader::kTTPedestal: 254 254 fTPedestal->Fill(); 255 255 return kTRUE; 256 256 257 case kTTCalibration:257 case MRawEvtHeader::kTTCalibration: 258 258 fTCalibration->Fill(); 259 259 return kTRUE; -
trunk/MagicSoft/Mars/mraw/MRawRunHeader.cc
r3183 r3374 61 61 using namespace std; 62 62 63 const UShort_t MRawRunHeader::kMagicNumber = 0xc0c0; 64 const Byte_t MRawRunHeader::kMaxFormatVersion = 3; 65 63 66 // -------------------------------------------------------------------------- 64 67 // -
trunk/MagicSoft/Mars/mraw/MRawRunHeader.h
r3183 r3374 14 14 class MArrayS; 15 15 16 //17 // Magic number to detect the magic file type18 //19 const UShort_t kMagicNumber = 0xc0c0;20 const Byte_t kMaxFormatVersion = 3;21 22 //23 // enum for the Run Type. Monte Carlo Runs have24 // to have a value greater than 255 (>0xff)25 //26 enum {27 kRTData = 0x0000,28 kRTPedestal = 0x0001,29 kRTCalibration = 0x0002,30 kRTMonteCarlo = 0x0100,31 kRTNone = 0xffff32 };33 34 16 class MRawRunHeader : public MParContainer 35 17 { 18 public: 19 // 20 // enum for the Run Type. Monte Carlo Runs have 21 // to have a value greater than 255 (>0xff) 22 // 23 enum { 24 kRTData = 0x0000, 25 kRTPedestal = 0x0001, 26 kRTCalibration = 0x0002, 27 kRTMonteCarlo = 0x0100, 28 kRTNone = 0xffff 29 }; 30 31 // 32 // Magic number to detect the magic file type 33 // 34 static const UShort_t kMagicNumber; 35 static const Byte_t kMaxFormatVersion; 36 36 37 private: 37 38 /* ---- Run Header Informations ---- */ … … 105 106 Int_t GetNumTotalBytes() const; 106 107 108 Bool_t IsMonteCarloRun() const { return fRunType>0x00ff; } 109 107 110 void Print(Option_t *t=NULL) const; 108 111
Note:
See TracChangeset
for help on using the changeset viewer.