/search.css" rel="stylesheet" type="text/css"/> /search.js">
00001 #ifndef FEEREADOUTFORMAT_FEEREADOUT_H 00002 #define FEEREADOUTFORMAT_FEEREADOUT_H 00003 00004 /* 00005 * FeeReadout.h 00006 * FeeReadoutFormat 00007 * 00008 * Created by Simon Patton on 7/19/10. 00009 * Copyright 2010 DayaBay Collaboration. All rights reserved. 00010 * 00011 */ 00012 #include <vector> 00013 00014 #include "DaqReadoutFormat/RomData.h" 00015 #include "FeeReadoutFormat/FeeBuffer.h" 00016 00017 namespace DybDaq { 00018 class FeeFoot; 00019 class FeeHead; 00020 class FeeHit; 00021 } 00022 00023 #include "DaqReadoutFormat/DaqContainer.h" 00024 00025 namespace DybDaq { 00026 00027 class FeeReadout : public DaqContainer, public RomData { 00028 00029 public: 00030 00031 typedef std::vector<const FeeHit*> FeeHitPtrList; 00032 00033 FeeReadout(const unsigned int triggerNumber, 00034 const unsigned int triggerType, 00035 const bool checked, 00036 const bool error, 00037 const FeeTraits& traits); 00038 00042 FeeReadout(const ByteBuffer& byteBuffer, 00043 const unsigned int length); 00044 00048 virtual ~FeeReadout(); 00049 00053 virtual const DaqTraits& daqTraits() const; 00054 00055 /* 00056 * Returns the FeeHead for this readout. 00057 */ 00058 const FeeHead& head() const; 00059 00060 /* 00061 * Returns the list of FeeHitPtrList for this readout. 00062 */ 00063 const FeeHitPtrList& feeHits() const; 00064 00065 /* 00066 * Returns the FeeFoot for this readout. 00067 */ 00068 const FeeFoot& foot() const; 00069 00073 virtual unsigned int romSize() const; 00074 00079 virtual unsigned int gatherRom(DaqBuffer::OutputBufferList& outputBuffers) const; 00080 00085 virtual unsigned int inspectRom(DaqBuffer::Bytes& inspectors) const; 00086 00090 virtual unsigned int bufferSize() const; 00091 00095 const FeeHit& addHit(const unsigned int channel, 00096 const unsigned int peakCycle, 00097 const bool highRangeAdc, 00098 const unsigned int pedestal, 00099 const unsigned int charge, 00100 const unsigned int hitNumber, 00101 const unsigned int time); 00102 00103 protected: 00104 00108 virtual unsigned int gatherComponents(OutputBufferList& outputBuffers) const; 00109 00113 virtual unsigned int inspectComponents(DaqBuffer::Bytes& inspectors) const; 00114 00118 virtual void expanded(const unsigned int size); 00119 00124 virtual bool setRomExpandable(DaqExpandable& expandable); 00125 00126 private: 00127 00131 FeeReadout(); 00132 00136 FeeReadout(FeeReadout& rhs); 00137 00141 FeeReadout& operator=(FeeReadout& rhs); 00142 00146 const FeeHit& add(const FeeHit* hit); 00147 00148 /* 00149 * Returns the FeeFoot for this readout. 00150 */ 00151 FeeFoot& foot(); 00152 00156 mutable FeeHead* m_head; 00157 00161 mutable FeeHitPtrList* m_hits; 00162 00166 mutable FeeFoot* m_foot; 00167 }; 00168 00169 } 00170 00171 #endif // FEEREADOUTFORMAT_FEEREADOUT_H