/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 | Friends
DybDaq::FecData Class Reference

#include <FecData.h>

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

List of all members.

Public Types

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

virtual ~FecData ()
unsigned int rpcCFId () const
unsigned int rpcFecId () const
bool forceTrigger () const
bool parity () const
bool transErr () const
bool transErr1 () const
bool transErr2 () const
bool bitsCheck () 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
virtual unsigned int bufferSize () const
const FecTraitsfecTraits () const
bool hasDaqTraits () const
virtual const DaqTraitsdaqTraits () const
virtual unsigned int gather (OutputBufferList &outputBuffers) const
virtual unsigned int inspect (DaqBuffer::Bytes &inspectors) const

Static Public Attributes

static const unsigned int kBytesInInt
static const unsigned int kUndefinedFormatComponent

Protected Member Functions

virtual unsigned int formatComponent () const
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)

Private Member Functions

 FecData (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 FecTraits &traits)
 FecData (const unsigned int rpcCFId, const unsigned int rpcFecId, const unsigned int trigType, const unsigned int second, const unsigned int nanoSecond, const unsigned int hitMap, const FecTraits &traits)
 FecData (const ByteBuffer &byteBuffer, const FecTraits &traits)
 FecData ()
 FecData (const FecData &)
FecDataoperator= (const FecData &)
void setRpcCFId (const unsigned int rpcCFId)
void setRpcFecId (const unsigned int rpcFecId)
void setForceTrigger (const bool forceTrigger)
void setParity (const bool parity)
void setTransErr (const bool transErr)
void setTransErr1 (const bool transErr1)
void setTransErr2 (const bool transErr2)
void setTrigType (const unsigned int trigType)
void setFullFlag (const bool fullFlag)
void setValidGPS (const bool validGPS)
void setValidCLK (const bool validCLK)
void setUsingUTC (const bool usingUTC)
void setSecond (const unsigned int second)
void setNanoSecond (const unsigned int nanoSecond)
void setHitMap (const unsigned int hitMap)

Friends

class FecReadout

Detailed Description

Definition at line 14 of file FecData.h.


Constructor & Destructor Documentation

FecData::~FecData ( ) [virtual]

Definition at line 72 of file FecData.cc.

{
}
FecData::FecData ( 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 FecTraits traits 
) [private]
FecData::FecData ( const unsigned int  rpcCFId,
const unsigned int  rpcFecId,
const unsigned int  trigType,
const unsigned int  second,
const unsigned int  nanoSecond,
const unsigned int  hitMap,
const FecTraits traits 
) [private]

Definition at line 37 of file FecData.cc.

: FecBuffer(new char[ traits.fecSize() * kBytesInInt ], traits)
{
    unsigned int parity = nanoSecond ^ hitMap;
    for ( unsigned int nbits = 16; nbits != 0; nbits>>=1 ) {
        parity = (parity >> nbits) ^ parity;
    }
    parity &= 1;
    traits.initializeFec( buffer() );
    setRpcCFId(rpcCFId);
    setRpcFecId(rpcFecId);
    setParity(parity);
    setTransErr(false);
    setTrigType(trigType);
    setFullFlag(false);
    setValidGPS(true);
    setValidCLK(true);
    setUsingUTC(false);
    setSecond(second);
    setNanoSecond(nanoSecond);
    setHitMap(hitMap);
}
FecData::FecData ( const ByteBuffer byteBuffer,
const FecTraits traits 
) [private]

Definition at line 66 of file FecData.cc.

   : FecBuffer(byteBuffer, traits)
{
   byteBuffer.position( byteBuffer.position() + fecTraits().fecSize() * kBytesInInt );
}
DybDaq::FecData::FecData ( ) [private]
DybDaq::FecData::FecData ( const FecData ) [private]

Member Function Documentation

unsigned int FecData::rpcCFId ( ) const

Definition at line 80 of file FecData.cc.

unsigned int FecData::rpcFecId ( ) const

Definition at line 84 of file FecData.cc.

bool FecData::forceTrigger ( ) const

Definition at line 88 of file FecData.cc.

bool FecData::parity ( ) const

Definition at line 92 of file FecData.cc.

bool FecData::transErr ( ) const

Definition at line 96 of file FecData.cc.

bool FecData::transErr1 ( ) const

Definition at line 100 of file FecData.cc.

bool FecData::transErr2 ( ) const

Definition at line 104 of file FecData.cc.

bool FecData::bitsCheck ( ) const

Definition at line 108 of file FecData.cc.

                              {
    unsigned int res = nanoSecond() ^ hitMap();
    for ( unsigned int nbits = 16; nbits != 0; nbits>>=1 ) {
        res = (res >> nbits) ^ res;
    }
    res &= 1;
    return (readUnsignedInt(FecTraits::kTransErr1) == res);
}
unsigned int FecData::trigType ( ) const

Definition at line 117 of file FecData.cc.

bool FecData::fullFlag ( ) const

Definition at line 121 of file FecData.cc.

bool FecData::validGPS ( ) const

Definition at line 125 of file FecData.cc.

bool FecData::validCLK ( ) const

Definition at line 129 of file FecData.cc.

bool FecData::usingUTC ( ) const

Definition at line 133 of file FecData.cc.

unsigned int FecData::second ( ) const

Definition at line 137 of file FecData.cc.

unsigned int FecData::nanoSecond ( ) const

Definition at line 141 of file FecData.cc.

unsigned int FecData::hitMap ( ) const

Definition at line 145 of file FecData.cc.

unsigned int FecData::bufferSize ( ) const [virtual]

Implements DybDaq::DaqBuffer.

Definition at line 149 of file FecData.cc.

                                       {
   return fecTraits().fecSize();
}
unsigned int FecData::formatComponent ( ) const [protected, virtual]

Reimplemented from DybDaq::DaqBuffer.

Definition at line 76 of file FecData.cc.

                                            {
    return FecTraits::kData;
}
FecData& DybDaq::FecData::operator= ( const FecData ) [private]
void FecData::setRpcCFId ( const unsigned int  rpcCFId) [private]

Definition at line 153 of file FecData.cc.

void FecData::setRpcFecId ( const unsigned int  rpcFecId) [private]

Definition at line 157 of file FecData.cc.

void FecData::setForceTrigger ( const bool  forceTrigger) [private]

Definition at line 161 of file FecData.cc.

void FecData::setParity ( const bool  parity) [private]

Definition at line 165 of file FecData.cc.

void FecData::setTransErr ( const bool  transErr) [private]

Definition at line 169 of file FecData.cc.

void FecData::setTransErr1 ( const bool  transErr1) [private]

Definition at line 173 of file FecData.cc.

void FecData::setTransErr2 ( const bool  transErr2) [private]

Definition at line 177 of file FecData.cc.

void FecData::setTrigType ( const unsigned int  trigType) [private]

Definition at line 181 of file FecData.cc.

void FecData::setFullFlag ( const bool  fullFlag) [private]

Definition at line 185 of file FecData.cc.

void FecData::setValidGPS ( const bool  validGPS) [private]

Definition at line 189 of file FecData.cc.

void FecData::setValidCLK ( const bool  validCLK) [private]

Definition at line 193 of file FecData.cc.

void FecData::setUsingUTC ( const bool  usingUTC) [private]

Definition at line 197 of file FecData.cc.

void FecData::setSecond ( const unsigned int  second) [private]

Definition at line 201 of file FecData.cc.

void FecData::setNanoSecond ( const unsigned int  nanoSecond) [private]

Definition at line 205 of file FecData.cc.

void FecData::setHitMap ( const unsigned int  hitMap) [private]

Definition at line 209 of file FecData.cc.

const FecTraits & FecBuffer::fecTraits ( ) const [inherited]

Definition at line 23 of file FecBuffer.cc.

{
   return dynamic_cast<const FecTraits&>( daqTraits() );
}

Friends And Related Function Documentation

friend class FecReadout [friend]

Definition at line 19 of file FecData.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