- Timestamp:
- 11/09/11 21:51:58 (13 years ago)
- Location:
- trunk/FACT++/src
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/src/DataProcessorImp.cc
r11999 r12477 48 48 // ======================================================================= 49 49 50 bool DataDump::Open( RUN_HEAD* h)50 bool DataDump::Open(const RUN_HEAD* h, const FAD::RunDescription &) 51 51 { 52 52 fFileName = "/dev/null"; -
trunk/FACT++/src/DataProcessorImp.h
r11893 r12477 7 7 struct _EVENT; 8 8 struct _RUN_TAIL; 9 10 namespace FAD 11 { 12 struct RunDescription; 13 }; 9 14 10 15 typedef struct _RUN_HEAD RUN_HEAD; … … 30 35 virtual ~DataProcessorImp() { } 31 36 32 virtual bool Open( RUN_HEAD* h) = 0;37 virtual bool Open(const RUN_HEAD* h, const FAD::RunDescription &desc) = 0; 33 38 virtual bool WriteEvt(EVENT *) = 0; 34 39 virtual bool Close(RUN_TAIL * = 0) = 0; … … 55 60 DataDump(const std::string &path, uint32_t id, MessageImp &imp) : DataProcessorImp(path, id, imp) { } 56 61 57 bool Open( RUN_HEAD* h);62 bool Open(const RUN_HEAD* h, const FAD::RunDescription &d); 58 63 bool WriteEvt(EVENT *e); 59 64 bool Close(RUN_TAIL * = 0); -
trunk/FACT++/src/DataWriteFits.cc
r12454 r12477 1 1 #include "DataWriteFits.h" 2 2 3 #include "HeadersFAD.h" 3 4 #include "FAD.h" 4 5 #include "Converter.h" … … 30 31 //! @param h a pointer to the RUN_HEAD structure that contains the informations relative to this run 31 32 // 32 bool DataWriteFits::Open( RUN_HEAD* h)33 bool DataWriteFits::Open(const RUN_HEAD* h, const FAD::RunDescription &d) 33 34 { 34 35 if (fConv) … … 94 95 fFile.WriteKey("NROI", h->Nroi, "Number of slices per pixels"); 95 96 fFile.WriteKey("NROITM", realRoiTM, "Number of slices per time-marker"); //ETIENNE from NroiTMm to Nroi 96 int realOffset = (h->NroiTM > h->Nroi) ? h->NroiTM - 2*h->Nroi : 0; 97 fFile.WriteKey("OFFSET", realOffset, "Offset between pixels ROI and TM ROi"); //ETIENNE added 97 98 const uint16_t realOffset = (h->NroiTM > h->Nroi) ? h->NroiTM - 2*h->Nroi : 0; 99 fFile.WriteKey("OFFSET", realOffset, "Offset between pixels ROI and TM ROi"); //ETIENNE added 98 100 99 101 //FIXME should we also put the start and stop time of the received data ? … … 103 105 fFile.WriteKey("ADCRANGE", 2000, "Dynamic range in mV"); 104 106 fFile.WriteKey("ADC", 12, "Resolution in bits"); 105 107 fFile.WriteKey("TYPE", d.name, "File type according to FAD configuration (Config database)"); 106 108 107 109 // Write a single key for: -
trunk/FACT++/src/DataWriteRaw.cc
r11893 r12477 1 1 #include "DataWriteRaw.h" 2 2 3 #include "HeadersFAD.h" 3 4 #include "FAD.h" 4 5 … … 18 19 } 19 20 20 bool DataWriteRaw::Open( RUN_HEAD *h)21 bool DataWriteRaw::Open(const RUN_HEAD *h, const FAD::RunDescription &d) 21 22 { 22 23 const string name = FormFileName("bin"); … … 51 52 52 53 WriteBlockHeader(kRunHeader, 1, 0, sizeof(RUN_HEAD)-sizeof(PEVNT_HEADER*)); 53 fOut.write(reinterpret_cast<c har*>(h), sizeof(RUN_HEAD)-sizeof(PEVNT_HEADER*));54 fOut.write(reinterpret_cast<const char*>(h), sizeof(RUN_HEAD)-sizeof(PEVNT_HEADER*)); 54 55 55 56 for (int i=0; i<40; i++) -
trunk/FACT++/src/DataWriteRaw.h
r11893 r12477 81 81 }; 82 82 83 bool Open( RUN_HEAD *h);83 bool Open(const RUN_HEAD *h, const FAD::RunDescription &d); 84 84 bool WriteEvt(EVENT *evt); 85 85 bool Close(RUN_TAIL *tail= 0); -
trunk/FACT++/src/HeadersFAD.h
r12438 r12477 401 401 }; 402 402 403 struct RunDescription 404 { 405 uint32_t maxtime; 406 uint32_t maxevt; 407 408 std::string name; 409 410 Configuration reference; 411 }; 412 403 413 // -------------------------------------------------------------------- 404 414 #ifdef __cplusplus
Note:
See TracChangeset
for help on using the changeset viewer.