CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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...
 
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::CTPPSPixelROC ( )
inline

Definition at line 20 of file CTPPSPixelROC.h.

20 : theDetUnit(0), theIdDU(0), theIdLk(0) {}
unsigned int theIdDU
Definition: CTPPSPixelROC.h:89
unsigned int theIdLk
Definition: CTPPSPixelROC.h:89
uint32_t theDetUnit
Definition: CTPPSPixelROC.h:88
CTPPSPixelROC::~CTPPSPixelROC ( )
inline

Definition at line 22 of file CTPPSPixelROC.h.

22 {}
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:89
unsigned int theIdLk
Definition: CTPPSPixelROC.h:89
uint32_t theDetUnit
Definition: CTPPSPixelROC.h:88

Member Function Documentation

unsigned int CTPPSPixelROC::idInDetUnit ( ) const
inline

id of this ROC in DetUnit etermined by token path

Definition at line 33 of file CTPPSPixelROC.h.

References theIdDU.

33 { return theIdDU; }
unsigned int theIdDU
Definition: CTPPSPixelROC.h:89
unsigned int CTPPSPixelROC::idInLink ( ) const
inline

id of this ROC in parent Link.

Definition at line 36 of file CTPPSPixelROC.h.

References theIdLk.

36 { return theIdLk; }
unsigned int theIdLk
Definition: CTPPSPixelROC.h:89
std::string CTPPSPixelROC::print ( int  depth = 0) const

printout for debug

uint32_t CTPPSPixelROC::rawId ( ) const
inline

return the DetUnit to which this ROC belongs to.

Definition at line 30 of file CTPPSPixelROC.h.

References theDetUnit.

Referenced by CTPPSPixelDataFormatter::interpretRawData().

30 { return theDetUnit; }
uint32_t theDetUnit
Definition: CTPPSPixelROC.h:88
template<class Archive >
void CTPPSPixelROC::serialize ( Archive &  ar,
const unsigned int  version 
)
private
std::pair<int, int> CTPPSPixelROC::toGlobal ( const std::pair< int, int > &  rocPixel) const
inline

Definition at line 51 of file CTPPSPixelROC.h.

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

Referenced by CTPPSPixelDataFormatter::interpretRawData().

51  {
52  int modulePixelRow = -1;
53  int modulePixelColumn = -1;
54  int rocPixelRow = rocPixel.first;
55  int rocPixelColumn = rocPixel.second;
56 
57  theIndices.transformToModule(rocPixelColumn, rocPixelRow, theIdDU, modulePixelColumn, modulePixelRow);
58 
59  std::pair<int, int> modulePixel;
60  modulePixel = std::make_pair(modulePixelRow, modulePixelColumn);
61 
62  return modulePixel;
63  }
unsigned int theIdDU
Definition: CTPPSPixelROC.h:89
int transformToModule(const int colROC, const int rowROC, const int rocId, int &col, int &row) const
CTPPSPixelIndices theIndices
Definition: CTPPSPixelROC.h:91
std::pair<int, int> CTPPSPixelROC::toGlobalfromDcol ( const std::pair< int, int > &  rocPixel) const
inline

Definition at line 65 of file CTPPSPixelROC.h.

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

Referenced by CTPPSPixelDataFormatter::interpretRawData().

65  {
66  int modulePixelRow = -1;
67  int modulePixelColumn = -1;
68  int rocDcol = rocPixel.first;
69  int rocPxl = rocPixel.second;
70 
71  int rocPixelRow;
72  int rocPixelColumn;
73 
74  theIndices.convertDcolToCol(rocDcol, rocPxl, rocPixelColumn, rocPixelRow);
75 
76  theIndices.transformToModule(rocPixelColumn, rocPixelRow, theIdDU, modulePixelColumn, modulePixelRow);
77 
78  std::pair<int, int> modulePixel;
79  modulePixel = std::make_pair(modulePixelRow, modulePixelColumn);
80 
81  return modulePixel;
82  }
static int convertDcolToCol(const int dcol, const int pix, int &colROC, int &rowROC)
unsigned int theIdDU
Definition: CTPPSPixelROC.h:89
int transformToModule(const int colROC, const int rowROC, const int rocId, int &col, int &row) const
CTPPSPixelIndices theIndices
Definition: CTPPSPixelROC.h:91
std::pair<int, int> CTPPSPixelROC::toLocal ( const std::pair< int, int > &  modulePixel) const
inline

Definition at line 38 of file CTPPSPixelROC.h.

References theIndices, and CTPPSPixelIndices::transformToROC().

38  {
39  int rocPixelRow, rocPixelColumn, idDU;
40  int modulePixelRow = modulePixel.first;
41  int modulePixelColumn = modulePixel.second;
42 
43  theIndices.transformToROC(modulePixelColumn, modulePixelRow, idDU, rocPixelColumn, rocPixelRow);
44 
45  std::pair<int, int> rocPixel;
46  rocPixel = std::make_pair(rocPixelRow, rocPixelColumn);
47 
48  return rocPixel;
49  }
int transformToROC(const int col, const int row, int &rocId, int &colROC, int &rowROC) const
CTPPSPixelIndices theIndices
Definition: CTPPSPixelROC.h:91

Friends And Related Function Documentation

friend class boost::serialization::access
friend

Definition at line 93 of file CTPPSPixelROC.h.

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

Definition at line 93 of file CTPPSPixelROC.h.

Member Data Documentation

uint32_t CTPPSPixelROC::theDetUnit
private

Definition at line 88 of file CTPPSPixelROC.h.

Referenced by rawId().

unsigned int CTPPSPixelROC::theIdDU
private

Definition at line 89 of file CTPPSPixelROC.h.

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

unsigned int CTPPSPixelROC::theIdLk
private

Definition at line 89 of file CTPPSPixelROC.h.

Referenced by idInLink().

CTPPSPixelIndices CTPPSPixelROC::theIndices
private

Definition at line 91 of file CTPPSPixelROC.h.

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