00001
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
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
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
00066 IGuiSvc* guiSvc = 0;
00067 StatusCode sc = service("GuiSvc", guiSvc);
00068
00069
00070
00071 if (sc.isSuccess()) {
00072
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
00085
00086
00087 return sc;
00088 }
00089
00090