Changeset 7430 for trunk/MagicSoft/Mars/mfileio
- Timestamp:
- 11/25/05 14:47:57 (19 years ago)
- Location:
- trunk/MagicSoft/Mars/mfileio
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mfileio/MReadRflFile.cc
r4898 r7430 76 76 fIn->read((char*)&revth, sizeof(RflEventHeader_old)); 77 77 fEvtHeader->SetEvtNumber((int)revth.EvtNumber); 78 // *fLog << "Event Number: " << revth.EvtNumber;79 // *fLog << " Primary ID: " << revth.PrimaryID;80 // *fLog << " Run Number: " << revth.RunNumber << endl;81 return (bool)*fIn;82 78 } 83 79 else … … 86 82 fIn->read((char*)&revth, sizeof(RflEventHeader)); 87 83 fEvtHeader->SetEvtNumber((int)revth.EvtNumber); 88 // *fLog << "Event Number: " << revth.EvtNumber; 89 // *fLog << " Primary ID: " << revth.PrimaryID; 90 // *fLog << " Run Number: " << revth.RunNumber << endl; 91 return (bool)*fIn; 92 } 93 } 94 95 enum { 96 kError, 97 kEndOfFile, 98 kStartOfRun, 99 kEndOfRun, 100 kStartOfEvtData, 101 kEndOfEvtData, 102 kUndefined 103 }; 104 84 fEvtHeader->SetEnergy((int)revth.Etotal); 85 fEvtHeader->SetMomentum(revth.p[0], revth.p[1], revth.p[2]); 86 fEvtHeader->SetCorePosition(revth.CorePos[0][0], revth.CorePos[1][0]); 87 88 fEvtHeader->SetHeightFirstInt((Float_t)revth.zFirstInt); 89 90 fEvtHeader->SetPhi((Float_t)revth.telescopePhi); 91 fEvtHeader->SetTheta((Float_t)revth.telescopeTheta); 92 93 fEvtHeader->SetNmax((Float_t)revth.longi_Nmax); 94 fEvtHeader->SetT0((Float_t)revth.longi_t0); 95 fEvtHeader->SetTmax((Float_t)revth.longi_tmax); 96 fEvtHeader->SetChi2((Float_t)revth.longi_chi2); 97 98 fEvtHeader->SetEFraction((Float_t)revth.elec_cph_fraction); 99 fEvtHeader->SetMFraction((Float_t)revth.muon_cph_fraction); 100 fEvtHeader->SetOFraction((Float_t)revth.other_cph_fraction); 101 } 102 103 return (bool)*fIn; 104 } 105 105 106 106 int MReadRflFile::ReadFlag() … … 111 111 if (!fIn) 112 112 return kError; 113 114 //*fLog << "<" << TString(&flag[1], 11) << ">" <<endl;115 113 116 114 if (FlagIsA(flag, FLAG_END_OF_FILE)) -
trunk/MagicSoft/Mars/mfileio/MReadRflFile.h
r6499 r7430 18 18 { 19 19 private: 20 ifstream *fIn; // the inputfile 21 TList *fFileNames; // Array which stores the \0-terminated filenames 20 enum { 21 kError, 22 kEndOfFile, 23 kStartOfRun, 24 kEndOfRun, 25 kStartOfEvtData, 26 kEndOfEvtData, 27 kUndefined 28 }; 22 29 23 MRflEvtData *fEvtData; //! 24 MRflEvtHeader *fEvtHeader; 25 MRflRunHeader *fRunHeader; 30 ifstream *fIn; // the inputfile 31 TList *fFileNames; // Array which stores the \0-terminated filenames 26 32 27 UInt_t fNumFile; 28 UInt_t fEntries; // TO BE IMPLEMENTED 33 MRflEvtData *fEvtData; //! 34 MRflEvtHeader *fEvtHeader; //! 35 MRflRunHeader *fRunHeader; //! 36 37 UInt_t fNumFile; 38 UInt_t fEntries; // TO BE IMPLEMENTED 29 39 TString fFileName; 30 40 31 Float_t fCurrentVersion; //! Version of currently open rfl file41 Float_t fCurrentVersion; //! Version of currently open rfl file 32 42 33 43 float ReadVersion();
Note:
See TracChangeset
for help on using the changeset viewer.