00001 #ifndef DAQREADOUTFORMAT_BITSDEFINITION_H 00002 #define DAQREADOUTFORMAT_BITSDEFINITION_H 00003 00004 /* 00005 * BitsDefinition.h 00006 * DaqReadoutFormat 00007 * 00008 * Created by Simon Patton on 4/4/11. 00009 * Copyright 2010 DayaBay Collaboration. All rights reserved. 00010 * 00011 */ 00012 #include <string> 00013 00014 namespace DybDaq { 00015 00016 class BitsDefinition { 00017 00018 public: 00019 00023 BitsDefinition(const BitsDefinition& rhs); 00024 00028 BitsDefinition& operator=(const BitsDefinition& rhs); 00029 00033 BitsDefinition(unsigned int field, 00034 unsigned int offset, 00035 unsigned int lowbit, 00036 unsigned int count, 00037 const std::string& description); 00038 00042 virtual ~BitsDefinition(); 00043 00047 unsigned int field() const; 00048 00052 unsigned int offset() const; 00053 00057 unsigned int lowBit() const; 00058 00062 unsigned int highBit() const; 00063 00067 const std::string& description() const; 00068 00069 protected: 00070 00071 private: 00072 00076 BitsDefinition(); 00077 00081 unsigned int m_field; 00082 00086 unsigned int m_offset; 00087 00091 unsigned int m_lowBit; 00092 00096 unsigned int m_count; 00097 00101 const std::string* m_description; 00102 00103 }; 00104 00105 } 00106 00107 #endif // DAQREADOUTFORMAT_BITSDEFINITION_H