#ifndef UTSUSEMIEVENTDATACREATOR
#define UTSUSEMIEVENTDATACREATOR

#include "Header.hh"
#include "StringTools.hh"
#include "UtsusemiHeader.hh"

//////////////////////////////////
// UtsusemiEventDataCreator
/////////////////////////////////

//! Create Event data file from scinario in text
/*!
 *   tt=EventDataCreator()
 *   evt=tt.encodePidClockEvent( 1111, 2000 )
 *   evt.encode().hex()
 *   '5b000000000004575c00001f40000000'
 *   f=open("test.edb","wb")
 *   f.write(v.encode())
 *   16
 *   f.close()
 *
 */

class EventDataCreator
{
private:
    StringTools* _st;
    UInt4 _daqID;
    UInt4 _modNo;
protected:

public:
    EventDataCreator();
        //!< Constructor
        /*!<
         */
    ~EventDataCreator();
        //!< Destructor
        /*!<
         */
    std::string encodePidClockEvent( int pid, double clock );
    std::string encodeNeutronEvent( double tof,int mod,int psd);
    std::string encodeTrignetEvent( double tof, int sid1, int sid2, int val1, int val2=0);
    bool output( std::string path_in, std::string path_n, std::string path_t );

};

#endif
