Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:02:17

0001 //
0002 // A simple storage buffer for FFTJet corrections data.
0003 //
0004 // I. Volobouev, 07/31/2012
0005 //
0006 
0007 #ifndef CondFormats_JetMETObjects_FFTJetCorrectorParameters_h
0008 #define CondFormats_JetMETObjects_FFTJetCorrectorParameters_h
0009 
0010 #include "CondFormats/Serialization/interface/Serializable.h"
0011 
0012 #include <string>
0013 
0014 class FFTJetCorrectorParameters {
0015 public:
0016   // Constructors
0017   inline FFTJetCorrectorParameters() {}
0018   inline explicit FFTJetCorrectorParameters(const std::string& s) : m_buffer(s) {}
0019   inline FFTJetCorrectorParameters(const char* c, std::size_t len) : m_buffer(c, len) {}
0020   inline explicit FFTJetCorrectorParameters(std::size_t len) : m_buffer(len, '\0') {}
0021 
0022   // Inspectors
0023   inline const std::string& str() const { return m_buffer; }
0024   inline std::size_t length() const { return m_buffer.size(); }
0025   inline bool empty() const { return m_buffer.empty(); }
0026   inline const char* getBuffer() const { return m_buffer.empty() ? static_cast<const char*>(nullptr) : &m_buffer[0]; }
0027 
0028   // Modifiers
0029   inline char* getBuffer() { return m_buffer.empty() ? static_cast<char*>(nullptr) : &m_buffer[0]; }
0030   inline void setStr(const std::string& s) { m_buffer = s; }
0031 
0032 private:
0033   std::string m_buffer;
0034 
0035   COND_SERIALIZABLE;
0036 };
0037 
0038 #endif  // CondFormats_JetMETObjects_FFTJetCorrectorParameters_h