CMS 3D CMS Logo

List of all members | Classes | Public Types | Public Member Functions | Protected Member Functions
VFATFrameCollection Class Referenceabstract

#include <VFATFrameCollection.h>

Inheritance diagram for VFATFrameCollection:
SimpleVFATFrameCollection

Classes

class  Iterator
 the VFATFrameCollection interator More...
 

Public Types

typedef std::pair< TotemFramePosition, const VFATFrame * > value_type
 pair: frame DAQ position, frame data More...
 

Public Member Functions

virtual bool Empty () const =0
 returns whether the collection is empty More...
 
virtual const VFATFrameGetFrameByID (unsigned int ID) const =0
 returns pointer to frame with ID, performs NO duplicity check (if there is precisely one frame with this 12bit ID) More...
 
virtual const VFATFrameGetFrameByIndex (TotemFramePosition index) const =0
 returns frame at given position in Slink frame More...
 
virtual const VFATFrameGetFrameByIndexID (TotemFramePosition index, unsigned int ID)
 returns frame at given position in Slink frame and checks 12bit ID More...
 
virtual unsigned int Size () const =0
 return the number of VFAT frames in the collection More...
 
 VFATFrameCollection ()
 
virtual ~VFATFrameCollection ()
 

Protected Member Functions

virtual value_type BeginIterator () const =0
 returns the beginning of the collection More...
 
virtual bool IsEndIterator (const value_type &) const =0
 checks whether the iterator points over the end of the collection More...
 
virtual value_type NextIterator (const value_type &) const =0
 shifts the iterator More...
 

Detailed Description

Interface class for VFAT-frame collections.

Definition at line 22 of file VFATFrameCollection.h.

Member Typedef Documentation

pair: frame DAQ position, frame data

Definition at line 44 of file VFATFrameCollection.h.

Constructor & Destructor Documentation

VFATFrameCollection::VFATFrameCollection ( )
inline

Definition at line 25 of file VFATFrameCollection.h.

25 {}
virtual VFATFrameCollection::~VFATFrameCollection ( )
inlinevirtual

Definition at line 26 of file VFATFrameCollection.h.

References Empty(), GetFrameByID(), GetFrameByIndex(), GetFrameByIndexID(), and Size().

26 {}

Member Function Documentation

virtual value_type VFATFrameCollection::BeginIterator ( ) const
protectedpure virtual

returns the beginning of the collection

Implemented in SimpleVFATFrameCollection.

Referenced by VFATFrameCollection::Iterator::IsEnd(), and VFATFrameCollection::Iterator::Iterator().

virtual bool VFATFrameCollection::Empty ( ) const
pure virtual

returns whether the collection is empty

Implemented in SimpleVFATFrameCollection.

Referenced by ~VFATFrameCollection().

virtual const VFATFrame* VFATFrameCollection::GetFrameByID ( unsigned int  ID) const
pure virtual

returns pointer to frame with ID, performs NO duplicity check (if there is precisely one frame with this 12bit ID)

Implemented in SimpleVFATFrameCollection.

Referenced by ~VFATFrameCollection().

virtual const VFATFrame* VFATFrameCollection::GetFrameByIndex ( TotemFramePosition  index) const
pure virtual

returns frame at given position in Slink frame

Implemented in SimpleVFATFrameCollection.

Referenced by GetFrameByIndexID(), and ~VFATFrameCollection().

const VFATFrame * VFATFrameCollection::GetFrameByIndexID ( TotemFramePosition  index,
unsigned int  ID 
)
virtual

returns frame at given position in Slink frame and checks 12bit ID

Definition at line 14 of file VFATFrameCollection.cc.

References VFATFrame::getChipID(), and GetFrameByIndex().

Referenced by ~VFATFrameCollection().

15 {
16  const VFATFrame* returnframe = GetFrameByIndex(index);
17  if (returnframe == nullptr)
18  return nullptr;
19  return (returnframe->getChipID() == (ID & 0xFFF)) ? returnframe : nullptr;
20 }
virtual const VFATFrame * GetFrameByIndex(TotemFramePosition index) const =0
returns frame at given position in Slink frame
uint32_t ID
Definition: Definitions.h:26
VFATFrame::word getChipID() const
Returns ChipID (ChipID<11:0>).
Definition: VFATFrame.h:69
virtual bool VFATFrameCollection::IsEndIterator ( const value_type ) const
protectedpure virtual

checks whether the iterator points over the end of the collection

Implemented in SimpleVFATFrameCollection.

Referenced by VFATFrameCollection::Iterator::IsEnd().

virtual value_type VFATFrameCollection::NextIterator ( const value_type ) const
protectedpure virtual
virtual unsigned int VFATFrameCollection::Size ( ) const
pure virtual

return the number of VFAT frames in the collection

Implemented in SimpleVFATFrameCollection.

Referenced by ~VFATFrameCollection().