/search.css" rel="stylesheet" type="text/css"/> /search.js">
| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

In This Package:

Public Types | Public Member Functions | Static Public Attributes | Protected Member Functions | Private Member Functions | Private Attributes | Friends
DybDaq::RtmReadout Class Reference

#include <RtmReadout.h>

Inheritance diagram for DybDaq::RtmReadout:
Inheritance graph
[legend]
Collaboration diagram for DybDaq::RtmReadout:
Collaboration graph
[legend]

List of all members.

Public Types

typedef std::vector< const
RtmData * > 
RtmDataPtrList
typedef std::pair< const char
*, unsigned int > 
OutputBuffer
typedef std::vector< OutputBufferOutputBufferList
typedef std::vector
< ByteInspector * > 
Bytes
typedef std::vector
< BitsInspector * > 
Bits

Public Member Functions

 RtmReadout (const RtmTraits &traits)
 RtmReadout (const ByteBuffer &byteBuffer, const unsigned int length, const unsigned int verFormat=0)
virtual ~RtmReadout ()
virtual const DaqTraitsdaqTraits () const
const RtmDataPtrListrtmDataList () const
virtual unsigned int romSize () const
virtual unsigned int gatherRom (OutputBufferList &outputBuffers) const
virtual unsigned int inspectRom (DaqBuffer::Bytes &inspectors) const
virtual unsigned int bufferSize () const
const RtmDataaddRtmData (const unsigned int rpcCFId, const bool transErr, const bool romAlmostFull, const bool rtmAlmostFull, const bool fullFlag, const bool validGPS, const bool validCLK, const bool usingUTC, const unsigned int second, const unsigned int nanoSecond, const int accumulation, const unsigned int triggerRot, const unsigned int triggerMap)
const RtmDataadd (const RtmData *rtmData)
virtual unsigned int gather (OutputBufferList &outputBuffers) const
virtual unsigned int inspect (DaqBuffer::Bytes &inspectors) const
bool hasDaqTraits () const

Static Public Attributes

static const unsigned int kBytesInInt
static const unsigned int kUndefinedFormatComponent

Protected Member Functions

virtual unsigned int gatherComponents (OutputBufferList &outputBuffers) const
virtual unsigned int inspectComponents (DaqBuffer::Bytes &inspectors) const
virtual void expanded (const unsigned int size)
virtual bool setRomExpandable (DaqExpandable &expandable)
unsigned int begin () const
unsigned int containerSize () const
bool setExpandable (DaqExpandable &expandable)
void notifyExpandable (const unsigned int size)
bool expandedByRomData (const RomData *romData)
const char * buffer () const
char * buffer ()
bool hasByteBuffer () const
const ByteBufferbyteBuffer () const
unsigned int fillInspectors (DaqBuffer::Bytes &inspectors, unsigned int component, unsigned int cursor) const
virtual bool readBool (const unsigned int field) const
virtual int readInt (const unsigned int field) const
virtual unsigned char readUnsignedChar (const unsigned int field) const
virtual unsigned int readUnsignedInt (const unsigned int field) const
virtual void writeField (const bool value, const unsigned int field)
virtual void writeField (const int value, const unsigned int field)
virtual void writeField (const unsigned int value, const unsigned int field)
virtual unsigned int formatComponent () const

Private Member Functions

 RtmReadout ()
 RtmReadout (const RtmReadout &)
RtmReadoutoperator= (const RtmReadout &)
const RtmTraitsrtmTraits () const

Private Attributes

RtmDataPtrListm_rtmList
unsigned int m_verFormat
const RtmTraitsm_rtmTraits

Friends

friend class DaqContainer

Detailed Description

Definition at line 18 of file RtmReadout.h.


Member Typedef Documentation

typedef std::vector<const RtmData*> DybDaq::RtmReadout::RtmDataPtrList

Definition at line 21 of file RtmReadout.h.


Constructor & Destructor Documentation

RtmReadout::RtmReadout ( const RtmTraits traits)

Definition at line 13 of file RtmReadout.cc.

   : DaqContainer(),
     m_rtmList(0),
     m_verFormat(0),
     m_rtmTraits(&traits)
{
}
RtmReadout::RtmReadout ( const ByteBuffer byteBuffer,
const unsigned int  length,
const unsigned int  verFormat = 0 
)

Definition at line 21 of file RtmReadout.cc.

RtmReadout::~RtmReadout ( ) [virtual]

Definition at line 32 of file RtmReadout.cc.

{
   if ( m_rtmList != 0 ) {
      RtmDataPtrList::iterator it = m_rtmList->begin();
      while ( it != m_rtmList->end() ) {
         delete *it;
         ++it;
      }
      delete m_rtmList;
   }
}
DybDaq::RtmReadout::RtmReadout ( ) [private]
DybDaq::RtmReadout::RtmReadout ( const RtmReadout ) [private]

Member Function Documentation

const DaqTraits & RtmReadout::daqTraits ( ) const [virtual]

Reimplemented from DybDaq::DaqContainer.

Definition at line 44 of file RtmReadout.cc.

{
   return rtmTraits();
}
const RtmReadout::RtmDataPtrList & RtmReadout::rtmDataList ( ) const

Definition at line 49 of file RtmReadout.cc.

{
   if ( m_rtmList == 0 ) {
      m_rtmList = new RtmDataPtrList();
      if ( hasByteBuffer() ) {
         const RtmTraits& traits = rtmTraits();
         const ByteBuffer& buffer = byteBuffer();

         const unsigned int originalPosition = buffer.position();
         buffer.position( begin() );
         const unsigned int finished = containerSize() / traits.rtmSize();
         for ( unsigned int count = 0; count != finished; ++count ) {
            RtmData* rtmData = new RtmData(buffer, traits);
            m_rtmList->push_back(rtmData);
         }
         buffer.position( originalPosition );
      }
   }
   return *m_rtmList;
}
unsigned int RtmReadout::romSize ( ) const [virtual]

Implements DybDaq::RomData.

Definition at line 70 of file RtmReadout.cc.

{
   return bufferSize();
}
unsigned int RtmReadout::gatherRom ( OutputBufferList outputBuffers) const [virtual]

Implements DybDaq::RomData.

Definition at line 75 of file RtmReadout.cc.

{
   return gather(outputBuffers);
}
unsigned int RtmReadout::inspectRom ( DaqBuffer::Bytes inspectors) const [virtual]

Implements DybDaq::RomData.

Definition at line 80 of file RtmReadout.cc.

{
    return inspect(inspectors);
}
unsigned int RtmReadout::bufferSize ( ) const [virtual]

Implements DybDaq::DaqContainer.

Definition at line 85 of file RtmReadout.cc.

{
   unsigned int result = 0;
   const RtmDataPtrList& rtmList = rtmDataList();

   RtmDataPtrList::const_iterator it = rtmList.begin();
   while ( it != rtmList.end() ) {
      result += (*it)->bufferSize();
      ++it;
   }

   return result;
}
const RtmData & RtmReadout::addRtmData ( const unsigned int  rpcCFId,
const bool  transErr,
const bool  romAlmostFull,
const bool  rtmAlmostFull,
const bool  fullFlag,
const bool  validGPS,
const bool  validCLK,
const bool  usingUTC,
const unsigned int  second,
const unsigned int  nanoSecond,
const int  accumulation,
const unsigned int  triggerRot,
const unsigned int  triggerMap 
)

Definition at line 99 of file RtmReadout.cc.

{
   RtmData* result = new RtmData(rpcCFId,
                                 transErr,
                                 romAlmostFull,
                                 rtmAlmostFull,
                                 fullFlag,
                                 validGPS,
                                 validCLK,
                                 usingUTC,
                                 second,
                                 nanoSecond,
                                 accumulation,
                                 triggerRot,
                                 triggerMap,
                                 rtmTraits() );
   return add( result );
}
const RtmData & RtmReadout::add ( const RtmData rtmData)

Definition at line 176 of file RtmReadout.cc.

{
   if ( m_rtmList == 0 ) {
      m_rtmList = new RtmDataPtrList();
   }

   m_rtmList->push_back(rtmData);
   expanded( rtmData->bufferSize() );

   return *rtmData;
}
unsigned int RtmReadout::gatherComponents ( OutputBufferList outputBuffers) const [protected, virtual]

Implements DybDaq::DaqContainer.

Definition at line 130 of file RtmReadout.cc.

{
   unsigned int result = 0;
   const RtmDataPtrList& rtmList = rtmDataList();

   RtmDataPtrList::const_iterator it = rtmList.begin();
   while ( it != rtmList.end() ) {
      result += (*it)->gather(outputBuffers);
      ++it;
   }

   return result;
}
unsigned int RtmReadout::inspectComponents ( DaqBuffer::Bytes inspectors) const [protected, virtual]

Implements DybDaq::DaqContainer.

Definition at line 144 of file RtmReadout.cc.

{
    unsigned int result = 0;
    const RtmDataPtrList& rtmList = rtmDataList();
    
    RtmDataPtrList::const_iterator it = rtmList.begin();
    while ( it != rtmList.end() ) {
        result += (*it)->inspect(inspectors);
        ++it;
    }
    
    return result;
}
void RtmReadout::expanded ( const unsigned int  size) [protected, virtual]

Implements DybDaq::DaqContainer.

Definition at line 158 of file RtmReadout.cc.

{
   notifyExpandable(size);
}
bool RtmReadout::setRomExpandable ( DaqExpandable expandable) [protected, virtual]

Implements DybDaq::RomData.

Definition at line 163 of file RtmReadout.cc.

{
   return setExpandable(expandable);
}
RtmReadout& DybDaq::RtmReadout::operator= ( const RtmReadout ) [private]
const RtmTraits & RtmReadout::rtmTraits ( ) const [private]

Definition at line 168 of file RtmReadout.cc.


Member Data Documentation

Definition at line 101 of file RtmReadout.h.

unsigned int DybDaq::RtmReadout::m_verFormat [private]

Definition at line 104 of file RtmReadout.h.

const RtmTraits* DybDaq::RtmReadout::m_rtmTraits [mutable, private]

Definition at line 107 of file RtmReadout.h.


The documentation for this class was generated from the following files:
| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

Generated on Fri May 16 2014 09:52:52 for RtmReadoutFormat by doxygen 1.7.4