00001 #ifndef DAQREADOUTFORMAT_BITSINSPECTOR_H 00002 #define DAQREADOUTFORMAT_BITSINSPECTOR_H 00003 00004 /* 00005 * BitsInspector.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 class BitsDefinition; 00016 } 00017 00018 namespace DybDaq { 00019 00020 class BitsInspector { 00021 00022 public: 00023 00027 BitsInspector(unsigned int value, 00028 const DybDaq::BitsDefinition& definition); 00029 00033 virtual ~BitsInspector(); 00034 00038 unsigned int lowBit() const; 00039 00043 unsigned int highBit() const; 00044 00048 unsigned int value() const; 00049 00053 const std::string& description() const; 00054 00055 protected: 00056 00057 private: 00058 00062 BitsInspector(); 00063 00067 BitsInspector(BitsInspector& rhs); 00068 00072 BitsInspector& operator=(BitsInspector& rhs); 00073 00077 const unsigned int m_value; 00078 00082 const DybDaq::BitsDefinition& m_definition; 00083 00084 }; 00085 00086 } 00087 00088 #endif // DAQREADOUTFORMAT_BITSINSPECTOR_H