CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions | Private Attributes | Friends
CTPPSPixelROC Class Reference

#include <CTPPSPixelROC.h>

Public Member Functions

 CTPPSPixelROC ()
 
 CTPPSPixelROC (uint32_t du, int idInDU, int idLk)
 
unsigned int idInDetUnit () const
 id of this ROC in DetUnit etermined by token path More...
 
unsigned int idInLink () const
 id of this ROC in parent Link. More...
 
std::string print (int depth=0) const
 printout for debug More...
 
uint32_t rawId () const
 return the DetUnit to which this ROC belongs to. More...
 
void setParameters (uint32_t du, int idInDU, int idLk)
 
std::pair< int, int > toGlobal (const std::pair< int, int > &rocPixel) const
 
std::pair< int, int > toGlobalfromDcol (const std::pair< int, int > &rocPixel) const
 
std::pair< int, int > toLocal (const std::pair< int, int > &modulePixel) const
 
 ~CTPPSPixelROC ()
 

Private Member Functions

template<class Archive >
void serialize (Archive &ar, const unsigned int version)
 

Private Attributes

uint32_t theDetUnit
 
unsigned int theIdDU
 
unsigned int theIdLk
 
CTPPSPixelIndices theIndices
 

Friends

class boost::serialization::access
 
template<typename CondSerializationT , typename Enabled >
struct cond::serialization::access
 

Detailed Description

Definition at line 18 of file CTPPSPixelROC.h.

Constructor & Destructor Documentation

◆ CTPPSPixelROC() [1/2]

CTPPSPixelROC::CTPPSPixelROC ( )
inline

Definition at line 20 of file CTPPSPixelROC.h.

20 : theDetUnit(0), theIdDU(0), theIdLk(0) {}
unsigned int theIdDU
Definition: CTPPSPixelROC.h:95
unsigned int theIdLk
Definition: CTPPSPixelROC.h:95
uint32_t theDetUnit
Definition: CTPPSPixelROC.h:94

◆ ~CTPPSPixelROC()

CTPPSPixelROC::~CTPPSPixelROC ( )
inline

Definition at line 22 of file CTPPSPixelROC.h.

22 {}

◆ CTPPSPixelROC() [2/2]

CTPPSPixelROC::CTPPSPixelROC ( uint32_t  du,
int  idInDU,
int  idLk 
)

ctor with DetUnit id, ROC number in DU (given by token passage), ROC number in Link (given by token passage),

Definition at line 3 of file CTPPSPixelROC.cc.

3 : theDetUnit(du), theIdDU(idDU), theIdLk(idLk) {}
unsigned int theIdDU
Definition: CTPPSPixelROC.h:95
unsigned int theIdLk
Definition: CTPPSPixelROC.h:95
uint32_t theDetUnit
Definition: CTPPSPixelROC.h:94

Member Function Documentation

◆ idInDetUnit()

unsigned int CTPPSPixelROC::idInDetUnit ( ) const
inline

id of this ROC in DetUnit etermined by token path

Definition at line 39 of file CTPPSPixelROC.h.

References theIdDU.

39 { return theIdDU; }
unsigned int theIdDU
Definition: CTPPSPixelROC.h:95

◆ idInLink()

unsigned int CTPPSPixelROC::idInLink ( ) const
inline

id of this ROC in parent Link.

Definition at line 42 of file CTPPSPixelROC.h.

References theIdLk.

42 { return theIdLk; }
unsigned int theIdLk
Definition: CTPPSPixelROC.h:95

◆ print()

std::string CTPPSPixelROC::print ( int  depth = 0) const

printout for debug

◆ rawId()

uint32_t CTPPSPixelROC::rawId ( ) const
inline

return the DetUnit to which this ROC belongs to.

Definition at line 36 of file CTPPSPixelROC.h.

References theDetUnit.

Referenced by CTPPSPixelDataFormatter::interpretRawData().

36 { return theDetUnit; }
uint32_t theDetUnit
Definition: CTPPSPixelROC.h:94

◆ serialize()

template<class Archive >
void CTPPSPixelROC::serialize ( Archive &  ar,
const unsigned int  version 
)
private

◆ setParameters()

void CTPPSPixelROC::setParameters ( uint32_t  du,
int  idInDU,
int  idLk 
)
inline

Definition at line 29 of file CTPPSPixelROC.h.

References theDetUnit, theIdDU, and theIdLk.

Referenced by CTPPSPixelDataFormatter::interpretRawData().

29  {
30  theDetUnit = du;
31  theIdDU = idInDU;
32  theIdLk = idLk;
33  }
unsigned int theIdDU
Definition: CTPPSPixelROC.h:95
unsigned int theIdLk
Definition: CTPPSPixelROC.h:95
uint32_t theDetUnit
Definition: CTPPSPixelROC.h:94

◆ toGlobal()

std::pair<int, int> CTPPSPixelROC::toGlobal ( const std::pair< int, int > &  rocPixel) const
inline

Definition at line 57 of file CTPPSPixelROC.h.

References theIdDU, theIndices, and CTPPSPixelIndices::transformToModule().

Referenced by CTPPSPixelDataFormatter::interpretRawData().

57  {
58  int modulePixelRow = -1;
59  int modulePixelColumn = -1;
60  int rocPixelRow = rocPixel.first;
61  int rocPixelColumn = rocPixel.second;
62 
63  theIndices.transformToModule(rocPixelColumn, rocPixelRow, theIdDU, modulePixelColumn, modulePixelRow);
64 
65  std::pair<int, int> modulePixel;
66  modulePixel = std::make_pair(modulePixelRow, modulePixelColumn);
67 
68  return modulePixel;
69  }
unsigned int theIdDU
Definition: CTPPSPixelROC.h:95
int transformToModule(const int colROC, const int rowROC, const int rocId, int &col, int &row) const
CTPPSPixelIndices theIndices
Definition: CTPPSPixelROC.h:97

◆ toGlobalfromDcol()

std::pair<int, int> CTPPSPixelROC::toGlobalfromDcol ( const std::pair< int, int > &  rocPixel) const
inline

Definition at line 71 of file CTPPSPixelROC.h.

References CTPPSPixelIndices::convertDcolToCol(), theIdDU, theIndices, and CTPPSPixelIndices::transformToModule().

Referenced by CTPPSPixelDataFormatter::interpretRawData().

71  {
72  int modulePixelRow = -1;
73  int modulePixelColumn = -1;
74  int rocDcol = rocPixel.first;
75  int rocPxl = rocPixel.second;
76 
77  int rocPixelRow;
78  int rocPixelColumn;
79 
80  theIndices.convertDcolToCol(rocDcol, rocPxl, rocPixelColumn, rocPixelRow);
81 
82  theIndices.transformToModule(rocPixelColumn, rocPixelRow, theIdDU, modulePixelColumn, modulePixelRow);
83 
84  std::pair<int, int> modulePixel;
85  modulePixel = std::make_pair(modulePixelRow, modulePixelColumn);
86 
87  return modulePixel;
88  }
static int convertDcolToCol(const int dcol, const int pix, int &colROC, int &rowROC)
unsigned int theIdDU
Definition: CTPPSPixelROC.h:95
int transformToModule(const int colROC, const int rowROC, const int rocId, int &col, int &row) const
CTPPSPixelIndices theIndices
Definition: CTPPSPixelROC.h:97

◆ toLocal()

std::pair<int, int> CTPPSPixelROC::toLocal ( const std::pair< int, int > &  modulePixel) const
inline

Definition at line 44 of file CTPPSPixelROC.h.

References theIndices, and CTPPSPixelIndices::transformToROC().

44  {
45  int rocPixelRow, rocPixelColumn, idDU;
46  int modulePixelRow = modulePixel.first;
47  int modulePixelColumn = modulePixel.second;
48 
49  theIndices.transformToROC(modulePixelColumn, modulePixelRow, idDU, rocPixelColumn, rocPixelRow);
50 
51  std::pair<int, int> rocPixel;
52  rocPixel = std::make_pair(rocPixelRow, rocPixelColumn);
53 
54  return rocPixel;
55  }
int transformToROC(const int col, const int row, int &rocId, int &colROC, int &rowROC) const
CTPPSPixelIndices theIndices
Definition: CTPPSPixelROC.h:97

Friends And Related Function Documentation

◆ boost::serialization::access

friend class boost::serialization::access
friend

Definition at line 99 of file CTPPSPixelROC.h.

◆ cond::serialization::access

template<typename CondSerializationT , typename Enabled >
friend struct cond::serialization::access
friend

Definition at line 99 of file CTPPSPixelROC.h.

Member Data Documentation

◆ theDetUnit

uint32_t CTPPSPixelROC::theDetUnit
private

Definition at line 94 of file CTPPSPixelROC.h.

Referenced by rawId(), and setParameters().

◆ theIdDU

unsigned int CTPPSPixelROC::theIdDU
private

Definition at line 95 of file CTPPSPixelROC.h.

Referenced by idInDetUnit(), setParameters(), toGlobal(), and toGlobalfromDcol().

◆ theIdLk

unsigned int CTPPSPixelROC::theIdLk
private

Definition at line 95 of file CTPPSPixelROC.h.

Referenced by idInLink(), and setParameters().

◆ theIndices

CTPPSPixelIndices CTPPSPixelROC::theIndices
private

Definition at line 97 of file CTPPSPixelROC.h.

Referenced by toGlobal(), toGlobalfromDcol(), and toLocal().