| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

In This Package:

LtbReadout.h

Go to the documentation of this file.
00001 #ifndef LTBREADOUTFORMAT_LTBREADOUT_H
00002 #define LTBREADOUTFORMAT_LTBREADOUT_H
00003 
00004 /*
00005  *  LtbReadout.h
00006  *  LtbReadoutFormat
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 "LtbReadoutFormat/LtbBuffer.h"
00016 #include "LtbReadoutFormat/LtbTraits.h"
00017 
00018 namespace DybDaq {
00019     class LtbBuffer;
00020     class LtbFoot;
00021     class LtbFrame;
00022     class LtbHead;
00023 }
00024 
00025 #include "DaqReadoutFormat/DaqContainer.h"
00026 
00027 namespace DybDaq {
00028 
00029 class LtbReadout : public DaqContainer, public RomData {
00030 
00031 public:
00032 
00033     typedef std::vector<const LtbFrame*> LtbFramePtrList;
00034 
00038     LtbReadout(const unsigned int localTriggerNumber,
00039                const unsigned int rawTriggerTotal,
00040                const unsigned int ltbStatus,
00041                const bool clockError,
00042                const LtbTraits& traits);
00043 
00047     LtbReadout(const ByteBuffer& byteBuffer,
00048                const unsigned int bufferSize);
00049 
00053     virtual ~LtbReadout();
00054 
00058     virtual const DaqTraits& daqTraits() const;
00059 
00060     /*
00061      * Returns the LtbHead for this readout.
00062      */
00063     const LtbHead& head() const;
00064 
00065     /*
00066      * Returns the list of LtbFrames for this readout.
00067      */
00068     const LtbFramePtrList& ltbFrames() const;
00069     /*
00070      * Returns the LtbFoot for this readout.
00071      */
00072     const LtbFoot& foot() const;
00073 
00077     virtual unsigned int romSize() const;
00078 
00083     virtual unsigned int gatherRom(DaqBuffer::OutputBufferList& outputBuffers) const;
00084 
00089     virtual unsigned int inspectRom(DaqBuffer::Bytes& inspectors) const;
00090     
00094     virtual unsigned int bufferSize() const;
00095 
00099     const LtbFrame& addFrame(const unsigned int readoutType,
00100                              const unsigned int triggerMask,
00101                              const LtbTraits::LtbDateTime& dateTime,
00102                              const unsigned int halfNanoseconds,
00103                              const int accumulation,
00104                              const unsigned int hitSum,
00105                              const bool totalEsum,
00106                              const bool highEsum,
00107                              const bool lowEsum,
00108                              const unsigned int energySum,
00109                              const unsigned int crossTriggerSource,
00110                              const bool accumulationStatus,
00111                              const bool validGps,
00112                              const bool usingUtc,
00113                              const bool validClockSystem,
00114                              const bool feeBufferFull,
00115                              const bool ltbBufferFull,
00116                              const unsigned int blockedTriggerCount);
00117 
00121     const LtbFrame& addFrame(const LtbFrame* frame);
00122 
00123 protected:
00124 
00128     virtual unsigned int gatherComponents(OutputBufferList& outputBuffers) const;
00129 
00133     virtual unsigned int inspectComponents(DaqBuffer::Bytes& inspectors) const;
00134     
00138     virtual void expanded(const unsigned int size);
00139 
00144     virtual bool setRomExpandable(DaqExpandable& expandable);
00145 
00146 private:
00147 
00151     LtbReadout();
00152 
00156     LtbReadout(LtbReadout& rhs);
00157 
00161     LtbReadout& operator=(LtbReadout& rhs);
00162 
00163     /*
00164      * Returns the LtbFoot for this readout.
00165      */
00166     LtbFoot& foot();
00167 
00171     mutable LtbHead* m_head;
00172 
00176     mutable LtbFramePtrList* m_frames;
00177 
00181     mutable LtbFoot* m_foot;
00182 
00183 };
00184 
00185 }
00186 
00187 #endif // LTBREADOUTFORMAT_LTBREADOUT_H
| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

Generated on Mon Apr 11 20:08:08 2011 for LtbReadoutFormat by doxygen 1.4.7