StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
EvtParser.hh
1 //--------------------------------------------------------------------------
2 //
3 // Environment:
4 // This software is part of the EvtGen package developed jointly
5 // for the BaBar and CLEO collaborations. If you use all or part
6 // of it, please give an appropriate acknowledgement.
7 //
8 // Copyright Information: See EvtGen/COPYRIGHT
9 // Copyright (C) 1998 Caltech, UCSB
10 //
11 // Module: EvtGen/EvtParser.hh
12 //
13 // Description:
14 //
15 // Modification history:
16 //
17 // RYD Febuary 11, 1997 Module created
18 //
19 //------------------------------------------------------------------------
20 
21 #ifndef EVTPARSER_HH
22 #define EVTPARSER_HH
23 
24 #include <string>
25 
26 class EvtParser {
27 public:
28  EvtParser();
29  ~EvtParser();
30 
31  int read(const std::string filename);
32  int getNToken();
33  const std::string& getToken(int i);
34  int getLineofToken(int i);
35 
36 private:
37 
38  int _ntoken;
39  std::string* _tokenlist;
40  int * _linelist;
41  int _lengthoftokenlist;
42 
43  void addToken(int line,const std::string& string);
44 
45 };
46 
47 #endif
48