// Author: David Lawrence June 24, 2004 // // // DEventSourceHDDM // /// Implements JEventSource for HDDM files #ifndef _JEVENT_SOURCEHDDM_H_ #define _JEVENT_SOURCEHDDM_H_ #include #include using namespace std; #include #include #include #include "hddm_s.h" #include "TRACKING/DMCTrackHit.h" #include "TRACKING/DMCThrown.h" #include "TRACKING/DMCTrajectoryPoint.h" #include "BCAL/DHDDMBCALHit.h" #include "BCAL/DBCALTruthShower.h" #include "CDC/DCDCHit.h" #include "FDC/DFDCHit.h" #include "FCAL/DFCALTruthShower.h" #include "FCAL/DMCFCALHit.h" #include "TOF/DTOFTruth.h" #include "TOF/DHDDMTOFHit.h" #include "START_COUNTER/DSCTruthHit.h" #include "START_COUNTER/DSCHit.h" #include class DEventSourceHDDM:public JEventSource { public: DEventSourceHDDM(const char* source_name); virtual ~DEventSourceHDDM(); virtual const char* className(void){return static_className();} static const char* static_className(void){return "DEventSourceHDDM";} jerror_t GetEvent(JEvent &event); void FreeEvent(JEvent &event); jerror_t GetObjects(JEvent &event, JFactory_base *factory); jerror_t Extract_DMCTrackHit(s_HDDM_t *hddm_s, JFactory *factory); jerror_t GetCDCTruthHits(s_HDDM_t *hddm_s, vector& data); jerror_t GetFDCTruthHits(s_HDDM_t *hddm_s, vector& data); jerror_t GetBCALTruthHits(s_HDDM_t *hddm_s, vector& data); jerror_t GetTOFTruthHits(s_HDDM_t *hddm_s, vector& data); jerror_t GetCherenkovTruthHits(s_HDDM_t *hddm_s, vector& data); jerror_t GetFCALTruthHits(s_HDDM_t *hddm_s, vector& data); jerror_t Extract_DBCALTruthShower(s_HDDM_t *hddm_s, JFactory *factory); jerror_t Extract_DHDDMBCALHit(s_HDDM_t *hddm_s, JFactory *factory); jerror_t Extract_DBeamPhoton(s_HDDM_t *hddm_s, JFactory *factory); jerror_t Extract_DMCThrown(s_HDDM_t *hddm_s, JFactory *factory); jerror_t Extract_DCDCHit(s_HDDM_t *hddm_s, JFactory *factory); jerror_t Extract_DFDCHit(s_HDDM_t *hddm_s, JFactory *factory); jerror_t Extract_DFCALTruthShower(s_HDDM_t *hddm_s, JFactory *factory); jerror_t Extract_DMCFCALHit(s_HDDM_t *hddm_s, JFactory *factory, JEventLoop* eventLoop ); jerror_t Extract_DMCTrajectoryPoint(s_HDDM_t *hddm_s, JFactory *factory); jerror_t Extract_DTOFTruth(s_HDDM_t *hddm_s, JFactory *factory); jerror_t Extract_DHDDMTOFHit( s_HDDM_t *hddm_s, JFactory* factory); jerror_t Extract_DSCHit(s_HDDM_t *hddm_s, JFactory *factory); jerror_t Extract_DSCTruthHit(s_HDDM_t *hddm_s, JFactory *factory); s_iostream_t *fin; s_HDDM_t *hddm_s; bool flush_on_free; private: }; #endif //_JEVENT_SOURCEHDDM_H_