00001 //-------------------------------------------------------------------------- 00002 // 00003 // Environment: 00004 // This software is part of the EvtGen package developed jointly 00005 // for the BaBar and CLEO collaborations. If you use all or part 00006 // of it, please give an appropriate acknowledgement. 00007 // 00008 // Copyright Information: See EvtGen/COPYRIGHT 00009 // Copyright (C) 1998 Caltech, UCSB 00010 // 00011 // Module: EvtGen/EvtParser.hh 00012 // 00013 // Description: 00014 // 00015 // Modification history: 00016 // 00017 // RYD Febuary 11, 1997 Module created 00018 // 00019 //------------------------------------------------------------------------ 00020 00021 #ifndef EVTPARSER_HH 00022 #define EVTPARSER_HH 00023 00024 #include <string> 00025 00026 class EvtParser { 00027 public: 00028 EvtParser(); 00029 ~EvtParser(); 00030 00031 int Read(const std::string filename); 00032 int getNToken(); 00033 const std::string& getToken(int i); 00034 int getLineofToken(int i); 00035 00036 private: 00037 00038 int _ntoken; 00039 std::string* _tokenlist; 00040 int * _linelist; 00041 int _lengthoftokenlist; 00042 00043 void addToken(int line,const std::string& string); 00044 00045 }; 00046 00047 #endif 00048