CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
L1TriggerLutFile.h
Go to the documentation of this file.
1 //-------------------------------------------------
2 //
13 //
14 //--------------------------------------------------
15 #ifndef L1_TRIGGER_LUT_FILE_H
16 #define L1_TRIGGER_LUT_FILE_H
17 
18 //---------------
19 // C++ Headers --
20 //---------------
21 
22 #include <string>
23 #include <fstream>
24 
25 //----------------------
26 // Base Class Headers --
27 //----------------------
28 
29 //------------------------------------
30 // Collaborating Class Declarations --
31 //------------------------------------
32 
33 // ---------------------
34 // -- Class Interface --
35 // ---------------------
36 
38 
39  public:
40 
42  L1TriggerLutFile(const std::string name = "" );
43 
46 
48  virtual ~L1TriggerLutFile();
49 
52 
54  inline const std::string& getName() const { return m_file; }
55 
57  int open();
58 
60  inline bool good() { return m_fin.good(); }
61 
63  inline bool bad() { return m_fin.bad(); }
64 
66  inline void close() { m_fin.close(); }
67 
69  void ignoreLines(int n);
70 
72  int readInteger();
73 
75  int readHex();
76 
78  std::string readString();
79 
80  private:
81 
82  std::ifstream m_fin; // input file stream
83  std::string m_file; // file name
84 
85 };
86 
87 #endif
const std::string & getName() const
return filename
bool good()
return status of file stream
L1TriggerLutFile & operator=(const L1TriggerLutFile &)
assignment operator
L1TriggerLutFile(const std::string name="")
constructor
int readHex()
read one hex from file
void close()
close file
bool bad()
return status of file stream
std::ifstream m_fin
void ignoreLines(int n)
read and ignore n lines from file
std::string readString()
read one string from file
int readInteger()
read one integer from file
std::string m_file
virtual ~L1TriggerLutFile()
destructor
int open()
open file