CMS 3D CMS Logo

DTTPGLutFile.h
Go to the documentation of this file.
1 //-------------------------------------------------
2 //
11 //
12 //--------------------------------------------------
13 #ifndef DTTPG_LUT_FILE_H
14 #define DTTPG_LUT_FILE_H
15 
16 //---------------
17 // C++ Headers --
18 //---------------
19 
20 #include <fstream>
21 #include <string>
22 
23 //----------------------
24 // Base Class Headers --
25 //----------------------
26 
27 //------------------------------------
28 // Collaborating Class Declarations --
29 //------------------------------------
30 
31 // ---------------------
32 // -- Class Interface --
33 // ---------------------
34 
35 class DTTPGLutFile {
36 public:
38  DTTPGLutFile(const std::string name = "");
39 
41  DTTPGLutFile(const DTTPGLutFile &);
42 
44  virtual ~DTTPGLutFile();
45 
48 
50  inline std::string getName() const { return m_file; }
51 
53  int open();
54 
56  inline bool good() { return m_fin.good(); }
57 
59  inline bool bad() { return m_fin.bad(); }
60 
62  inline void close() { m_fin.close(); }
63 
65  void ignoreLines(int n);
66 
68  int readInteger();
69 
71  int readHex();
72 
75 
76 private:
77  std::ifstream m_fin; // input file stream
78  std::string m_file; // file name
79 };
80 
81 #endif
dqmiodumpmetadata.n
n
Definition: dqmiodumpmetadata.py:28
DTTPGLutFile::m_fin
std::ifstream m_fin
Definition: DTTPGLutFile.h:77
DTTPGLutFile::readHex
int readHex()
read one hex from file
Definition: DTTPGLutFile.cc:83
DTTPGLutFile::readInteger
int readInteger()
read one integer from file
Definition: DTTPGLutFile.cc:77
DTTPGLutFile::operator=
DTTPGLutFile & operator=(const DTTPGLutFile &)
assignment operator
Definition: DTTPGLutFile.cc:55
DTTPGLutFile::getName
std::string getName() const
return filename
Definition: DTTPGLutFile.h:50
DTTPGLutFile::open
int open()
open file
Definition: DTTPGLutFile.cc:60
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
DTTPGLutFile::ignoreLines
void ignoreLines(int n)
read and ignore n lines from file
Definition: DTTPGLutFile.cc:71
DTTPGLutFile::good
bool good()
return status of file stream
Definition: DTTPGLutFile.h:56
DTTPGLutFile::readString
std::string readString()
read one string from file
Definition: DTTPGLutFile.cc:89
Skims_PA_cff.name
name
Definition: Skims_PA_cff.py:17
DTTPGLutFile::DTTPGLutFile
DTTPGLutFile(const std::string name="")
constructor
DTTPGLutFile
Definition: DTTPGLutFile.h:35
DTTPGLutFile::bad
bool bad()
return status of file stream
Definition: DTTPGLutFile.h:59
DTTPGLutFile::m_file
std::string m_file
Definition: DTTPGLutFile.h:78
DTTPGLutFile::~DTTPGLutFile
virtual ~DTTPGLutFile()
destructor
Definition: DTTPGLutFile.cc:49
DTTPGLutFile::close
void close()
close file
Definition: DTTPGLutFile.h:62