00001 /* 00002 * BitsInspector.cc 00003 * DaqReadoutFormat 00004 * 00005 * Created by Simon Patton on 4/4/11. 00006 * Copyright 2010 DayaBay Collaboration. All rights reserved. 00007 * 00008 */ 00009 #include "DaqReadoutFormat/BitsInspector.h" 00010 00011 #include "DaqReadoutFormat/BitsDefinition.h" 00012 00013 using DybDaq::BitsInspector; 00014 using std::string; 00015 00016 BitsInspector::BitsInspector(unsigned int value, 00017 const DybDaq::BitsDefinition& definition) : 00018 m_value(value), 00019 m_definition(definition) { 00020 } 00021 00022 BitsInspector::~BitsInspector() { 00023 } 00024 00025 unsigned int BitsInspector::lowBit() const { 00026 return m_definition.lowBit(); 00027 } 00028 00029 unsigned int BitsInspector::highBit() const { 00030 return m_definition.highBit(); 00031 } 00032 00033 unsigned int BitsInspector::value() const { 00034 return m_value; 00035 } 00036 00037 const string& BitsInspector::description() const { 00038 return m_definition.description(); 00039 }