00001 #ifndef UTIL_LCStdHepRdr_H 00002 #define UTIL_LCStdHepRdr_H 1 00003 00004 #include "IMPL/LCCollectionVec.h" 00005 #include "UTIL/lStdHep.hh" 00006 #include "EVENT/LCIO.h" 00007 #include "Exceptions.h" 00008 00009 namespace IMPL{ 00010 00011 class LCEventImpl ; 00012 00013 } 00014 00015 namespace UTIL{ 00016 00024 class LCStdHepRdr{ 00025 00026 public: 00027 00030 LCStdHepRdr(const char* evfile) ; 00031 00033 LCStdHepRdr(const LCStdHepRdr&) = delete ; 00035 LCStdHepRdr& operator=(const LCStdHepRdr&) = delete ; 00036 00039 ~LCStdHepRdr() ; 00040 00041 00045 long getNumberOfEvents() const { 00046 return _reader->numEvents() ; 00047 } 00048 00053 long getNumberOfTotalEventsExpected() const { 00054 return _reader->numEventsExpected() ; 00055 } 00056 00060 IMPL::LCCollectionVec * readEvent() ; 00061 00066 void updateNextEvent( IMPL::LCEventImpl* evt , const char* colName=EVENT::LCIO::MCPARTICLE ) ; 00067 00068 00071 void printHeader(std::ostream& os = std::cout ) ; 00072 00073 00076 int threeCharge( int pdgID ) const ; 00077 00078 private: 00079 00080 lStdHep* _reader{NULL}; 00081 00082 00083 }; // class 00084 00085 } // namespace UTIL 00086 00087 #endif /* ifndef UTIL_LCStdHepRdr_H */