Changeset 15628 for trunk/FACT++
- Timestamp:
- 05/17/13 11:40:30 (12 years ago)
- Location:
- trunk/FACT++/src
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/src/DataCalib.cc
r15011 r15628 175 175 } 176 176 177 bool DataCalib::WriteEvt( EVENT *e)177 bool DataCalib::WriteEvt(const EVENT *e) 178 178 { 179 179 // FIXME: SET StartPix to 0 if StartPix is -1 … … 269 269 } 270 270 */ 271 bool DataCalib::Close( RUN_TAIL *tail)271 bool DataCalib::Close(const RUN_TAIL *tail) 272 272 { 273 273 if (fNumEntries==0) -
trunk/FACT++/src/DataCalib.h
r15023 r15628 38 38 39 39 bool Open(const RUN_HEAD* h, const FAD::RunDescription &d); 40 bool WriteEvt( EVENT *e);41 bool Close( RUN_TAIL * = 0);40 bool WriteEvt(const EVENT *e); 41 bool Close(const RUN_TAIL * = 0); 42 42 43 43 //static void Apply(int16_t *val, const int16_t *start, uint32_t roi); -
trunk/FACT++/src/DataProcessorImp.cc
r14700 r15628 66 66 } 67 67 68 bool DataDump::WriteEvt( EVENT *e)68 bool DataDump::WriteEvt(const EVENT *e) 69 69 { 70 70 const Time now; … … 81 81 } 82 82 83 bool DataDump::Close( RUN_TAIL *)83 bool DataDump::Close(const RUN_TAIL *) 84 84 { 85 85 ostringstream str; … … 93 93 // ======================================================================= 94 94 95 bool DataDebug::WriteEvt( EVENT *e)95 bool DataDebug::WriteEvt(const EVENT *e) 96 96 { 97 97 cout << "WRITE_EVENT #" << GetRunId() << " (" << e->EventNum << ")" << endl; -
trunk/FACT++/src/DataProcessorImp.h
r14700 r15628 37 37 38 38 virtual bool Open(const RUN_HEAD* h, const FAD::RunDescription &desc) = 0; 39 virtual bool WriteEvt( EVENT *) = 0;40 virtual bool Close( RUN_TAIL * = 0) = 0;39 virtual bool WriteEvt(const EVENT *) = 0; 40 virtual bool Close(const RUN_TAIL * = 0) = 0; 41 41 42 42 const std::string &GetFileName() const { return fFileName; } … … 62 62 63 63 bool Open(const RUN_HEAD* h, const FAD::RunDescription &d); 64 bool WriteEvt( EVENT *e);65 bool Close( RUN_TAIL * = 0);64 bool WriteEvt(const EVENT *e); 65 bool Close(const RUN_TAIL * = 0); 66 66 }; 67 67 … … 71 71 DataDebug(const std::string &path, uint64_t night, uint32_t id, MessageImp &imp) : DataDump(path, night, id, imp) { } 72 72 73 bool WriteEvt( EVENT *e);73 bool WriteEvt(const EVENT *e); 74 74 }; 75 75 -
trunk/FACT++/src/DataWriteFits.cc
r12806 r15628 198 198 //! @param e the pointer to the EVENT 199 199 // 200 bool DataWriteFits::WriteEvt( EVENT *e)200 bool DataWriteFits::WriteEvt(const EVENT *e) 201 201 { 202 202 if (!fFile.AddRow()) … … 227 227 const size_t sz = sizeof(EVENT) + sizeof(e->StartPix)*e->Roi+sizeof(e->StartTM)*realRoiTM; //ETIENNE from RoiTm to Roi 228 228 229 const vector<char> data = fConv->ToFits(reinterpret_cast<c har*>(e)+4, sz-4);229 const vector<char> data = fConv->ToFits(reinterpret_cast<const char*>(e)+4, sz-4); 230 230 231 231 return fFile.WriteData(data.data(), data.size()); 232 232 } 233 233 234 bool DataWriteFits::WriteFooter( RUN_TAIL */*rt*/)234 bool DataWriteFits::WriteFooter(const RUN_TAIL */*rt*/) 235 235 { 236 236 try … … 288 288 //! @param rt the pointer to the RUN_TAIL data structure 289 289 // 290 bool DataWriteFits::Close( RUN_TAIL *rt)290 bool DataWriteFits::Close(const RUN_TAIL *rt) 291 291 { 292 292 if (!fFile.IsOpen()) -
trunk/FACT++/src/DataWriteFits.h
r14700 r15628 23 23 void WriteKey(const string &name, const int idx, const T &value, const string &comment); 24 24 25 bool WriteFooter( RUN_TAIL *rt);25 bool WriteFooter(const RUN_TAIL *rt); 26 26 27 27 virtual int GetDrsStep() const { return -1; } … … 36 36 37 37 bool Open(const RUN_HEAD* h, const FAD::RunDescription &d); 38 bool WriteEvt( EVENT *e);39 bool Close( RUN_TAIL *rt = 0);38 bool WriteEvt(const EVENT *e); 39 bool Close(const RUN_TAIL *rt = 0); 40 40 }; 41 41 -
trunk/FACT++/src/DataWriteFits2.cc
r14550 r15628 209 209 //! @param e the pointer to the EVENT 210 210 // 211 bool DataWriteFits2::WriteEvt( EVENT *e)211 bool DataWriteFits2::WriteEvt(const EVENT *e) 212 212 { 213 213 if (e->TriggerType && !(e->TriggerType & FAD::EventHeader::kAll)) … … 237 237 try 238 238 { 239 fFile.WriteRow(reinterpret_cast<c har*>(e)+4, sz-4);239 fFile.WriteRow(reinterpret_cast<const char*>(e)+4, sz-4); 240 240 } 241 241 catch (const exception &ex) … … 256 256 } 257 257 258 void DataWriteFits2::WriteFooter( RUN_TAIL */*rt*/)258 void DataWriteFits2::WriteFooter(const RUN_TAIL */*rt*/) 259 259 { 260 260 //FIXME shouldn't we convert start and stop time to MjD first ? … … 292 292 //! @param rt the pointer to the RUN_TAIL data structure 293 293 // 294 bool DataWriteFits2::Close( RUN_TAIL *rt)294 bool DataWriteFits2::Close(const RUN_TAIL *rt) 295 295 { 296 296 if (!fFile.is_open()) -
trunk/FACT++/src/DataWriteFits2.h
r15010 r15628 17 17 18 18 void WriteHeader(const RUN_HEAD* h, const FAD::RunDescription &d); 19 void WriteFooter( RUN_TAIL *rt);19 void WriteFooter(const RUN_TAIL *rt); 20 20 21 21 virtual int GetDrsStep() const { return -1; } … … 28 28 29 29 bool Open(const RUN_HEAD* h, const FAD::RunDescription &d); 30 bool WriteEvt( EVENT *e);31 bool Close( RUN_TAIL *rt = 0);30 bool WriteEvt(const EVENT *e); 31 bool Close(const RUN_TAIL *rt = 0); 32 32 33 33 Time GetTstart() const { return Time(fTstart[0], fTstart[1]); } -
trunk/FACT++/src/DataWriteRaw.cc
r15464 r15628 79 79 } 80 80 81 bool DataWriteRaw::WriteEvt( EVENT *evt)81 bool DataWriteRaw::WriteEvt(const EVENT *evt) 82 82 { 83 83 const int sh = sizeof(EVENT)-2 + NPIX*evt->Roi*2; 84 84 85 85 WriteBlockHeader(kEvent, 1, fCounter++, sh); 86 fOut.write(reinterpret_cast<c har*>(evt)+2, sh);86 fOut.write(reinterpret_cast<const char*>(evt)+2, sh); 87 87 return true; 88 88 } 89 89 90 bool DataWriteRaw::Close( RUN_TAIL *tail)90 bool DataWriteRaw::Close(const RUN_TAIL *tail) 91 91 { 92 92 WriteBlockHeader(kEndOfFile, 0, 0, 0); … … 97 97 98 98 WriteValue(uint32_t(1)); 99 fOut.write(reinterpret_cast<c har*>(tail), sizeof(RUN_TAIL));99 fOut.write(reinterpret_cast<const char*>(tail), sizeof(RUN_TAIL)); 100 100 } 101 101 -
trunk/FACT++/src/DataWriteRaw.h
r14700 r15628 82 82 83 83 bool Open(const RUN_HEAD *h, const FAD::RunDescription &d); 84 bool WriteEvt( EVENT *evt);85 bool Close( RUN_TAIL *tail= 0);84 bool WriteEvt(const EVENT *evt); 85 bool Close(const RUN_TAIL *tail= 0); 86 86 }; 87 87
Note:
See TracChangeset
for help on using the changeset viewer.