/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::FecReadout Class Reference

#include <FecReadout.h>

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

List of all members.

Public Types

typedef std::vector< const
FecData * > 
FecDataPtrList
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

 FecReadout (const FecTraits &traits)
 FecReadout (const ByteBuffer &byteBuffer, const unsigned int length, const unsigned int verFormat=0)
virtual ~FecReadout ()
virtual const DaqTraitsdaqTraits () const
const FecDataPtrListfecDataList () 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 FecDataaddFecData (const unsigned int rpcCFId, const unsigned int rpcFecId, const bool transErr1, const bool transErr2, const unsigned int trigType, const bool fullFlag, const bool validGPS, const bool validCLK, const bool usingUTC, const unsigned int second, const unsigned int nanoSecond, const unsigned int hitMap)
const FecDataaddFecData (const unsigned int rpcCFId, const unsigned int rpcFecId, const unsigned int trigType, const unsigned int second, const unsigned int nanoSecond, const unsigned int hitMap)
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

 FecReadout ()
 FecReadout (const FecReadout &)
FecReadoutoperator= (const FecReadout &)
const FecTraitsfecTraits () const
const FecDataadd (const FecData *fecData)

Private Attributes

FecDataPtrListm_fecList
unsigned int m_verFormat
const FecTraitsm_fecTraits

Friends

friend class DaqContainer

Detailed Description

Definition at line 18 of file FecReadout.h.


Member Typedef Documentation

typedef std::vector<const FecData*> DybDaq::FecReadout::FecDataPtrList

Definition at line 21 of file FecReadout.h.


Constructor & Destructor Documentation

FecReadout::FecReadout ( const FecTraits traits)

Definition at line 14 of file FecReadout.cc.

   : DaqContainer(),
     m_fecList(0),
     m_verFormat(0),
     m_fecTraits(&traits)
{
}
FecReadout::FecReadout ( const ByteBuffer byteBuffer,
const unsigned int  length,
const unsigned int  verFormat = 0 
)

Definition at line 22 of file FecReadout.cc.

FecReadout::~FecReadout ( ) [virtual]

Definition at line 33 of file FecReadout.cc.

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

Member Function Documentation

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

Reimplemented from DybDaq::DaqContainer.

Definition at line 45 of file FecReadout.cc.

{
   return fecTraits();
}
const FecReadout::FecDataPtrList & FecReadout::fecDataList ( ) const

Definition at line 50 of file FecReadout.cc.

{
   if ( m_fecList == 0 ) {
      m_fecList = new FecDataPtrList();
      if ( hasByteBuffer() ) {
         const FecTraits& traits = fecTraits();
         const ByteBuffer& buffer = byteBuffer();

         const unsigned int originalPosition = buffer.position();
         buffer.position( begin() );
         const unsigned int finished = containerSize() / traits.fecSize();
         for ( unsigned int count = 0; count != finished; ++count ) {
            FecData* fecData = new FecData(buffer, traits);
            m_fecList->push_back(fecData);
         }
         buffer.position( originalPosition );
      }
   }
   return *m_fecList;
}
unsigned int FecReadout::romSize ( ) const [virtual]

Implements DybDaq::RomData.

Definition at line 71 of file FecReadout.cc.

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

Implements DybDaq::RomData.

Definition at line 76 of file FecReadout.cc.

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

Implements DybDaq::RomData.

Definition at line 81 of file FecReadout.cc.

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

Implements DybDaq::DaqContainer.

Definition at line 86 of file FecReadout.cc.

{
   unsigned int result = 0;
   const FecDataPtrList& fecList = fecDataList();

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

   return result;
}
const FecData & FecReadout::addFecData ( const unsigned int  rpcCFId,
const unsigned int  rpcFecId,
const bool  transErr1,
const bool  transErr2,
const unsigned int  trigType,
const bool  fullFlag,
const bool  validGPS,
const bool  validCLK,
const bool  usingUTC,
const unsigned int  second,
const unsigned int  nanoSecond,
const unsigned int  hitMap 
)

Definition at line 100 of file FecReadout.cc.

{
   FecData* result = new FecData(rpcCFId,
                                 rpcFecId,
                                 transErr1,
                                 transErr2,
                                 trigType,
                                 fullFlag,
                                 validGPS,
                                 validCLK,
                                 usingUTC,
                                 second,
                                 nanoSecond,
                                 hitMap,
                                 fecTraits() );
   return add( result );
}
const FecData & FecReadout::addFecData ( const unsigned int  rpcCFId,
const unsigned int  rpcFecId,
const unsigned int  trigType,
const unsigned int  second,
const unsigned int  nanoSecond,
const unsigned int  hitMap 
)

Definition at line 129 of file FecReadout.cc.

{
   FecData* result = new FecData(rpcCFId,
                                 rpcFecId,
                                 trigType,
                                 second,
                                 nanoSecond,
                                 hitMap,
                                 fecTraits() );
   return add( result );
}
unsigned int FecReadout::gatherComponents ( OutputBufferList outputBuffers) const [protected, virtual]

Implements DybDaq::DaqContainer.

Definition at line 146 of file FecReadout.cc.

{
   unsigned int result = 0;
   const FecDataPtrList& fecList = fecDataList();

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

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

Implements DybDaq::DaqContainer.

Definition at line 160 of file FecReadout.cc.

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

Implements DybDaq::DaqContainer.

Definition at line 174 of file FecReadout.cc.

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

Implements DybDaq::RomData.

Definition at line 179 of file FecReadout.cc.

{
   return setExpandable(expandable);
}
FecReadout& DybDaq::FecReadout::operator= ( const FecReadout ) [private]
const FecTraits & FecReadout::fecTraits ( ) const [private]

Definition at line 184 of file FecReadout.cc.

const FecData & FecReadout::add ( const FecData fecData) [private]

Definition at line 192 of file FecReadout.cc.

{
   if ( m_fecList == 0 ) {
      m_fecList = new FecDataPtrList();
   }

   m_fecList->push_back(fecData);
   expanded( fecData->bufferSize() );

   return *fecData;
}

Member Data Documentation

Definition at line 108 of file FecReadout.h.

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

Definition at line 111 of file FecReadout.h.

const FecTraits* DybDaq::FecReadout::m_fecTraits [mutable, private]

Definition at line 114 of file FecReadout.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:55 for FecReadoutFormat by doxygen 1.7.4