CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Member Functions | Private Attributes
CSCAnodeData Class Reference

#include <CSCAnodeData.h>

Public Member Functions

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

Static Public Member Functions

static bool selfTest ()
 

Private Attributes

int firmwareVersion
 
std::shared_ptr< CSCAnodeDataFormattheData
 

Detailed Description

Definition at line 10 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 8 of file CSCAnodeData.cc.

References firmwareVersion, and theData.

10  if (firmwareVersion == 2006) {
11  theData = std::shared_ptr<CSCAnodeDataFormat>(new CSCAnodeData2006(header));
12  } else {
13  theData = std::shared_ptr<CSCAnodeDataFormat>(new CSCAnodeData2007(header));
14  }
15 }
int firmwareVersion
Definition: CSCAnodeData.h:31
unsigned short int alctFirmwareVersion() const
std::shared_ptr< CSCAnodeDataFormat > theData
Definition: CSCAnodeData.h:30
CSCAnodeData::CSCAnodeData ( const CSCALCTHeader header,
const unsigned short *  buf 
)

fill from a real datastream

Definition at line 18 of file CSCAnodeData.cc.

References firmwareVersion, and theData.

20  if (firmwareVersion == 2006) {
21  theData = std::shared_ptr<CSCAnodeDataFormat>(new CSCAnodeData2006(header, buf));
22  } else {
23  theData = std::shared_ptr<CSCAnodeDataFormat>(new CSCAnodeData2007(header, buf));
24  }
25 }
int firmwareVersion
Definition: CSCAnodeData.h:31
unsigned short int alctFirmwareVersion() const
std::shared_ptr< CSCAnodeDataFormat > theData
Definition: CSCAnodeData.h:30

Member Function Documentation

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

Definition at line 25 of file CSCAnodeData.h.

References selfTest(), and theData.

Referenced by CSCEventData::add(), counter.Counter::register(), SequenceTypes.Task::remove(), and SequenceTypes.Task::replace().

25 { theData->add(wireDigi, layer); }
std::shared_ptr< CSCAnodeDataFormat > theData
Definition: CSCAnodeData.h:30
unsigned short* CSCAnodeData::data ( )
inline

Definition at line 17 of file CSCAnodeData.h.

References theData.

Referenced by CSCEventData::pack().

17 { return theData->data(); }
std::shared_ptr< CSCAnodeDataFormat > theData
Definition: CSCAnodeData.h:30
static bool CSCAnodeData::selfTest ( )
static

Referenced by add().

unsigned short int CSCAnodeData::sizeInWords ( ) const
inline

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

Definition at line 19 of file CSCAnodeData.h.

References theData.

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

19 { return theData->sizeInWords(); }
std::shared_ptr< CSCAnodeDataFormat > theData
Definition: CSCAnodeData.h:30
std::vector<CSCWireDigi> CSCAnodeData::wireDigis ( int  layer) const
inline

input layer is from 1 to 6

Definition at line 22 of file CSCAnodeData.h.

References theData, and wireDigis().

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

22 { return theData->wireDigis(layer); }
std::shared_ptr< CSCAnodeDataFormat > theData
Definition: CSCAnodeData.h:30
std::vector< std::vector< CSCWireDigi > > CSCAnodeData::wireDigis ( ) const

Definition at line 27 of file CSCAnodeData.cc.

References mps_fire::result.

Referenced by wireDigis().

27  {
28  std::vector<std::vector<CSCWireDigi> > result;
29  for (int layer = 1; layer <= 6; ++layer) {
30  result.push_back(wireDigis(layer));
31  }
32  return result;
33 }
std::vector< std::vector< CSCWireDigi > > wireDigis() const
Definition: CSCAnodeData.cc:27

Member Data Documentation

int CSCAnodeData::firmwareVersion
private

Definition at line 31 of file CSCAnodeData.h.

Referenced by CSCAnodeData().

std::shared_ptr<CSCAnodeDataFormat> CSCAnodeData::theData
private

Definition at line 30 of file CSCAnodeData.h.

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