CMS 3D CMS Logo

List of all members | Classes | Public Member Functions
SourceCardRouting Class Reference

#include <SourceCardRouting.h>

Classes

struct  EmuToSfpData
 

Public Member Functions

void EMUtoSFP (unsigned short(&eIsoRank)[4], unsigned short(&eIsoCardId)[4], unsigned short(&eIsoRegionId)[4], unsigned short(&eNonIsoRank)[4], unsigned short(&eNonIsoCardId)[4], unsigned short(&eNonIsoRegionId)[4], unsigned short(&MIPbits)[7][2], unsigned short(&Qbits)[7][2], unsigned short(&SFP)[2][4]) const
 
void EMUtoSTRING (unsigned short &logicalCardID, unsigned short &eventNumber, unsigned short(&eIsoRank)[4], unsigned short(&eIsoCardId)[4], unsigned short(&eIsoRegionId)[4], unsigned short(&eNonIsoRank)[4], unsigned short(&eNonIsoCardId)[4], unsigned short(&eNonIsoRegionId)[4], unsigned short(&MIPbits)[7][2], unsigned short(&Qbits)[7][2], std::string &dataString) const
 
void EMUtoVHDCI (unsigned short(&eIsoRank)[4], unsigned short(&eIsoCardId)[4], unsigned short(&eIsoRegionId)[4], unsigned short(&eNonIsoRank)[4], unsigned short(&eNonIsoCardId)[4], unsigned short(&eNonIsoRegionId)[4], unsigned short(&MIPbits)[7][2], unsigned short(&Qbits)[7][2], unsigned long(&VHDCI)[2][2]) const
 
void LogicalCardIDtoRoutingMode (unsigned short &logicalCardID, int &RoutingMode, int &RCTCrateNumber) const
 
void RC012toSFP (unsigned short(&RC)[7][2], unsigned short(&RCof)[7][2], unsigned short(&RCtau)[7][2], unsigned short(&SFP)[2][4]) const
 
void RC012toSTRING (unsigned short &logicalCardID, unsigned short &eventNumber, unsigned short(&RC)[7][2], unsigned short(&RCof)[7][2], unsigned short(&RCtau)[7][2], std::string &dataString) const
 
void RC012toVHDCI (unsigned short(&RC)[7][2], unsigned short(&RCof)[7][2], unsigned short(&RCtau)[7][2], unsigned long(&VHDCI)[2][2]) const
 
void RC234toSFP (unsigned short(&RC)[7][2], unsigned short(&RCof)[7][2], unsigned short(&RCtau)[7][2], unsigned short(&sisterRC)[7][2], unsigned short(&sisterRCof)[7][2], unsigned short(&sisterRCtau)[7][2], unsigned short(&SFP)[2][4]) const
 
void RC234toSTRING (unsigned short &logicalCardID, unsigned short &eventNumber, unsigned short(&RC)[7][2], unsigned short(&RCof)[7][2], unsigned short(&RCtau)[7][2], unsigned short(&sisterRC)[7][2], unsigned short(&sisterRCof)[7][2], unsigned short(&sisterRCtau)[7][2], std::string &dataString) const
 
void RC234toVHDCI (unsigned short(&RC)[7][2], unsigned short(&RCof)[7][2], unsigned short(&RCtau)[7][2], unsigned short(&sisterRC)[7][2], unsigned short(&sisterRCof)[7][2], unsigned short(&sisterRCtau)[7][2], unsigned long(&VHDCI)[2][2]) const
 
void RC56HFtoSFP (unsigned short(&RC)[7][2], unsigned short(&RCof)[7][2], unsigned short(&RCtau)[7][2], unsigned short(&HF)[4][2], unsigned short(&HFQ)[4][2], unsigned short(&SFP)[2][4]) const
 
void RC56HFtoSTRING (unsigned short &logicalCardID, unsigned short &eventNumber, unsigned short(&RC)[7][2], unsigned short(&RCof)[7][2], unsigned short(&RCtau)[7][2], unsigned short(&HF)[4][2], unsigned short(&HFQ)[4][2], std::string &dataString) const
 
void RC56HFtoVHDCI (unsigned short(&RC)[7][2], unsigned short(&RCof)[7][2], unsigned short(&RCtau)[7][2], unsigned short(&HF)[4][2], unsigned short(&HFQ)[4][2], unsigned long(&VHDCI)[2][2]) const
 
void RoutingModetoLogicalCardID (unsigned short &logicalCardID, int &RoutingMode, int &RCTCrateNumber) const
 
void SFPtoEMU (unsigned short(&eIsoRank)[4], unsigned short(&eIsoCardId)[4], unsigned short(&eIsoRegionId)[4], unsigned short(&eNonIsoRank)[4], unsigned short(&eNonIsoCardId)[4], unsigned short(&eNonIsoRegionId)[4], unsigned short(&MIPbits)[7][2], unsigned short(&Qbits)[7][2], unsigned short(&SFP)[2][4]) const
 
void SFPtoRC012 (unsigned short(&RC)[7][2], unsigned short(&RCof)[7][2], unsigned short(&RCtau)[7][2], unsigned short(&SFP)[2][4]) const
 
void SFPtoRC234 (unsigned short(&RC)[7][2], unsigned short(&RCof)[7][2], unsigned short(&RCtau)[7][2], unsigned short(&sisterRC)[7][2], unsigned short(&sisterRCof)[7][2], unsigned short(&sisterRCtau)[7][2], unsigned short(&SFP)[2][4]) const
 
void SFPtoRC56HF (unsigned short(&RC)[7][2], unsigned short(&RCof)[7][2], unsigned short(&RCtau)[7][2], unsigned short(&HF)[4][2], unsigned short(&HFQ)[4][2], unsigned short(&SFP)[2][4]) const
 
void SFPtoSTRING (unsigned short &logicalCardID, unsigned short &eventNumber, int RoutingMode, unsigned short(&SFP)[2][4], std::string &dataString) const
 
void SFPtoVHDCI (int RoutingMode, unsigned short(&SFP)[2][4], unsigned long(&VHDCI)[2][2]) const
 
 SourceCardRouting ()
 
void STRINGtoVHDCI (unsigned short &logicalCardID, unsigned short &eventNumber, std::string &dataString, unsigned long(&VHDCI)[2][2]) const
 
void VHDCItoEMU (unsigned short(&eIsoRank)[4], unsigned short(&eIsoCardId)[4], unsigned short(&eIsoRegionId)[4], unsigned short(&eNonIsoRank)[4], unsigned short(&eNonIsoCardId)[4], unsigned short(&eNonIsoRegionId)[4], unsigned short(&MIPbits)[7][2], unsigned short(&Qbits)[7][2], unsigned long(&VHDCI)[2][2]) const
 
void VHDCItoRC012 (unsigned short(&RC)[7][2], unsigned short(&RCof)[7][2], unsigned short(&RCtau)[7][2], unsigned long(&VHDCI)[2][2]) const
 
void VHDCItoRC234 (unsigned short(&RC)[7][2], unsigned short(&RCof)[7][2], unsigned short(&RCtau)[7][2], unsigned short(&sisterRC)[7][2], unsigned short(&sisterRCof)[7][2], unsigned short(&sisterRCtau)[7][2], unsigned long(&VHDCI)[2][2]) const
 
void VHDCItoRC56HF (unsigned short(&RC)[7][2], unsigned short(&RCof)[7][2], unsigned short(&RCtau)[7][2], unsigned short(&HF)[4][2], unsigned short(&HFQ)[4][2], unsigned long(&VHDCI)[2][2]) const
 
void VHDCItoSFP (int RoutingMode, unsigned short(&SFP)[2][4], unsigned long(&VHDCI)[2][2]) const
 
void VHDCItoSTRING (unsigned short &logicalCardID, unsigned short &eventNumber, std::string &dataString, unsigned long(&VHDCI)[2][2]) const
 
 ~SourceCardRouting ()
 

Detailed Description

Definition at line 13 of file SourceCardRouting.h.

Constructor & Destructor Documentation

◆ SourceCardRouting()

SourceCardRouting::SourceCardRouting ( )

Definition at line 17 of file SourceCardRouting.cc.

17  {
18  // std::cout<<"Constructor"<<std::endl;
19 }

◆ ~SourceCardRouting()

SourceCardRouting::~SourceCardRouting ( )

Definition at line 21 of file SourceCardRouting.cc.

21  {
22  // std::cout<<"Destructor"<<std::endl;
23 }

Member Function Documentation

◆ EMUtoSFP()

void SourceCardRouting::EMUtoSFP ( unsigned short(&)  eIsoRank[4],
unsigned short(&)  eIsoCardId[4],
unsigned short(&)  eIsoRegionId[4],
unsigned short(&)  eNonIsoRank[4],
unsigned short(&)  eNonIsoCardId[4],
unsigned short(&)  eNonIsoRegionId[4],
unsigned short(&)  MIPbits[7][2],
unsigned short(&)  Qbits[7][2],
unsigned short(&)  SFP[2][4] 
) const

Definition at line 30 of file SourceCardRouting.cc.

38  {
39  SFP[0][0] = 0;
40  SFP[1][0] = 0x8000;
41 
42  for (int i = 0; i < 7; i++) {
43  for (int j = 0; j < 2; j++) {
44  SFP[0][0] = SFP[0][0] | ((MIPbits[i][j] & 0x01) << ((2 * i) + j));
45  SFP[1][0] = SFP[1][0] | ((Qbits[i][j] & 0x01) << ((2 * i) + j));
46  }
47  }
48 
49  SFP[0][1] = (eIsoRank[0] & 0x3f) | ((eIsoRegionId[0] & 0x01) << 6) | ((eIsoCardId[0] & 0x07) << 7) |
50  ((eIsoRank[1] & 0x7) << 10);
51  SFP[1][1] = 0x8000 | (eIsoRank[2] & 0x3f) | ((eIsoRegionId[2] & 0x01) << 6) | ((eIsoCardId[2] & 0x07) << 7) |
52  ((eIsoRank[3] & 0x7) << 10);
53  SFP[0][2] = (eNonIsoRank[0] & 0x3f) | ((eNonIsoRegionId[0] & 0x01) << 6) | ((eNonIsoCardId[0] & 0x07) << 7) |
54  ((eIsoRank[1] & 0x38) << 7) | ((eIsoRegionId[1] & 0x01) << 13);
55  SFP[1][2] = 0x8000 | (eNonIsoRank[2] & 0x3f) | ((eNonIsoRegionId[2] & 0x01) << 6) | ((eNonIsoCardId[2] & 0x07) << 7) |
56  ((eIsoRank[3] & 0x38) << 7) | ((eIsoRegionId[3] & 0x01) << 13);
57  SFP[0][3] = (eNonIsoRank[1] & 0x3f) | ((eNonIsoRegionId[1] & 0x01) << 6) | ((eNonIsoCardId[1] & 0x07) << 7) |
58  ((eIsoCardId[1] & 0x07) << 10);
59  SFP[1][3] = 0x8000 | (eNonIsoRank[3] & 0x3f) | ((eNonIsoRegionId[3] & 0x01) << 6) | ((eNonIsoCardId[3] & 0x07) << 7) |
60  ((eIsoCardId[3] & 0x07) << 10);
61 }

References mps_fire::i, and dqmiolumiharvest::j.

Referenced by GctFormatTranslateMCLegacy::writeRctEmCandBlocks().

◆ EMUtoSTRING()

void SourceCardRouting::EMUtoSTRING ( unsigned short &  logicalCardID,
unsigned short &  eventNumber,
unsigned short(&)  eIsoRank[4],
unsigned short(&)  eIsoCardId[4],
unsigned short(&)  eIsoRegionId[4],
unsigned short(&)  eNonIsoRank[4],
unsigned short(&)  eNonIsoCardId[4],
unsigned short(&)  eNonIsoRegionId[4],
unsigned short(&)  MIPbits[7][2],
unsigned short(&)  Qbits[7][2],
std::string &  dataString 
) const

Definition at line 615 of file SourceCardRouting.cc.

625  {
626  unsigned long VHDCI[2][2] = {{0}};
627  EMUtoVHDCI(eIsoRank, eIsoCardId, eIsoRegionId, eNonIsoRank, eNonIsoCardId, eNonIsoRegionId, MIPbits, Qbits, VHDCI);
628  VHDCItoSTRING(logicalCardID, eventNumber, dataString, VHDCI);
629 }

Referenced by RctDigiToSourceCardText::analyze().

◆ EMUtoVHDCI()

void SourceCardRouting::EMUtoVHDCI ( unsigned short(&)  eIsoRank[4],
unsigned short(&)  eIsoCardId[4],
unsigned short(&)  eIsoRegionId[4],
unsigned short(&)  eNonIsoRank[4],
unsigned short(&)  eNonIsoCardId[4],
unsigned short(&)  eNonIsoRegionId[4],
unsigned short(&)  MIPbits[7][2],
unsigned short(&)  Qbits[7][2],
unsigned long(&)  VHDCI[2][2] 
) const

Definition at line 487 of file SourceCardRouting.cc.

495  {
496  unsigned short SFP[2][4] = {{0}};
497  EMUtoSFP(eIsoRank, eIsoCardId, eIsoRegionId, eNonIsoRank, eNonIsoCardId, eNonIsoRegionId, MIPbits, Qbits, SFP);
498  SFPtoVHDCI(0, SFP, VHDCI);
499 }

◆ LogicalCardIDtoRoutingMode()

void SourceCardRouting::LogicalCardIDtoRoutingMode ( unsigned short &  logicalCardID,
int &  RoutingMode,
int &  RCTCrateNumber 
) const

Definition at line 739 of file SourceCardRouting.cc.

741  {
742  RCTCrateNumber = (logicalCardID >> 3);
743  if ((logicalCardID & 0x4) != 0)
744  RCTCrateNumber += 9;
745  RoutingMode = (logicalCardID & 0x3);
746 }

Referenced by SourceCardTextToRctDigi::produce().

◆ RC012toSFP()

void SourceCardRouting::RC012toSFP ( unsigned short(&)  RC[7][2],
unsigned short(&)  RCof[7][2],
unsigned short(&)  RCtau[7][2],
unsigned short(&)  SFP[2][4] 
) const

Definition at line 191 of file SourceCardRouting.cc.

194  {
195  SFP[0][0] = (RC[0][0] & 0x3ff) | ((RCof[0][0] & 0x1) << 10) | ((RCtau[0][0] & 0x1) << 11) | ((RC[2][0] & 0x7) << 12);
196  SFP[1][0] =
197  0x8000 | (RC[0][1] & 0x3ff) | ((RCof[0][1] & 0x1) << 10) | ((RCtau[0][1] & 0x1) << 11) | ((RC[2][1] & 0x7) << 12);
198 
199  SFP[0][1] = (RC[1][0] & 0x3ff) | ((RCof[1][0] & 0x1) << 10) | ((RCtau[1][0] & 0x1) << 11) | ((RC[2][0] & 0x38) << 9);
200  SFP[1][1] =
201  0x8000 | (RC[1][1] & 0x3ff) | ((RCof[1][1] & 0x1) << 10) | ((RCtau[1][1] & 0x1) << 11) | ((RC[2][1] & 0x38) << 9);
202 
203  SFP[0][2] = (RC[0][0] & 0x3ff) | ((RCof[0][0] & 0x1) << 10) | ((RCtau[0][0] & 0x1) << 11);
204  SFP[1][2] = 0x8000 | (RC[0][1] & 0x3ff) | ((RCof[0][1] & 0x1) << 10) | ((RCtau[0][1] & 0x1) << 11);
205 
206  SFP[0][3] = (RC[1][0] & 0x3ff) | ((RCof[1][0] & 0x1) << 10) | ((RCtau[1][0] & 0x1) << 11);
207  SFP[1][3] = 0x8000 | (RC[1][1] & 0x3ff) | ((RCof[1][1] & 0x1) << 10) | ((RCtau[1][1] & 0x1) << 11);
208 }

References testProducerWithPsetDescEmpty_cfi::x1.

◆ RC012toSTRING()

void SourceCardRouting::RC012toSTRING ( unsigned short &  logicalCardID,
unsigned short &  eventNumber,
unsigned short(&)  RC[7][2],
unsigned short(&)  RCof[7][2],
unsigned short(&)  RCtau[7][2],
std::string &  dataString 
) const

Definition at line 651 of file SourceCardRouting.cc.

656  {
657  unsigned long VHDCI[2][2] = {{0}};
658  RC012toVHDCI(RC, RCof, RCtau, VHDCI);
659  VHDCItoSTRING(logicalCardID, eventNumber, dataString, VHDCI);
660 }

Referenced by RctDigiToSourceCardText::analyze().

◆ RC012toVHDCI()

void SourceCardRouting::RC012toVHDCI ( unsigned short(&)  RC[7][2],
unsigned short(&)  RCof[7][2],
unsigned short(&)  RCtau[7][2],
unsigned long(&)  VHDCI[2][2] 
) const

Definition at line 556 of file SourceCardRouting.cc.

559  {
560  unsigned short SFP[2][4] = {{0}};
561  RC012toSFP(RC, RCof, RCtau, SFP);
562  SFPtoVHDCI(2, SFP, VHDCI);
563 }

◆ RC234toSFP()

void SourceCardRouting::RC234toSFP ( unsigned short(&)  RC[7][2],
unsigned short(&)  RCof[7][2],
unsigned short(&)  RCtau[7][2],
unsigned short(&)  sisterRC[7][2],
unsigned short(&)  sisterRCof[7][2],
unsigned short(&)  sisterRCtau[7][2],
unsigned short(&)  SFP[2][4] 
) const

Definition at line 240 of file SourceCardRouting.cc.

246  {
247  SFP[0][0] = (RC[3][0] & 0x3ff) | ((RCof[3][0] & 0x1) << 10) | ((RCtau[3][0] & 0x1) << 11) | ((RC[2][0] & 0x1c0) << 6);
248  SFP[1][0] = 0x8000 | (RC[3][1] & 0x3ff) | ((RCof[3][1] & 0x1) << 10) | ((RCtau[3][1] & 0x1) << 11) |
249  ((RC[2][1] & 0x1c0) << 6);
250 
251  SFP[0][1] = (RC[4][0] & 0x3ff) | ((RCof[4][0] & 0x1) << 10) | ((RCtau[4][0] & 0x1) << 11) |
252  ((RC[2][0] & 0x200) << 3) | ((RCof[2][0] & 0x1) << 13) | ((RCtau[2][0] & 0x1) << 14);
253  SFP[1][1] = 0x8000 | (RC[4][1] & 0x3ff) | ((RCof[4][1] & 0x1) << 10) | ((RCtau[4][1] & 0x1) << 11) |
254  ((RC[2][1] & 0x200) << 3) | ((RCof[2][1] & 0x1) << 13) | ((RCtau[2][1] & 0x1) << 14);
255 
256  SFP[0][2] = (sisterRC[3][0] & 0x3ff) | ((sisterRCof[3][0] & 0x1) << 10) | ((sisterRCtau[3][0] & 0x1) << 11) |
257  ((sisterRC[2][0] & 0x1c0) << 6);
258  SFP[1][2] = 0x8000 | (sisterRC[3][1] & 0x3ff) | ((sisterRCof[3][1] & 0x1) << 10) | ((sisterRCtau[3][1] & 0x1) << 11) |
259  ((sisterRC[2][1] & 0x1c0) << 6);
260 
261  SFP[0][3] = (sisterRC[4][0] & 0x3ff) | ((sisterRCof[4][0] & 0x1) << 10) | ((sisterRCtau[4][0] & 0x1) << 11) |
262  ((sisterRC[2][0] & 0x200) << 3) | ((sisterRCof[2][0] & 0x1) << 13) | ((sisterRCtau[2][0] & 0x1) << 14);
263  SFP[1][3] = 0x8000 | (sisterRC[4][1] & 0x3ff) | ((sisterRCof[4][1] & 0x1) << 10) | ((sisterRCtau[4][1] & 0x1) << 11) |
264  ((sisterRC[2][1] & 0x200) << 3) | ((sisterRCof[2][1] & 0x1) << 13) | ((sisterRCtau[2][1] & 0x1) << 14);
265 }

References testProducerWithPsetDescEmpty_cfi::x1.

◆ RC234toSTRING()

void SourceCardRouting::RC234toSTRING ( unsigned short &  logicalCardID,
unsigned short &  eventNumber,
unsigned short(&)  RC[7][2],
unsigned short(&)  RCof[7][2],
unsigned short(&)  RCtau[7][2],
unsigned short(&)  sisterRC[7][2],
unsigned short(&)  sisterRCof[7][2],
unsigned short(&)  sisterRCtau[7][2],
std::string &  dataString 
) const

Definition at line 665 of file SourceCardRouting.cc.

673  {
674  unsigned long VHDCI[2][2] = {{0}};
675  RC234toVHDCI(RC, RCof, RCtau, sisterRC, sisterRCof, sisterRCtau, VHDCI);
676  VHDCItoSTRING(logicalCardID, eventNumber, dataString, VHDCI);
677 }

Referenced by RctDigiToSourceCardText::analyze().

◆ RC234toVHDCI()

void SourceCardRouting::RC234toVHDCI ( unsigned short(&)  RC[7][2],
unsigned short(&)  RCof[7][2],
unsigned short(&)  RCtau[7][2],
unsigned short(&)  sisterRC[7][2],
unsigned short(&)  sisterRCof[7][2],
unsigned short(&)  sisterRCtau[7][2],
unsigned long(&)  VHDCI[2][2] 
) const

Definition at line 582 of file SourceCardRouting.cc.

588  {
589  unsigned short SFP[2][4] = {{0}};
590  RC234toSFP(RC, RCof, RCtau, sisterRC, sisterRCof, sisterRCtau, SFP);
591  SFPtoVHDCI(3, SFP, VHDCI);
592 }

◆ RC56HFtoSFP()

void SourceCardRouting::RC56HFtoSFP ( unsigned short(&)  RC[7][2],
unsigned short(&)  RCof[7][2],
unsigned short(&)  RCtau[7][2],
unsigned short(&)  HF[4][2],
unsigned short(&)  HFQ[4][2],
unsigned short(&)  SFP[2][4] 
) const

Definition at line 120 of file SourceCardRouting.cc.

125  {
126  SFP[0][0] = (RC[5][0] & 0x3ff) | ((RCof[5][0] & 0x1) << 10) | ((RCtau[5][0] & 0x1) << 11) |
127  ((HFQ[0][0] & 0x1) << 12) | ((HFQ[1][0] & 0x01) << 13) | ((HF[0][0] & 0x01) << 14);
128  SFP[1][0] = 0x8000 | (RC[5][1] & 0x3ff) | ((RCof[5][1] & 0x1) << 10) | ((RCtau[5][1] & 0x1) << 11) |
129  ((HFQ[2][0] & 0x1) << 12) | ((HFQ[3][0] & 0x01) << 13) | ((HF[2][0] & 0x01) << 14);
130  SFP[0][1] = (RC[6][0] & 0x3ff) | ((RCof[6][0] & 0x1) << 10) | ((RCtau[6][0] & 0x1) << 11) |
131  ((HFQ[0][1] & 0x1) << 12) | ((HFQ[1][1] & 0x01) << 13) | ((HF[0][1] & 0x01) << 14);
132  SFP[1][1] = 0x8000 | (RC[6][1] & 0x3ff) | ((RCof[6][1] & 0x1) << 10) | ((RCtau[6][1] & 0x1) << 11) |
133  ((HFQ[2][1] & 0x1) << 12) | ((HFQ[3][1] & 0x01) << 13) | ((HF[2][1] & 0x01) << 14);
134  SFP[0][2] = ((HF[0][0] >> 1) & 0x7f) | ((HF[1][0] & 0xff) << 7);
135  SFP[1][2] = 0x8000 | ((HF[2][0] >> 1) & 0x7f) | ((HF[3][0] & 0xff) << 7);
136  SFP[0][3] = ((HF[0][1] >> 1) & 0x7f) | ((HF[1][1] & 0xff) << 7);
137  SFP[1][3] = 0x8000 | ((HF[2][1] >> 1) & 0x7f) | ((HF[3][1] & 0xff) << 7);
138 }

References DigiToRawDM_cff::HF, and testProducerWithPsetDescEmpty_cfi::x1.

◆ RC56HFtoSTRING()

void SourceCardRouting::RC56HFtoSTRING ( unsigned short &  logicalCardID,
unsigned short &  eventNumber,
unsigned short(&)  RC[7][2],
unsigned short(&)  RCof[7][2],
unsigned short(&)  RCtau[7][2],
unsigned short(&)  HF[4][2],
unsigned short(&)  HFQ[4][2],
std::string &  dataString 
) const

Definition at line 635 of file SourceCardRouting.cc.

642  {
643  unsigned long VHDCI[2][2] = {{0}};
644  RC56HFtoVHDCI(RC, RCof, RCtau, HF, HFQ, VHDCI);
645  VHDCItoSTRING(logicalCardID, eventNumber, dataString, VHDCI);
646 }

References DigiToRawDM_cff::HF.

Referenced by RctDigiToSourceCardText::analyze().

◆ RC56HFtoVHDCI()

void SourceCardRouting::RC56HFtoVHDCI ( unsigned short(&)  RC[7][2],
unsigned short(&)  RCof[7][2],
unsigned short(&)  RCtau[7][2],
unsigned short(&)  HF[4][2],
unsigned short(&)  HFQ[4][2],
unsigned long(&)  VHDCI[2][2] 
) const

Definition at line 525 of file SourceCardRouting.cc.

530  {
531  unsigned short SFP[2][4] = {{0}};
532  RC56HFtoSFP(RC, RCof, RCtau, HF, HFQ, SFP);
533  SFPtoVHDCI(1, SFP, VHDCI);
534 }

References DigiToRawDM_cff::HF.

◆ RoutingModetoLogicalCardID()

void SourceCardRouting::RoutingModetoLogicalCardID ( unsigned short &  logicalCardID,
int &  RoutingMode,
int &  RCTCrateNumber 
) const

Definition at line 750 of file SourceCardRouting.cc.

752  {
753  logicalCardID = ((RCTCrateNumber % 9) << 3) | (RCTCrateNumber > 8 ? 0x4 : 0x0) | (RoutingMode & 0x3);
754 }

Referenced by RctDigiToSourceCardText::analyze().

◆ SFPtoEMU()

void SourceCardRouting::SFPtoEMU ( unsigned short(&)  eIsoRank[4],
unsigned short(&)  eIsoCardId[4],
unsigned short(&)  eIsoRegionId[4],
unsigned short(&)  eNonIsoRank[4],
unsigned short(&)  eNonIsoCardId[4],
unsigned short(&)  eNonIsoRegionId[4],
unsigned short(&)  MIPbits[7][2],
unsigned short(&)  Qbits[7][2],
unsigned short(&)  SFP[2][4] 
) const

Definition at line 68 of file SourceCardRouting.cc.

76  {
77  for (int i = 0; i < 7; i++) {
78  for (int j = 0; j < 2; j++) {
79  MIPbits[i][j] = (SFP[0][0] >> ((2 * i) + j)) & 0x1;
80  Qbits[i][j] = (SFP[1][0] >> ((2 * i) + j)) & 0x1;
81  }
82  }
83 
84  eIsoRank[0] = SFP[0][1] & 0x3f;
85  eIsoRank[1] = ((SFP[0][1] >> 10) & 0x7) | ((SFP[0][2] >> 7) & 0x38);
86  eIsoRank[2] = SFP[1][1] & 0x3f;
87  eIsoRank[3] = ((SFP[1][1] >> 10) & 0x7) | ((SFP[1][2] >> 7) & 0x38);
88 
89  eNonIsoRank[0] = SFP[0][2] & 0x3f;
90  eNonIsoRank[1] = SFP[0][3] & 0x3f;
91  eNonIsoRank[2] = SFP[1][2] & 0x3f;
92  eNonIsoRank[3] = SFP[1][3] & 0x3f;
93 
94  eIsoRegionId[0] = (SFP[0][1] >> 6) & 0x1;
95  eIsoRegionId[1] = (SFP[0][2] >> 13) & 0x1;
96  eIsoRegionId[2] = (SFP[1][1] >> 6) & 0x1;
97  eIsoRegionId[3] = (SFP[1][2] >> 13) & 0x1;
98 
99  eNonIsoRegionId[0] = (SFP[0][2] >> 6) & 0x1;
100  eNonIsoRegionId[1] = (SFP[0][3] >> 6) & 0x1;
101  eNonIsoRegionId[2] = (SFP[1][2] >> 6) & 0x1;
102  eNonIsoRegionId[3] = (SFP[1][3] >> 6) & 0x1;
103 
104  eIsoCardId[0] = (SFP[0][1] >> 7) & 0x7;
105  eIsoCardId[1] = (SFP[0][3] >> 10) & 0x7;
106  eIsoCardId[2] = (SFP[1][1] >> 7) & 0x7;
107  eIsoCardId[3] = (SFP[1][3] >> 10) & 0x7;
108 
109  eNonIsoCardId[0] = (SFP[0][2] >> 7) & 0x7;
110  eNonIsoCardId[1] = (SFP[0][3] >> 7) & 0x7;
111  eNonIsoCardId[2] = (SFP[1][2] >> 7) & 0x7;
112  eNonIsoCardId[3] = (SFP[1][3] >> 7) & 0x7;
113 }

References mps_fire::i, dqmiolumiharvest::j, and testProducerWithPsetDescEmpty_cfi::x1.

Referenced by GctFormatTranslateV35::blockToRctEmCand(), GctFormatTranslateV38::blockToRctEmCand(), and GctFormatTranslateMCLegacy::blockToRctEmCand().

◆ SFPtoRC012()

void SourceCardRouting::SFPtoRC012 ( unsigned short(&)  RC[7][2],
unsigned short(&)  RCof[7][2],
unsigned short(&)  RCtau[7][2],
unsigned short(&)  SFP[2][4] 
) const

Definition at line 214 of file SourceCardRouting.cc.

217  {
218  RC[0][0] = SFP[0][0] & 0x3ff;
219  RC[0][1] = SFP[1][0] & 0x3ff;
220  RC[1][0] = SFP[0][1] & 0x3ff;
221  RC[1][1] = SFP[1][1] & 0x3ff;
222  RC[2][0] = (RC[2][0] & 0x3c0) | ((SFP[0][0] & 0x7000) >> 12) | ((SFP[0][1] & 0x7000) >> 9);
223  RC[2][1] = (RC[2][1] & 0x3c0) | ((SFP[1][0] & 0x7000) >> 12) | ((SFP[1][1] & 0x7000) >> 9);
224 
225  RCof[0][0] = (SFP[0][0] >> 10) & 0x1;
226  RCof[0][1] = (SFP[1][0] >> 10) & 0x1;
227  RCof[1][0] = (SFP[0][1] >> 10) & 0x1;
228  RCof[1][1] = (SFP[1][1] >> 10) & 0x1;
229 
230  RCtau[0][0] = (SFP[0][0] >> 11) & 0x1;
231  RCtau[0][1] = (SFP[1][0] >> 11) & 0x1;
232  RCtau[1][0] = (SFP[0][1] >> 11) & 0x1;
233  RCtau[1][1] = (SFP[1][1] >> 11) & 0x1;
234 }

References testProducerWithPsetDescEmpty_cfi::x1.

◆ SFPtoRC234()

void SourceCardRouting::SFPtoRC234 ( unsigned short(&)  RC[7][2],
unsigned short(&)  RCof[7][2],
unsigned short(&)  RCtau[7][2],
unsigned short(&)  sisterRC[7][2],
unsigned short(&)  sisterRCof[7][2],
unsigned short(&)  sisterRCtau[7][2],
unsigned short(&)  SFP[2][4] 
) const

Definition at line 271 of file SourceCardRouting.cc.

277  {
278  RC[2][0] = (RC[2][0] & 0x3f) | ((SFP[0][0] & 0x7000) >> 6) | ((SFP[0][1] & 0x1000) >> 3);
279  RC[3][0] = SFP[0][0] & 0x3ff;
280  RC[4][0] = SFP[0][1] & 0x3ff;
281  RC[2][1] = (RC[2][1] & 0x3f) | ((SFP[1][0] & 0x7000) >> 6) | ((SFP[1][1] & 0x1000) >> 3);
282  RC[3][1] = SFP[1][0] & 0x3ff;
283  RC[4][1] = SFP[1][1] & 0x3ff;
284 
285  RCof[2][0] = (SFP[0][1] >> 13) & 0x1;
286  RCof[3][0] = (SFP[0][0] >> 10) & 0x1;
287  RCof[4][0] = (SFP[0][1] >> 10) & 0x1;
288  RCof[2][1] = (SFP[1][1] >> 13) & 0x1;
289  RCof[3][1] = (SFP[1][0] >> 10) & 0x1;
290  RCof[4][1] = (SFP[1][1] >> 10) & 0x1;
291 
292  RCtau[2][0] = (SFP[0][1] >> 14) & 0x1;
293  RCtau[3][0] = (SFP[0][0] >> 11) & 0x1;
294  RCtau[4][0] = (SFP[0][1] >> 11) & 0x1;
295  RCtau[2][1] = (SFP[1][1] >> 14) & 0x1;
296  RCtau[3][1] = (SFP[1][0] >> 11) & 0x1;
297  RCtau[4][1] = (SFP[1][1] >> 11) & 0x1;
298 
299  sisterRC[2][0] = (sisterRC[2][0] & ~0x3C0) | ((SFP[0][2] & 0x7000) >> 6) | ((SFP[0][3] & 0x1000) >> 3);
300  sisterRC[3][0] = SFP[0][2] & 0x3ff;
301  sisterRC[4][0] = SFP[0][3] & 0x3ff;
302  sisterRC[2][1] = (sisterRC[2][1] & ~0x3C0) | ((SFP[1][2] & 0x7000) >> 6) | ((SFP[1][3] & 0x1000) >> 3);
303  sisterRC[3][1] = SFP[1][2] & 0x3ff;
304  sisterRC[4][1] = SFP[1][3] & 0x3ff;
305 
306  sisterRCof[2][0] = (SFP[0][3] >> 13) & 0x1;
307  sisterRCof[3][0] = (SFP[0][2] >> 10) & 0x1;
308  sisterRCof[4][0] = (SFP[0][3] >> 10) & 0x1;
309  sisterRCof[2][1] = (SFP[1][3] >> 13) & 0x1;
310  sisterRCof[3][1] = (SFP[1][2] >> 10) & 0x1;
311  sisterRCof[4][1] = (SFP[1][3] >> 10) & 0x1;
312 
313  sisterRCtau[2][0] = (SFP[0][3] >> 14) & 0x1;
314  sisterRCtau[3][0] = (SFP[0][2] >> 11) & 0x1;
315  sisterRCtau[4][0] = (SFP[0][3] >> 11) & 0x1;
316  sisterRCtau[2][1] = (SFP[1][3] >> 14) & 0x1;
317  sisterRCtau[3][1] = (SFP[1][2] >> 11) & 0x1;
318  sisterRCtau[4][1] = (SFP[1][3] >> 11) & 0x1;
319 }

References testProducerWithPsetDescEmpty_cfi::x1.

◆ SFPtoRC56HF()

void SourceCardRouting::SFPtoRC56HF ( unsigned short(&)  RC[7][2],
unsigned short(&)  RCof[7][2],
unsigned short(&)  RCtau[7][2],
unsigned short(&)  HF[4][2],
unsigned short(&)  HFQ[4][2],
unsigned short(&)  SFP[2][4] 
) const

Definition at line 145 of file SourceCardRouting.cc.

150  {
151  RC[5][0] = SFP[0][0] & 0x3ff;
152  RC[5][1] = SFP[1][0] & 0x3ff;
153  RC[6][0] = SFP[0][1] & 0x3ff;
154  RC[6][1] = SFP[1][1] & 0x3ff;
155 
156  RCof[5][0] = (SFP[0][0] >> 10) & 0x1;
157  RCof[5][1] = (SFP[1][0] >> 10) & 0x1;
158  RCof[6][0] = (SFP[0][1] >> 10) & 0x1;
159  RCof[6][1] = (SFP[1][1] >> 10) & 0x1;
160 
161  RCtau[5][0] = (SFP[0][0] >> 11) & 0x1;
162  RCtau[5][1] = (SFP[1][0] >> 11) & 0x1;
163  RCtau[6][0] = (SFP[0][1] >> 11) & 0x1;
164  RCtau[6][1] = (SFP[1][1] >> 11) & 0x1;
165 
166  HFQ[0][0] = (SFP[0][0] >> 12) & 0x1;
167  HFQ[1][0] = (SFP[0][0] >> 13) & 0x1;
168  HFQ[2][0] = (SFP[1][0] >> 12) & 0x1;
169  HFQ[3][0] = (SFP[1][0] >> 13) & 0x1;
170 
171  HFQ[0][1] = (SFP[0][1] >> 12) & 0x1;
172  HFQ[1][1] = (SFP[0][1] >> 13) & 0x1;
173  HFQ[2][1] = (SFP[1][1] >> 12) & 0x1;
174  HFQ[3][1] = (SFP[1][1] >> 13) & 0x1;
175 
176  HF[0][0] = ((SFP[0][2] & 0x7f) << 1) | ((SFP[0][0] >> 14) & 0x01);
177  HF[1][0] = (SFP[0][2] >> 7) & 0xff;
178  HF[2][0] = ((SFP[1][2] & 0x7f) << 1) | ((SFP[1][0] >> 14) & 0x01);
179  HF[3][0] = (SFP[1][2] >> 7) & 0xff;
180 
181  HF[0][1] = ((SFP[0][3] & 0x7f) << 1) | ((SFP[0][1] >> 14) & 0x01);
182  HF[1][1] = (SFP[0][3] >> 7) & 0xff;
183  HF[2][1] = ((SFP[1][3] & 0x7f) << 1) | ((SFP[1][1] >> 14) & 0x01);
184  HF[3][1] = (SFP[1][3] >> 7) & 0xff;
185 }

References DigiToRawDM_cff::HF, and testProducerWithPsetDescEmpty_cfi::x1.

◆ SFPtoSTRING()

void SourceCardRouting::SFPtoSTRING ( unsigned short &  logicalCardID,
unsigned short &  eventNumber,
int  RoutingMode,
unsigned short(&)  SFP[2][4],
std::string &  dataString 
) const

Definition at line 682 of file SourceCardRouting.cc.

686  {
687  unsigned long VHDCI[2][2] = {{0}};
688  SFPtoVHDCI(RoutingMode, SFP, VHDCI);
689  VHDCItoSTRING(logicalCardID, eventNumber, dataString, VHDCI);
690 }

◆ SFPtoVHDCI()

void SourceCardRouting::SFPtoVHDCI ( int  RoutingMode,
unsigned short(&)  SFP[2][4],
unsigned long(&)  VHDCI[2][2] 
) const

Definition at line 326 of file SourceCardRouting.cc.

326  {
327  unsigned short sfp_reverse[2][4] = {{0}};
328 
329  for (int i = 0; i < 2; i++) {
330  for (int j = 0; j < 4; j++) {
331  for (int k = 0; k < 16; k++) {
332  sfp_reverse[i][j] = sfp_reverse[i][j] | (((SFP[i][j] >> k) & 0x01) << (15 - k));
333  }
334  // std::cout <<hex<< SFP[i][j]<<'\t'<<sfp_reverse[i][j]<<std::endl;
335  }
336  }
337 
338  switch (RoutingMode) {
339  case 0:
340  VHDCI[0][0] = (SFP[0][1] & 0x3ff) | ((SFP[0][1] & 0x1c00) << 1) | ((SFP[0][2] & 0x3c00) << 4) |
341  ((SFP[0][3] & 0x1c00) << 8) | ((SFP[0][0] & 0xff) << 22);
342  VHDCI[0][1] = (SFP[1][1] & 0x3ff) | ((SFP[1][1] & 0x1c00) << 1) | ((SFP[1][2] & 0x3c00) << 4) |
343  ((SFP[1][3] & 0x1c00) << 8) | ((SFP[1][0] & 0xff) << 22);
344  VHDCI[1][0] = (SFP[0][2] & 0x3ff) | ((SFP[0][3] & 0x3ff) << 11) | ((SFP[0][0] & 0x3f00) << 14);
345  VHDCI[1][1] = (SFP[1][2] & 0x3ff) | ((SFP[1][3] & 0x3ff) << 11) | ((SFP[1][0] & 0x3f00) << 14);
346  break;
347  case 1:
348  VHDCI[0][0] = (SFP[0][0] & 0xfff) | ((SFP[0][1] & 0x7) << 12) | ((SFP[0][2] & 0x80) << 10) |
349  ((SFP[0][0] & 0x4000) << 4) | ((sfp_reverse[0][1] & 0xc) << 17) |
350  ((sfp_reverse[0][0] & 0xc) << 19) | ((sfp_reverse[0][1] & 0x1ff0) << 19);
351  VHDCI[0][1] = (SFP[1][0] & 0xfff) | ((SFP[1][1] & 0x7) << 12) | ((SFP[1][2] & 0x80) << 10) |
352  ((SFP[1][0] & 0x4000) << 4) | ((sfp_reverse[1][1] & 0xc) << 17) |
353  ((sfp_reverse[1][0] & 0xc) << 19) | ((sfp_reverse[1][1] & 0x1ff0) << 19);
354 
355  VHDCI[1][0] = (SFP[0][1] & 0x4000) | ((SFP[0][3] & 0x80) << 24);
356  VHDCI[1][1] = (SFP[1][1] & 0x4000) | ((SFP[1][3] & 0x80) << 24);
357 
358  for (int i = 0; i < 7; i++) {
359  VHDCI[1][0] = VHDCI[1][0] | (((SFP[0][2] >> i) & 0x1) << (2 * i)) |
360  (((SFP[0][2] >> (i + 8)) & 0x1) << ((2 * i) + 1)) |
361  (((sfp_reverse[0][3] >> (i + 1)) & 0x1) << ((2 * i) + 17)) |
362  (((sfp_reverse[0][3] >> (i + 9)) & 0x1) << ((2 * i) + 18));
363  VHDCI[1][1] = VHDCI[1][1] | (((SFP[1][2] >> i) & 0x1) << (2 * i)) |
364  (((SFP[1][2] >> (i + 8)) & 0x1) << ((2 * i) + 1)) |
365  (((sfp_reverse[1][3] >> (i + 1)) & 0x1) << ((2 * i) + 17)) |
366  (((sfp_reverse[1][3] >> (i + 9)) & 0x1) << ((2 * i) + 18));
367  }
368  break;
369  case 2:
370  VHDCI[0][0] = (SFP[0][0] & 0xfff) | ((SFP[0][1] & 0x7) << 12) | ((sfp_reverse[0][1] & 0xe) << 16) |
371  ((sfp_reverse[0][0] & 0xe) << 19) | ((sfp_reverse[0][1] & 0x1ff0) << 19);
372  VHDCI[0][1] = (SFP[1][0] & 0xfff) | ((SFP[1][1] & 0x7) << 12) | ((sfp_reverse[1][1] & 0xe) << 16) |
373  ((sfp_reverse[1][0] & 0xe) << 19) | ((sfp_reverse[1][1] & 0x1ff0) << 19);
374  VHDCI[1][0] = 0;
375  VHDCI[1][1] = 0;
376  break;
377  case 3:
378  VHDCI[0][0] = ((SFP[0][0] >> 12) & 0x7) | ((SFP[0][1] >> 9) & 0x38) | ((SFP[0][0] & 0x1ff) << 6) |
379  ((sfp_reverse[0][1] & 0xfff0) << 13) | ((sfp_reverse[0][0] & 0x70) << 25);
380  VHDCI[0][1] = ((SFP[1][0] >> 12) & 0x7) | ((SFP[1][1] >> 9) & 0x38) | ((SFP[1][0] & 0x1ff) << 6) |
381  ((sfp_reverse[1][1] & 0xfff0) << 13) | ((sfp_reverse[1][0] & 0x70) << 25);
382 
383  VHDCI[1][0] = ((SFP[0][2] >> 12) & 0x7) | ((SFP[0][3] >> 9) & 0x38) | ((SFP[0][2] & 0x1ff) << 6) |
384  ((sfp_reverse[0][3] & 0xfff0) << 13) | ((sfp_reverse[0][2] & 0x70) << 25);
385  VHDCI[1][1] = ((SFP[1][2] >> 12) & 0x7) | ((SFP[1][3] >> 9) & 0x38) | ((SFP[1][2] & 0x1ff) << 6) |
386  ((sfp_reverse[1][3] & 0xfff0) << 13) | ((sfp_reverse[1][2] & 0x70) << 25);
387  break;
388  default:
389  VHDCI[0][0] = 0;
390  VHDCI[0][1] = 0;
391  VHDCI[1][0] = 0;
392  VHDCI[1][1] = 0;
393  }
394 }

References mps_fire::i, dqmiolumiharvest::j, dqmdumpme::k, and testProducerWithPsetDescEmpty_cfi::x1.

◆ STRINGtoVHDCI()

void SourceCardRouting::STRINGtoVHDCI ( unsigned short &  logicalCardID,
unsigned short &  eventNumber,
std::string &  dataString,
unsigned long(&)  VHDCI[2][2] 
) const

Definition at line 695 of file SourceCardRouting.cc.

698  {
699  stringstream temp;
700 
701  if (!dataString.empty()) {
702  temp << dataString << std::endl;
703  temp >> dec >> eventNumber;
704  temp >> dec >> logicalCardID;
705  temp >> hex >> VHDCI[0][0];
706  temp >> hex >> VHDCI[0][1];
707  temp >> hex >> VHDCI[1][0];
708  temp >> hex >> VHDCI[1][1];
709  } else {
710  eventNumber = 65535;
711  logicalCardID = 65535;
712  VHDCI[0][0] = 0;
713  VHDCI[0][1] = 0;
714  VHDCI[1][0] = 0;
715  VHDCI[1][1] = 0;
716  }
717 }

References TauDecayModes::dec, and groupFilesInBlocks::temp.

Referenced by SourceCardTextToRctDigi::produce().

◆ VHDCItoEMU()

void SourceCardRouting::VHDCItoEMU ( unsigned short(&)  eIsoRank[4],
unsigned short(&)  eIsoCardId[4],
unsigned short(&)  eIsoRegionId[4],
unsigned short(&)  eNonIsoRank[4],
unsigned short(&)  eNonIsoCardId[4],
unsigned short(&)  eNonIsoRegionId[4],
unsigned short(&)  MIPbits[7][2],
unsigned short(&)  Qbits[7][2],
unsigned long(&)  VHDCI[2][2] 
) const

Definition at line 506 of file SourceCardRouting.cc.

514  {
515  unsigned short SFP[2][4] = {{0}};
516  VHDCItoSFP(0, SFP, VHDCI);
517  SFPtoEMU(eIsoRank, eIsoCardId, eIsoRegionId, eNonIsoRank, eNonIsoCardId, eNonIsoRegionId, MIPbits, Qbits, SFP);
518 }

Referenced by SourceCardTextToRctDigi::produce().

◆ VHDCItoRC012()

void SourceCardRouting::VHDCItoRC012 ( unsigned short(&)  RC[7][2],
unsigned short(&)  RCof[7][2],
unsigned short(&)  RCtau[7][2],
unsigned long(&)  VHDCI[2][2] 
) const

Definition at line 569 of file SourceCardRouting.cc.

572  {
573  unsigned short SFP[2][4] = {{0}};
574  VHDCItoSFP(2, SFP, VHDCI);
575  SFPtoRC012(RC, RCof, RCtau, SFP);
576 }

Referenced by SourceCardTextToRctDigi::produce().

◆ VHDCItoRC234()

void SourceCardRouting::VHDCItoRC234 ( unsigned short(&)  RC[7][2],
unsigned short(&)  RCof[7][2],
unsigned short(&)  RCtau[7][2],
unsigned short(&)  sisterRC[7][2],
unsigned short(&)  sisterRCof[7][2],
unsigned short(&)  sisterRCtau[7][2],
unsigned long(&)  VHDCI[2][2] 
) const

Definition at line 598 of file SourceCardRouting.cc.

604  {
605  unsigned short SFP[2][4] = {{0}};
606  VHDCItoSFP(3, SFP, VHDCI);
607  SFPtoRC234(RC, RCof, RCtau, sisterRC, sisterRCof, sisterRCtau, SFP);
608 }

Referenced by SourceCardTextToRctDigi::produce().

◆ VHDCItoRC56HF()

void SourceCardRouting::VHDCItoRC56HF ( unsigned short(&)  RC[7][2],
unsigned short(&)  RCof[7][2],
unsigned short(&)  RCtau[7][2],
unsigned short(&)  HF[4][2],
unsigned short(&)  HFQ[4][2],
unsigned long(&)  VHDCI[2][2] 
) const

Definition at line 541 of file SourceCardRouting.cc.

546  {
547  unsigned short SFP[2][4] = {{0}};
548  VHDCItoSFP(1, SFP, VHDCI);
549  SFPtoRC56HF(RC, RCof, RCtau, HF, HFQ, SFP);
550 }

References DigiToRawDM_cff::HF.

Referenced by SourceCardTextToRctDigi::produce().

◆ VHDCItoSFP()

void SourceCardRouting::VHDCItoSFP ( int  RoutingMode,
unsigned short(&)  SFP[2][4],
unsigned long(&)  VHDCI[2][2] 
) const

Definition at line 399 of file SourceCardRouting.cc.

399  {
400  unsigned short VHDCI_reverse[2][4] = {{0}};
401 
402  for (int i = 0; i < 2; i++) {
403  for (int j = 0; j < 2; j++) {
404  for (int k = 0; k < 32; k++) {
405  VHDCI_reverse[i][j] = VHDCI_reverse[i][j] | (((VHDCI[i][j] >> k) & 0x01) << (31 - k));
406  }
407  }
408  }
409 
410  switch (RoutingMode) {
411  case 0:
412  SFP[0][0] = ((VHDCI[0][0] >> 22) & 0xff) | ((VHDCI[1][0] >> 14) & 0x3f00);
413  SFP[1][0] = 0x8000 | ((VHDCI[0][1] >> 22) & 0xff) | ((VHDCI[1][1] >> 14) & 0x3f00);
414  SFP[0][1] = (VHDCI[0][0] & 0x3ff) | ((VHDCI[0][0] >> 1) & 0x1c00);
415  SFP[1][1] = 0x8000 | (VHDCI[0][1] & 0x3ff) | ((VHDCI[0][1] >> 1) & 0x1c00);
416  SFP[0][2] = (VHDCI[1][0] & 0x3ff) | ((VHDCI[0][0] >> 4) & 0x3c00);
417  SFP[1][2] = 0x8000 | (VHDCI[1][1] & 0x3ff) | ((VHDCI[0][1] >> 4) & 0x3c00);
418  SFP[0][3] = ((VHDCI[1][0] >> 11) & 0x3ff) | ((VHDCI[0][0] >> 8) & 0x1c00);
419  SFP[1][3] = 0x8000 | ((VHDCI[1][1] >> 11) & 0x3ff) | ((VHDCI[0][1] >> 8) & 0x1c00);
420  break;
421  case 1:
422  SFP[0][0] = (VHDCI[0][0] & 0xfff) | ((VHDCI_reverse[0][0] & 0x600) << 3) | ((VHDCI_reverse[0][0] & 0x2000) << 1);
423  SFP[1][0] =
424  0x8000 | (VHDCI[0][1] & 0xfff) | ((VHDCI_reverse[0][1] & 0x600) << 3) | ((VHDCI_reverse[0][1] & 0x2000) << 1);
425  SFP[0][1] = ((VHDCI[0][0] & 0x7000) >> 12) | ((VHDCI_reverse[0][0] & 0x1ff) << 3) |
426  ((VHDCI_reverse[0][0] & 0x1800) << 1) | (VHDCI[1][0] & 0x4000);
427  SFP[1][1] = 0x8000 | ((VHDCI[0][1] & 0x7000) >> 12) | ((VHDCI_reverse[0][1] & 0x1ff) << 3) |
428  ((VHDCI_reverse[0][1] & 0x1800) << 1) | (VHDCI[1][1] & 0x4000);
429 
430  SFP[0][2] = ((VHDCI[0][0] & 0x20000) >> 10);
431  SFP[1][2] = 0x8000 | ((VHDCI[0][1] & 0x20000) >> 10);
432  SFP[0][3] = ((VHDCI[1][0] & 0x20000) >> 3);
433  SFP[1][3] = 0x8000 | ((VHDCI[1][1] & 0x20000) >> 3);
434  for (int i = 0; i < 7; i++) {
435  SFP[0][2] =
436  SFP[0][2] | (((VHDCI[1][0] >> (2 * i)) & 0x1) << i) | (((VHDCI[1][0] >> ((2 * i) + 1)) & 0x1) << (i + 8));
437  SFP[1][2] =
438  SFP[1][2] | (((VHDCI[1][1] >> (2 * i)) & 0x1) << i) | (((VHDCI[1][1] >> ((2 * i) + 1)) & 0x1) << (i + 8));
439  SFP[0][3] = SFP[0][3] | (((VHDCI_reverse[1][0] >> ((2 * i) + 1)) & 0x1) << i) |
440  (((VHDCI_reverse[1][0] >> (2 * i)) & 0x1) << (i + 7));
441  SFP[1][3] = SFP[1][3] | (((VHDCI_reverse[1][1] >> ((2 * i) + 1)) & 0x1) << i) |
442  (((VHDCI_reverse[1][1] >> (2 * i)) & 0x1) << (i + 7));
443  }
444  break;
445  case 2:
446  SFP[0][0] = (VHDCI[0][0] & 0xfff) | ((VHDCI_reverse[0][0] & 0xe00) << 3);
447  SFP[1][0] = 0x8000 | (VHDCI[0][1] & 0xfff) | ((VHDCI_reverse[0][1] & 0xe00) << 3);
448  SFP[0][1] =
449  ((VHDCI[0][0] & 0x7000) >> 12) | ((VHDCI_reverse[0][0] & 0x1ff) << 3) | (VHDCI_reverse[0][0] & 0x7000);
450  SFP[1][1] = 0x8000 | ((VHDCI[0][1] & 0x7000) >> 12) | ((VHDCI_reverse[0][1] & 0x1ff) << 3) |
451  (VHDCI_reverse[0][1] & 0x7000);
452  SFP[0][2] = (VHDCI[0][0] & 0xfff);
453  SFP[1][2] = 0x8000 | (VHDCI[0][1] & 0xfff);
454  SFP[0][3] = ((VHDCI[0][0] & 0x7000) >> 12) | ((VHDCI_reverse[0][0] & 0x1ff) << 3);
455  SFP[1][3] = 0x8000 | ((VHDCI[0][1] & 0x7000) >> 12) | ((VHDCI_reverse[0][1] & 0x1ff) << 3);
456  break;
457  case 3:
458  SFP[0][0] = ((VHDCI[0][0] & 0x7fc0) >> 6) | ((VHDCI_reverse[0][0] & 0x7) << 9) | ((VHDCI[0][0] & 0x7) << 12);
459  SFP[1][0] =
460  0x8000 | ((VHDCI[0][1] & 0x7fc0) >> 6) | ((VHDCI_reverse[0][1] & 0x7) << 9) | ((VHDCI[0][1] & 0x7) << 12);
461  SFP[0][1] = ((VHDCI_reverse[0][0] & 0x7ff8) >> 3) | ((VHDCI[0][0] & 0x38) << 9);
462  SFP[1][1] = 0x8000 | ((VHDCI_reverse[0][1] & 0x7ff8) >> 3) | ((VHDCI[0][1] & 0x38) << 9);
463  SFP[0][2] = ((VHDCI[1][0] & 0x7fc0) >> 6) | ((VHDCI_reverse[1][0] & 0x7) << 9) | ((VHDCI[1][0] & 0x7) << 12);
464  SFP[1][2] =
465  0x8000 | ((VHDCI[1][1] & 0x7fc0) >> 6) | ((VHDCI_reverse[1][1] & 0x7) << 9) | ((VHDCI[1][1] & 0x7) << 12);
466  SFP[0][3] = ((VHDCI_reverse[1][0] & 0x7ff8) >> 3) | ((VHDCI[1][0] & 0x38) << 9);
467  SFP[1][3] = 0x8000 | ((VHDCI_reverse[1][1] & 0x7ff8) >> 3) | ((VHDCI[1][1] & 0x38) << 9);
468  break;
469  default:
470  SFP[0][0] = 0;
471  SFP[1][0] = 0x8000;
472  SFP[0][1] = 0;
473  SFP[1][1] = 0x8000;
474  SFP[0][2] = 0;
475  SFP[1][2] = 0x8000;
476  SFP[0][3] = 0;
477  SFP[1][3] = 0x8000;
478  }
479 }

References mps_fire::i, dqmiolumiharvest::j, dqmdumpme::k, and testProducerWithPsetDescEmpty_cfi::x1.

◆ VHDCItoSTRING()

void SourceCardRouting::VHDCItoSTRING ( unsigned short &  logicalCardID,
unsigned short &  eventNumber,
std::string &  dataString,
unsigned long(&)  VHDCI[2][2] 
) const

Definition at line 721 of file SourceCardRouting.cc.

724  {
725  stringstream temp;
726 
727  temp << dec << eventNumber << '\t';
728  temp << dec << logicalCardID << '\t';
729  temp << hex << setw(8) << setfill('0') << VHDCI[0][0] << '\t';
730  temp << hex << setw(8) << setfill('0') << VHDCI[0][1] << '\t';
731  temp << hex << setw(8) << setfill('0') << VHDCI[1][0] << '\t';
732  temp << hex << setw(8) << setfill('0') << VHDCI[1][1] << std::endl;
733  dataString = temp.str();
734 }

References TauDecayModes::dec, and groupFilesInBlocks::temp.

mps_fire.i
i
Definition: mps_fire.py:428
SourceCardRouting::EMUtoVHDCI
void EMUtoVHDCI(unsigned short(&eIsoRank)[4], unsigned short(&eIsoCardId)[4], unsigned short(&eIsoRegionId)[4], unsigned short(&eNonIsoRank)[4], unsigned short(&eNonIsoCardId)[4], unsigned short(&eNonIsoRegionId)[4], unsigned short(&MIPbits)[7][2], unsigned short(&Qbits)[7][2], unsigned long(&VHDCI)[2][2]) const
Definition: SourceCardRouting.cc:487
SourceCardRouting::RC56HFtoSFP
void RC56HFtoSFP(unsigned short(&RC)[7][2], unsigned short(&RCof)[7][2], unsigned short(&RCtau)[7][2], unsigned short(&HF)[4][2], unsigned short(&HFQ)[4][2], unsigned short(&SFP)[2][4]) const
Definition: SourceCardRouting.cc:120
groupFilesInBlocks.temp
list temp
Definition: groupFilesInBlocks.py:142
SourceCardRouting::VHDCItoSTRING
void VHDCItoSTRING(unsigned short &logicalCardID, unsigned short &eventNumber, std::string &dataString, unsigned long(&VHDCI)[2][2]) const
Definition: SourceCardRouting.cc:721
SourceCardRouting::SFPtoRC234
void SFPtoRC234(unsigned short(&RC)[7][2], unsigned short(&RCof)[7][2], unsigned short(&RCtau)[7][2], unsigned short(&sisterRC)[7][2], unsigned short(&sisterRCof)[7][2], unsigned short(&sisterRCtau)[7][2], unsigned short(&SFP)[2][4]) const
Definition: SourceCardRouting.cc:271
SourceCardRouting::SFPtoRC56HF
void SFPtoRC56HF(unsigned short(&RC)[7][2], unsigned short(&RCof)[7][2], unsigned short(&RCtau)[7][2], unsigned short(&HF)[4][2], unsigned short(&HFQ)[4][2], unsigned short(&SFP)[2][4]) const
Definition: SourceCardRouting.cc:145
SourceCardRouting::RC012toSFP
void RC012toSFP(unsigned short(&RC)[7][2], unsigned short(&RCof)[7][2], unsigned short(&RCtau)[7][2], unsigned short(&SFP)[2][4]) const
Definition: SourceCardRouting.cc:191
testProducerWithPsetDescEmpty_cfi.x1
x1
Definition: testProducerWithPsetDescEmpty_cfi.py:33
dqmdumpme.k
k
Definition: dqmdumpme.py:60
SourceCardRouting::SFPtoEMU
void SFPtoEMU(unsigned short(&eIsoRank)[4], unsigned short(&eIsoCardId)[4], unsigned short(&eIsoRegionId)[4], unsigned short(&eNonIsoRank)[4], unsigned short(&eNonIsoCardId)[4], unsigned short(&eNonIsoRegionId)[4], unsigned short(&MIPbits)[7][2], unsigned short(&Qbits)[7][2], unsigned short(&SFP)[2][4]) const
Definition: SourceCardRouting.cc:68
SourceCardRouting::RC012toVHDCI
void RC012toVHDCI(unsigned short(&RC)[7][2], unsigned short(&RCof)[7][2], unsigned short(&RCtau)[7][2], unsigned long(&VHDCI)[2][2]) const
Definition: SourceCardRouting.cc:556
SourceCardRouting::EMUtoSFP
void EMUtoSFP(unsigned short(&eIsoRank)[4], unsigned short(&eIsoCardId)[4], unsigned short(&eIsoRegionId)[4], unsigned short(&eNonIsoRank)[4], unsigned short(&eNonIsoCardId)[4], unsigned short(&eNonIsoRegionId)[4], unsigned short(&MIPbits)[7][2], unsigned short(&Qbits)[7][2], unsigned short(&SFP)[2][4]) const
Definition: SourceCardRouting.cc:30
SourceCardRouting::RC56HFtoVHDCI
void RC56HFtoVHDCI(unsigned short(&RC)[7][2], unsigned short(&RCof)[7][2], unsigned short(&RCtau)[7][2], unsigned short(&HF)[4][2], unsigned short(&HFQ)[4][2], unsigned long(&VHDCI)[2][2]) const
Definition: SourceCardRouting.cc:525
SourceCardRouting::VHDCItoSFP
void VHDCItoSFP(int RoutingMode, unsigned short(&SFP)[2][4], unsigned long(&VHDCI)[2][2]) const
Definition: SourceCardRouting.cc:399
SourceCardRouting::RC234toSFP
void RC234toSFP(unsigned short(&RC)[7][2], unsigned short(&RCof)[7][2], unsigned short(&RCtau)[7][2], unsigned short(&sisterRC)[7][2], unsigned short(&sisterRCof)[7][2], unsigned short(&sisterRCtau)[7][2], unsigned short(&SFP)[2][4]) const
Definition: SourceCardRouting.cc:240
SourceCardRouting::SFPtoVHDCI
void SFPtoVHDCI(int RoutingMode, unsigned short(&SFP)[2][4], unsigned long(&VHDCI)[2][2]) const
Definition: SourceCardRouting.cc:326
dqmiolumiharvest.j
j
Definition: dqmiolumiharvest.py:66
DigiToRawDM_cff.HF
HF
Definition: DigiToRawDM_cff.py:22
SourceCardRouting::RC234toVHDCI
void RC234toVHDCI(unsigned short(&RC)[7][2], unsigned short(&RCof)[7][2], unsigned short(&RCtau)[7][2], unsigned short(&sisterRC)[7][2], unsigned short(&sisterRCof)[7][2], unsigned short(&sisterRCtau)[7][2], unsigned long(&VHDCI)[2][2]) const
Definition: SourceCardRouting.cc:582
TauDecayModes.dec
dec
Definition: TauDecayModes.py:143
SourceCardRouting::SFPtoRC012
void SFPtoRC012(unsigned short(&RC)[7][2], unsigned short(&RCof)[7][2], unsigned short(&RCtau)[7][2], unsigned short(&SFP)[2][4]) const
Definition: SourceCardRouting.cc:214