CMS 3D CMS Logo

Public Member Functions | Static Public Member Functions | Private Attributes

CSCAnodeData Class Reference

#include <CSCAnodeData.h>

List of all members.

Public Member Functions

void add (const CSCWireDigi &wireDigi, int layer)
 CSCAnodeData (const CSCALCTHeader &, const unsigned short *buf)
 fill from a real datastream
 CSCAnodeData (const CSCALCTHeader &)
 a blank one, for Monte Carlo
unsigned short * data ()
unsigned short int sizeInWords () const
 the amount of the input binary buffer read, in 16-bit words
std::vector< std::vector
< CSCWireDigi > > 
wireDigis () const
std::vector< CSCWireDigiwireDigis (int layer) const
 input layer is from 1 to 6

Static Public Member Functions

static bool selfTest ()

Private Attributes

int firmwareVersion
boost::shared_ptr
< CSCAnodeDataFormat
theData

Detailed Description

Definition at line 11 of file CSCAnodeData.h.


Constructor & Destructor Documentation

CSCAnodeData::CSCAnodeData ( const CSCALCTHeader header)

a blank one, for Monte Carlo

for digi->raw packing

Definition at line 11 of file CSCAnodeData.cc.

References firmwareVersion, and theData.

:  firmwareVersion(header.alctFirmwareVersion())
{
  if(firmwareVersion == 2006) {
    theData = boost::shared_ptr<CSCAnodeDataFormat>(new CSCAnodeData2006(header));
  } else {
    theData = boost::shared_ptr<CSCAnodeDataFormat>(new CSCAnodeData2007(header));
  }
}
CSCAnodeData::CSCAnodeData ( const CSCALCTHeader header,
const unsigned short *  buf 
)

fill from a real datastream

Definition at line 23 of file CSCAnodeData.cc.

References firmwareVersion, and theData.

:  firmwareVersion(header.alctFirmwareVersion())
{
  if(firmwareVersion == 2006) {
    theData = boost::shared_ptr<CSCAnodeDataFormat>(new CSCAnodeData2006(header, buf));
  } else {
    theData = boost::shared_ptr<CSCAnodeDataFormat>(new CSCAnodeData2007(header, buf));
  }
}

Member Function Documentation

void CSCAnodeData::add ( const CSCWireDigi wireDigi,
int  layer 
) [inline]

Definition at line 27 of file CSCAnodeData.h.

References theData.

Referenced by CSCEventData::add().

{theData->add(wireDigi, layer);}
unsigned short* CSCAnodeData::data ( ) [inline]

Definition at line 19 of file CSCAnodeData.h.

References theData.

Referenced by CSCEventData::pack().

{return theData->data();}
static bool CSCAnodeData::selfTest ( ) [static]
unsigned short int CSCAnodeData::sizeInWords ( ) const [inline]

the amount of the input binary buffer read, in 16-bit words

Definition at line 21 of file CSCAnodeData.h.

References theData.

Referenced by CSCEventData::checkALCTClasses(), and CSCEventData::pack().

{return theData->sizeInWords();}
std::vector<CSCWireDigi> CSCAnodeData::wireDigis ( int  layer) const [inline]

input layer is from 1 to 6

Definition at line 24 of file CSCAnodeData.h.

References theData.

Referenced by cscdqm::EventProcessor::processCSC(), and CSCEventData::wireDigis().

{return theData->wireDigis(layer);}
std::vector< std::vector< CSCWireDigi > > CSCAnodeData::wireDigis ( ) const

Definition at line 34 of file CSCAnodeData.cc.

References query::result.

{
  std::vector < std::vector<CSCWireDigi> > result;
  for (int layer = 1; layer <= 6; ++layer) 
    {
      result.push_back(wireDigis(layer));
    }
  return result;
}

Member Data Documentation

Definition at line 33 of file CSCAnodeData.h.

Referenced by CSCAnodeData().

boost::shared_ptr<CSCAnodeDataFormat> CSCAnodeData::theData [private]

Definition at line 32 of file CSCAnodeData.h.

Referenced by add(), CSCAnodeData(), data(), sizeInWords(), and wireDigis().