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

AcdDisplay.cxx

Go to the documentation of this file.
00001 //$Header: /nfs/slac/g/glast/ground/cvs/acdRecon/src/AcdDisplay.cxx,v 1.1 2001/06/02 04:20:14 burnett Exp $
00002 
00004 #include "GaudiKernel/Algorithm.h"
00005 #include "GaudiKernel/MsgStream.h"
00006 #include "GaudiKernel/AlgFactory.h"
00007 #include "GaudiKernel/IDataProviderSvc.h"
00008 #include "GaudiKernel/SmartDataPtr.h"
00009 
00010 // gui, display includes
00011 #include "GuiSvc/IGuiSvc.h"
00012 #include "gui/DisplayControl.h"
00013 #include "gui/GuiMgr.h"
00014 
00015 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
00019 class AcdDisplay : public Algorithm
00020 {
00021 public:
00023     AcdDisplay(const std::string& name, ISvcLocator* pSvcLocator); 
00024     virtual ~AcdDisplay() {}
00026     StatusCode initialize();
00028     StatusCode execute();
00030     StatusCode finalize(){ return StatusCode::SUCCESS;}
00031     
00032 };
00033 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
00034 static const AlgFactory<AcdDisplay>  Factory;
00035 const IAlgFactory& AcdDisplayFactory = Factory;
00036 
00037 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
00038 AcdDisplay::AcdDisplay(const std::string& name, ISvcLocator* pSvcLocator) :
00039 Algorithm(name, pSvcLocator) 
00040 {
00041     
00042 }
00043 
00044 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
00045 class AcdRep : public gui::DisplayRep {
00046 public:
00047     AcdRep(){}
00048     void update(){
00049         // loop thru the tiles with DOCA's and show marker and value
00050 #if 0 // example code from old version
00051         if( m_DOCA>100. ) return;
00052         set_color("red");
00053         markerAt(m_hit_tile.position());
00054         move_to(m_hit_tile.position()); 
00055         char text[10]; sprintf(text, "%5g", m_DOCA);
00056         drawText(text);
00057         set_color("black");
00058 #endif // of example code 
00059     }
00060 };
00061 
00062 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
00063 StatusCode AcdDisplay::initialize()
00064 {
00065     //Look for the gui service
00066     IGuiSvc* guiSvc = 0;
00067     StatusCode sc = service("GuiSvc", guiSvc);
00068 
00069     
00070     //Ok, see if we can set up the display
00071     if (sc.isSuccess())  {
00072         //Set up the display rep for Clusters
00073         guiSvc->guiMgr()->display().add(new AcdRep(), "ACD recon");
00074     }
00075     
00076     return sc;
00077 }
00078 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
00079 StatusCode AcdDisplay::execute()
00080 {
00081     StatusCode sc = StatusCode::SUCCESS;
00082     MsgStream log(msgSvc(), name());
00083 
00084     // set pointer to ACD data on TDS
00085     //    m_SiClusters = SmartDataPtr<SiClusters>(eventSvc(),"/Event/AcdRecon/SiClusters");
00086     
00087     return sc;
00088 }
00089 
00090 

Generated at Wed Nov 21 12:22:56 2001 by doxygen1.2.3 written by Dimitri van Heesch, © 1997-2000