52 notFound =
m_ASDToPP[PPType]->getConnection(
m_sideId,layer,rNumber,ch,&idPP,&conPP,&chPP);
55 if (
tgcArgs()->MSGLEVEL() <= MSG::DEBUG) {
59 <<
"signalType= " << ((signalType ==
WIRE) ?
"Wire" :
"Strip")
60 <<
" layer= " <<layer <<
" rNumber= " <<rNumber <<
" ch= "<< ch
61 <<
"id(PP)= " <<idPP <<
" connector(PP)= " <<conPP <<
" ch(PP)= " <<chPP
67 m_PP[PPType][idPP]->setASDOut(chPP,conPP,ASDOut);
76 if((layer>=0)&&(layer<=2)){
79 }
else if((layer>=3)&&(layer<=6)){
82 }
else if (layer<=8) {
100 m_PP[iPatchPanelType].clear();
103 m_SB[iSlaveBoardType].clear();
106 m_HPB[iHighPtBoardType].clear();
114 std::shared_ptr<const LVL1TGC::TGCTMDB> tm,
115 std::shared_ptr<const LVL1TGC::TGCNSW> nsw,
116 std::shared_ptr<const LVL1TGC::TGCBIS78> bis78)
128 for( i=0; i<=
SDPP; i+=1) {
170 for (
int jpp=0; jpp <=
SDPP; jpp++) {
172 for (
unsigned int i=0; i <
m_PP[jpp].size(); i++) {
178 m_PP[jpp][i]->setType(jpp);
187 for (
int jsb=0; jsb <=
SDSB; jsb++) {
189 for (
unsigned int i=0; i <
m_SB[jsb].size(); i++) {
195 m_SB[jsb][i]->setType(jsb);
206 for (
unsigned int i=0; i <
m_HPB[jhp].size(); i++) {
210 m_HPB[jhp][i]->setType(jhp);
220 for (
int jpp=0; jpp <=
SDPP; jpp++) {
225 for (
unsigned int i=0; i <
m_PP[jpp].size(); i++) {
229 m_PP[jpp][i]->setType(jpp);
235 for (
int jsb=0; jsb<=
SDSB; jsb+=1) {
241 m_SB[jsb][0]->setType(jsb);
243 m_SB[jsb][0]->setId(0);
259 int startType, endType;
270 for (
int i=startType; i <= endType; i++) {
272 std::cerr <<
"connectionPPToSB :"
275 <<
" #PP=" <<
m_PP[i].size()
276 <<
" #SB=" <<
m_SB[i].size()
279 for(
unsigned int iPP = 0; iPP <
m_PP[i].size(); iPP++) {
281 m_PP[i][iPP]->setIdSlaveBoard(iPort,connection->
getSBIdToPP(i,iPort,iPP));
282 for (
unsigned int iSB = 0; iSB <
m_SB[i].size(); iSB++) {
283 if (
m_PP[i][iPP]->getIdSlaveBoard(iPort) ==
m_SB[i][iSB]->
getId()) {
284 m_SB[i][iSB]->setPatchPanel(
m_PP[i][iPP]);
297 for (
unsigned int iPP = 1; iPP <
m_PP[
WDPP].size(); iPP++) {
302 for (
unsigned int iPP = 1; iPP <
m_PP[
WTPP].size(); iPP++) {
307 for (
unsigned int iPP = 1; iPP <
m_PP[
STPP].size(); iPP++) {
312 for (
unsigned int iPP = 1; iPP <
m_PP[
SDPP].size(); iPP++) {
317 for (
int i=0; i<=
SDPP; i++) {
327 if ( i==
WISB )
continue;
328 if ( i==
SISB )
continue;
330 for (
unsigned int iSB = 0; iSB <
m_SB[i].size(); iSB++) {
333 for (
unsigned int iHPB = 0; iHPB <
m_HPB[
type].size(); iHPB += 1){
351 for (
unsigned int iHPB = 0; iHPB <
m_HPB[
WHPB].size(); iHPB++){
354 for (
unsigned int iHPB = 0; iHPB <
m_HPB[
SHPB].size(); iHPB++) {
383 for (
unsigned int j=0; j<
m_PP[i].size(); j++) {
384 if (
m_PP[i][j] !=
nullptr)
delete m_PP[i][j];
390 for (
unsigned int j=0; j <
m_SB[i].size(); j+=1) {
391 if(
m_SB[i][j] !=
nullptr)
delete m_SB[i][j];
397 for(
unsigned int j=0; j <
m_HPB[i].size(); j+=1) {
398 if(
m_HPB[i][j] !=
nullptr)
delete m_HPB[i][j];
413 std::cout <<
"numberOfPP(index in a type): " <<
m_PP[j].size() << std::endl;
415 std::cout <<
" Type:" << ppasic->getType();
416 std::cout <<
" Id:" << ppasic->getId();
424 std::cout <<
"numberOfSB(index in a type): " <<
m_SB[j].size() << std::endl;
425 for (
unsigned int i=0; i <
m_SB[j].size(); i++) {
426 std::cout <<
" Type:" <<
m_SB[j][i]->getType();
427 std::cout <<
" Id:" <<
m_SB[j][i]->getId();
434 std::cout <<
"numberOfHPB(index in a type):" <<
m_HPB[j].size() << std::endl;
435 for(
unsigned int i=0; i <
m_HPB[j].size(); i+=1) {
436 std::cout <<
" Type:" <<
m_HPB[j][i]->getType();
437 std::cout <<
" Id:" <<
m_HPB[j][i]->getId();
442 std::cout <<
"SectorLogic" << std::endl;
444 std::cout <<
"SL:" <<
m_SL << std::endl;
445 std::cout <<
" Id:" <<
m_SL->getId();
446 std::cout <<
" Region:";
448 std::cout <<
"Endcap" << std::endl;
450 std::cout <<
"Forward" << std::endl;
453 std::cout <<
"NO SL" << std::endl;
const TGCReadoutIndex & GetTGCReadoutIndex() const
TGCSignalType GetSignalType() const
int getId(const unsigned int type, const unsigned int board) const
int getNumber(const unsigned int type) const
int getSLPortToHPB(int type, int index) const
int getSBIdToPP(int type, int port, int index) const
int getNumberOfPort() const
const TGCConnectionSBToHPB * getSBToHPB() const
const TGCConnectionHPBToSL * getHPBToSL() const
const TGCConnectionPPToSB * getPPToSB() const
int getHPBPortToSB(int type, int index) const
int getHPBIdToSB(int type, int index) const
int GetLayerNumber() const
std::vector< TGCHighPtBoard * > m_HPB[NumberOfHighPtBoardType]
void connectPPToSB(const TGCConnectionPPToSB *connection)
LVL1TGC::TGCSide m_sideId
std::shared_ptr< const LVL1TGC::TGCBIS78 > m_BIS78
void setModule(const TGCConnectionPPToSL *connection)
std::vector< TGCPatchPanel * > m_PP[NumberOfPatchPanelType]
@ NumberOfHighPtBoardType
TGCRegionType m_regionType
std::shared_ptr< const LVL1TGC::TGCTMDB > m_TMDB
void connectSBToHPB(const TGCConnectionSBToHPB *connection)
const TGCDatabaseManager * m_dbMgr
std::vector< TGCSlaveBoard * > m_SB[NumberOfSlaveBoardType]
int distributeSignal(const TGCASDOut *asdOut)
TGCForwardBackwardType m_forwardBackward
const TGCConnectionASDToPP * m_ASDToPP[NumberOfPatchPanelType]
std::shared_ptr< const LVL1TGC::TGCNSW > m_NSW
void connectHPBToSL(const TGCConnectionHPBToSL *connection)
int getPatchPanelType(TGCSignalType signal, int layer) const
void connectAdjacentHPB()
singleton-like access to IMessageSvc via open function and helper
IMessageSvc * getMessageSvc(bool quiet=false)
class TGCPatchPanel TGCStripTripletPP
class TGCPatchPanel TGCStripInnerPP
class TGCPatchPanel TGCWireTripletPP
class TGCPatchPanel TGCWireInnerPP
class TGCPatchPanel TGCStripDoubletPP
class TGCPatchPanel TGCWireDoubletPP
TGCSide
The sides of TGC (A- or C-side)