This writes one event to the file
- Parameters
-
e | the pointer to the EVENT |
Implements DataProcessorImp.
Definition at line 249 of file DataWriteFits2.cc.
References MessageImp::Error(), EVT_CTRL2::fEvent, fFile, DataProcessorImp::fFileName, fTriggerCounter, fTstop, str, EVT_CTRL2::time, and EVT_CTRL2::triggerCounter.
Referenced by GetDrsStep(), and DataCalib::WriteEvt().
258 const EVENT &e = *evt.
fEvent;
260 const int realRoiTM = (e.RoiTM > e.Roi) ? e.Roi : 0;
261 const size_t sz =
sizeof(EVENT) +
sizeof(e.StartPix)*e.Roi+
sizeof(e.StartTM)*realRoiTM;
265 fFile->WriteRow(reinterpret_cast<const char*>(&e)+4, sz-4);
267 catch (
const exception &ex)
276 str <<
"fstream::write() failed for '" <<
fFileName <<
"': " << strerror(errno) <<
" [errno=" << errno <<
"]";
std::shared_ptr< ofits > fFile
std::array< uint32_t, 8 > fTriggerCounter
int Error(const std::string &str)
std::array< uint32_t, 8 > triggerCounter