/search.css" rel="stylesheet" type="text/css"/> /search.js">
| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

In This Package:

Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes
RPCTool Class Reference

#include <RPCTool.h>

Inheritance diagram for RPCTool:
Inheritance graph
[legend]
Collaboration diagram for RPCTool:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 RPCTool (const string &type, const string &name, const IInterface *parent)
virtual ~RPCTool ()
virtual StatusCode initialize ()
virtual StatusCode finalize ()

Static Public Member Functions

static const InterfaceID & interfaceID ()

Private Member Functions

std::vector< int > ReturnModule (unsigned int triggermap, unsigned int rpcCFId)
std::vector< int > AjacentModule (int row, int col)
int rowCol (int cfId, int fecId)

Private Attributes

string m_rpcreadoutToolName
IRPCToolm_rpcTool
vector< int > m_TriggerModule

Detailed Description

Definition at line 33 of file RPCTool.h.


Constructor & Destructor Documentation

RPCTool::RPCTool ( const string &  type,
const string &  name,
const IInterface *  parent 
)

Definition at line 30 of file RPCTool.cc.

   : GaudiTool(type, name, parent)
{
declareInterface< IRPCTool >(this);
}
RPCTool::~RPCTool ( ) [virtual]

Definition at line 36 of file RPCTool.cc.

{
}

Member Function Documentation

StatusCode RPCTool::initialize ( ) [virtual]

Definition at line 40 of file RPCTool.cc.

{
   info() << " @ initialize()" << endreq;
   return StatusCode::SUCCESS;
}
StatusCode RPCTool::finalize ( ) [virtual]

Definition at line 46 of file RPCTool.cc.

{
   info() << " @ finalize()" << endreq;

   return StatusCode::SUCCESS;
}
std::vector< int > RPCTool::ReturnModule ( unsigned int  triggermap,
unsigned int  rpcCFId 
) [private, virtual]

Implements IRPCTool.

Definition at line 52 of file RPCTool.cc.

{
  int row,col;
  std::vector<int> module;
  for(int i=0;i<32;i++)
  {
    if(i>=0&&i<=14){
      if((triggerrot>>i)&&1==1)
      {
        col = i/5+1+3*(rpcCFId+1);
        row = 9-i%5;
        module.push_back(row*10+col);
        //if(row>1&&row<9)
        //  if(col>1&&col<6) ReadoutModule.push_back();
      }
    }
    else if(i>=16&&i<=27)
      if((triggerrot>>i)&&1==1)
      {
        col = i/5+1+3*(rpcCFId+1);
        row = 4-(i-16)%4;
        module.push_back(row*10+col);
      }

  }
   
return module; 
}
std::vector< int > RPCTool::AjacentModule ( int  row,
int  col 
) [private, virtual]

Implements IRPCTool.

Definition at line 80 of file RPCTool.cc.

{ 
  std::vector<int> module;
  if(row > 1 && row < 6)
  {
    if(col > 1 && col < 9)
    {
      module.push_back((row + 1) * 10 + col);
      module.push_back(row * 10 + col - 1);
      module.push_back(row * 10 + col + 1);
      module.push_back((row - 1) * 10 + col);
    }
    else if(col == 1)
    {
      module.push_back((row + 1)* 10 + col);
      module.push_back(row * 10 + col + 1);
      module.push_back((row - 1) * 10 + col);
    }
    else if(col == 9){
      module.push_back((row + 1) * 10 + col);
      module.push_back(row * 10 + col - 1);
      module.push_back((row - 1) * 10 + col);
    }
  }
  else if(row == 1){
    module.push_back((row + 1) * 10 + col);
    if(col != 1)
      module.push_back(row * 10 + col- 1);
    if(col != 9)
    module.push_back(row*10 + col + 1);
    if(col == 5) module.push_back(5);
  }
  else if(row == 6)
  {
    module.push_back((row - 1) * 10 + col);
    if(col != 1)
      module.push_back(row * 10 + col - 1);
    if(col != 9)
      module.push_back(row * 10 + col + 1);
    if(col == 5) module.push_back(75);
  }
  return module;
}
int RPCTool::rowCol ( int  cfId,
int  fecId 
) [private, virtual]

Implements IRPCTool.

Definition at line 125 of file RPCTool.cc.

{
  int rpcRow,rpcCol;
  int cfRow = cfId / 2;
  if(cfId%2 == 0) //left
  {
    rpcRow = 6 - (fecId / 5 + cfRow * 3);
    rpcCol = fecId%5 + 1;
  }
  else   //right
  {
    if(fecId == 14)
    {
      if(cfId == 3) 
      {
        rpcRow = 0;
        rpcCol = 5;
      }
      else if(cfId == 1) 
      {
        //rpcRow = ArrayRow + 1;
        rpcRow = 7;
        rpcCol = 5;
      }
    }
    else 
    {
      rpcRow = 6 - (fecId / 4 +cfRow * 3);// the index starts from 1
      rpcCol =  fecId%4 + 6;// the index starts from 1
    }
  }

  debug() << "(cfId,fecId,rpcRow,rpcCol)=" << cfId << "," << fecId << "," << rpcRow << "," << rpcCol << endreq;

  return (rpcRow<<4) | rpcCol;
}
static const InterfaceID& IRPCTool::interfaceID ( ) [inline, static, inherited]

Definition at line 31 of file IRPCTool.h.

    {
      return IID_IRPCTool;
    }

Member Data Documentation

Definition at line 47 of file RPCTool.h.

Definition at line 50 of file RPCTool.h.

vector<int> RPCTool::m_TriggerModule [private]

Definition at line 51 of file RPCTool.h.


The documentation for this class was generated from the following files:
| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

Generated on Fri May 16 2014 10:09:35 for RPCCalib by doxygen 1.7.4