#if !defined(HDDMDATAWRITER) #define HDDMDATAWRITER #include #include #include #include using namespace std; #include "CLHEP/Vector/LorentzVector.h" #include "IUAmpTools/Kinematics.h" #include "HDDM/hddm_s.hpp" using namespace CLHEP; class HDDMDataWriter { public: HDDMDataWriter( const string& outFile, int runNumber=9000); ~HDDMDataWriter(); void writeEvent( const Kinematics& kin, const vector& ptype, bool centeredVertex=false); void writeEvent( const Kinematics& kin, const vector& ptype, float vx, float vy, float vz_min, float vz_max); void writeEvent( const Kinematics& kin, const vector& ptype, float vx, float vy, float vz); int eventCounter() const { return m_eventCounter; } bool FileOpen() { return m_OutputStream; } private: std::ofstream *m_OutputFile; // output hddm file ofstream hddm_s::ostream *m_OutputStream; // provides hddm layer on top of ofstream int m_eventCounter, m_runNumber; }; #endif