LCIO  02.17
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
LCStdHepRdrNew.h
Go to the documentation of this file.
1 #ifndef UTIL_LCStdHepRdr_H
2 #define UTIL_LCStdHepRdr_H 1
3 
4 #include "IMPL/LCCollectionVec.h"
5 #include "UTIL/lStdHep.hh"
6 #include "EVENT/LCIO.h"
7 #include "Exceptions.h"
8 
9 namespace IMPL{
10 
11 class LCEventImpl ;
12 
13 }
14 
15 namespace UTIL{
16 
25 
26  public:
27 
30  LCStdHepRdrNew(const char* evfile) ;
31 
33  LCStdHepRdrNew(const LCStdHepRdrNew&) = delete ;
35  LCStdHepRdrNew& operator=(const LCStdHepRdrNew&) = delete ;
36 
39  ~LCStdHepRdrNew() ;
40 
41 
45  long getNumberOfEvents() const {
46  return _reader->numEvents() ;
47  }
48 
54  return _reader->numEventsExpected() ;
55  }
56 
61 
66  void updateNextEvent( IMPL::LCEventImpl* evt , const char* colName=EVENT::LCIO::MCPARTICLE ) ;
67 
68 
71  void printHeader(std::ostream& os = std::cout ) ;
72 
73 
76  int threeCharge( int pdgID ) const;
77 
78  void setWriteEventNumber(bool writeEventNumber) {
79  _writeEventNumber = writeEventNumber;
80  }
81 
82  private:
83 
85  bool _writeEventNumber{false};
86 
87 
88  }; // class
89 
90 } // namespace UTIL
91 
92 #endif /* ifndef UTIL_LCStdHepRdr_H */
long getNumberOfEvents() const
Get number of events in the stdhep file.
LCStdHepRdrNew & operator=(const LCStdHepRdrNew &)=delete
no assignment operator
Implementation of the LCCollection using (inheriting from) an STL vector of LCObjects.
long numEventsExpected() const
Definition: lStdHep.hh:176
Implementation of the main event class.
Definition: LCEventImpl.h:31
int threeCharge(int pdgID) const
Return the charge of the particle times 3 - code copied from HepPDT package.
Basic utility for reading a binary stdhep file and filling a LCCollectionVec with MCParticles contain...
IMPL::LCCollectionVec * readEvent()
Read an event and return an LCCollectionVec of MCParticles.
long getNumberOfTotalEventsExpected() const
Get total number of expected events in the whole set of stdhep files from which this stdhep file belo...
void printHeader(std::ostream &os=std::cout)
Print the file header to the given ostream.
void updateNextEvent(IMPL::LCEventImpl *evt, const char *colName=EVENT::LCIO::MCPARTICLE)
Reads the next stdhep event and adds a new MCParticle collection to the the event with default name '...
LCStdHepRdrNew(const char *evfile)
Open the stdhep input file in the constructer.
long numEvents() const
Definition: lStdHep.hh:175
STL class.
void setWriteEventNumber(bool writeEventNumber)