00001 #ifndef CBLTREADOUTFORMAT_CBLTBODY_H 00002 #define CBLTREADOUTFORMAT_CBLTBODY_H 00003 00004 /* 00005 * CbltBody.h 00006 * CbltReadoutFormat 00007 * 00008 * Created by Simon Patton on 7/19/10. 00009 * Copyright 2010 DayaBay Collaboration. All rights reserved. 00010 * 00011 */ 00012 #include "CbltReadoutFormat/CbltBuffer.h" 00013 00014 namespace DybDaq { 00015 class CbltReadout; 00016 class RomData; 00017 } 00018 00019 #include "DaqReadoutFormat/DaqContainer.h" 00020 00021 namespace DybDaq { 00022 00023 class CbltBody : public DaqContainer { 00024 00025 public: 00026 00027 friend class CbltReadout; 00028 00032 virtual ~CbltBody(); 00033 00034 /* 00035 * Returns the RomData for this readout. 00036 */ 00037 const RomData& data() const; 00038 00042 virtual unsigned int bufferSize() const; 00043 00044 protected: 00045 00049 CbltBody(const RomData* romData, 00050 const unsigned int moduleType, 00051 DaqExpandable& expandable); 00052 00056 CbltBody(const ByteBuffer& byteBuffer, 00057 const unsigned int moduleType, 00058 const unsigned int size, 00059 const CbltTraits& traits); 00060 00064 virtual unsigned int gatherComponents(OutputBufferList& outputBuffers) const; 00065 00069 virtual unsigned int inspectComponents(DaqBuffer::Bytes& inspectors) const; 00070 00074 virtual void expanded(const unsigned int size); 00075 00076 private: 00077 00081 CbltBody(); 00082 00086 CbltBody(CbltBody& rhs); 00087 00091 CbltBody& operator=(CbltBody& rhs); 00092 00096 mutable const RomData* m_data; 00097 00101 unsigned int m_moduleType; 00102 00103 }; 00104 00105 } 00106 00107 #endif // CBLTREADOUTFORMAT_CBLTBODY_H