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

In This Package:

FecReadout.h

Go to the documentation of this file.
00001 #ifndef FECREADOUTFORMAT_FECREADOUT_H
00002 #define FECREADOUTFORMAT_FECREADOUT_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 FecData;
00012    class FecTraits;
00013 }
00014 
00015 
00016 namespace DybDaq {
00017 
00018 class FecReadout : public DaqContainer, public RomData {
00019 public :
00020 
00021    typedef std::vector<const FecData*> FecDataPtrList;
00022 
00023    // Constructor for writing
00024    FecReadout(const FecTraits& traits);
00025 
00026    // Constructor for reading
00027    FecReadout(const ByteBuffer& byteBuffer,
00028               const unsigned int length,
00029               const unsigned int verFormat = 0);
00030 
00031    // Destructor
00032    virtual ~FecReadout();
00033 
00034    // Returns the DaqTraits for parsing
00035    virtual const DaqTraits& daqTraits() const;
00036 
00037    // Get the list of FecData
00038    const FecDataPtrList& fecDataList() 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 FEC data to this CBLT readout
00056    const FecData& addFecData(const unsigned int rpcCFId,
00057                              const unsigned int rpcFecId,
00058                              const bool transErr1,
00059                              const bool transErr2,
00060                              const unsigned int trigType,
00061                              const bool fullFlag,
00062                              const bool validGPS,
00063                              const bool validCLK,
00064                              const bool usingUTC,
00065                              const unsigned int second,
00066                              const unsigned int nanoSecond,
00067                              const unsigned int hitMap);
00068 
00069 
00070 protected :
00071 
00072     // Gathers the DAQ formatted bytes for this object's components.
00073     virtual unsigned int gatherComponents(OutputBufferList& outputBuffers) const;
00074 
00075     //Inspects the DAQ formatted bytes for this object's components.
00076     virtual unsigned int inspectComponents(DaqBuffer::Bytes& inspectors) const;
00077     
00078     // Tells this object that its contents has expanded by the specified number of bytes.
00079     virtual void expanded(const unsigned int size);
00080 
00081     // Associates the supplied DaqExpandable with this object if it is not already associated with
00082     // one. It returns true if the association is successful, false otherwise.
00083     virtual bool setRomExpandable(DaqExpandable& expandable);
00084 
00085 
00086 private :
00087 
00088     // Following interfaces are suppressed by default
00089     FecReadout();
00090     FecReadout(const FecReadout&);
00091     FecReadout& operator=(const FecReadout&);
00092 
00093     // Returns the FecTraits for parsing
00094     const FecTraits& fecTraits() const;
00095 
00096     // Add a RpcFecData to this CBLT readout
00097     const FecData& add(const FecData* fecData);
00098 
00099 
00100     // The list of FecData
00101     mutable FecDataPtrList* m_fecList;
00102 
00103     // The version of FEC data format
00104     unsigned int m_verFormat;
00105 
00106     // The FecTraits pointer
00107     mutable const FecTraits* m_fecTraits;
00108 };
00109 
00110 }
00111 
00112 #endif
| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

Generated on Mon Apr 11 20:07:52 2011 for FecReadoutFormat by doxygen 1.4.7