CMS 3D CMS Logo

Public Member Functions | Protected Attributes

DCCDataBlockPrototype Class Reference

#include <DCCDataBlockPrototype.h>

Inheritance diagram for DCCDataBlockPrototype:
DCCFEBlock DCCMemBlock DCCSRPBlock DCCTCCBlock DCCSCBlock DCCTowerBlock DCCEBSRPBlock DCCEESRPBlock DCCEBTCCBlock DCCEETCCBlock

List of all members.

Public Member Functions

 DCCDataBlockPrototype (DCCDataUnpacker *unpacker, EcalElectronicsMapper *mapper, DCCEventBlock *event, bool unpack=true)
virtual void display (std::ostream &o)
void enableSyncChecks ()
virtual unsigned int getLength ()
virtual int unpack (uint64_t **data, unsigned int *dwToEnd)
virtual void updateCollectors ()
virtual void updateEventPointers ()

Protected Attributes

unsigned int blockLength_
uint64_t * data_
uint64_t ** datap_
unsigned int * dwToEnd_
bool error_
DCCEventBlockevent_
EcalElectronicsMappermapper_
bool sync_
DCCDataUnpackerunpacker_
bool unpackInternalData_

Detailed Description

Definition at line 31 of file DCCDataBlockPrototype.h.


Constructor & Destructor Documentation

DCCDataBlockPrototype::DCCDataBlockPrototype ( DCCDataUnpacker unpacker,
EcalElectronicsMapper mapper,
DCCEventBlock event,
bool  unpack = true 
)

Class constructor

Definition at line 4 of file DCCDataBlockPrototype.cc.

: unpacker_(unp), error_(false), mapper_(mapper), event_(event), unpackInternalData_(unpackInternalData), sync_(false)
{}

Member Function Documentation

virtual void DCCDataBlockPrototype::display ( std::ostream &  o) [inline, virtual]

Reimplemented in DCCFEBlock, DCCMemBlock, DCCSRPBlock, and DCCTCCBlock.

Definition at line 43 of file DCCDataBlockPrototype.h.

{} 
void DCCDataBlockPrototype::enableSyncChecks ( ) [inline]

Definition at line 45 of file DCCDataBlockPrototype.h.

References sync_.

Referenced by DCCEventBlock::enableSyncChecks().

{sync_=true;}
virtual unsigned int DCCDataBlockPrototype::getLength ( ) [inline, virtual]

Reimplemented in DCCEETCCBlock, and DCCFEBlock.

Definition at line 65 of file DCCDataBlockPrototype.h.

References blockLength_.

Referenced by DCCTCCBlock::unpack().

{ return blockLength_; }
virtual int DCCDataBlockPrototype::unpack ( uint64_t **  data,
unsigned int *  dwToEnd 
) [inline, virtual]

Definition at line 39 of file DCCDataBlockPrototype.h.

References BLOCK_UNPACKED.

{ return BLOCK_UNPACKED;}
virtual void DCCDataBlockPrototype::updateCollectors ( ) [inline, virtual]
virtual void DCCDataBlockPrototype::updateEventPointers ( ) [inline, virtual]

Updates data pointer and dw to end of event

Definition at line 50 of file DCCDataBlockPrototype.h.

References blockLength_, datap_, and dwToEnd_.

Referenced by DCCMemBlock::unpack(), DCCFEBlock::unpack(), DCCTCCBlock::unpack(), and DCCSRPBlock::unpack().

                                      { 

     //cout<<"\n block Length "<<blockLength_;
     //cout<<"\n dwToEne...   "<<*dwToEnd_;    

      *datap_   += blockLength_;

      // preventing pointers from navigating wildly outside of fedBlock
      if((*dwToEnd_)>=blockLength_) 
        *dwToEnd_ -= blockLength_; 
      else 
        *dwToEnd_ = 0; 

    }

Member Data Documentation

unsigned int DCCDataBlockPrototype::blockLength_ [protected]
uint64_t* DCCDataBlockPrototype::data_ [protected]
uint64_t** DCCDataBlockPrototype::datap_ [protected]
unsigned int* DCCDataBlockPrototype::dwToEnd_ [protected]
bool DCCDataBlockPrototype::sync_ [protected]