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 | Private Member Functions | Private Attributes | Static Private Attributes
SiStripFedKey Class Reference

A container class for generic run and event-related info, information required by the commissioning analyses (such as hardware parameters), event quality flags, error conditions, etc... More...

#include <SiStripFedKey.h>

Inheritance diagram for SiStripFedKey:
SiStripKey

Public Member Functions

const uint16_t & feChan () const
 
const uint16_t & fedApv () const
 
uint16_t fedChannel () const
 
const uint16_t & fedId () const
 
const uint16_t & feUnit () const
 
bool isConsistent (const SiStripKey &) const
 
bool isEqual (const SiStripKey &) const
 
bool isInvalid () const
 
bool isInvalid (const sistrip::Granularity &) const
 
bool isValid () const
 
bool isValid (const sistrip::Granularity &) const
 
virtual void print (std::stringstream &ss) const
 
 SiStripFedKey (const uint16_t &fed_id, const uint16_t &fe_unit=0, const uint16_t &fe_chan=0, const uint16_t &fed_apv=0)
 
 SiStripFedKey (const uint32_t &fed_key)
 
 SiStripFedKey (const std::string &directory_path)
 
 SiStripFedKey (const SiStripFedKey &)
 
 SiStripFedKey (const SiStripKey &)
 
 SiStripFedKey ()
 
virtual void terse (std::stringstream &ss) const
 
- Public Member Functions inherited from SiStripKey
const uint16_t & channel () const
 
const sistrip::Granularitygranularity () const
 
const uint32_t & key () const
 
const SiStripKeyoperator= (const SiStripKey &)
 
const std::string & path () const
 
 SiStripKey (const uint32_t &key)
 
 SiStripKey (const std::string &directory_path)
 
 SiStripKey (const SiStripKey &)
 
 SiStripKey ()
 
virtual ~SiStripKey ()
 

Static Public Member Functions

static uint16_t feChan (const uint16_t &fed_ch)
 
static uint16_t fedCh (const uint16_t &fe_unit, const uint16_t &fe_chan)
 
static uint32_t fedIndex (const uint16_t &fed_id, const uint16_t &fed_ch)
 
static uint16_t feUnit (const uint16_t &fed_ch)
 

Private Member Functions

void initFromKey ()
 
void initFromPath ()
 
void initFromValue ()
 
void initGranularity ()
 

Private Attributes

uint16_t feChan_
 
uint16_t fedApv_
 
uint16_t fedId_
 
uint16_t feUnit_
 

Static Private Attributes

static const uint16_t feChanMask_ = 0x00F
 
static const uint16_t feChanOffset_ = 2
 
static const uint16_t fedApvMask_ = 0x003
 
static const uint16_t fedApvOffset_ = 0
 
static const uint16_t fedCrateMask_ = 0x03F
 
static const uint16_t fedCrateOffset_ = 24
 
static const uint16_t fedIdMask_ = 0x1FF
 
static const uint16_t fedIdOffset_ = 10
 
static const uint16_t fedSlotMask_ = 0x01F
 
static const uint16_t fedSlotOffset_ = 19
 
static const uint16_t feUnitMask_ = 0x00F
 
static const uint16_t feUnitOffset_ = 6
 

Additional Inherited Members

- Protected Member Functions inherited from SiStripKey
void channel (const uint16_t &)
 
void granularity (const sistrip::Granularity &)
 
void key (const uint32_t &)
 
void path (const std::string &)
 

Detailed Description

A container class for generic run and event-related info, information required by the commissioning analyses (such as hardware parameters), event quality flags, error conditions, etc...

Utility class that identifies a position within the strip tracker readout structure, down to the level of an APV25 chip.

Author
R.Bainbridge
R.Bainbridge

The class allows to encode the position within a 32-bit "key" and, conversely, unpack a 32-bit key to provide the position.

The class provides the following member data:

Member data (integer in type only) with values of 0xFFFF signifies "invalid" (ie, FedId = 0xFFFF means "invalid FED id"). Data with null values signifies "all" (ie, FedId = 0 means "all FEDs").

The class generates a "directory path" string according to the member data. This can be used to organise histograms / other data types when using DQM / root. Conversely, the member data can also be built using the directory path when provided as a constructor argument.

The class also provides the "granularity" to which the FED key is unambiguous (ie, not "invalid" or "null") in defining a position within the readout system.

In addition, the class provides static methods that allow to convert between the two "FED channel" numbering schema in place. The class member data hold values that respect the "external" numbering scheme used by the optical links group. Front-End units are numbered from 1 to 8, bottom to top. Channels with the FE units are numbered 1 to 12, bottom to top. The "internal" numbering scheme is used by the DAQ software, which numbers FED channels consecutively from 0 to 95, top to bottom.

Definition at line 56 of file SiStripFedKey.h.

Constructor & Destructor Documentation

SiStripFedKey::SiStripFedKey ( const uint16_t &  fed_id,
const uint16_t &  fe_unit = 0,
const uint16_t &  fe_chan = 0,
const uint16_t &  fed_apv = 0 
)

Constructor using FED id, FE unit, FE channel, and APV.

Definition at line 12 of file SiStripFedKey.cc.

SiStripFedKey::SiStripFedKey ( const uint32_t &  fed_key)

Constructor using 32-bit "FED key".

Definition at line 31 of file SiStripFedKey.cc.

SiStripFedKey::SiStripFedKey ( const std::string &  directory_path)

Constructor using directory path.

Definition at line 47 of file SiStripFedKey.cc.

SiStripFedKey::SiStripFedKey ( const SiStripFedKey input)

Copy constructor.

Definition at line 63 of file SiStripFedKey.cc.

SiStripFedKey::SiStripFedKey ( const SiStripKey input)

Copy constructor using base class.

Definition at line 77 of file SiStripFedKey.cc.

SiStripFedKey::SiStripFedKey ( )

Default constructor

Definition at line 98 of file SiStripFedKey.cc.

Member Function Documentation

const uint16_t & SiStripFedKey::feChan ( ) const
inline

Returns chan of FE unit (according to "external" numbering).

Definition at line 196 of file SiStripFedKey.h.

Referenced by FedCablingAlgorithm::analyse(), SummaryGeneratorReadoutView::fill(), and CommissioningAnalysis::header().

uint16_t SiStripFedKey::feChan ( const uint16_t &  fed_ch)
static

Returns Front-End channel ("external" numbering scheme) for given FED channel ("internal" numbering scheme).

Definition at line 130 of file SiStripFedKey.cc.

const uint16_t & SiStripFedKey::fedApv ( ) const
inline

Returns APV within FED channel.

Definition at line 197 of file SiStripFedKey.h.

Referenced by SummaryGeneratorReadoutView::fill().

uint16_t SiStripFedKey::fedCh ( const uint16_t &  fe_unit,
const uint16_t &  fe_chan 
)
static

Returns FED channel ("internal" numbering scheme) for given Front-End unit and channel ("external" numbering scheme).

Definition at line 108 of file SiStripFedKey.cc.

uint16_t SiStripFedKey::fedChannel ( ) const
inline

Returns FED channel (according to "internal" numbering).

Definition at line 198 of file SiStripFedKey.h.

Referenced by CommissioningAnalysis::header(), and FedCablingAnalysis::print().

const uint16_t & SiStripFedKey::fedId ( ) const
inline
uint32_t SiStripFedKey::fedIndex ( const uint16_t &  fed_id,
const uint16_t &  fed_ch 
)
static

Returns number that encodes FED id and FED channel, which can be used to index vectors containing event and non-event data. Users should check if returned value is valid for indexing vector!

Definition at line 139 of file SiStripFedKey.cc.

const uint16_t & SiStripFedKey::feUnit ( ) const
inline

Returns Front-End unit (according to "external" numbering).

Definition at line 195 of file SiStripFedKey.h.

Referenced by FedCablingAlgorithm::analyse(), SummaryGeneratorReadoutView::fill(), and CommissioningAnalysis::header().

uint16_t SiStripFedKey::feUnit ( const uint16_t &  fed_ch)
static

Returns Front-End unit ("external" numbering scheme) for given FED channel ("internal" numbering scheme).

Definition at line 121 of file SiStripFedKey.cc.

void SiStripFedKey::initFromKey ( )
privatevirtual

Reimplemented from SiStripKey.

Definition at line 256 of file SiStripFedKey.cc.

void SiStripFedKey::initFromPath ( )
privatevirtual

Reimplemented from SiStripKey.

Definition at line 333 of file SiStripFedKey.cc.

void SiStripFedKey::initFromValue ( )
privatevirtual

Reimplemented from SiStripKey.

Definition at line 232 of file SiStripFedKey.cc.

void SiStripFedKey::initGranularity ( )
privatevirtual

Reimplemented from SiStripKey.

Definition at line 448 of file SiStripFedKey.cc.

bool SiStripFedKey::isConsistent ( const SiStripKey key) const
virtual

"Consistent" means identical and/or null (ie, "all") data.

Reimplemented from SiStripKey.

Definition at line 162 of file SiStripFedKey.cc.

bool SiStripFedKey::isEqual ( const SiStripKey key) const
virtual

Identifies key objects with identical member data.

Reimplemented from SiStripKey.

Definition at line 149 of file SiStripFedKey.cc.

bool SiStripFedKey::isInvalid ( ) const
virtual

Identifies all member data as being invalid.

Reimplemented from SiStripKey.

Definition at line 204 of file SiStripFedKey.cc.

bool SiStripFedKey::isInvalid ( const sistrip::Granularity gran) const
virtual

All member data to level of "Granularity" are invalid. If sistrip::Granularity is "undefined", returns true.

Reimplemented from SiStripKey.

Definition at line 210 of file SiStripFedKey.cc.

bool SiStripFedKey::isValid ( void  ) const
virtual

Identifies all member data as being "valid" or null ("all").

Reimplemented from SiStripKey.

Definition at line 176 of file SiStripFedKey.cc.

Referenced by SummaryGeneratorReadoutView::fill(), and core.AutoHandle.AutoHandle::ReallyLoad().

bool SiStripFedKey::isValid ( const sistrip::Granularity gran) const
virtual

All member data to level of "Granularity" are valid. If sistrip::Granularity is "undefined", returns false.

Reimplemented from SiStripKey.

Definition at line 182 of file SiStripFedKey.cc.

Referenced by core.AutoHandle.AutoHandle::ReallyLoad().

void SiStripFedKey::print ( std::stringstream &  ss) const
virtual

Print member data of the key

Reimplemented from SiStripKey.

Definition at line 510 of file SiStripFedKey.cc.

void SiStripFedKey::terse ( std::stringstream &  ss) const
virtual

A terse summary of the key

Reimplemented from SiStripKey.

Definition at line 485 of file SiStripFedKey.cc.

Member Data Documentation

uint16_t SiStripFedKey::feChan_
private

FE channel [0,1-12,invalid].

Definition at line 169 of file SiStripFedKey.h.

const uint16_t SiStripFedKey::feChanMask_ = 0x00F
staticprivate

Definition at line 187 of file SiStripFedKey.h.

const uint16_t SiStripFedKey::feChanOffset_ = 2
staticprivate

Definition at line 179 of file SiStripFedKey.h.

uint16_t SiStripFedKey::fedApv_
private

APV [0,1-2,invalid].

Definition at line 172 of file SiStripFedKey.h.

const uint16_t SiStripFedKey::fedApvMask_ = 0x003
staticprivate

Definition at line 188 of file SiStripFedKey.h.

const uint16_t SiStripFedKey::fedApvOffset_ = 0
staticprivate

Definition at line 180 of file SiStripFedKey.h.

const uint16_t SiStripFedKey::fedCrateMask_ = 0x03F
staticprivate

Definition at line 183 of file SiStripFedKey.h.

const uint16_t SiStripFedKey::fedCrateOffset_ = 24
staticprivate

Definition at line 175 of file SiStripFedKey.h.

uint16_t SiStripFedKey::fedId_
private

FED id [0,50-489,invalid].

Definition at line 163 of file SiStripFedKey.h.

const uint16_t SiStripFedKey::fedIdMask_ = 0x1FF
staticprivate

Definition at line 185 of file SiStripFedKey.h.

const uint16_t SiStripFedKey::fedIdOffset_ = 10
staticprivate

Definition at line 177 of file SiStripFedKey.h.

const uint16_t SiStripFedKey::fedSlotMask_ = 0x01F
staticprivate

Definition at line 184 of file SiStripFedKey.h.

const uint16_t SiStripFedKey::fedSlotOffset_ = 19
staticprivate

Definition at line 176 of file SiStripFedKey.h.

uint16_t SiStripFedKey::feUnit_
private

FE unit [0,1-8,invalid].

Definition at line 166 of file SiStripFedKey.h.

const uint16_t SiStripFedKey::feUnitMask_ = 0x00F
staticprivate

Definition at line 186 of file SiStripFedKey.h.

const uint16_t SiStripFedKey::feUnitOffset_ = 6
staticprivate

Definition at line 178 of file SiStripFedKey.h.