// // Author: Richard Jones June 29, 2012 // // DEventSourceREST // /// Implements JEventSource for REST files #ifndef _JEVENT_SOURCEREST_H_ #define _JEVENT_SOURCEREST_H_ #include #include #include #include #include #include #include "hddm_r.hpp" #include #include #include #include "TRACKING/DMCThrown.h" #include #include #include #include #include #include #include #include #include #include #include #include class DEventSourceREST:public JEventSource { public: DEventSourceREST(const char* source_name); virtual ~DEventSourceREST(); virtual const char* className(void) { return DEventSourceREST::static_className(); } static const char* static_className(void) { return "DEventSourceREST"; } jerror_t GetEvent(JEvent &event); void FreeEvent(JEvent &event); jerror_t GetObjects(JEvent &event, JFactory_base *factory); jerror_t Extract_DMCReaction(hddm_r::HDDM *record, JFactory *factory, JEventLoop* locEventLoop); jerror_t Extract_DRFTime(hddm_r::HDDM *record, JFactory *factory, JEventLoop* locEventLoop); jerror_t Extract_DBeamPhoton(hddm_r::HDDM *record, JFactory *factory, JEventLoop *eventLoop); jerror_t Extract_DMCThrown(hddm_r::HDDM *record, JFactory *factory); jerror_t Extract_DSCHit(hddm_r::HDDM *record, JFactory* factory); jerror_t Extract_DTOFPoint(hddm_r::HDDM *record, JFactory* factory); jerror_t Extract_DFCALShower(hddm_r::HDDM *record, JFactory* factory); jerror_t Extract_DBCALShower(hddm_r::HDDM *record, JFactory* factory); jerror_t Extract_DTrackTimeBased(hddm_r::HDDM *record, JFactory* factory); jerror_t Extract_DMCTrigger(hddm_r::HDDM *record, JFactory* factory); jerror_t Extract_DDetectorMatches(JEventLoop* locEventLoop, hddm_r::HDDM *record, JFactory* factory); #if 0 jerror_t Extract_DRFTime(hddm_r::HDDM *record, JFactory* factory); #endif DMatrixDSym Get7x7ErrorMatrix(double mass, const double vec[5], const DMatrixDSym& C5x5); private: // Warning: Class JEventSource methods must be re-entrant, so do not // store any data here that might change from event to event. map dTargetCenterZMap; //unsigned int is run number map dRFBunchPeriodMap; //unsigned int is run number std::ifstream *ifs; // input hddm file ifstream hddm_r::istream *fin; // provides hddm layer on top of ifstream }; #endif //_JEVENT_SOURCEREST_H_