CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_3/src/CondFormats/L1TObjects/interface/L1TriggerLutFile.h

Go to the documentation of this file.
00001 //-------------------------------------------------
00002 //
00013 //
00014 //--------------------------------------------------
00015 #ifndef L1_TRIGGER_LUT_FILE_H
00016 #define L1_TRIGGER_LUT_FILE_H
00017 
00018 //---------------
00019 // C++ Headers --
00020 //---------------
00021 
00022 #include <string>
00023 #include <fstream>
00024 
00025 //----------------------
00026 // Base Class Headers --
00027 //----------------------
00028 
00029 //------------------------------------
00030 // Collaborating Class Declarations --
00031 //------------------------------------
00032 
00033 //              ---------------------
00034 //              -- Class Interface --
00035 //              ---------------------
00036 
00037 class L1TriggerLutFile {
00038 
00039   public:
00040  
00042     L1TriggerLutFile(const std::string name = "" );
00043     
00045     L1TriggerLutFile(const L1TriggerLutFile& ); 
00046 
00048     virtual ~L1TriggerLutFile();
00049  
00051     L1TriggerLutFile& operator=(const L1TriggerLutFile&);
00052 
00054     inline const std::string& getName() const { return m_file; }
00055     
00057     int open();
00058     
00060     inline bool good() { return m_fin.good(); }
00061 
00063     inline bool bad() { return m_fin.bad(); }
00064     
00066     inline void close() { m_fin.close(); }
00067 
00069     void ignoreLines(int n);
00070     
00072     int readInteger();
00073 
00075     int readHex();
00076 
00078     std::string readString();
00079 
00080   private:
00081 
00082     std::ifstream m_fin;       // input file stream
00083     std::string   m_file;      // file name
00084 
00085 }; 
00086 
00087 #endif