Changeset 11556
- Timestamp:
- 07/24/11 11:05:14 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Mars/mraw/MRawFitsRead.cc
r11490 r11556 43 43 #include "MLogManip.h" 44 44 45 #include " MFits.h"45 #include "fits.h" 46 46 #include "MTime.h" 47 47 … … 68 68 Bool_t MRawFitsRead::IsFits(const char *name) 69 69 { 70 MZlib fin(name); 71 if (!fin) 72 return 0; 73 74 Byte_t c[6]; 75 fin.read((char*)c, 6); 76 if (!fin) 77 return 0; 78 79 return memcmp(c, "SIMPLE", 6)==0; 70 return fits(name).good(); 80 71 } 81 72 82 73 istream *MRawFitsRead::OpenFile(const char *filename) 83 74 { 84 return new MFits(filename);75 return new fits(filename); 85 76 } 86 77 87 78 Bool_t MRawFitsRead::ReadRunHeader(istream &stream) 88 79 { 89 MFits &fin = static_cast<MFits&>(stream); 80 fits &fin = static_cast<fits&>(stream); 81 82 if (fin.GetStr("TELESCOP")!="FACT") 83 { 84 gLog << err << "Not a valid FACT FITS file (key TELESCOP not 'FACT')." << endl; 85 return kFALSE; 86 } 90 87 91 88 fRawRunHeader->SetValidMagicNumber(); … … 106 103 Bool_t::MRawFitsRead::InitReadData(istream &stream) 107 104 { 108 MFits &fin = static_cast<MFits&>(stream);105 fits &fin = static_cast<fits&>(stream); 109 106 110 107 MArrayB **data = reinterpret_cast<MArrayB**>(fRawEvtData1->DataMember("fHiGainFadcSamples")); … … 139 136 Bool_t MRawFitsRead::ReadEvent(istream &stream) 140 137 { 141 if (!static_cast< MFits&>(stream).GetNextRow())138 if (!static_cast<fits&>(stream).GetNextRow()) 142 139 return kFALSE; 143 140 … … 154 151 void MRawFitsRead::SkipEvent(istream &fin) 155 152 { 156 static_cast< MFits&>(fin).SkipNextRow();153 static_cast<fits&>(fin).SkipNextRow(); 157 154 }
Note:
See TracChangeset
for help on using the changeset viewer.