9 #include "pdsdata/xtc/Dgram.hh"
22 using std::tr1::shared_ptr;
26 buf.resize(
sizeof(Pds::Dgram));
27 file.read(&buf.front(),
sizeof(Pds::Dgram));
32 Pds::Dgram& dg(reinterpret_cast<Pds::Dgram&>(buf.front()));
33 const int payloadSize(dg.xtc.sizeofPayload());
34 buf.resize(
sizeof(Pds::Dgram) + payloadSize);
35 file.read(&buf[
sizeof(Pds::Dgram)], payloadSize);
50 std::tr1::shared_ptr<CASSEvent> event(
new CASSEvent);
54 const streampos eventstartpos(file.tellg());
56 Pds::Dgram& dg(reinterpret_cast<Pds::Dgram&>(buf.front()));
57 if (dg.seq.service() != Pds::TransitionId::L1Accept)
64 file.seekg(eventstartpos);
Event to store all LCLS Data.
file contains declaration of the CASSEvent
void readHeaderInfo(std::ifstream &file)
read the file header
contains class to read xtc files
bool operator()(std::ifstream &file, CASSEvent &event)
read the xtc file contents put them into cassevent
std::vector< char > buffer_t
a buffer type
base class for all file readers
void readDgramHeaderToBuf(ifstream &file, CASSEvent::buffer_t &buf)
FormatConverter & _convert
a reference to the format converter functor
buffer_t & datagrambuffer()
setters
file contains specialized class that do the settings for cass
void loadSettings()
load the settings of the reader
contains a logger for cass
void readDgramPayloadToBuf(ifstream &file, CASSEvent::buffer_t &buf)