Changeset 11490 for trunk/Mars/mraw
- Timestamp:
- 07/20/11 18:03:06 (13 years ago)
- Location:
- trunk/Mars/mraw
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Mars/mraw/MRawFitsRead.cc
r11459 r11490 47 47 48 48 #include "MArrayB.h" 49 #include "MArrayS.h" 49 50 50 51 #include "MRawRunHeader.h" … … 97 98 fRawRunHeader->SetRunType(0/*data*/); 98 99 99 return kTRUE; 100 return 101 fin.HasKey("NPIX") && fin.HasKey("RUNID") && 102 fin.HasKey("NROI") && fin.HasKey("BLDVER") && 103 fin.HasKey("NIGHT"); 100 104 } 101 105 … … 105 109 106 110 MArrayB **data = reinterpret_cast<MArrayB**>(fRawEvtData1->DataMember("fHiGainFadcSamples")); 111 MArrayS **cell = reinterpret_cast<MArrayS**>(fRawEvtData1->DataMember("fStartCells")); 107 112 UInt_t *evtnum = reinterpret_cast<UInt_t*> (fRawEvtHeader->DataMember("fDAQEvtNumber")); 108 113 109 if (!data || ! evtnum)114 if (!data || !cell || !evtnum) 110 115 return kFALSE; 111 116 112 117 fRawEvtData1->ResetPixels(); 113 118 fRawEvtData2->ResetPixels(0, 0); 119 fRawEvtData1->InitStartCells(); 114 120 115 121 if (!fin.SetRefAddress("EventNum", *evtnum)) 116 122 return kFALSE; 117 123 118 if (!fin.SetRefAddress("PCTime", fPCTime)) 124 fPCTime.resize(2); 125 if (!fin.SetVecAddress("PCTime", fPCTime)) 119 126 return kFALSE; 120 127 121 if (!fin.SetPtrAddress("Data", (uint16_t*)(*data)->GetArray(), (*data)->GetSize()/2)) 128 if (!fin.SetPtrAddress("Data", (int16_t*)(*data)->GetArray(), (*data)->GetSize()/2)) 129 return kFALSE; 130 131 if (!fin.SetPtrAddress("StartCell", (uint16_t*)(*cell)->GetArray(), (*cell)->GetSize())) 122 132 return kFALSE; 123 133 … … 132 142 return kFALSE; 133 143 134 fRawEvtTime->SetUnixTime(fPCTime, 0); 144 fRawEvtTime->SetUnixTime(fPCTime[0], fPCTime[1]); 145 146 // FIXME: Correctly sort the pixels here! 135 147 136 148 fRawEvtData1->SetReadyToSave(); -
trunk/Mars/mraw/MRawFitsRead.h
r11459 r11490 6 6 #endif 7 7 8 #include <vector> 9 8 10 class MRawFitsRead : public MRawFileRead 9 11 { 10 12 private: 11 UInt_tfPCTime; //! Buffer13 std::vector<UInt_t> fPCTime; //! Buffer 12 14 13 15 istream *OpenFile(const char *filename);
Note:
See TracChangeset
for help on using the changeset viewer.