/search.css" rel="stylesheet" type="text/css"/> /search.js">
00001 #ifndef EVENTREADOUTFORMAT_ROMHEADER_H 00002 #define EVENTREADOUTFORMAT_ROMHEADER_H 00003 00004 /* 00005 * RomHeader.h 00006 * EventReadoutFormat 00007 * 00008 * Created by Simon Patton on 7/19/10. 00009 * Copyright 2010 DayaBay Collaboration. All rights reserved. 00010 * 00011 */ 00012 00013 namespace DybDaq { 00014 class RomFragment; 00015 } 00016 00017 #include "EventReadoutFormat/EventBuffer.h" 00018 00019 namespace DybDaq { 00020 00021 class RomHeader : public EventBuffer { 00022 00023 public: 00024 00025 friend class RomFragment; 00026 00030 virtual ~RomHeader(); 00031 00035 unsigned int headerSize() const; 00036 00040 unsigned int totalSize() const; 00041 00045 unsigned int site() const; 00046 00050 unsigned int detector() const; 00051 00055 unsigned int moduleType() const; 00056 00060 unsigned int slot() const; 00061 00065 virtual unsigned int bufferSize() const; 00066 00067 protected: 00068 00072 RomHeader(const unsigned int site, 00073 const unsigned int detector, 00074 const unsigned int moduleType, 00075 const unsigned int slot, 00076 const EventTraits& traits); 00077 00081 RomHeader(const ByteBuffer& byteBuffer, 00082 const EventTraits& traits); 00083 00084 protected: 00085 00089 virtual unsigned int formatComponent() const; 00090 00091 private: 00092 00096 RomHeader(); 00097 00101 RomHeader(RomHeader& rhs); 00102 00106 RomHeader& operator=(RomHeader& rhs); 00107 00111 void setHeaderSize(const unsigned int headerLength); 00112 00116 void setTotalSize(const unsigned int totalLength); 00117 00121 void setSite(const unsigned int site); 00122 00126 void setDetector(const unsigned int detector); 00127 00131 void setModuleType(const unsigned int moduleType); 00132 00136 void setSlot(const unsigned int slot); 00137 }; 00138 00139 } 00140 00141 #endif // EVENTREADOUTFORMAT_ROMHEADER_H