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 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.

References firmwareVersion, RecoTauValidation_cfi::header, and theData.

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 }
int firmwareVersion
Definition: CSCAnodeData.h:30
std::shared_ptr< CSCAnodeDataFormat > theData
Definition: CSCAnodeData.h:29

◆ 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.

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

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 }
int firmwareVersion
Definition: CSCAnodeData.h:30
std::shared_ptr< CSCAnodeDataFormat > theData
Definition: CSCAnodeData.h:29

Member Function Documentation

◆ add()

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

Definition at line 24 of file CSCAnodeData.h.

References nano_mu_digi_cff::layer, and theData.

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

24 { theData->add(wireDigi, layer); }
std::shared_ptr< CSCAnodeDataFormat > theData
Definition: CSCAnodeData.h:29

◆ data()

unsigned short* CSCAnodeData::data ( )
inline

Definition at line 16 of file CSCAnodeData.h.

References theData.

Referenced by CSCEventData::pack().

16 { return theData->data(); }
std::shared_ptr< CSCAnodeDataFormat > theData
Definition: CSCAnodeData.h:29

◆ 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.

References theData.

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

18 { return theData->sizeInWords(); }
std::shared_ptr< CSCAnodeDataFormat > theData
Definition: CSCAnodeData.h:29

◆ wireDigis() [1/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.

References nano_mu_digi_cff::layer, and theData.

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

21 { return theData->wireDigis(layer); }
std::shared_ptr< CSCAnodeDataFormat > theData
Definition: CSCAnodeData.h:29

◆ wireDigis() [2/2]

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

Definition at line 28 of file CSCAnodeData.cc.

References nano_mu_digi_cff::layer, CSCDetId::maxLayerId(), CSCDetId::minLayerId(), and mps_fire::result.

28  {
29  std::vector<std::vector<CSCWireDigi> > result;
31  result.push_back(wireDigis(layer));
32  }
33  return result;
34 }
std::vector< std::vector< CSCWireDigi > > wireDigis() const
Definition: CSCAnodeData.cc:28
static int minLayerId()
Definition: CSCDetId.h:242
static int maxLayerId()
Definition: CSCDetId.h:243

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().