- Timestamp:
- 11/21/13 17:15:05 (11 years ago)
- Location:
- trunk/FACT++/src
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/src/DataCalib.cc
r17271 r17330 1 1 #include "DataCalib.h" 2 2 3 #include " FAD.h"3 #include "EventBuilder.h" 4 4 #include "FitsFile.h" 5 5 #include "DimDescriptionService.h" … … 180 180 } 181 181 182 bool DataCalib::WriteEvt(const EV ENT &e)182 bool DataCalib::WriteEvt(const EVT_CTRL2 &evt) 183 183 { 184 184 // FIXME: SET StartPix to 0 if StartPix is -1 185 185 186 const EVENT &e = *evt.fEvent; 187 186 188 if (fData.fStep==0) 187 189 { … … 197 199 } 198 200 199 return DataWriteFits2::WriteEvt(e );201 return DataWriteFits2::WriteEvt(evt); 200 202 } 201 203 … … 274 276 } 275 277 */ 276 bool DataCalib::Close(const RUN_TAIL *tail)278 bool DataCalib::Close(const EVT_CTRL2 &evt) 277 279 { 278 280 if (fNumEntries==0) … … 357 359 fProcessing = false; 358 360 359 return DataWriteFits2::Close( tail);360 } 361 return DataWriteFits2::Close(evt); 362 } -
trunk/FACT++/src/DataCalib.h
r17233 r17330 38 38 39 39 bool Open(const RUN_HEAD &h, const FAD::RunDescription &d); 40 bool WriteEvt(const EV ENT &e);41 bool Close(const RUN_TAIL * = 0);40 bool WriteEvt(const EVT_CTRL2 &); 41 bool Close(const EVT_CTRL2 &); 42 42 43 43 //static void Apply(int16_t *val, const int16_t *start, uint32_t roi); -
trunk/FACT++/src/DataProcessorImp.cc
r16582 r17330 2 2 3 3 #include "HeadersFAD.h" 4 #include " FAD.h"4 #include "EventBuilder.h" 5 5 #include "tools.h" 6 6 … … 67 67 } 68 68 69 bool DataDump::WriteEvt(const EV ENT&e)69 bool DataDump::WriteEvt(const EVT_CTRL2 &e) 70 70 { 71 71 const Time now; … … 76 76 77 77 ostringstream str; 78 str << this << " - EVENT #" << e. EventNum << " / " << e.TriggerNum;78 str << this << " - EVENT #" << e.evNum << " / " << e.trgNum; 79 79 Debug(str); 80 80 … … 82 82 } 83 83 84 bool DataDump::Close(const RUN_TAIL *)84 bool DataDump::Close(const EVT_CTRL2 &) 85 85 { 86 86 ostringstream str; … … 94 94 // ======================================================================= 95 95 96 bool DataDebug::WriteEvt(const EV ENT&e)96 bool DataDebug::WriteEvt(const EVT_CTRL2 &e) 97 97 { 98 cout << "WRITE_EVENT #" << GetRunId() << " (" << e. EventNum << ")" << endl;99 cout << " Typ=" << e. TriggerType<< endl;100 cout << " roi=" << e. Roi << endl;101 cout << " tim=" << e. PCTime<< endl;98 cout << "WRITE_EVENT #" << GetRunId() << " (" << e.evNum << ")" << endl; 99 cout << " Typ=" << e.trgTyp << endl; 100 cout << " roi=" << e.nRoi << endl; 101 cout << " tim=" << e.time.tv_sec << endl; 102 102 103 103 return true; -
trunk/FACT++/src/DataProcessorImp.h
r16055 r17330 5 5 6 6 struct RUN_HEAD; 7 struct _EVENT;8 struct _RUN_TAIL;7 struct EVT_CTRL2; 8 struct RUN_CTRL2; 9 9 10 10 namespace FAD … … 12 12 struct RunDescription; 13 13 }; 14 15 typedef struct _EVENT EVENT;16 typedef struct _RUN_TAIL RUN_TAIL;17 14 18 15 class DataProcessorImp : public MessageImp … … 36 33 37 34 virtual bool Open(const RUN_HEAD &h, const FAD::RunDescription &desc) = 0; 38 virtual bool WriteEvt(const EV ENT&) = 0;39 virtual bool Close(const RUN_TAIL * = 0) = 0;35 virtual bool WriteEvt(const EVT_CTRL2 &) = 0; 36 virtual bool Close(const EVT_CTRL2 &) = 0; 40 37 41 38 const std::string &GetFileName() const { return fFileName; } … … 62 59 63 60 bool Open(const RUN_HEAD &h, const FAD::RunDescription &d); 64 bool WriteEvt(const EV ENT &e);65 bool Close(const RUN_TAIL * = 0);61 bool WriteEvt(const EVT_CTRL2 &); 62 bool Close(const EVT_CTRL2 &); 66 63 }; 67 64 … … 71 68 DataDebug(const std::string &path, uint64_t night, uint32_t id, MessageImp &imp) : DataDump(path, night, id, imp) { } 72 69 73 bool WriteEvt(const EV ENT &e);70 bool WriteEvt(const EVT_CTRL2 &); 74 71 }; 75 72 -
trunk/FACT++/src/DataWriteRaw.cc
r16072 r17330 2 2 3 3 #include "HeadersFAD.h" 4 #include " FAD.h"4 #include "EventBuilder.h" 5 5 6 6 using namespace std; … … 79 79 } 80 80 81 bool DataWriteRaw::WriteEvt(const EV ENT &e)81 bool DataWriteRaw::WriteEvt(const EVT_CTRL2 &evt) 82 82 { 83 const EVENT &e = *evt.fEvent; 84 83 85 const int sh = sizeof(EVENT)-2 + NPIX*e.Roi*2; 84 86 … … 88 90 } 89 91 90 bool DataWriteRaw::Close( const RUN_TAIL *tail)92 bool DataWriteRaw::Close() 91 93 { 92 94 WriteBlockHeader(kEndOfFile, 0, 0, 0); 93 95 96 /* 94 97 if (tail) 95 98 { … … 97 100 98 101 WriteValue(uint32_t(1)); 99 fOut.write(reinterpret_cast<const char*>(tail), 0/*sizeof(RUN_TAIL)*/);100 } 102 fOut.write(reinterpret_cast<const char*>(tail), sizeof(RUN_TAIL)); 103 }*/ 101 104 102 105 if (!fOut) -
trunk/FACT++/src/DataWriteRaw.h
r16055 r17330 82 82 83 83 bool Open(const RUN_HEAD &h, const FAD::RunDescription &d); 84 bool WriteEvt(const EVENT &evt); 85 bool Close(const RUN_TAIL *tail= 0); 84 bool WriteEvt(const EVT_CTRL2 &); 85 bool Close(const EVT_CTRL2 &) { return Close(); } 86 bool Close(); 86 87 }; 87 88
Note:
See TracChangeset
for help on using the changeset viewer.