Changeset 2136
- Timestamp:
- 05/23/03 18:25:35 (21 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 5 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r2135 r2136 42 42 * mreflector, mreflector/Makefile, mreflector/ReflectorLinkDef.h, 43 43 mreflector/MRflEvtData.[h,cc], mreflector/MRflSinglePhoton.[h,cc]: 44 mreflector/MRflEvtHeader.[h,cc], mreflector/MRflRunHeader.[h,cc]: 45 - added 46 47 * macros/readRfl.C: 44 48 - added 45 49 -
trunk/MagicSoft/Mars/mfileio/MCT1ReadPreProc.cc
r2134 r2136 914 914 // read in the number of cerenkov photons and add the 'new' pixel 915 915 // too the list with it's id, number of photons and error 916 //917 fNphot->InitSize(iMAXNUMPIX);918 919 916 // number of photoelectrons measured in each pixel only the 920 917 // actual number of pixels (outputpars.inumpixels) is written out 921 918 // short spixsig_10thphot[iMAXNUMPIX]; 922 // *fLog << "spixsig_10thphot : " << endl;919 // 923 920 for (Int_t i=0; i<iMAXNUMPIX; i++) 924 921 { 925 //*fLog << event.spixsig_10thphot[i] << " "; 926 927 // next 2 statements commented out by WW 928 //if (event.spixsig_10thphot[i]==0) 929 // continue; 922 // next 2 statements commented out by WW 923 //if (event.spixsig_10thphot[i]==0) 924 // continue; 930 925 931 926 fNphot->AddPixel(i, 0.1*event.spixsig_10thphot[i], 932 927 (*fPedest)[i].GetMeanRms()); 933 928 } 934 //*fLog << "" << endl; 935 929 fNphot->FixSize(); 936 930 fNphot->SetReadyToSave(); 937 931 -
trunk/MagicSoft/Mars/mfileio/MReadRflFile.cc
r2134 r2136 40 40 #include "MParList.h" 41 41 #include "MRflEvtData.h" 42 #include "MRflEvtHeader.h" 43 #include "MRflRunHeader.h" 42 44 43 45 #include "MLog.h" … … 69 71 RflEventHeader_old revth; 70 72 fIn->read(&revth, sizeof(RflEventHeader_old)); 73 fEvtHeader->SetEvtNumber(revth.EvtNumber); 74 // *fLog << "Event Number: " << revth.EvtNumber; 75 // *fLog << " Primary ID: " << revth.PrimaryID; 76 // *fLog << " Run Number: " << revth.RunNumber << endl; 71 77 return (bool)*fIn; 72 78 } 73 79 else 74 80 { 75 RflEventHeader revth_new; 76 fIn->read(&revth_new, sizeof(RflEventHeader)); 81 RflEventHeader revth; 82 fIn->read(&revth, sizeof(RflEventHeader)); 83 fEvtHeader->SetEvtNumber(revth.EvtNumber); 84 // *fLog << "Event Number: " << revth.EvtNumber; 85 // *fLog << " Primary ID: " << revth.PrimaryID; 86 // *fLog << " Run Number: " << revth.RunNumber << endl; 77 87 return (bool)*fIn; 78 88 } … … 84 94 kStartOfRun, 85 95 kEndOfRun, 86 kStartOfEvt ,87 kEndOfEvt ,96 kStartOfEvtData, 97 kEndOfEvtData, 88 98 kUndefined 89 99 }; … … 107 117 return kStartOfRun; 108 118 if (FlagIsA(flag, FLAG_END_OF_EVENT)) 109 return kEndOfEvt ;119 return kEndOfEvtData; 110 120 if (FlagIsA(flag, FLAG_START_OF_EVENT)) 111 return kStartOfEvt ;121 return kStartOfEvtData; 112 122 113 123 return kUndefined; … … 134 144 break; 135 145 136 MRflSinglePhoton &ph = fEvt ->GetNewPhoton();146 MRflSinglePhoton &ph = fEvtData->GetNewPhoton(); 137 147 ph.SetXY(data.x*10, data.y*10); 138 148 ph.SetCosUV(data.u, data.v); … … 142 152 } 143 153 144 fEvt ->FixSize();154 fEvtData->FixSize(); 145 155 return rc; 146 156 } … … 172 182 { 173 183 *fLog << inf << "FIXME: Call ReInit" << endl; 184 185 fRunHeader->SetRunNumber(rrunh.RunNumber); 186 *fLog << underline << "RunHeader:" << endl; 187 *fLog << " Run Number: " << rrunh.RunNumber << endl; 188 *fLog << " Date: " << rrunh.date << endl; 189 *fLog << " Corsika Ver.: " << rrunh.Corsika_version << endl; 190 174 191 break; 175 192 } … … 180 197 return kUndefined; 181 198 182 case kStartOfEvt :199 case kStartOfEvtData: 183 200 case kEndOfRun: 184 201 break; … … 217 234 continue; 218 235 219 case kStartOfEvt :236 case kStartOfEvtData: 220 237 break; 221 238 } … … 231 248 Bool_t MReadRflFile::PreProcess(MParList *plist) 232 249 { 233 fEvt=(MRflEvtData*)plist->FindCreateObj("MRflEvtData"); 234 if (!fEvt) 250 fEvtData=(MRflEvtData*)plist->FindCreateObj("MRflEvtData"); 251 if (!fEvtData) 252 return kFALSE; 253 254 fEvtHeader=(MRflEvtHeader*)plist->FindCreateObj("MRflEvtHeader"); 255 if (!fEvtHeader) 256 return kFALSE; 257 258 fRunHeader=(MRflRunHeader*)plist->FindCreateObj("MRflRunHeader"); 259 if (!fRunHeader) 235 260 return kFALSE; 236 261 … … 334 359 } 335 360 336 337 Bool_t MReadRflFile::PostProcess()338 {339 return kTRUE;340 }341 342 361 // -------------------------------------------------------------------------- 343 362 // … … 404 423 } 405 424 425 426 Bool_t MReadRflFile::SearchFor(Int_t runno, Int_t eventno) 427 { 428 if (!fEvtHeader) 429 return kFALSE; 430 431 fNumFile = 0; 432 if (!OpenNextFile()) 433 return kFALSE; 434 435 while (1) 436 { 437 fEvtData->Reset(); 438 if (!Process()) 439 return kFALSE; 440 441 if (fEvtHeader->GetEvtNumber()==eventno && 442 fRunHeader->GetRunNumber()==runno) 443 return kTRUE; 444 } 445 } -
trunk/MagicSoft/Mars/mfileio/MReadRflFile.h
r2134 r2136 12 12 class TList; 13 13 class MRflEvtData; 14 class MRflEvtHeader; 15 class MRflRunHeader; 14 16 15 17 class MReadRflFile : public MRead … … 19 21 TList *fFileNames; // Array which stores the \0-terminated filenames 20 22 21 MRflEvtData *fEvt; //! 23 MRflEvtData *fEvtData; //! 24 MRflEvtHeader *fEvtHeader; 25 MRflRunHeader *fRunHeader; 22 26 23 27 UInt_t fNumFile; … … 36 40 Bool_t PreProcess(MParList *pList); 37 41 Bool_t Process(); 38 Bool_t PostProcess();39 42 40 43 public: … … 50 53 UInt_t GetEntries() { return fEntries; } 51 54 55 Bool_t SearchFor(Int_t runno, Int_t eventno); 56 52 57 ClassDef(MReadRflFile, 0) // Reads reflector files 53 58 }; -
trunk/MagicSoft/Mars/mreflector/ReflectorLinkDef.h
r2135 r2136 6 6 7 7 #pragma link C++ class MRflEvtData+; 8 #pragma link C++ class MRflEvtHeader+; 9 #pragma link C++ class MRflRunHeader+; 8 10 #pragma link C++ class MRflSinglePhoton+; 9 11
Note:
See TracChangeset
for help on using the changeset viewer.