CMS 3D CMS Logo

VisL1MuDTTrackContainerTwig Class Reference

#include <VisReco/VisTrigger/interface/VisL1MuDTTrackContainerTwig.h>

Inheritance diagram for VisL1MuDTTrackContainerTwig:

VisQueuedTwig IgSimpleTwig VisEventObserver IgCompoundTwig IgTwig IgRepresentable

List of all members.

Public Member Functions

virtual void onNewEvent (const edm::Event &event, const edm::EventSetup &eventSetup)
virtual void update (IgTextRep *rep)
virtual void update (Ig3DRep *rep)
 VisL1MuDTTrackContainerTwig (IgState *state, IgTwig *parent, const std::string &name, const std::string &friendlyName="", const std::string &moduleLabel="", const std::string &instanceName="", const std::string &processName="")

Private Attributes

std::vector< L1MuDTTrackCand > * m_container
std::string m_friendlyName
std::string m_instanceName
std::string m_moduleLabel
std::string m_processName
IgStatem_state
std::string m_text


Detailed Description

Definition at line 18 of file VisL1MuDTTrackContainerTwig.h.


Constructor & Destructor Documentation

VisL1MuDTTrackContainerTwig::VisL1MuDTTrackContainerTwig ( IgState state,
IgTwig parent,
const std::string &  name,
const std::string &  friendlyName = "",
const std::string &  moduleLabel = "",
const std::string &  instanceName = "",
const std::string &  processName = "" 
)

Definition at line 48 of file VisL1MuDTTrackContainerTwig.cc.

References createThisTwig(), edm::TypeID::friendlyClassName(), DBSPlugin::get(), and VisTwigFactroyService::registerTwig().

00054     : VisQueuedTwig (state, parent, name),
00055       m_state (state),
00056       m_text ("no info"),
00057       m_friendlyName (friendlyName),
00058       m_moduleLabel (moduleLabel),
00059       m_instanceName (instanceName),
00060       m_processName (processName)
00061 {
00062     VisTwigFactroyService *tfService = VisTwigFactroyService::get (state);
00063     if (! tfService)
00064     {
00065         tfService = new VisTwigFactroyService (state);
00066     }
00067     edm::TypeID triggerID (typeid (L1MuDTTrackContainer));
00068     tfService->registerTwig (triggerID.friendlyClassName (), &createThisTwig);
00069 }


Member Function Documentation

void VisL1MuDTTrackContainerTwig::onNewEvent ( const edm::Event event,
const edm::EventSetup eventSetup 
) [virtual]

Reimplemented from VisQueuedTwig.

Definition at line 72 of file VisL1MuDTTrackContainerTwig.cc.

References arg, GenMuonPlsPt100GeV_cfg::cout, e, lat::endl(), eta, exception, i, edm::Event::id(), edm::Handle< T >::isValid(), m_container, VisQueuedTwig::m_onCmsException, VisQueuedTwig::m_onError, VisQueuedTwig::m_onException, VisQueuedTwig::m_onUnhandledException, m_text, VisQueuedTwig::onBaseInvalidate(), VisQueuedTwig::onNewEvent(), and phi.

00074 {    
00075     // Get debugging dump.
00076     VisQueuedTwig::onNewEvent (event, eventSetup);
00077 
00078     m_text = (QString ("Run # %1, event # %2")
00079               .arg (event.id ().run ())
00080               .arg (event.id ().event ()).latin1 ());
00081     try
00082     {
00083         edm::Handle<L1MuDTTrackContainer> l1MuDTTracks;
00084         event.getByType (l1MuDTTracks);
00085         if (l1MuDTTracks.isValid ())
00086         {
00087             m_container = l1MuDTTracks->getContainer ();
00088             std::cout << "L1MuDTTrackContainer: " << m_container->size () << std::endl;
00089 
00090             for (std::vector<L1MuDTTrackCand>::const_iterator i = m_container->begin (), iEnd = m_container->end (); 
00091                  i != iEnd; ++i) 
00092             {
00093                 if (! i->empty ())
00094                 {
00095                     float phi = i->phiValue ();
00096                     float eta = i->etaValue ();
00097                     float pt = i->ptValue ();
00098                     i->print ();
00099                 }
00100             }
00101         }
00102     }
00103     catch (cms::Exception& e)
00104     {
00105         if (this->m_onCmsException)
00106             this->m_onCmsException (&e);
00107     }
00108     catch (lat::Error &e) 
00109     {
00110         if (this->m_onError)
00111             this->m_onError (&e);
00112     }
00113     catch (std::exception &e) 
00114     {
00115         if (this->m_onException)
00116             this->m_onException (&e);
00117     }
00118     catch (...) 
00119     {
00120         if (this->m_onUnhandledException)
00121             this->m_onUnhandledException ();
00122     }
00123 
00124     VisQueuedTwig::onBaseInvalidate ();
00125 }

void VisL1MuDTTrackContainerTwig::update ( IgTextRep rep  )  [virtual]

Reimplemented from VisQueuedTwig.

Definition at line 137 of file VisL1MuDTTrackContainerTwig.cc.

References m_text, IgTextRep::setText(), and VisQueuedTwig::update().

00138 {
00139     // Get debugging dump.
00140     VisQueuedTwig::update (rep);
00141 
00142     // Prepare the property description.
00143     std::ostringstream text;
00144 
00145     text << m_text;
00146   
00147     text << setiosflags (std::ios::showpoint | std::ios::fixed);
00148     text.setf (std::ios::right, std::ios::adjustfield);
00149     text << "<table width='100%' border=1>"
00150          << "<TR align = center>"
00151          << "<TH>DetId</TH>"
00152          << "<TH>Wheel</TH>"
00153          << "<TH>Station</TH>"
00154          << "<TH>Sector</TH>"
00155          << "</TR>";
00156 
00157     // text << "<TR><TH>" << m_decision.latin1 () << "</TH></TR>";
00158     
00159     text << "</table>";  
00160 
00161     IgQtLock ();
00162     rep->setText (text.str ());
00163 }

void VisL1MuDTTrackContainerTwig::update ( Ig3DRep rep  )  [virtual]

Reimplemented from VisQueuedTwig.

Definition at line 128 of file VisL1MuDTTrackContainerTwig.cc.

References VisQueuedTwig::update().

00129 {
00130     // Get debugging dump.
00131     VisQueuedTwig::update (rep);
00132 
00133     IgQtLock ();
00134 }


Member Data Documentation

std::vector<L1MuDTTrackCand>* VisL1MuDTTrackContainerTwig::m_container [private]

Definition at line 43 of file VisL1MuDTTrackContainerTwig.h.

Referenced by onNewEvent().

std::string VisL1MuDTTrackContainerTwig::m_friendlyName [private]

Definition at line 39 of file VisL1MuDTTrackContainerTwig.h.

std::string VisL1MuDTTrackContainerTwig::m_instanceName [private]

Definition at line 41 of file VisL1MuDTTrackContainerTwig.h.

std::string VisL1MuDTTrackContainerTwig::m_moduleLabel [private]

Definition at line 40 of file VisL1MuDTTrackContainerTwig.h.

std::string VisL1MuDTTrackContainerTwig::m_processName [private]

Definition at line 42 of file VisL1MuDTTrackContainerTwig.h.

IgState* VisL1MuDTTrackContainerTwig::m_state [private]

Reimplemented from VisQueuedTwig.

Definition at line 37 of file VisL1MuDTTrackContainerTwig.h.

std::string VisL1MuDTTrackContainerTwig::m_text [private]

Definition at line 38 of file VisL1MuDTTrackContainerTwig.h.

Referenced by onNewEvent(), and update().


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:35:31 2009 for CMSSW by  doxygen 1.5.4