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< std::vector< CSCWireDigi > > wireDigis () const
 
std::vector< CSCWireDigiwireDigis (int layer) const
 input layer is from 1 to 6 More...
 

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() [1/2]

CSCAnodeData::CSCAnodeData ( const CSCALCTHeader header)

a blank one, for Monte Carlo

for digi->raw packing

Definition at line 8 of file CSCAnodeData.cc.

9  : firmwareVersion(header.alctFirmwareVersion()) {
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 }

References firmwareVersion, RecoTauValidation_cfi::header, and theData.

◆ CSCAnodeData() [2/2]

CSCAnodeData::CSCAnodeData ( const CSCALCTHeader header,
const unsigned short *  buf 
)

fill from a real datastream

Definition at line 18 of file CSCAnodeData.cc.

19  : firmwareVersion(header.alctFirmwareVersion()) {
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 }

References visDQMUpload::buf, firmwareVersion, RecoTauValidation_cfi::header, and theData.

Member Function Documentation

◆ add()

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

Definition at line 25 of file CSCAnodeData.h.

25 { theData->add(wireDigi, layer); }

References theData.

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

◆ data()

unsigned short* CSCAnodeData::data ( )
inline

Definition at line 17 of file CSCAnodeData.h.

17 { return theData->data(); }

References theData.

Referenced by CSCEventData::pack().

◆ selfTest()

static bool CSCAnodeData::selfTest ( )
static

◆ sizeInWords()

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.

19 { return theData->sizeInWords(); }

References theData.

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

◆ wireDigis() [1/2]

std::vector< std::vector< CSCWireDigi > > CSCAnodeData::wireDigis ( ) const

Definition at line 27 of file CSCAnodeData.cc.

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 }

References mps_fire::result.

◆ wireDigis() [2/2]

std::vector<CSCWireDigi> CSCAnodeData::wireDigis ( int  layer) const
inline

input layer is from 1 to 6

Definition at line 22 of file CSCAnodeData.h.

22 { return theData->wireDigis(layer); }

References theData.

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

Member Data Documentation

◆ firmwareVersion

int CSCAnodeData::firmwareVersion
private

Definition at line 31 of file CSCAnodeData.h.

Referenced by CSCAnodeData().

◆ theData

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

Definition at line 30 of file CSCAnodeData.h.

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

CSCAnodeData::wireDigis
std::vector< std::vector< CSCWireDigi > > wireDigis() const
Definition: CSCAnodeData.cc:27
CSCAnodeData2007
Definition: CSCAnodeData2007.h:30
visDQMUpload.buf
buf
Definition: visDQMUpload.py:154
CSCAnodeData2006
Definition: CSCAnodeData2006.h:39
CSCAnodeData::firmwareVersion
int firmwareVersion
Definition: CSCAnodeData.h:31
RecoTauValidation_cfi.header
header
Definition: RecoTauValidation_cfi.py:292
mps_fire.result
result
Definition: mps_fire.py:311
CSCAnodeData::theData
std::shared_ptr< CSCAnodeDataFormat > theData
Definition: CSCAnodeData.h:30