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

In This Package:

RtmReadout.h

Go to the documentation of this file.
00001 #ifndef RTMREADOUTFORMAT_RTMREADOUT_H
00002 #define RTMREADOUTFORMAT_RTMREADOUT_H
00003 
00004 #include "DaqReadoutFormat/RomData.h"
00005 #include "DaqReadoutFormat/DaqContainer.h"
00006 
00007 #include <vector>
00008 
00009 // pre-declaration
00010 namespace DybDaq {
00011    class RtmData;
00012    class RtmTraits;
00013 }
00014 
00015 
00016 namespace DybDaq {
00017 
00018 class RtmReadout : public DaqContainer, public RomData {
00019 public :
00020 
00021    typedef std::vector<const RtmData*> RtmDataPtrList;
00022 
00023    // Constructor for writing
00024    RtmReadout(const RtmTraits& traits);
00025 
00026    // Constructor for reading
00027    RtmReadout(const ByteBuffer& byteBuffer,
00028               const unsigned int length,
00029               const unsigned int verFormat = 0);
00030 
00031    // Destructor
00032    virtual ~RtmReadout();
00033 
00034    // Returns the DaqTraits for parsing
00035    virtual const DaqTraits& daqTraits() const;
00036 
00037    // Get the list of RtmData
00038    const RtmDataPtrList& rtmDataList() const;
00039 
00040    // Returns the total size, in 4-bytes, of all the buffers for this object's components.
00041    virtual unsigned int romSize() const;
00042 
00043    // Adds to the supplied line the OutputBuffers that contain the DAQ format
00044    // of this objects content returning the total number of bytes in the added buffers.
00045    virtual unsigned int gatherRom(OutputBufferList& outputBuffers) const;
00046 
00047    // Adds to the supplied list the DaqBuffer::Bytes that contains inspections of this
00048    // object's objects.
00049    virtual unsigned int inspectRom(DaqBuffer::Bytes& inspectors) const;
00050     
00051    // Returns the size, in 4-bytes, of this ojbect's contents in the buffer.
00052    virtual unsigned int bufferSize() const;
00053 
00054 
00055    // Add RTM data to this CBLT readout
00056    const RtmData& addRtmData(const unsigned int rpcCFId,
00057                              const bool transErr,
00058                              const bool romAlmostFull,
00059                              const bool rtmAlmostFull,
00060                              const bool fullFlag,
00061                              const bool validGPS,
00062                              const bool validCLK,
00063                              const bool usingUTC,
00064                              const unsigned int second,
00065                              const unsigned int nanoSecond,
00066                              const unsigned int accumulation,
00067                              const unsigned int triggerRot,
00068                              const unsigned int triggerMap);
00069 
00070 
00071 protected :
00072 
00073     // Gathers the DAQ formatted bytes for this object's components.
00074     virtual unsigned int gatherComponents(OutputBufferList& outputBuffers) const;
00075 
00076     //Inspects the DAQ formatted bytes for this object's components.
00077     virtual unsigned int inspectComponents(DaqBuffer::Bytes& inspectors) const;
00078     
00079     // Tells this object that its contents has expanded by the specified number of bytes.
00080     virtual void expanded(const unsigned int size);
00081 
00082     // Associates the supplied DaqExpandable with this object if it is not already associated with
00083     // one. It returns true if the association is successful, false otherwise.
00084     virtual bool setRomExpandable(DaqExpandable& expandable);
00085 
00086 
00087 private :
00088 
00089     // Following interfaces are suppressed by default
00090     RtmReadout();
00091     RtmReadout(const RtmReadout&);
00092     RtmReadout& operator=(const RtmReadout&);
00093 
00094     // Returns the RtmTraits for parsing
00095     const RtmTraits& rtmTraits() const;
00096 
00097     // Add a RpcRtmData to this CBLT readout
00098     const RtmData& add(const RtmData* rtmData);
00099 
00100 
00101     // The list of RtmData
00102     mutable RtmDataPtrList* m_rtmList;
00103 
00104     // The version of RTM data format
00105     unsigned int m_verFormat;
00106 
00107     // The RtmTraits pointer
00108     mutable const RtmTraits* m_rtmTraits;
00109 };
00110 
00111 }
00112 
00113 #endif
| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

Generated on Mon Apr 11 20:07:47 2011 for RtmReadoutFormat by doxygen 1.4.7