/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 Attributes
SimpRpcCalibTool Class Reference

#include <SimpRpcCalibTool.h>

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

List of all members.

Public Member Functions

 SimpRpcCalibTool (const std::string &type, const std::string &name, const IInterface *parent)
virtual ~SimpRpcCalibTool ()
virtual StatusCode calibration (const DayaBay::DaqCrate *, DayaBay::CalibReadout *)
 This is the extension. Sub classes must provide it.
virtual StatusCode initialize ()
virtual StatusCode finalize ()

Static Public Member Functions

static const InterfaceID & interfaceID ()
 Retrieve interface ID.

Private Attributes

std::string m_simDataSvcName
ISimDataSvcm_simDataSvc
std::string m_cableSvcName
ICableSvcm_cableSvc
std::string m_rpcIdToolName

Detailed Description

Definition at line 27 of file SimpRpcCalibTool.h.


Constructor & Destructor Documentation

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

Definition at line 12 of file SimpRpcCalibTool.cc.

  :  GaudiTool(type, name, parent)
  //,  m_calibDataSvc(0)
  ,  m_simDataSvc(0)
  ,  m_cableSvc(0)
{
  declareInterface< ICalibTool >(this);

  declareProperty("SimDataSvcName", m_simDataSvcName = "SimDataSvc",
    "Name of Pmt simulation data Service");

  declareProperty("CableSvcName", m_cableSvcName = "CableSvc",
    "Name of Cable Service");

  declareProperty("RpcIdToolName", m_rpcIdToolName = "RPCTool",
      "Name of RPC Id conversion tool");
}
SimpRpcCalibTool::~SimpRpcCalibTool ( ) [virtual]

Definition at line 32 of file SimpRpcCalibTool.cc.

{}

Member Function Documentation

StatusCode SimpRpcCalibTool::calibration ( const DayaBay::DaqCrate ,
DayaBay::CalibReadout  
) [virtual]

This is the extension. Sub classes must provide it.

Implements ICalibTool.

Definition at line 54 of file SimpRpcCalibTool.cc.

{
  debug() << "running calibration() " << endreq;

  const DayaBay::DaqRpcCrate* rpcCrate = readout->asRpcCrate();
  if ( !rpcCrate ) {
      error() << "calibration():  no rpc readouts." << endreq;
      return StatusCode::FAILURE;
  }

  DayaBay::CalibReadoutRpcCrate* calibReadoutCrate
    = dynamic_cast<DayaBay::CalibReadoutRpcCrate*>(calibReadout);
  // Check CalibReadoutCrate
  if(calibReadoutCrate == NULL) {
    error() << "calibration():  no calib rpc readouts." << endreq;
    return StatusCode::FAILURE;
  }

  ServiceMode svcMode( calibReadoutCrate->header()->context(), 0/*task*/);

  const DayaBay::DaqRpcCrate::RpcPanelPtrList& panels = rpcCrate->rpcPanelReadouts();
  DayaBay::DaqRpcCrate::RpcPanelPtrList::const_iterator iPanel = panels.begin();

  while ( iPanel != panels.end() ) {
      const DayaBay::DaqRpcPanel::RpcStripPtrList& strips = (*iPanel)->daqRpcStripList();
      DayaBay::DaqRpcPanel::RpcStripPtrList::const_iterator iStrip = strips.begin();

      while ( iStrip != strips.end() ) {
          DayaBay::RpcSensor rpcSensor = m_cableSvc->rpcSensor((*iStrip)->channelId(), svcMode);
          debug() << "Add rpc sensor: " << rpcSensor << endreq;
          calibReadoutCrate->addSensor(rpcSensor, (*iStrip)->fromRot());
          ++iStrip;
      }
      ++iPanel;
  }

  return StatusCode::SUCCESS;
}
StatusCode SimpRpcCalibTool::initialize ( ) [virtual]

Definition at line 34 of file SimpRpcCalibTool.cc.

{
  // Get CalibData Service
  //m_calibDataSvc = svc<ICalibDataSvc>(m_calibDataSvcName, true);

  // Get SimData Service
  m_simDataSvc = svc<ISimDataSvc>(m_simDataSvcName, true);

  // Get CableData Service
  m_cableSvc = svc<ICableSvc>(m_cableSvcName, true);

  return StatusCode::SUCCESS;
}
StatusCode SimpRpcCalibTool::finalize ( ) [virtual]

Definition at line 49 of file SimpRpcCalibTool.cc.

{
  return StatusCode::SUCCESS;
}
const InterfaceID & ICalibTool::interfaceID ( ) [static, inherited]

Retrieve interface ID.

Definition at line 8 of file ICalibTool.cc.

{ 
    return IID_ICalibTool; 
}

Member Data Documentation

std::string SimpRpcCalibTool::m_simDataSvcName [private]

Definition at line 53 of file SimpRpcCalibTool.h.

Definition at line 56 of file SimpRpcCalibTool.h.

std::string SimpRpcCalibTool::m_cableSvcName [private]

Definition at line 60 of file SimpRpcCalibTool.h.

Definition at line 63 of file SimpRpcCalibTool.h.

std::string SimpRpcCalibTool::m_rpcIdToolName [private]

Definition at line 66 of file SimpRpcCalibTool.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:14:11 for CalibAlg by doxygen 1.7.4