Main Page   Class Hierarchy   Compound List   File List   Compound Members   File Members   Related Pages  

CalDisplay Class Reference

Display the Cal reconstructed information. More...

#include <CalDisplay.h>

List of all members.

Public Methods

 CalDisplay (const std::string &name, ISvcLocator *pSvcLocator)
 Constructor of this form must be provided. More...

virtual ~CalDisplay ()
StatusCode initialize ()
 mandatory. More...

StatusCode execute ()
 mandatory. More...

StatusCode finalize ()
 mandatory. More...

void clearLogsDisp ()
void clearClusterDisp ()

Private Attributes

CalRecLogsm_crl
CsIClusterListm_cls
ICalGeometrySvcm_CalGeo


Detailed Description

Display the Cal reconstructed information.

Definition at line 14 of file CalDisplay.h.


Constructor & Destructor Documentation

CalDisplay::CalDisplay const std::string &    name,
ISvcLocator *    pSvcLocator
 

Constructor of this form must be provided.

Definition at line 24 of file CalDisplay.cxx.

00024                                                                       :
00025 Algorithm(name, pSvcLocator) 
00026 {
00027     
00028 }

virtual CalDisplay::~CalDisplay   [inline, virtual]
 

Definition at line 19 of file CalDisplay.h.

00019 {}


Member Function Documentation

void CalDisplay::clearClusterDisp   [inline]
 

Definition at line 28 of file CalDisplay.h.

References m_cls.

Referenced by CsIClusterList::~CsIClusterList().

00028 {m_cls=0;}

void CalDisplay::clearLogsDisp   [inline]
 

Definition at line 27 of file CalDisplay.h.

References m_crl.

00027 {m_crl=0;}

StatusCode CalDisplay::execute  
 

mandatory.

Definition at line 196 of file CalDisplay.cxx.

References m_cls, m_crl, CsIClusterList::setCalDisplay(), and CalRecLogs::setCalDisplay().

00197 {
00198     StatusCode sc = StatusCode::SUCCESS;
00199     MsgStream log(msgSvc(), name());
00200 
00201 
00202         m_crl = SmartDataPtr<CalRecLogs>(eventSvc(),"/Event/CalRecon/CalRecLogs"); 
00203         if (m_crl == 0){ sc = StatusCode::FAILURE;
00204         
00205                 log << MSG::ERROR << "CalDisplay failed to access CalRecLogs" << endreq;
00206                         return sc;
00207     } else { m_crl->setCalDisplay(this);}
00208     
00209         
00210         m_cls  = SmartDataPtr<CsIClusterList>(eventSvc(),"/Event/CalRecon/CsIClusterList");
00211 
00212         if (m_cls == 0){ sc = StatusCode::FAILURE;
00213         
00214                 log << MSG::ERROR << "CalDisplay failed to access CsIClusterList" << endreq;
00215                         return sc;
00216     } else {m_cls->setCalDisplay(this);}
00217     
00218     return sc;
00219 }

StatusCode CalDisplay::finalize   [inline]
 

mandatory.

Definition at line 25 of file CalDisplay.h.

00025 { return StatusCode::SUCCESS;}

StatusCode CalDisplay::initialize  
 

mandatory.

Definition at line 158 of file CalDisplay.cxx.

References ICalGeometrySvc::layerHeight(), ICalGeometrySvc::logHeight(), logheight, m_CalGeo, m_cls, m_crl, ICalGeometrySvc::numLayers(), ICalGeometrySvc::numViews(), and ICalGeometrySvc::Z0().

00159 {
00160     //Look for the gui service
00161     MsgStream log(msgSvc(), name());
00162     IGuiSvc* guiSvc = 0;
00163     StatusCode sc = service("GuiSvc", guiSvc);
00164     
00165     m_crl = 0;
00166     m_cls = 0;
00167     
00168     sc = service("CalGeometrySvc", m_CalGeo);
00169 
00170     if(sc.isFailure())
00171     {
00172         log << MSG::ERROR << "ICalGeometrySvc could not be found" <<endreq;
00173         return sc;
00174     }
00175 
00176        
00177     float logheight = m_CalGeo->logHeight();
00178     float layerheight = m_CalGeo->layerHeight();
00179     int nlayers = m_CalGeo->numLayers()*m_CalGeo->numViews();
00180     float Z0 = m_CalGeo->Z0();
00181     float calZtop = Z0+(nlayers-1)*layerheight;
00182     float calZbottom = Z0;
00183     
00184     
00185     
00186     //Ok, see if we can set up the display
00187     if (sc.isSuccess())  {
00188         //Set up the display rep for Clusters
00189         guiSvc->guiMgr()->display().add(
00190             new CalRep(&m_crl,&m_cls,logheight,calZtop,calZbottom), "Cal recon");
00191     }
00192     
00193     return sc;
00194 }


Member Data Documentation

ICalGeometrySvc* CalDisplay::m_CalGeo [private]
 

Definition at line 34 of file CalDisplay.h.

Referenced by initialize().

CsIClusterList* CalDisplay::m_cls [private]
 

Definition at line 33 of file CalDisplay.h.

Referenced by clearClusterDisp(), execute(), and initialize().

CalRecLogs* CalDisplay::m_crl [private]
 

Definition at line 32 of file CalDisplay.h.

Referenced by clearLogsDisp(), execute(), and initialize().


The documentation for this class was generated from the following files:
Generated on Thu Nov 29 16:38:53 2001 by doxygen1.2.12 written by Dimitri van Heesch, © 1997-2001