- Timestamp:
- 01/06/09 13:07:00 (16 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 14 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r9211 r9212 29 29 - added AddClipped 30 30 31 * mbase/MMath.[h,cc]: 32 - implemented ReSort 33 34 * mcorsika/MCorsikaEvtHeader.cc: 35 - removed obsolete comments 36 37 * mcorsika/MCorsikaRead.cc: 38 - cosmetics 39 40 * mcorsika/MCorsikaRunHeader.[h,cc]: 41 - added comments about file contents 42 - added fWavelengthMin/Max 43 44 * mextralgo/MExtralgoSpline.[h,cc]: 45 - renamed SearchY to SearchYdn 46 - fixed a problem in SearchYup (must be ++i instead of i++) 47 (this is relatively unimportant because it was only used 48 in the determination of the pulse width which we never 49 really used) 50 - added a sanity/range-check to SearchYup and SearchYdn 51 - added a comment 52 - changed the order of arguments in EvalDeriv1 53 - changed the order of arguments in EvalDeriv2 54 - accelerated EvalDeriv1 (one multiplication less) 55 - added Deriv1 function 56 - made SearchYup and SearchYdn public 57 58 * mjobs/MDataSet.cc: 59 - removed an obsolete return statement 60 61 * mraw/MRawEvtData.[h,cc]: 62 - changed pointer in AddPixel to reference 63 - added a Set function 64 65 * mraw/MRawRunHeader.[h,cc]: 66 - added a lot of fixes for wrong run numbers written by Arehucas 67 - added a fix for strange file numbers written by Arehucas 68 - added functions as monta carlo interface to set contents 69 70 * msignal/MSignalCam.cc: 71 - defined a case 9 72 31 73 32 74 -
trunk/MagicSoft/Mars/NEWS
r9186 r9212 61 61 62 62 * Now allows to merpp files newer than 2008/09/03. 63 64 * Added fixes for wrong (wrong or double) run- and file-numbers 65 written by Arehucas. For deatils see MRawRunHeader::FixRunNumbers 63 66 64 67 ;callisto -
trunk/MagicSoft/Mars/mcorsika/MCorsikaEvtHeader.cc
r9186 r9212 140 140 fin.seekg(1088-273*4, ios::cur); 141 141 142 // f[76] Cherenkov flag:143 // bit(1) : CERENKOV option compiled in144 // bit(2) : IACT option compiled in145 // bit(3) : CEFFIC option compiled in146 // bit(4) : ATMEXT option compiled in147 // bit(5) : ATMEXT option used with refaction enabled148 // bit(6) : VOLUMEDET option compiled in149 // bit(7) : CURVED option compiled in150 // bit(9) : SLATN option compiled in151 // 11-21 : table number for externam athmosphere (but<1024)152 // f[78] Curved athmosphere? (0=flat, 1=curved)153 154 // f[80] lower edge of theta in °155 // f[81] upper edge of theta in °156 // f[82] lower edge of phi in °157 // f[83] upper edge of phi in °158 // f[84] cherenkov bunch size159 160 // f[93] flag for additinal muon information of particle output file161 162 // f[95] Cherenkov bandwidth lower end in nm163 // f[96] Cherenkov bandwidth upper end in nm164 165 // f[97] Numbr i of uses of each cherenkov event166 // f[145] Muon multiple scattering flag167 // f[152] !! inner angle of view cone (°)168 // f[153] !! outer angle of view cone (°)169 // f[156] altitude of horizontal shower axis170 171 142 return !fin.eof(); 172 143 } -
trunk/MagicSoft/Mars/mcorsika/MCorsikaRead.cc
r9186 r9212 452 452 return rc; 453 453 } 454 return kTRUE; 454 return kTRUE; 455 455 } 456 456 -
trunk/MagicSoft/Mars/mcorsika/MCorsikaRunHeader.cc
r9186 r9212 172 172 // -------------------- Read first event header ------------------- 173 173 174 // f[76] Cherenkov flag: 175 // bit(1) : CERENKOV option compiled in 176 // bit(2) : IACT option compiled in 177 // bit(3) : CEFFIC option compiled in 178 // bit(4) : ATMEXT option compiled in 179 // bit(5) : ATMEXT option used with refaction enabled 180 // bit(6) : VOLUMEDET option compiled in 181 // bit(7) : CURVED option compiled in 182 // bit(9) : SLATN option compiled in 183 // 11-21 : table number for externam athmosphere (but<1024) 184 // f[78] Curved athmosphere? (0=flat, 1=curved) 185 186 // f[80] lower edge of theta in ° 187 // f[81] upper edge of theta in ° 188 // f[82] lower edge of phi in ° 189 // f[83] upper edge of phi in ° 190 // f[84] cherenkov bunch size 191 192 // f[93] flag for additinal muon information of particle output file 193 194 // f[95] Cherenkov bandwidth lower end in nm 195 // f[96] Cherenkov bandwidth upper end in nm 196 197 // f[97] Numbr i of uses of each cherenkov event 198 // f[145] Muon multiple scattering flag 199 // f[152] !! inner angle of view cone (°) 200 // f[153] !! outer angle of view cone (°) 201 // f[156] altitude of horizontal shower axis 202 174 203 char evth[4]; 175 204 fin.read(evth, 4); … … 200 229 fAzMin = 180-g[81]; 201 230 fAzMax = 180-g[82]; 231 232 fWavelengthMin = g[95]; 233 fWavelengthMax = g[96]; 202 234 203 235 fViewConeInnerAngle = g[151]; -
trunk/MagicSoft/Mars/mcorsika/MCorsikaRunHeader.h
r9186 r9212 33 33 Float_t fAzMax; // [rad] Azimuth (north=0; west=90) 34 34 35 Float_t fWavelengthMin; // [nm] Wavelength bandwidth lo edge 36 Float_t fWavelengthMax; // [nm] Wavelength bandwidth up edge 37 35 38 //Float_t fImpactMax; // [cm] Maximum simulated impact 36 39 … … 50 53 Float_t GetAzMax() const { return fAzMax; } 51 54 55 Float_t GetWavelengthMin() const { return fWavelengthMin; } 56 Float_t GetWavelengthMax() const { return fWavelengthMax; } 57 52 58 //Float_t GetImpactMax() const { return fImpactMax; } 53 59 -
trunk/MagicSoft/Mars/mextralgo/MExtralgoSpline.cc
r8795 r9212 18 18 ! Author(s): Markus Gaug 09/2004 <mailto:markus@ifae.es> 19 19 ! 20 ! Copyright: MAGIC Software Development, 2002-200 720 ! Copyright: MAGIC Software Development, 2002-2008 21 21 ! 22 22 ! … … 47 47 // (Note that the variables fDer are not real first derivative coefficients.) 48 48 // 49 // Note, this spline is not optimized to be evaluated many many times, but 50 // it is optimized to be initialized very fast with new values again and 51 // again. 52 // 49 53 ////////////////////////////////////////////////////////////////////////////// 50 54 #include "MExtralgoSpline.h" … … 179 183 // at x, until x==0. If y is not found -2 is returned. 180 184 // 181 Double_t MExtralgoSpline::SearchY (Float_t x, Float_t y) const185 Double_t MExtralgoSpline::SearchYdn(Float_t x, Float_t y) const 182 186 { 183 187 if (x>=fNum-1) … … 185 189 186 190 Int_t i = TMath::FloorNint(x); 191 if (i<0) 192 return -2; 193 187 194 Double_t rc = FindY(i, kTRUE, y, 0, x-i); 188 195 while (--i>=0 && rc<0) … … 198 205 199 206 Int_t i = TMath::FloorNint(x); 207 if (i>fNum-2) 208 return -2; 209 200 210 Double_t rc = FindY(i, kFALSE, y, x-i, 1.); 201 while ( i++<fNum-1 && rc<0)211 while (++i<fNum-1 && rc<0) 202 212 rc = FindY(i, kFALSE, y); 203 213 … … 287 297 // Search downwards for fHeight/2 288 298 // By doing also a search upwards we could extract the pulse width 289 fTime = SearchY (maxpos, h);299 fTime = SearchYdn(maxpos, h); 290 300 fTimeDev = 0; 291 301 if (width) -
trunk/MagicSoft/Mars/mextralgo/MExtralgoSpline.h
r8928 r9212 58 58 59 59 // Evaluate first derivative of spline in the interval i with x=[0;1[ 60 inline Double_t EvalDeriv1(const Float_t x, const Int_t i) const60 inline Double_t EvalDeriv1(const Int_t i, const Float_t x) const 61 61 { 62 62 // x := [0; 1[ … … 64 64 const Double_t difder = fDer2[i+1]-fDer2[i]; 65 65 66 return 3*difder*x*x + 6*fDer2[i]*x - 2*fDer2[i] - fDer2[i+1] + difval; 66 //return 3*difder*x*x + 6*fDer2[i]*x - 2*fDer2[i] - fDer2[i+1] + difval; 67 return 3*difder*x*x + (6*x - 2)*fDer2[i] - fDer2[i+1] + difval; 67 68 } 68 69 69 70 // Evaluate second derivative of spline in the interval i with x=[0;1[ 70 inline Double_t EvalDeriv2(const Float_t x, const Int_t i) const71 inline Double_t EvalDeriv2(const Int_t i, const Float_t x) const 71 72 { 72 73 // x := [0; 1[ … … 75 76 76 77 Double_t FindY(Int_t i, Bool_t downwards, Double_t y=0, Double_t min=0, Double_t max=1) const; 77 Double_t SearchY(Float_t maxpos, Float_t y) const;78 Double_t SearchYup(Float_t maxpos, Float_t y) const;79 78 80 79 Int_t EvalDerivEq0(const Int_t i, Double_t &x1, Double_t &x2) const; … … 141 140 142 141 // Calculate the intgeral of the Eval-function in 143 // bin i from a=[0;1[ to b=[0;1[142 // bin i from 0 <= a < b < 1 144 143 inline Double_t EvalInteg(Int_t i, Float_t a, Float_t b) const 145 144 { … … 268 267 return kFALSE; 269 268 270 const Bool_t ismax1 = x1>=min && x1<max && EvalDeriv2( x1, i)<0;271 const Bool_t ismax2 = x2>=min && x2<max && EvalDeriv2( x2, i)<0;269 const Bool_t ismax1 = x1>=min && x1<max && EvalDeriv2(i, x1)<0; 270 const Bool_t ismax2 = x2>=min && x2<max && EvalDeriv2(i, x2)<0; 272 271 273 272 if (!ismax1 && !ismax2) … … 323 322 324 323 Float_t EvalAt(const Float_t x) const; 324 Float_t Deriv1(const Float_t x) const; 325 326 Double_t SearchYdn(Float_t maxpos, Float_t y) const; 327 Double_t SearchYup(Float_t maxpos, Float_t y) const; 328 329 Double_t SearchYdn(Float_t y) const { return SearchYdn(fNum, y); } 330 Double_t SearchYup(Float_t y) const { return SearchYup(0, y); } 325 331 }; 326 332 … … 335 341 } 336 342 343 inline Float_t MExtralgoSpline::Deriv1(const Float_t x) const 344 { 345 Int_t i = TMath::FloorNint(x); 346 Float_t f = x-i; 347 348 Align(i, f); 349 350 return EvalDeriv1(i, f); 351 } 352 337 353 #endif -
trunk/MagicSoft/Mars/mjobs/MDataSet.cc
r9186 r9212 473 473 } 474 474 475 476 475 // -------------------------------------------------------------------------- 477 476 // … … 578 577 while ((seq=(MSequence*)NextOff())) 579 578 PrintFile(out, *seq); 580 581 return;582 579 } 583 580 } -
trunk/MagicSoft/Mars/mraw/MRawEvtData.cc
r8938 r9212 91 91 #include "MArrayS.h" 92 92 #include "MArrayB.h" 93 #include "MArrayI.h" 93 94 #include "MGeomCam.h" 94 95 … … 396 397 // The parameters are the pixelnumber and the FADC_SLICES values of ADCs 397 398 // 398 void MRawEvtData::AddPixel(UShort_t nOfPixel, TArrayC *data)399 void MRawEvtData::AddPixel(UShort_t nOfPixel, const TArrayC &data) 399 400 { 400 401 const Int_t n = fRunHeader->GetNumSamples(); 401 if (data ->GetSize()!=n)402 if (data.GetSize()!=n) 402 403 { 403 404 *fLog << err << "RawEvtData::AddPixel: Error, number of samples in "; 404 *fLog << "TArrayC " << data ->GetSize() << " doesn't match current number " << n << endl;405 *fLog << "TArrayC " << data.GetSize() << " doesn't match current number " << n << endl; 405 406 return; 406 407 } … … 424 425 // add the new slices as last entries to array 425 426 // 426 fHiGainFadcSamples->AddAt((Byte_t*)data->GetArray(), fHiGainFadcSamples->GetSize()-n, n); 427 } 427 fHiGainFadcSamples->AddAt((Byte_t*)data.GetArray(), fHiGainFadcSamples->GetSize()-n, n); 428 } 429 430 // -------------------------------------------------------------------------- 431 // 432 // Add the contents of the MArrayI to the fHiGainFadcSamples 433 // One Integer is added to one sample in the array. 434 // 435 void MRawEvtData::Set(const MArrayI &data) 436 { 437 const UInt_t n = fRunHeader->GetNumSamples()*fConnectedPixels; 438 439 Byte_t *dest = fHiGainFadcSamples->GetArray(); 440 441 UInt_t *src = reinterpret_cast<UInt_t*>(data.GetArray()); 442 UInt_t *end = reinterpret_cast<UInt_t*>(data.GetArray()) + n; 443 444 switch (fNumBytesPerSample) 445 { 446 case 1: 447 { 448 Byte_t *ptr = reinterpret_cast<Byte_t*>(dest); 449 while (src<end) 450 *ptr++ = *src++; 451 } 452 return; 453 454 case 2: 455 { 456 UShort_t *ptr = reinterpret_cast<UShort_t*>(dest); 457 while (src<end) 458 *ptr++ = *src++; 459 } 460 return; 461 462 case 4: 463 memcpy(dest, data.GetArray(), n*4); 464 return; 465 } 466 } 467 428 468 /* 429 469 void MRawEvtData::AddPixel(UShort_t nOfPixel, TArrayC *data, Bool_t lflag) -
trunk/MagicSoft/Mars/mraw/MRawEvtData.h
r8938 r9212 19 19 class MArrayS; 20 20 class MArrayB; 21 class MArrayI; 21 22 22 23 class MRawEvtData : public MParContainer, public MCamEvent … … 51 52 case 1: return reinterpret_cast<const Byte_t*>(ptr)[n]; 52 53 case 2: return reinterpret_cast<const UShort_t*>(ptr)[n]; 53 case 3: return reinterpret_cast<const UInt_t*>(ptr)[n];54 case 4: return reinterpret_cast<const UInt_t*>(ptr)[n]; 54 55 } 55 56 return 0; … … 74 75 75 76 void ResetPixels(UShort_t npix, UShort_t maxid); 76 void AddPixel(UShort_t nOfPixel, TArrayC *data); 77 void AddPixel(UShort_t nOfPixel, const TArrayC &data); 78 void Set(const MArrayI &data); 77 79 78 80 UShort_t GetNumHiGainSamples() const; -
trunk/MagicSoft/Mars/mraw/MRawRunHeader.cc
r9180 r9212 181 181 // the default. Do not mix files with and without a value if the 182 182 // files with the value do not match the default! 183 fFormatVersion= 0;183 fFormatVersion=11; 184 184 fSoftVersion=0; 185 185 fTelescopeNumber=1; … … 351 351 } 352 352 return kTRUE; 353 } 354 355 void MRawRunHeader::FixRunNumbers() 356 { 357 if (fFormatVersion<11 || fTelescopeNumber!=1) 358 return; 359 360 // Map 1:1001349 to 47:1001395 361 if (fRunNumber<48 && 362 fRunStart.GetMjd()>54674.5 && fRunStart.GetMjd()<56476.5) 363 { 364 fRunNumber += 1001348; 365 *fLog << warn << "Format >V10: Wrong run number increased by 1001348 to " << fRunNumber << "." << endl; 366 } 367 368 // Map 1001916:1001922 to 1002349:1002355 369 if (fRunNumber>1001915 && fRunNumber<1001923 && 370 fRunStart.GetMjd()>54710.5 && fRunStart.GetMjd()<54711.5) 371 { 372 fRunNumber += 433; 373 *fLog << warn << "Format >V10: Wrong run number increased by 434 to " << fRunNumber << "." << endl; 374 } 375 376 // Map 10000342:1000343 to 10000351:1000351 377 if (fRunNumber>10000342 && fRunNumber<10000352 && 378 fRunStart.GetMjd()>54254.5 && fRunStart.GetMjd()<54255.5) 379 { 380 fRunNumber -= 9000000; 381 *fLog << warn << "Format >V10: Wrong run number decreased by 9000000 to " << fRunNumber << "." << endl; 382 } 383 384 if (fRunNumber==1000382 && 385 fRunStart.GetMjd()>54256.5 && fRunStart.GetMjd()<54257.5 && 386 !strcmp(fSourceName, "GRB080605-2347")) 387 { 388 fFileNumber += 99; 389 *fLog << warn << "Format >V10: Ambiguous file number increased by 99 to " << fFileNumber << "." << endl; 390 } 353 391 } 354 392 … … 492 530 Bool_t MRawRunHeader::Fixes() 493 531 { 532 FixRunNumbers(); 533 494 534 if (fFormatVersion>8 && fRunNumber>326152 && fTelescopeNumber==1) 495 535 { … … 497 537 fNumEventsRead--; 498 538 *fLog << inf << "Format >V8 and Run>M1:326152: Stored number of events decreased by 1." << endl; 499 }500 501 if (fFormatVersion>10 && fRunNumber<48 &&502 fRunStart.GetMjd()>54674.5 && fRunStart.GetMjd()<56476.5)503 {504 fRunNumber += 1001348;505 *fLog << warn << "Format >V10: Wrong run number increased by 1001348 to " << fRunNumber << "." << endl;506 539 } 507 540 … … 760 793 return IsConsistent(); 761 794 } 762 795 /* 796 Bool_t MRawRunHeader::WriteEvt(ostream& out) const 797 { 798 // 799 // write one RUN HEADER from the input stream 800 // 801 const UInt_t n = fNumCrates*fNumPixInCrate; 802 803 const UShort_t magicnumber = kMagicNumber; 804 const UInt_t formatversion = 11; 805 const UInt_t headersizerun = (97+n)*4; //??? 806 807 // FIXME: Write fixed number (c0c0) 808 out.write((char*)&magicnumber, 2); // Total=2 809 out.write((char*)&formatversion, 2); // Total=4 810 out.write((char*)&formatversion, 4); 811 out.write((char*)&headersizerun, 4); 812 813 TArrayC h(headersizerun-12); 814 815 // ----- convert ----- 816 Byte_t *Char = reinterpret_cast<Byte_t* >(h.GetArray()); 817 UInt_t *Int = reinterpret_cast<UInt_t* >(h.GetArray()); 818 //const Float_t *Float = reinterpret_cast<Float_t*>(h.GetArray()); 819 820 // ----- Start interpretation ----- 821 822 Int[0] = 0; // fHeaderSizeEvt; 823 Int[1] = 0; // fHeaderSizeCrate; 824 Int[2] = 0; // fSoftVersion; 825 Int[3] = fFadcType; 826 Int[4] = fCameraVersion; 827 Int[5] = fTelescopeNumber; 828 Int[5] = fRunType; 829 Int[6] = fRunNumber; 830 Int[7] = fFileNumber; 831 832 memcpy(Char+ 36, fProjectName, 100); // 25 833 memcpy(Char+136, fSourceName, 80); // 20 834 memcpy(Char+216, fObservationMode, 60); // 15 835 836 //F32 fSourceRA = Float[69]; 837 //F32 fSourceDEC = Float[70]; 838 //F32 fTelescopeRA = Float[71]; 839 //F32 fTelescopeDEC = Float[72]; 840 841 memcpy(Char+232, fSourceEpochChar, 4); 842 843 Int[74] = fSourceEpochDate; 844 Int[75] = fNumCrates; 845 Int[76] = fNumPixInCrate; 846 Int[77] = fNumSamplesHiGain; 847 848 //fNumSamplesRemovedHead = Int[78]; 849 //fNumSamplesRemovedTail = Int[79]; 850 851 Int[80] = fNumEvents; 852 Int[81] = fNumEvents; //fNumEventsRead; 853 Int[82] = fNumBytesPerSample; 854 Int[83] = fSamplingFrequency; 855 Int[84] = fFadcResolution; 856 857 fRunStart.GetBinary(Int+85); 858 fRunStop.GetBinary(Int+91); 859 860 // ----- 388 bytes so far ----- 861 862 //const UInt_t n = fNumCrates*fNumPixInCrate; 863 //if (fHeaderSizeRun<(97+n)*4) 864 //{ 865 // *fLog << err << "ERROR - Event header too small to contain pix assignment." << endl; 866 // return kFALSE; 867 //} 868 869 // ----- Pixel Assignment ----- 870 for (UInt_t i=0; i<n; i++) 871 Int[97+i] = (*fPixAssignment)[i]; 872 873 out.write(h.GetArray(), h.GetSize()); 874 875 return out; 876 } 877 */ 763 878 // -------------------------------------------------------------------------- 764 879 // … … 990 1105 return 0; 991 1106 } 1107 1108 // -------------------------------------------------------------------------- 1109 // 1110 // Monte Carlo Interface 1111 // 1112 // This is a (prelimiary) way to setup an existing FADC system. 1113 // 1114 // 1: Siegen FADCs 1115 // 2: MUX FADCs 1116 // 1117 void MRawRunHeader::InitFadcType(UShort_t type) 1118 { 1119 switch (type) 1120 { 1121 case 1: 1122 fNumSamplesLoGain = 15; 1123 fNumSamplesHiGain = 15; 1124 fNumBytesPerSample = 1; // number of bytes per sample 1125 fSamplingFrequency = 300; // Sampling Frequency [MHz] 1126 fFadcResolution = 8; // number of significant bits 1127 break; 1128 case 2: 1129 fNumSamplesLoGain = 0; 1130 fNumSamplesHiGain = 50; 1131 fNumBytesPerSample = 2; // number of bytes per sample 1132 fSamplingFrequency = 2000; // Sampling Frequency [MHz] 1133 fFadcResolution = 12; // number of significant bits 1134 break; 1135 } 1136 1137 fFadcType = type; 1138 } 1139 1140 // -------------------------------------------------------------------------- 1141 // 1142 // Monte Carlo Interface 1143 // 1144 // Init a camera 1145 // 1146 void MRawRunHeader::InitCamera(UShort_t type) 1147 { 1148 switch (type) 1149 { 1150 case 1: 1151 fNumCrates = 1; 1152 fNumPixInCrate = 577; 1153 break; 1154 } 1155 1156 fCameraVersion = type; 1157 1158 const Int_t n = fNumCrates*fNumPixInCrate; 1159 1160 fPixAssignment->Set(n); 1161 1162 for (int i=0; i<n; i++) 1163 (*fPixAssignment)[i] = i; 1164 } 1165 1166 // -------------------------------------------------------------------------- 1167 // 1168 // Monte Carlo Interface 1169 // 1170 // Set run-type, telescope number, run-number and file-number 1171 // 1172 void MRawRunHeader::SetRunInfo(UShort_t type, UShort_t tel, UInt_t run, UInt_t file) 1173 { 1174 fRunType = type; 1175 fTelescopeNumber = tel; 1176 fRunNumber = run; 1177 fFileNumber = file; 1178 } 1179 1180 // -------------------------------------------------------------------------- 1181 // 1182 // Monte Carlo Interface 1183 // 1184 // Set source-name, epoch (default J) and date (default 2000) 1185 // 1186 void MRawRunHeader::SetSourceInfo(const char src[80], char epoch, UShort_t date) 1187 { 1188 memcpy(fSourceName, src, 80); 1189 1190 fSourceEpochChar[0] = epoch; // epoch char of the source 1191 fSourceEpochChar[1] = 0; // epoch char of the source 1192 1193 fSourceEpochDate = date; // epoch date of the source 1194 } 1195 1196 // -------------------------------------------------------------------------- 1197 // 1198 // Monte Carlo Interface 1199 // 1200 // Set run-start and -stop time 1201 // 1202 void MRawRunHeader::SetRunTime(const MTime &start, const MTime &end) 1203 { 1204 fRunStart = start; 1205 fRunStop = end; 1206 } 1207 1208 // -------------------------------------------------------------------------- 1209 // 1210 // Monte Carlo Interface 1211 // 1212 // Set project name and observation mode 1213 // 1214 void MRawRunHeader::SetObservation(const char mode[60], const char proj[100]) 1215 { 1216 memcpy(fProjectName, proj, 100); 1217 memcpy(fObservationMode, mode, 60); 1218 } 1219 1220 // -------------------------------------------------------------------------- 1221 // 1222 // Monte Carlo Interface 1223 // 1224 // Set number of events in file. 1225 // 1226 void MRawRunHeader::SetNumEvents(UInt_t num) 1227 { 1228 fNumEvents = num; 1229 fNumEventsRead = num; 1230 } -
trunk/MagicSoft/Mars/mraw/MRawRunHeader.h
r9180 r9212 72 72 73 73 Bool_t SwapAssignment(Short_t id0, Short_t id1); 74 void FixRunNumbers(); 74 75 Bool_t FixAssignment(); 75 76 Bool_t Fixes(); … … 83 84 84 85 // This is to be used in the MC chain only! 86 /* 85 87 void SetMagicNumber(UShort_t a) { fMagicNumber=a; } 86 88 void SetFormatVersion(UShort_t a) { fFormatVersion=a; } … … 96 98 void SetNumCrates(UShort_t a) { fNumCrates=a; } 97 99 void SetNumPixInCrate(UShort_t a) { fNumPixInCrate=a; } 98 void SetRunTime(Float_t start, Float_t stop) 99 { fRunStart.SetMjd(start); fRunStop.SetMjd(stop); } 100 */ 101 void InitFadcType(UShort_t type); 102 void InitCamera(UShort_t type); 103 void SetRunInfo(UShort_t type, UShort_t tel, UInt_t run, UInt_t file=0); 104 void SetSourceInfo(const char src[80], char epoch='J', UShort_t date=2000); 105 void SetRunTime(const MTime &start, const MTime &end); 106 void SetRunTimeMjd(Float_t start, Float_t stop) { fRunStart.SetMjd(start); fRunStop.SetMjd(stop); } 107 void SetObservation(const char mode[60], const char proj[100]); 108 void SetNumEvents(UInt_t num); 100 109 101 110 // This is to get the numbers... … … 153 162 154 163 Bool_t ReadEvt(istream& fin); 164 //Bool_t WriteEvt(ostream& fout) const; 155 165 156 166 ClassDef(MRawRunHeader, 10) // storage container for general info -
trunk/MagicSoft/Mars/msignal/MSignalCam.cc
r8528 r9212 648 648 */ 649 649 650 case 9: 650 651 default: 651 652 val = pix.GetNumPhotons()*ratio;
Note:
See TracChangeset
for help on using the changeset viewer.