00001 //<<<<<< INCLUDES >>>>>> 00002 00003 #include "VisSimulation/VisSimData/interface/VisGenParticleTwig.h" 00004 #include "VisSimulation/VisSimData/interface/xtypeinfo.h" 00005 #include "Iguana/Framework/interface/IgBrowserMethods.h" 00006 #include "Iguana/Models/interface/IgTextRep.h" 00007 #include "Iguana/Models/interface/xtypeinfo.h" 00008 #include <HepMC/GenParticle.h> 00009 #include <sstream> 00010 00011 //<<<<<< PRIVATE DEFINES >>>>>> 00012 //<<<<<< PRIVATE CONSTANTS >>>>>> 00013 //<<<<<< PRIVATE TYPES >>>>>> 00014 //<<<<<< PRIVATE VARIABLE DEFINITIONS >>>>>> 00015 //<<<<<< PUBLIC VARIABLE DEFINITIONS >>>>>> 00016 //<<<<<< CLASS STRUCTURE INITIALIZATION >>>>>> 00017 //<<<<<< PRIVATE FUNCTION DEFINITIONS >>>>>> 00018 //<<<<<< PUBLIC FUNCTION DEFINITIONS >>>>>> 00019 //<<<<<< MEMBER FUNCTION DEFINITIONS >>>>>> 00020 00021 VisGenParticleTwig::VisGenParticleTwig (IgTwig *parent, 00022 const std::string &name, HepMC::GenParticle &genParticle) 00023 : IgSimpleTwig (parent, name), 00024 m_genParticle (genParticle) 00025 { 00026 } 00027 00028 int 00029 VisGenParticleTwig::id (void) 00030 { return m_genParticle.pdg_id (); } 00031 00036 MMM_DEFUN_FUNC(void,IgBrowserMethods::,doUpdate, 00037 (VisGenParticleTwig *twig, IgTextRep *rep, unsigned)) 00038 { 00039 // Prepare property description. 00040 std::ostringstream text; 00041 00042 text << "Particle " << twig->name () << " with PDGid " << twig->id () << "<br>"; 00043 rep->setText (text.str ()); 00044 }