CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Member Functions | Private Attributes
FWEventAnnotation Class Reference

#include <FWEventAnnotation.h>

Inheritance diagram for FWEventAnnotation:

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 FWEventAnnotationoperator= (const FWEventAnnotation &)
 
void updateOverlayText ()
 

Private Attributes

int m_level
 

Detailed Description

Definition at line 12 of file FWEventAnnotation.h.

Constructor & Destructor Documentation

FWEventAnnotation::FWEventAnnotation ( TGLViewerBase *  view)

Definition at line 11 of file FWEventAnnotation.cc.

11  :
12  TGLAnnotation(view, "Event Info", 0.05, 0.95),
13  m_level(1)
14 {
15  SetRole(TGLOverlayElement::kViewer);
16  SetUseColorSet(true);
17  fAllowClose = false;
18 }
FWEventAnnotation::~FWEventAnnotation ( )
virtual

Definition at line 20 of file FWEventAnnotation.cc.

21 {
22 }
FWEventAnnotation::FWEventAnnotation ( const FWEventAnnotation )
private

Member Function Documentation

void FWEventAnnotation::addTo ( FWConfiguration iTo) const
virtual

Definition at line 91 of file FWEventAnnotation.cc.

References FWConfiguration::addKeyValue(), alignCSCRings::s, vdt::x, and detailsBasic3DVector::y.

Referenced by FWEveView::addTo().

92 {
93  std::stringstream s;
94  s<<fTextSize;
95  iTo.addKeyValue("EventInfoTextSize",FWConfiguration(s.str()));
96 
97  std::stringstream x;
98  x<<fPosX;
99  iTo.addKeyValue("EventInfoPosX",FWConfiguration(x.str()));
100 
101  std::stringstream y;
102  y<<fPosY;
103  iTo.addKeyValue("EventInfoPosY",FWConfiguration(y.str()));
104 }
FWConfiguration & addKeyValue(const std::string &, const FWConfiguration &)
x
Definition: VDTMath.h:216
const FWEventAnnotation& FWEventAnnotation::operator= ( const FWEventAnnotation )
private
void FWEventAnnotation::Render ( TGLRnrCtx &  rnrCtx)
virtual

Definition at line 82 of file FWEventAnnotation.cc.

References m_level.

83 {
84  if (m_level)
85  TGLAnnotation::Render(rnrCtx);
86 }
void FWEventAnnotation::setEvent ( )

Definition at line 40 of file FWEventAnnotation.cc.

References updateOverlayText().

Referenced by FWEveView::eventEnd().

41 {
43 }
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().

108 {
109  const FWConfiguration* value;
110 
111  value = iFrom.valueForKey("EventInfoTextSize");
112  if (value) fTextSize = atof(value->value().c_str());
113 
114  value = iFrom.valueForKey("EventInfoPosX");
115  if (value) fPosX = atof(value->value().c_str());
116 
117  value = iFrom.valueForKey("EventInfoPosY");
118  if (value) fPosY = atof(value->value().c_str());
119 
120 }
const std::string & value(unsigned int iIndex=0) const
const FWConfiguration * valueForKey(const std::string &iKey) const
void FWEventAnnotation::setLevel ( long  x)

Definition at line 27 of file FWEventAnnotation.cc.

References m_level, updateOverlayText(), and vdt::x.

Referenced by FWEveView::FWEveView().

28 {
29  if (x != m_level)
30  {
31  m_level = x;
32  fParent->Changed();
33  gEve->Redraw3D();
34  }
36 }
x
Definition: VDTMath.h:216
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().

47 {
48  fText = "CMS Experiment at LHC, CERN";
49 
51 
52  if (event && m_level)
53  {
54  fText += "\nData recorded: ";
55  fText += fireworks::getLocalTime( *event );
56  fText += "\nRun/Event: ";
57  fText += event->id().run();
58  fText += " / ";
59  fText += event->id().event();
60  if ( m_level > 1)
61  {
62  fText += "\nLumi section: ";
63  fText += event->luminosityBlock();
64  }
65  if ( m_level > 2)
66  {
67  fText += "\nOrbit/Crossing: ";
68  fText += event->orbitNumber();
69  fText += " / ";
70  fText += event->bunchCrossing();
71  }
72  }
73 
74  if (m_level)
75  {
76  fParent->Changed();
77  gEve->Redraw3D();
78  }
79 }
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger but the state exists so we define the behavior If all triggers are the negative crieriion will lead to accepting the event(this again matches the behavior of"!*"before the partial wildcard feature was incorporated).The per-event"cost"of each negative criterion with multiple relevant triggers is about the same as!*was in the past
const edm::EventBase * getCurrentEvent() const
static FWGUIManager * getGUIManager()
std::string getLocalTime(const edm::EventBase &event)

Member Data Documentation

int FWEventAnnotation::m_level
private

Definition at line 33 of file FWEventAnnotation.h.

Referenced by Render(), setLevel(), and updateOverlayText().