#include <FWEventAnnotation.h>
Public Member Functions | |
virtual void | addTo (FWConfiguration &) const |
FWEventAnnotation (TGLViewerBase *view) | |
virtual void | Render (TGLRnrCtx &rnrCtx) |
void | setEvent () |
virtual void | setFrom (const FWConfiguration &) |
void | setLevel (long x) |
virtual | ~FWEventAnnotation () |
Private Member Functions | |
FWEventAnnotation (const FWEventAnnotation &) | |
const FWEventAnnotation & | operator= (const FWEventAnnotation &) |
void | updateOverlayText () |
Private Attributes | |
int | m_level |
Definition at line 12 of file FWEventAnnotation.h.
FWEventAnnotation::FWEventAnnotation | ( | TGLViewerBase * | view | ) |
Definition at line 11 of file FWEventAnnotation.cc.
: TGLAnnotation(view, "Event Info", 0.05, 0.95), m_level(1) { SetRole(TGLOverlayElement::kViewer); SetUseColorSet(true); fAllowClose = false; }
FWEventAnnotation::~FWEventAnnotation | ( | ) | [virtual] |
Definition at line 20 of file FWEventAnnotation.cc.
{ }
FWEventAnnotation::FWEventAnnotation | ( | const FWEventAnnotation & | ) | [private] |
void FWEventAnnotation::addTo | ( | FWConfiguration & | iTo | ) | const [virtual] |
Definition at line 91 of file FWEventAnnotation.cc.
References FWConfiguration::addKeyValue(), asciidump::s, x, and detailsBasic3DVector::y.
Referenced by FWEveView::addTo().
{ std::stringstream s; s<<fTextSize; iTo.addKeyValue("EventInfoTextSize",FWConfiguration(s.str())); std::stringstream x; x<<fPosX; iTo.addKeyValue("EventInfoPosX",FWConfiguration(x.str())); std::stringstream y; y<<fPosY; iTo.addKeyValue("EventInfoPosY",FWConfiguration(y.str())); }
const FWEventAnnotation& FWEventAnnotation::operator= | ( | const FWEventAnnotation & | ) | [private] |
void FWEventAnnotation::Render | ( | TGLRnrCtx & | rnrCtx | ) | [virtual] |
Definition at line 82 of file FWEventAnnotation.cc.
References m_level.
{ if (m_level) TGLAnnotation::Render(rnrCtx); }
void FWEventAnnotation::setEvent | ( | ) |
Definition at line 40 of file FWEventAnnotation.cc.
References updateOverlayText().
Referenced by FWEveView::eventEnd().
{ updateOverlayText(); }
void FWEventAnnotation::setFrom | ( | const FWConfiguration & | iFrom | ) | [virtual] |
Definition at line 107 of file FWEventAnnotation.cc.
References FWConfiguration::value(), relativeConstraints::value, and FWConfiguration::valueForKey().
Referenced by FWEveView::setFrom().
{ const FWConfiguration* value; value = iFrom.valueForKey("EventInfoTextSize"); if (value) fTextSize = atof(value->value().c_str()); value = iFrom.valueForKey("EventInfoPosX"); if (value) fPosX = atof(value->value().c_str()); value = iFrom.valueForKey("EventInfoPosY"); if (value) fPosY = atof(value->value().c_str()); }
void FWEventAnnotation::setLevel | ( | long | x | ) |
Definition at line 27 of file FWEventAnnotation.cc.
References m_level, updateOverlayText(), and x.
Referenced by FWEveView::FWEveView().
{ if (x != m_level) { m_level = x; fParent->Changed(); gEve->Redraw3D(); } updateOverlayText(); }
void FWEventAnnotation::updateOverlayText | ( | ) | [private] |
Definition at line 46 of file FWEventAnnotation.cc.
References event(), FWGUIManager::getCurrentEvent(), FWGUIManager::getGUIManager(), fireworks::getLocalTime(), and m_level.
Referenced by setEvent(), and setLevel().
{ fText = "CMS Experiment at LHC, CERN"; const edm::EventBase* event = FWGUIManager::getGUIManager()->getCurrentEvent(); if (event && m_level) { fText += "\nData recorded: "; fText += fireworks::getLocalTime( *event ); fText += "\nRun/Event: "; fText += event->id().run(); fText += " / "; fText += event->id().event(); if ( m_level > 1) { fText += "\nLumi section: "; fText += event->luminosityBlock(); } if ( m_level > 2) { fText += "\nOrbit/Crossing: "; fText += event->orbitNumber(); fText += " / "; fText += event->bunchCrossing(); } } if (m_level) { fParent->Changed(); gEve->Redraw3D(); } }
int FWEventAnnotation::m_level [private] |
Definition at line 33 of file FWEventAnnotation.h.
Referenced by Render(), setLevel(), and updateOverlayText().