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 9 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 9 of file CSCAnodeData.cc.

10  : firmwareVersion(header.alctFirmwareVersion()) {
11  if (firmwareVersion == 2006) {
12  theData = std::shared_ptr<CSCAnodeDataFormat>(new CSCAnodeData2006(header));
13  } else {
14  theData = std::shared_ptr<CSCAnodeDataFormat>(new CSCAnodeData2007(header));
15  }
16 }

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 19 of file CSCAnodeData.cc.

20  : firmwareVersion(header.alctFirmwareVersion()) {
21  if (firmwareVersion == 2006) {
22  theData = std::shared_ptr<CSCAnodeDataFormat>(new CSCAnodeData2006(header, buf));
23  } else {
24  theData = std::shared_ptr<CSCAnodeDataFormat>(new CSCAnodeData2007(header, buf));
25  }
26 }

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

Member Function Documentation

◆ add()

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

◆ data()

unsigned short* CSCAnodeData::data ( )
inline

Definition at line 16 of file CSCAnodeData.h.

16 { 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 18 of file CSCAnodeData.h.

18 { 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 28 of file CSCAnodeData.cc.

28  {
29  std::vector<std::vector<CSCWireDigi> > result;
31  result.push_back(wireDigis(layer));
32  }
33  return result;
34 }

References phase1PixelTopology::layer, CSCDetId::maxLayerId(), CSCDetId::minLayerId(), and 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 21 of file CSCAnodeData.h.

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

References phase1PixelTopology::layer, and theData.

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

Member Data Documentation

◆ firmwareVersion

int CSCAnodeData::firmwareVersion
private

Definition at line 30 of file CSCAnodeData.h.

Referenced by CSCAnodeData().

◆ theData

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

Definition at line 29 of file CSCAnodeData.h.

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

phase1PixelTopology::layer
constexpr std::array< uint8_t, layerIndexSize > layer
Definition: phase1PixelTopology.h:99
CSCDetId::minLayerId
static int minLayerId()
Definition: CSCDetId.h:242
CSCAnodeData::wireDigis
std::vector< std::vector< CSCWireDigi > > wireDigis() const
Definition: CSCAnodeData.cc:28
CSCAnodeData2007
Definition: CSCAnodeData2007.h:30
visDQMUpload.buf
buf
Definition: visDQMUpload.py:160
CSCAnodeData2006
Definition: CSCAnodeData2006.h:39
CSCDetId::maxLayerId
static int maxLayerId()
Definition: CSCDetId.h:243
CSCAnodeData::firmwareVersion
int firmwareVersion
Definition: CSCAnodeData.h:30
RecoTauValidation_cfi.header
header
Definition: RecoTauValidation_cfi.py:291
mps_fire.result
result
Definition: mps_fire.py:311
CSCAnodeData::theData
std::shared_ptr< CSCAnodeDataFormat > theData
Definition: CSCAnodeData.h:29