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 LCStdHepRdrNew {
00025
00026 public:
00027
00030 LCStdHepRdrNew(const char* evfile) ;
00031
00033 LCStdHepRdrNew(const LCStdHepRdrNew&) = delete ;
00035 LCStdHepRdrNew& operator=(const LCStdHepRdrNew&) = delete ;
00036
00039 ~LCStdHepRdrNew() ;
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 void setWriteEventNumber(bool writeEventNumber) {
00079 _writeEventNumber = writeEventNumber;
00080 }
00081
00082 private:
00083
00084 lStdHep* _reader{};
00085 bool _writeEventNumber{false};
00086
00087
00088 };
00089
00090 }
00091
00092 #endif