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

DisplayMcEvent.h

Go to the documentation of this file.
00001 // DisplayMcEvent.h: interface for the DisplayMcEvent class.
00002 //
00004 
00005 #include "gui/DisplayRep.h"
00006 #include "GlastEvent/MonteCarlo/McVertex.h"
00007 #include "GlastEvent/MonteCarlo/McParticle.h"
00008 
00009 
00010 class DisplayMcEvent :  public gui::DisplayRep {
00011 public:
00012 
00013     DisplayMcEvent(const McVertex * vert){
00014         m_mcRoot = vert;
00015         update();
00016     }
00017     void update() {
00018 
00019         //draw the line.
00020         moveTo(m_mcRoot->initialPosition().x(),m_mcRoot->initialPosition().y(),m_mcRoot->initialPosition().z());
00021         lineTo(m_mcRoot->finalPosition().x(),m_mcRoot->finalPosition().y(),m_mcRoot->finalPosition().z());
00022 
00023         //Travers the Tree
00024         SmartRefVector<McParticle>::const_iterator i;
00025         for( i = m_mcRoot->daughterMcParticles().begin(); i != m_mcRoot->daughterMcParticles().end();i++){
00026                 append(DisplayMcEvent((*i)->mcVertex()));
00027         }
00028 
00029     }
00030 private:
00031     const McVertex* m_mcRoot;
00032 
00033 };

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