CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups 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 public:
40  L1TriggerLutFile(const std::string name = "");
41 
44 
46  virtual ~L1TriggerLutFile();
47 
50 
52  inline const std::string& getName() const { return m_file; }
53 
55  int open();
56 
58  inline bool good() { return m_fin.good(); }
59 
61  inline bool bad() { return m_fin.bad(); }
62 
64  inline void close() { m_fin.close(); }
65 
67  void ignoreLines(int n);
68 
70  int readInteger();
71 
73  int readHex();
74 
77 
78 private:
79  std::ifstream m_fin; // input file stream
80  std::string m_file; // file name
81 };
82 
83 #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