CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Static Public Member Functions | Static Public Attributes | Private Member Functions | Private Attributes
CSCEventData Class Reference

#include <CSCEventData.h>

Public Member Functions

void add (const CSCStripDigi &, int layer)
 routines to add digis to the data More...
 
void add (const CSCWireDigi &, int layer)
 
void add (const CSCComparatorDigi &, int layer)
 
void add (const CSCComparatorDigi &, const CSCDetId &)
 
void add (const std::vector< CSCALCTDigi > &)
 these go in as vectors, so they get sorted right away More...
 
void add (const std::vector< CSCCLCTDigi > &)
 
void add (const std::vector< CSCCorrelatedLCTDigi > &)
 
void addALCTStructures ()
 adds an empty ALCTHeader, trailer, and anode data More...
 
CSCAnodeDataalctData () const
 user must check if nalct > 0 More...
 
CSCALCTHeaderalctHeader () const
 user must check if nalct > 0 More...
 
CSCALCTTraileralctTrailer () const
 user must check if nalct > 0 More...
 
unsigned int calcALCTcrc (std::vector< std::pair< unsigned int, unsigned short * > > &vec)
 
CSCCFEBDatacfebData (unsigned icfeb) const
 unpacked in long mode: has overflow and error bits decoded More...
 
int chamberType () const
 might not be set in real data More...
 
CSCCLCTDataclctData () const
 user must check if nclct > 0 More...
 
 CSCEventData (int chamberType, uint16_t format_version=2005)
 
 CSCEventData (unsigned short *buf, uint16_t format_version=2005)
 should make const input soon More...
 
 CSCEventData ()
 
 CSCEventData (const CSCEventData &data)
 
const CSCDMBHeaderdmbHeader () const
 the DAQ motherboard header. A good place for event and chamber info More...
 
CSCDMBHeaderdmbHeader ()
 
const CSCDMBTrailerdmbTrailer () const
 DMB trailer. More...
 
uint16_t getFormatVersion () const
 
bool isALCT (const short unsigned int *buf)
 if dealing with ALCT data More...
 
bool isTMB (const short unsigned int *buf)
 if dealing with TMB data More...
 
int nalct () const
 the flag for existence of ALCT data More...
 
int nclct () const
 the number of CLCTs More...
 
CSCEventData operator= (const CSCEventData &data)
 
boost::dynamic_bitset pack ()
 returns the packed event data. More...
 
void setEventInformation (int bxnum, int lvl1num)
 
unsigned short size () const
 size of the data buffer used, in bytes More...
 
std::vector< CSCStripDigistripDigis (const CSCDetId &idlayer) const
 returns all the strip digis in the chamber, with the comparator information. More...
 
std::vector< CSCStripDigistripDigis (unsigned idlayer, unsigned icfeb) const
 returns all the strip digis in the chamber's cfeb More...
 
std::vector< std::vector
< CSCStripDigi > > 
stripDigis () const
 deprecated. Use the above methods instead More...
 
CSCTMBDatatmbData () const
 user must check in nclct > 0 More...
 
CSCTMBHeadertmbHeader () const
 user must check if nclct > 0 More...
 
std::vector< CSCWireDigiwireDigis (unsigned ilayer) const
 
std::vector< std::vector
< CSCWireDigi > > 
wireDigis () const
 deprecated. Use the above method instead. More...
 
 ~CSCEventData ()
 

Static Public Member Functions

static void selfTest ()
 
static void setDebug (const bool value)
 

Static Public Attributes

static std::atomic< bool > debug {false}
 

Private Member Functions

void addComparatorInformation (std::vector< CSCStripDigi > &, int layer) const
 adds the comparators to the strip digis More...
 
void checkALCTClasses ()
 makes new ALCT classes, if needed More...
 
void checkTMBClasses ()
 makes new TMB classes, if needed More...
 
void copy (const CSCEventData &)
 
void destroy ()
 
void init ()
 
void unpack_data (unsigned short *buf)
 

Private Attributes

unsigned short * alctZSErecovered
 Auxiliary bufer to recove the ALCT raw payload from zero suppression. More...
 
int size_
 
CSCALCTHeadertheALCTHeader
 
CSCALCTTrailertheALCTTrailer
 
CSCAnodeDatatheAnodeData
 
CSCCFEBDatatheCFEBData [7]
 for up to MAX_CFEB CFEB boards More...
 
int theChamberType
 
CSCDMBHeader theDMBHeader
 
CSCDMBTrailer theDMBTrailer
 
uint16_t theFormatVersion
 Output Format Version (2005, 2013) More...
 
CSCTMBDatatheTMBData
 
int zseEnable
 

Detailed Description

Definition at line 42 of file CSCEventData.h.

Constructor & Destructor Documentation

CSCEventData::CSCEventData ( int  chamberType,
uint16_t  format_version = 2005 
)
explicit

Definition at line 18 of file CSCEventData.cc.

CSCEventData::CSCEventData ( unsigned short *  buf,
uint16_t  format_version = 2005 
)

should make const input soon

Definition at line 38 of file CSCEventData.cc.

CSCEventData::CSCEventData ( )
inline

Definition at line 47 of file CSCEventData.h.

CSCEventData::~CSCEventData ( )

since we need deep copies, need the Big Three (destructor, copy ctor, op=)

Definition at line 310 of file CSCEventData.cc.

CSCEventData::CSCEventData ( const CSCEventData data)

Definition at line 305 of file CSCEventData.cc.

Member Function Documentation

void CSCEventData::add ( const CSCStripDigi digi,
int  layer 
)

routines to add digis to the data

Definition at line 569 of file CSCEventData.cc.

Referenced by counter.Counter::register().

void CSCEventData::add ( const CSCWireDigi digi,
int  layer 
)

Definition at line 588 of file CSCEventData.cc.

Referenced by counter.Counter::register().

void CSCEventData::add ( const CSCComparatorDigi digi,
int  layer 
)

Definition at line 597 of file CSCEventData.cc.

Referenced by counter.Counter::register().

void CSCEventData::add ( const CSCComparatorDigi digi,
const CSCDetId cid 
)

Definition at line 604 of file CSCEventData.cc.

Referenced by counter.Counter::register().

void CSCEventData::add ( const std::vector< CSCALCTDigi > &  digis)

these go in as vectors, so they get sorted right away

Definition at line 613 of file CSCEventData.cc.

Referenced by counter.Counter::register().

void CSCEventData::add ( const std::vector< CSCCLCTDigi > &  digis)

Definition at line 620 of file CSCEventData.cc.

Referenced by counter.Counter::register().

void CSCEventData::add ( const std::vector< CSCCorrelatedLCTDigi > &  digis)

Definition at line 626 of file CSCEventData.cc.

Referenced by counter.Counter::register().

void CSCEventData::addALCTStructures ( )

adds an empty ALCTHeader, trailer, and anode data

void CSCEventData::addComparatorInformation ( std::vector< CSCStripDigi > &  ,
int  layer 
) const
private

adds the comparators to the strip digis

CSCAnodeData * CSCEventData::alctData ( ) const

user must check if nalct > 0

Definition at line 470 of file CSCEventData.cc.

CSCALCTHeader * CSCEventData::alctHeader ( ) const

user must check if nalct > 0

Definition at line 457 of file CSCEventData.cc.

CSCALCTTrailer * CSCEventData::alctTrailer ( ) const

user must check if nalct > 0

Definition at line 463 of file CSCEventData.cc.

unsigned int CSCEventData::calcALCTcrc ( std::vector< std::pair< unsigned int, unsigned short * > > &  vec)

Definition at line 700 of file CSCEventData.cc.

CSCCFEBData * CSCEventData::cfebData ( unsigned  icfeb) const

unpacked in long mode: has overflow and error bits decoded

Definition at line 451 of file CSCEventData.cc.

int CSCEventData::chamberType ( ) const
inline

might not be set in real data

Definition at line 141 of file CSCEventData.h.

void CSCEventData::checkALCTClasses ( )
private

makes new ALCT classes, if needed

Definition at line 532 of file CSCEventData.cc.

void CSCEventData::checkTMBClasses ( )
private

makes new TMB classes, if needed

Definition at line 548 of file CSCEventData.cc.

CSCCLCTData * CSCEventData::clctData ( ) const

user must check if nclct > 0

Definition at line 489 of file CSCEventData.cc.

void CSCEventData::copy ( const CSCEventData data)
private

Definition at line 341 of file CSCEventData.cc.

void CSCEventData::destroy ( )
private

Definition at line 368 of file CSCEventData.cc.

const CSCDMBHeader* CSCEventData::dmbHeader ( ) const
inline

the DAQ motherboard header. A good place for event and chamber info

Definition at line 96 of file CSCEventData.h.

CSCDMBHeader* CSCEventData::dmbHeader ( )
inline

Definition at line 97 of file CSCEventData.h.

const CSCDMBTrailer* CSCEventData::dmbTrailer ( ) const
inline

DMB trailer.

Definition at line 118 of file CSCEventData.h.

uint16_t CSCEventData::getFormatVersion ( ) const
inline

Definition at line 143 of file CSCEventData.h.

void CSCEventData::init ( void  )
private

helpers for ctors, dtor, and op= zeroes all pointers

Definition at line 325 of file CSCEventData.cc.

bool CSCEventData::isALCT ( const short unsigned int *  buf)

if dealing with ALCT data

Definition at line 293 of file CSCEventData.cc.

bool CSCEventData::isTMB ( const short unsigned int *  buf)

if dealing with TMB data

Definition at line 298 of file CSCEventData.cc.

int CSCEventData::nalct ( ) const
inline

the flag for existence of ALCT data

Definition at line 90 of file CSCEventData.h.

int CSCEventData::nclct ( ) const
inline

the number of CLCTs

Definition at line 93 of file CSCEventData.h.

CSCEventData CSCEventData::operator= ( const CSCEventData data)

Definition at line 316 of file CSCEventData.cc.

boost::dynamic_bitset CSCEventData::pack ( )

returns the packed event data.

Definition at line 648 of file CSCEventData.cc.

Referenced by pyrootRender.interactiveRender::draw().

void CSCEventData::selfTest ( )
static

Definition at line 733 of file CSCEventData.cc.

static void CSCEventData::setDebug ( const bool  value)
inlinestatic

turns on/off debug flag for this class

Definition at line 58 of file CSCEventData.h.

void CSCEventData::setEventInformation ( int  bxnum,
int  lvl1num 
)

this will fill the DMB header, and change all related fields in the DMBTrailer, ALCTHeader, and TMBHeader

Definition at line 496 of file CSCEventData.cc.

unsigned short CSCEventData::size ( void  ) const
inline

size of the data buffer used, in bytes

Definition at line 55 of file CSCEventData.h.

std::vector< CSCStripDigi > CSCEventData::stripDigis ( const CSCDetId idlayer) const

returns all the strip digis in the chamber, with the comparator information.

Definition at line 390 of file CSCEventData.cc.

std::vector< CSCStripDigi > CSCEventData::stripDigis ( unsigned  idlayer,
unsigned  icfeb 
) const

returns all the strip digis in the chamber's cfeb

Definition at line 402 of file CSCEventData.cc.

std::vector< std::vector< CSCStripDigi > > CSCEventData::stripDigis ( ) const

deprecated. Use the above methods instead

Definition at line 429 of file CSCEventData.cc.

CSCTMBData * CSCEventData::tmbData ( ) const

user must check in nclct > 0

Definition at line 476 of file CSCEventData.cc.

CSCTMBHeader * CSCEventData::tmbHeader ( ) const

user must check if nclct > 0

Definition at line 483 of file CSCEventData.cc.

void CSCEventData::unpack_data ( unsigned short *  buf)
private

The size of the ALCT payload is determined here

Check if Zero Suppression ALCT Enabled

Aauxilary variables neede to recover zero suppression Calculate the number of wire groups per layer

Calculate the number of words in the layer

unsigned short * posZSEtmpALCT = pos; This is just to dump the actual ALCT payload ** begin ** For debuggin purposes

to_rm (8 lines)

This is just to dump the actual ALCT payload ** end **

Actual word counting and recovering the original ALCT payload

Convert the recovered vector into the array

This is to check the content of the recovered ALCT payload to_rm (7 lines)

Definition at line 45 of file CSCEventData.cc.

std::vector< CSCWireDigi > CSCEventData::wireDigis ( unsigned  ilayer) const

Definition at line 416 of file CSCEventData.cc.

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

deprecated. Use the above method instead.

Definition at line 440 of file CSCEventData.cc.

Member Data Documentation

unsigned short* CSCEventData::alctZSErecovered
private

Auxiliary bufer to recove the ALCT raw payload from zero suppression.

Definition at line 193 of file CSCEventData.h.

std::atomic< bool > CSCEventData::debug {false}
static

Definition at line 151 of file CSCEventData.h.

int CSCEventData::size_
private

Definition at line 187 of file CSCEventData.h.

CSCALCTHeader* CSCEventData::theALCTHeader
private

these may or may not be present. I decided to make them dynamic because most CSC chambers don't have LCTs, therefore don't have data, except for DMB headers and trailers.

Definition at line 177 of file CSCEventData.h.

CSCALCTTrailer* CSCEventData::theALCTTrailer
private

Definition at line 179 of file CSCEventData.h.

CSCAnodeData* CSCEventData::theAnodeData
private

Definition at line 178 of file CSCEventData.h.

CSCCFEBData* CSCEventData::theCFEBData[7]
private

for up to MAX_CFEB CFEB boards

Definition at line 183 of file CSCEventData.h.

int CSCEventData::theChamberType
private

this won't be filled when real data is read it. It's only used when packing simulated data, so we know how many wire and strip channels to make.

Definition at line 190 of file CSCEventData.h.

CSCDMBHeader CSCEventData::theDMBHeader
private

Definition at line 172 of file CSCEventData.h.

CSCDMBTrailer CSCEventData::theDMBTrailer
private

Definition at line 185 of file CSCEventData.h.

uint16_t CSCEventData::theFormatVersion
private

Output Format Version (2005, 2013)

Definition at line 197 of file CSCEventData.h.

CSCTMBData* CSCEventData::theTMBData
private

Definition at line 180 of file CSCEventData.h.

int CSCEventData::zseEnable
private

Definition at line 194 of file CSCEventData.h.