ATLAS Offline Software
Classes | Public Types | Signals | Public Member Functions | Static Public Member Functions | Protected Types | Protected Slots | Protected Member Functions | Private Types | Private Slots | Private Member Functions | Private Attributes | List of all members
IVP12DDetViewsChannelWidget Class Referenceabstract

#include <IVP12DDetViewsChannelWidget.h>

Inheritance diagram for IVP12DDetViewsChannelWidget:
Collaboration diagram for IVP12DDetViewsChannelWidget:

Classes

class  Imp
 

Public Types

enum  Type {
  UNKNOWN = 0, THREEDIMENSIONAL, TWODIMENSIONAL, HISTOGRAM,
  NUMBERS
}
 

Signals

void message (QString)
 
void uniqueNameChanged (const QString &)
 
void systemRefreshInfoChanged (QString sysrefreshing, int nsysOn, int nsysOnRefreshed)
 

Public Member Functions

 IVP12DDetViewsChannelWidget (const QString &name, const QString &information, const QString &contact_info)
 
Type type () const
 
void create ()
 
void systemRefreshed (IVP1System *)
 
void systemErased (IVP1System *)
 
virtual ~IVP12DDetViewsChannelWidget ()
 
virtual QByteArray saveState ()
 
virtual void restoreFromState (QByteArray)
 
virtual void init ()=0
 
virtual bool isAccumulator () const
 
void setRunEvtNumber (int runnumber, unsigned long long eventnumber)
 
const QString & name () const
 
const QString unique_name () const
 
const QString & information () const
 
const QString & contact_info () const
 
virtual QPixmap getSnapshot (bool transp=false, int width=0, bool batch=false)
 
virtual bool setAntiAliasing (bool aa)
 
virtual bool isAntiAliasing ()
 
virtual void dockResized ()
 

Static Public Member Functions

static QString str (const QString &s)
 
static QString str (const char *c)
 
static QString str (const bool b)
 
static QString str (const QColor &)
 
static QString str (const SbColor &)
 
static QString str (const VP1Interval &)
 
static QString str (const SbVec2d &)
 
static QString str (const SbVec2f &)
 
static QString str (const SbVec2s &)
 
static QString str (const SbVec3d &)
 
static QString str (const SbVec3f &)
 
static QString str (const SbVec3s &)
 
static QString str (const SbVec4d &)
 
static QString str (const SbVec4f &)
 
static QString str (short int n)
 
static QString str (unsigned short int n)
 
static QString str (long n)
 
static QString str (ulong n)
 
static QString str (int n)
 
static QString str (uint n)
 
static QString str (qlonglong n)
 
static QString str (qulonglong n)
 
static QString str (const double &d)
 
static QString str (const float &f)
 
static QString str (const void *)
 
template<class T >
static QString str (const T *t)
 
template<class T >
static QString str (const QFlags< T > &f)
 
template<class T >
static QString str (const HepGeom::BasicVector3D< T > &t)
 
static QString str (const Amg::Vector3D &t)
 
template<class T >
static QString str (const QList< T > &t)
 

Protected Types

enum  SystemOption {
  AllowAll = 0x0000, DisallowSelections = 0x0100, DisallowSwitchable = 0x0400, DisallowController = 0x0800,
  DisallowMovable = 0x1000, StartDisabled = 0x0010
}
 
enum  PROJECTION { XY, RZ }
 

Protected Slots

void showControlsForSystem ()
 

Protected Member Functions

void addSystem (IVP12DDetViewsSystem *, double zfactor, const SystemOptions &options=AllowAll)
 
void addGeneralSystem (IVP12DSystem *, const PROJECTION &projection, double zfactor, const SystemOptions &options=AllowAll)
 
virtual void goingToNextEvent ()
 
virtual void uncreate ()
 
virtual void lastOfActiveSystemsRefreshed ()
 
void turnOn (IVP1System *)
 
void turnOff (IVP1System *, const bool &immediateErase=true)
 
void getRunEvtNumber (int &runnumber, unsigned long long &eventnumber)
 
void setEvtTimestamp (unsigned timestamp)
 
void getEvtTimestamp (unsigned &timestamp)
 
void registerController (QWidget *)
 
void registerSystem (IVP1System *)
 

Private Types

enum  State { CONSTRUCTED =0, READY, UNCREATED }
 

Private Slots

void toggleSystemActive ()
 
void setBackgroundColor (const QColor &)
 

Private Member Functions

unsigned cloneID () const
 
QWidget * controllerWidget ()
 
void emitRefreshInfoChanged ()
 
bool hasRefreshingSystem ()
 
void setCloneID (unsigned id)
 
const std::set< IVP1System * > & systems ()
 
void deleteControllers ()
 
State state () const
 
void setState (const State &)
 
void setCanRegister (const bool &controller, const bool &system)
 

Private Attributes

Impm_d
 

Detailed Description

Definition at line 40 of file IVP12DDetViewsChannelWidget.h.

Member Enumeration Documentation

◆ PROJECTION

Enumerator
XY 
RZ 

Definition at line 67 of file IVP12DDetViewsChannelWidget.h.

67 { XY, RZ };

◆ State

enum IVP1ChannelWidget::State
privateinherited
Enumerator
CONSTRUCTED 
READY 
UNCREATED 

Definition at line 130 of file IVP1ChannelWidget.h.

130 { CONSTRUCTED=0, READY, UNCREATED };

◆ SystemOption

Enumerator
AllowAll 
DisallowSelections 
DisallowSwitchable 
DisallowController 
DisallowMovable 
StartDisabled 

Definition at line 49 of file IVP12DDetViewsChannelWidget.h.

49  {
50  AllowAll = 0x0000,
51  DisallowSelections = 0x0100,//User can not interact with items from this system (movable though, is handled separately)
52  DisallowSwitchable = 0x0400,//User can not turn items from this system on/off.
53  DisallowController = 0x0800,//Custom controllers provided by this wont be present in the GUI
54  DisallowMovable = 0x1000,//Items from this systems are never movable
55  StartDisabled = 0x0010
56  };

◆ Type

enum IVP1ChannelWidget::Type
inherited
Enumerator
UNKNOWN 
THREEDIMENSIONAL 
TWODIMENSIONAL 
HISTOGRAM 
NUMBERS 

Definition at line 46 of file IVP1ChannelWidget.h.

Constructor & Destructor Documentation

◆ IVP12DDetViewsChannelWidget()

IVP12DDetViewsChannelWidget::IVP12DDetViewsChannelWidget ( const QString &  name,
const QString &  information,
const QString &  contact_info 
)

Definition at line 62 of file IVP12DDetViewsChannelWidget.cxx.

64 {
65  m_d->channel=this;
66  m_d->first=true;
67  setMinimumSize(150,240);//minimum y size is to avoid absurd squeezing of buttons.
68 
69  //Tight layout:
70  QVBoxLayout * vboxLayout = new QVBoxLayout(this);
71  vboxLayout->setSpacing(0);
72  vboxLayout->setMargin(0);
73 
74  //Setup examiner viewer:
75  QList<QPair<QString,QString> > views;
76  views << QPair<QString,QString>("X-Y",":/icons/icons/xy.png");
77  views << QPair<QString,QString>("R-Z",":/icons/icons/rz.png");
78  VP12DExaminerViewer * examiner = new VP12DExaminerViewer(views, this);
79 
80  vboxLayout->addWidget(examiner);
81 
82  //Get pointers to the different views:
83  m_d->view_xy = examiner->view("X-Y");
84  m_d->view_rz = examiner->view("R-Z");
85  assert(m_d->view_xy&&m_d->view_rz);
86 
87  m_d->tabwidget = 0;
89 }

◆ ~IVP12DDetViewsChannelWidget()

IVP12DDetViewsChannelWidget::~IVP12DDetViewsChannelWidget ( )
virtual

Definition at line 92 of file IVP12DDetViewsChannelWidget.cxx.

93 {
94  delete m_d;
95 }

Member Function Documentation

◆ addGeneralSystem()

void IVP12DDetViewsChannelWidget::addGeneralSystem ( IVP12DSystem ,
const PROJECTION projection,
double  zfactor,
const SystemOptions &  options = AllowAll 
)
protected

Definition at line 252 of file IVP12DDetViewsChannelWidget.cxx.

253 {
254  message("IVP12DDetViewsChannelWidget::addGeneralSystem ERROR: Method not implemented yet!!");//fixme
255 }

◆ addSystem()

void IVP12DDetViewsChannelWidget::addSystem ( IVP12DDetViewsSystem system,
double  zfactor,
const SystemOptions &  options = AllowAll 
)
protected

Definition at line 98 of file IVP12DDetViewsChannelWidget.cxx.

98  {
99 
100  //Apart from the attachment of ic's to view's, this method is quite similar to the ones in addGeneralSystem
101  bool handleSelections = ! (options & DisallowSelections);
102  bool switchable = ! (options & DisallowSwitchable);
103  bool allowController = ! (options & DisallowController);
104  bool allowMovable = ! (options & DisallowMovable);
105  bool startDisabled = (options & StartDisabled);
106 
107  registerSystem(system);
108 
109  //Fixme: Attach to the relevant view instead.
110  assert(!m_d->system2itemcols.contains(system));
111 
112  m_d->system2itemcols.insert(system,system->getItemCollections_XY()+system->getItemCollections_RZ());
113 
118 
120  m_d->view_xy->setDisallowInteractions(ic, !handleSelections );
122  m_d->view_rz->setDisallowInteractions(ic, !handleSelections );
123 
125  m_d->view_xy->setDisallowMovable(ic, !allowMovable );
127  m_d->view_rz->setDisallowMovable(ic, !allowMovable );
128 
129  m_d->system2switchable << QPair<IVP1System*,bool>(system,switchable);
130 
131  assert(!m_d->system2startdisabled.contains(system));
132  m_d->system2startdisabled.insert(system,startDisabled);
133  assert(m_d->system2startdisabled.contains(system));
134 
135  if (allowController) {
136  m_d->systemsAllowedControllers << system;
137  connect(system,SIGNAL(itemFromSystemSelected()),this,SLOT(showControlsForSystem()));
138  }
139 
140 }

◆ cloneID()

unsigned IVP1ChannelWidget::cloneID ( ) const
privateinherited

Definition at line 197 of file IVP1ChannelWidget.cxx.

198 {
199  return m_d->cloneid;
200 }

◆ contact_info()

const QString & IVP1ChannelWidget::contact_info ( ) const
inherited

Definition at line 191 of file IVP1ChannelWidget.cxx.

192 {
193  return m_d->contact_info;
194 }

◆ controllerWidget()

QWidget * IVP1ChannelWidget::controllerWidget ( )
privateinherited

Definition at line 77 of file IVP1ChannelWidget.cxx.

78 {
79  return m_d->controller;
80 }

◆ create()

void IVP12DDetViewsChannelWidget::create ( )
virtual

Reimplemented from IVP1ChannelWidget.

Definition at line 143 of file IVP12DDetViewsChannelWidget.cxx.

143  {
144  //Fixme: Less code should be replicated here and in IVP12DStandardChannelWidget+IVP13DStandardChannelWidget.
145 
146  //Set up the controller.
152  connect(m_d->colorselectbutton,SIGNAL(colorChanged(const QColor&)),this,SLOT(setBackgroundColor(const QColor&)));
153  m_d->system2switchable.clear();
154 
155  QMapIterator<QCheckBox*,IVP1System*> it(m_d->checkbox2system);
156  while (it.hasNext()) {
157  it.next();
158 
159  assert(m_d->system2startdisabled.contains(it.value()));
160  if (m_d->system2startdisabled[it.value()]) {
161  it.key()->setChecked(false);
162  m_d->updateSystemState(it.key());
163  }
164 
165  connect(it.key(),SIGNAL(toggled(bool)),this,SLOT(toggleSystemActive()));
166  }
167 }

◆ deleteControllers()

void IVP1ChannelWidget::deleteControllers ( )
privateinherited

Definition at line 161 of file IVP1ChannelWidget.cxx.

162 {
164  for (it=m_d->systems.begin();it!=itE;++it) {
165  // assert((*it)->state()==IVP1System::ERASED);
166  if (*it)
167  (*it)->deleteController();
168  }
169  if (m_d->controller)
170  m_d->controller->deleteLater();
171  m_d->controller = 0;
172 }

◆ dockResized()

void IVP1ChannelWidget::dockResized ( )
virtualinherited

Reimplemented in IVP13DStandardChannelWidget.

Definition at line 315 of file IVP1ChannelWidget.cxx.

316 {
317 }

◆ emitRefreshInfoChanged()

void IVP1ChannelWidget::emitRefreshInfoChanged ( )
privateinherited

Definition at line 268 of file IVP1ChannelWidget.cxx.

269 {
270  int nsysOn(0), nsysOnRefreshed(0);
271  QString sysrefreshing;
273  for (it=m_d->systems.begin();it!=itE;++it) {
274  if ((*it)->activeState()==IVP1System::ON) {
275  ++nsysOn;
276  if((*it)->state()==IVP1System::REFRESHED)
277  ++nsysOnRefreshed;
278  if ((*it)->isRefreshing()) {
279  assert(sysrefreshing.isEmpty());
280  sysrefreshing=(*it)->name();
281  }
282  }
283  }
284  //Fixme: Only emit if actually changed.
285  systemRefreshInfoChanged(sysrefreshing, nsysOn, nsysOnRefreshed);
286 }

◆ getEvtTimestamp()

void IVP1ChannelWidget::getEvtTimestamp ( unsigned &  timestamp)
protectedinherited

Definition at line 262 of file IVP1ChannelWidget.cxx.

263 {
264  timestamp = m_d->timestamp;
265 }

◆ getRunEvtNumber()

void IVP1ChannelWidget::getRunEvtNumber ( int &  runnumber,
unsigned long long &  eventnumber 
)
protectedinherited

Definition at line 255 of file IVP1ChannelWidget.cxx.

256 {
258  eventnumber = m_d->eventnumber;
259 }

◆ getSnapshot()

QPixmap IVP1ChannelWidget::getSnapshot ( bool  transp = false,
int  width = 0,
bool  batch = false 
)
virtualinherited

Reimplemented in IVP13DStandardChannelWidget, and IVP13DChannelWidget.

Definition at line 306 of file IVP1ChannelWidget.cxx.

307 {
308  VP1Msg::messageVerbose("IVP1ChannelWidget::getSnapshot() - using QPixmap::grabWidget()");
309  VP1Msg::messageVerbose("(and so, not using the values - transp: "+QString::number(transp)+" - width: "+QString::number(width)+" - batch: " + batch +")");
310 
311  return this->grab();
312 }

◆ goingToNextEvent()

virtual void IVP1ChannelWidget::goingToNextEvent ( )
inlineprotectedvirtualinherited

Reimplemented in IVP13DChannelWidget.

Definition at line 57 of file IVP1ChannelWidget.h.

57 {}

◆ hasRefreshingSystem()

bool IVP1ChannelWidget::hasRefreshingSystem ( )
privateinherited

Definition at line 289 of file IVP1ChannelWidget.cxx.

289  {
291  for (it=m_d->systems.begin();it!=itE;++it) {
292  if ((*it)->isRefreshing())
293  return true;
294  }
295  return false;
296 }

◆ information()

const QString & IVP1ChannelWidget::information ( ) const
inherited

Definition at line 185 of file IVP1ChannelWidget.cxx.

186 {
187  return m_d->information;
188 }

◆ init()

virtual void IVP1ChannelWidget::init ( )
pure virtualinherited

◆ isAccumulator()

bool IVP1ChannelWidget::isAccumulator ( ) const
virtualinherited

Definition at line 83 of file IVP1ChannelWidget.cxx.

84 {
85  return false;
86 }

◆ isAntiAliasing()

virtual bool IVP1ChannelWidget::isAntiAliasing ( )
inlinevirtualinherited

Reimplemented in IVP13DStandardChannelWidget.

Definition at line 105 of file IVP1ChannelWidget.h.

105 {VP1Msg::messageVerbose("You should not call this function directly, but one of its implementations in derived classes..."); return false; };

◆ lastOfActiveSystemsRefreshed()

void IVP1ChannelWidget::lastOfActiveSystemsRefreshed ( )
protectedvirtualinherited

Reimplemented in IVP13DStandardChannelWidget.

Definition at line 334 of file IVP1ChannelWidget.cxx.

335 {
336  VP1Msg::messageVerbose("IVP1ChannelWidget base lastOfActiveSystemsRefreshed called");
337 }

◆ message

void IVP1ChannelWidget::message ( QString  )
signalinherited

◆ name()

const QString & IVP1ChannelWidget::name ( ) const
inherited

Definition at line 180 of file IVP1ChannelWidget.cxx.

181 {
182  return m_d->name;
183 }

◆ registerController()

void IVP1ChannelWidget::registerController ( QWidget *  w)
protectedinherited

Definition at line 210 of file IVP1ChannelWidget.cxx.

211 {
212  assert(m_d->canregistercontroller&&"Please only register controllers during create()");
213  assert(m_d->state==CONSTRUCTED);
214  assert(w&&"IVP1ChannelWidget::registerController(...) called with null pointer!!");
215  assert(!m_d->controller&&"IVP1ChannelWidget::registerController(...) called twice!!");
216  m_d->controller = w;
217  w->setParent(0);
218 }

◆ registerSystem()

void IVP1ChannelWidget::registerSystem ( IVP1System s)
protectedinherited

Definition at line 221 of file IVP1ChannelWidget.cxx.

222 {
223  assert(m_d->canregistersystem&&"Please only register systems during the channel constructor");
224  assert(m_d->state==CONSTRUCTED);
225  assert(m_d->systems.find(s)==m_d->systems.end()&&"IVP1ChannelWidget::registerSystem(...) called twice on the same system!!");
226  m_d->systems.insert(s);
227  s->setChannel(this);
228 }

◆ restoreFromState()

void IVP12DDetViewsChannelWidget::restoreFromState ( QByteArray  ba)
virtual

Reimplemented from IVP1ChannelWidget.

Definition at line 333 of file IVP12DDetViewsChannelWidget.cxx.

334 {
335  VP1Msg::messageVerbose("IVP12DDetViewsChannelWidget::restoreFromState");
336 
337  // ===> Setup stream for getting the contents of the byteArray:
338  QBuffer buffer(&ba);
339  buffer.open(QIODevice::ReadOnly);
340  QDataStream state(&buffer);
341  // ===> Check version and pass on state info to base class:
342  qint32 version;
343  state >> version;
344  if (version!=0) {
345  message("Warning: State data in .vp1 file is in wrong format - ignoring!");
346  return;
347  }
348  QByteArray basestate;
349  state >> basestate;
351  // ===> Decode the state info:
352 
353  QColor bgdcol;
354  state >> bgdcol;
355  if (bgdcol!=m_d->colorselectbutton->color())
356  m_d->colorselectbutton->setColor(bgdcol);
357  setBackgroundColor(bgdcol);
358 
359  //Switch systems on/off:
360  QMap<QString, bool> sysname2turnedon;
361  state >> sysname2turnedon;
362  QMap<QCheckBox*,IVP1System*>::const_iterator it = m_d->checkbox2system.constBegin();
363  while (it != m_d->checkbox2system.constEnd()) {
364  if (sysname2turnedon.contains(it.key()->text())) {
365  if (sysname2turnedon[it.key()->text()]!=it.key()->isChecked())
366  it.key()->setChecked(sysname2turnedon[it.key()->text()]);
367  } else {
368  message("Warning: Config data does not contain information about switched state of subsystem '"+it.key()->text()+"'");
369  }
370  ++it;
371  }
372 
373  //Current system tab
374  QString tabname;
375  state >> tabname;
376  if (m_d->tabwidget) {
377  for (int i = 0; i < m_d->tabwidget->count(); ++i) {
378  if (m_d->tabwidget->tabText(i) == tabname) {
379  m_d->tabwidget->setCurrentIndex(i);
380  break;
381  }
382  }
383  }
384 
385  // ===> Finish up:
386  buffer.close();
387 }

◆ saveState()

QByteArray IVP12DDetViewsChannelWidget::saveState ( )
virtual

Reimplemented from IVP1ChannelWidget.

Definition at line 290 of file IVP12DDetViewsChannelWidget.cxx.

291 {
292  VP1Msg::messageVerbose("IVP12DDetViewsChannelWidget::saveState");
293  // ===> Setup stream writing to a byteArray:
294  QByteArray byteArray;
295  QBuffer buffer(&byteArray);
296  buffer.open(QIODevice::WriteOnly);
297  QDataStream out(&buffer);
298 
299  // ===> Write Data:
300 
301  //Version & base state:
302  out << (qint32)0; //version
303  out << IVP1ChannelWidget::saveState();//Always include state info from the base class.
304 
305  //Background color:
307 
308  //Systems turned on/off:
309  //Fixme: Make sure that if you have two copies of the same system,
310  //that the text in the checkbox gets appended some stuff like [1],
311  //[2], etc., so that the strings used here will be unique.
312  QMap<QString, bool> sysname2turnedon;
313  QMap<QCheckBox*,IVP1System*>::const_iterator it = m_d->checkbox2system.constBegin();
314  while (it != m_d->checkbox2system.constEnd()) {
315  sysname2turnedon.insert(it.key()->text(),it.key()->isChecked());
316  ++it;
317  }
318 
319  out << sysname2turnedon;
320 
321  //Current system tab:
322  if (m_d->tabwidget)
323  out << m_d->tabwidget->tabText(m_d->tabwidget->currentIndex());
324  else
325  out << QString("");
326 
327  // ===> Finish up:
328  buffer.close();
329  return byteArray;
330 }

◆ setAntiAliasing()

virtual bool IVP1ChannelWidget::setAntiAliasing ( bool  aa)
inlinevirtualinherited

Reimplemented in IVP13DStandardChannelWidget.

Definition at line 104 of file IVP1ChannelWidget.h.

104 {VP1Msg::messageVerbose("You should not call this function directly, but one of its implementations in derived classes..."); return aa; };

◆ setBackgroundColor

void IVP12DDetViewsChannelWidget::setBackgroundColor ( const QColor &  col)
privateslot

Definition at line 258 of file IVP12DDetViewsChannelWidget.cxx.

259 {
260  if (!col.isValid())
261  return;
262  m_d->view_xy->setBackgroundBrush(col);
263  m_d->view_rz->setBackgroundBrush(col);
264 }

◆ setCanRegister()

void IVP1ChannelWidget::setCanRegister ( const bool &  controller,
const bool &  system 
)
privateinherited

Definition at line 299 of file IVP1ChannelWidget.cxx.

300 {
303 }

◆ setCloneID()

void IVP1ChannelWidget::setCloneID ( unsigned  id)
privateinherited

Definition at line 203 of file IVP1ChannelWidget.cxx.

204 {
205  m_d->cloneid=id;
207 }

◆ setEvtTimestamp()

void IVP1ChannelWidget::setEvtTimestamp ( unsigned  timestamp)
protectedinherited

Definition at line 96 of file IVP1ChannelWidget.cxx.

97 {
98  m_d->timestamp = timestamp;
99 }

◆ setRunEvtNumber()

void IVP1ChannelWidget::setRunEvtNumber ( int  runnumber,
unsigned long long  eventnumber 
)
inherited

Definition at line 89 of file IVP1ChannelWidget.cxx.

90 {
92  m_d->eventnumber = eventnumber;
93 }

◆ setState()

void IVP1ChannelWidget::setState ( const State s)
privateinherited

Definition at line 108 of file IVP1ChannelWidget.cxx.

109 {
110 
111 #ifndef NDEBUG
112  assert(s!=CONSTRUCTED);
113  if (s==READY) {
114  assert(m_d->state==CONSTRUCTED);
115  }
116  if (s==UNCREATED) {
117  assert(m_d->state==READY);
118  }
119 #endif
120  m_d->state = s;
121 }

◆ showControlsForSystem

void IVP12DDetViewsChannelWidget::showControlsForSystem ( )
protectedslot

Definition at line 267 of file IVP12DDetViewsChannelWidget.cxx.

268 {
269  if (!m_d->tabwidget)
270  return;
271  IVP1System * sys = static_cast<IVP1System*>(sender());
272  if (!sys) {
273  message("showControlsForSystem Error: Unable to determine system identity.");
274  return;
275  }
276  if (!m_d->sys2tabpage.contains(sys)) {
277  //Dont send warning here. The system in question might simply not have a controller!
278  return;
279  }
280 
281  int index = m_d->tabwidget->indexOf(m_d->sys2tabpage[sys]);
282  if (index<0||!m_d->tabwidget->isTabEnabled(index)) {
283  message("Warning: Asked to show controller for a disabled system. Surely you jest?");
284  return;
285  }
286  m_d->tabwidget->setCurrentIndex(index);
287 }

◆ state()

IVP1ChannelWidget::State IVP1ChannelWidget::state ( ) const
privateinherited

Definition at line 102 of file IVP1ChannelWidget.cxx.

103 {
104  return m_d->state;
105 }

◆ str() [1/30]

static QString VP1String::str ( const Amg::Vector3D t)
inlinestaticinherited

Definition at line 98 of file VP1String.h.

98 { return "("+str(t.x())+", "+str(t.y())+", "+str(t.z())+")"; }

◆ str() [2/30]

static QString VP1String::str ( const bool  b)
inlinestaticinherited

Definition at line 53 of file VP1String.h.

53 { return b?"True":"False"; }

◆ str() [3/30]

static QString VP1String::str ( const char *  c)
inlinestaticinherited

Definition at line 50 of file VP1String.h.

50 { return c; }

◆ str() [4/30]

static QString VP1String::str ( const double &  d)
inlinestaticinherited

Definition at line 81 of file VP1String.h.

81 { return QString::number(d); }

◆ str() [5/30]

static QString VP1String::str ( const float &  f)
inlinestaticinherited

Definition at line 82 of file VP1String.h.

82 { return QString::number(f); }

◆ str() [6/30]

template<class T >
static QString VP1String::str ( const HepGeom::BasicVector3D< T > &  t)
inlinestaticinherited

Definition at line 95 of file VP1String.h.

95 { return "("+str(t.x())+", "+str(t.y())+", "+str(t.z())+")"; }

◆ str() [7/30]

QString VP1String::str ( const QColor &  c)
staticinherited

Definition at line 30 of file VP1String.cxx.

31 {
32  return c.isValid() ? c.name() : "Invalid";
33 }

◆ str() [8/30]

template<class T >
static QString VP1String::str ( const QFlags< T > &  f)
inlinestaticinherited

Definition at line 91 of file VP1String.h.

91 { return "0x"+QString::number(f, 16).toUpper().rightJustified(8,'0'); }

◆ str() [9/30]

template<class T >
static QString VP1String::str ( const QList< T > &  t)
inlinestaticinherited

Definition at line 102 of file VP1String.h.

102 { return "QList of size"+QString::number(t.size()); }

◆ str() [10/30]

static QString VP1String::str ( const QString &  s)
inlinestaticinherited

Definition at line 49 of file VP1String.h.

49 { return s; }

◆ str() [11/30]

QString VP1String::str ( const SbColor &  c)
staticinherited

Definition at line 36 of file VP1String.cxx.

37 {
39 }

◆ str() [12/30]

QString VP1String::str ( const SbVec2d &  v)
staticinherited

Definition at line 61 of file VP1String.cxx.

61 { double x,y; v.getValue(x,y); return "("+str(x)+", "+str(y)+")"; }

◆ str() [13/30]

QString VP1String::str ( const SbVec2f &  v)
staticinherited

Definition at line 62 of file VP1String.cxx.

62 { float x,y; v.getValue(x,y); return "("+str(x)+", "+str(y)+")"; }

◆ str() [14/30]

QString VP1String::str ( const SbVec2s &  v)
staticinherited

Definition at line 63 of file VP1String.cxx.

63 { short x,y; v.getValue(x,y); return "("+str(x)+", "+str(y)+")"; }

◆ str() [15/30]

QString VP1String::str ( const SbVec3d &  v)
staticinherited

Definition at line 64 of file VP1String.cxx.

64 { double x,y,z; v.getValue(x,y,z); return "("+str(x)+", "+str(y)+", "+str(z)+")"; }

◆ str() [16/30]

QString VP1String::str ( const SbVec3f &  v)
staticinherited

Definition at line 65 of file VP1String.cxx.

65 { float x,y,z; v.getValue(x,y,z); return "("+str(x)+", "+str(y)+", "+str(z)+")"; }

◆ str() [17/30]

QString VP1String::str ( const SbVec3s &  v)
staticinherited

Definition at line 66 of file VP1String.cxx.

66 { short x,y,z; v.getValue(x,y,z); return "("+str(x)+", "+str(y)+", "+str(z)+")"; }

◆ str() [18/30]

QString VP1String::str ( const SbVec4d &  v)
staticinherited

Definition at line 67 of file VP1String.cxx.

67 { double x,y,z,t; v.getValue(x,y,z,t); return "("+str(x)+", "+str(y)+", "+str(z)+", "+str(t)+")"; }

◆ str() [19/30]

QString VP1String::str ( const SbVec4f &  v)
staticinherited

Definition at line 68 of file VP1String.cxx.

68 { float x,y,z,t; v.getValue(x,y,z,t); return "("+str(x)+", "+str(y)+", "+str(z)+", "+str(t)+")"; }

◆ str() [20/30]

template<class T >
static QString VP1String::str ( const T *  t)
inlinestaticinherited

Definition at line 87 of file VP1String.h.

87 { return str(static_cast<const void* >(t)); }

◆ str() [21/30]

QString VP1String::str ( const void *  p)
staticinherited

Definition at line 48 of file VP1String.cxx.

49 {
50  if (p) {
51  std::ostringstream s;
52  s << p;
53  // Explicitly naming QString here avoids a cppcheck warning.
54  return QString (s.str().c_str());
55  } else {
56  return "NULL";
57  }
58 }

◆ str() [22/30]

QString VP1String::str ( const VP1Interval i)
staticinherited

Definition at line 42 of file VP1String.cxx.

43 {
44  return i.toString();
45 }

◆ str() [23/30]

static QString VP1String::str ( int  n)
inlinestaticinherited

Definition at line 77 of file VP1String.h.

77 { return QString::number(n); }

◆ str() [24/30]

static QString VP1String::str ( long  n)
inlinestaticinherited

Definition at line 75 of file VP1String.h.

75 { return QString::number(n); }

◆ str() [25/30]

static QString VP1String::str ( qlonglong  n)
inlinestaticinherited

Definition at line 79 of file VP1String.h.

79 { return QString::number(n); }

◆ str() [26/30]

static QString VP1String::str ( qulonglong  n)
inlinestaticinherited

Definition at line 80 of file VP1String.h.

80 { return QString::number(n); }

◆ str() [27/30]

static QString VP1String::str ( short int  n)
inlinestaticinherited

Definition at line 73 of file VP1String.h.

73 { return QString::number(n); }

◆ str() [28/30]

static QString VP1String::str ( uint  n)
inlinestaticinherited

Definition at line 78 of file VP1String.h.

78 { return QString::number(n); }

◆ str() [29/30]

static QString VP1String::str ( ulong  n)
inlinestaticinherited

Definition at line 76 of file VP1String.h.

76 { return QString::number(n); }

◆ str() [30/30]

static QString VP1String::str ( unsigned short int  n)
inlinestaticinherited

Definition at line 74 of file VP1String.h.

74 { return QString::number(n); }

◆ systemErased()

void IVP12DDetViewsChannelWidget::systemErased ( IVP1System )
virtual

Reimplemented from IVP1ChannelWidget.

Definition at line 184 of file IVP12DDetViewsChannelWidget.cxx.

184  {
187 }

◆ systemRefreshed()

void IVP12DDetViewsChannelWidget::systemRefreshed ( IVP1System )
virtual

Reimplemented from IVP1ChannelWidget.

Definition at line 171 of file IVP12DDetViewsChannelWidget.cxx.

171  {
172  if (m_d->first) {
173  //This is not perfect, but usually it gives acceptable results.
174  //Todo: An improvement would be to keep track of the first time
175  //separately, and then only call fitViewToContents on the views
176  //where this system provides collections.
179  m_d->first=false;
180  }
181 }

◆ systemRefreshInfoChanged

void IVP1ChannelWidget::systemRefreshInfoChanged ( QString  sysrefreshing,
int  nsysOn,
int  nsysOnRefreshed 
)
signalinherited

◆ systems()

const std::set< IVP1System * > & IVP1ChannelWidget::systems ( )
privateinherited

Definition at line 231 of file IVP1ChannelWidget.cxx.

232 {
233  return m_d->systems;
234 }

◆ toggleSystemActive

void IVP12DDetViewsChannelWidget::toggleSystemActive ( )
privateslot

Definition at line 190 of file IVP12DDetViewsChannelWidget.cxx.

191 {
192  QCheckBox * cb = static_cast<QCheckBox*>(sender()); assert(cb);
193  m_d->updateSystemState(cb);
194 }

◆ turnOff()

void IVP1ChannelWidget::turnOff ( IVP1System s,
const bool &  immediateErase = true 
)
protectedinherited

Definition at line 246 of file IVP1ChannelWidget.cxx.

247 {
248  assert(s->channel()==this);
249  assert(m_d->systems.find(s)!=m_d->systems.end());
250  s->setActiveState(IVP1System::OFF,!immediateErase);
252 }

◆ turnOn()

void IVP1ChannelWidget::turnOn ( IVP1System s)
protectedinherited

Definition at line 237 of file IVP1ChannelWidget.cxx.

238 {
239  assert(s->channel()==this);
240  assert(m_d->systems.find(s)!=m_d->systems.end());
241  s->setActiveState(IVP1System::ON);
243 }

◆ type()

Type IVP12DDetViewsChannelWidget::type ( ) const
inlinevirtual

Implements IVP1ChannelWidget.

Definition at line 73 of file IVP12DDetViewsChannelWidget.h.

73 { return TWODIMENSIONAL; };

◆ uncreate()

void IVP1ChannelWidget::uncreate ( )
protectedvirtualinherited

Definition at line 155 of file IVP1ChannelWidget.cxx.

156 {
157  assert(m_d->state==READY);
158 }

◆ unique_name()

const QString IVP1ChannelWidget::unique_name ( ) const
inherited

Definition at line 175 of file IVP1ChannelWidget.cxx.

176 {
177  return m_d->name+(m_d->cloneid?" ["+QString::number(m_d->cloneid)+"]":QString(""));//Fixme: make sure that it is forbidden to end a name with ' [.*]'!
178 }

◆ uniqueNameChanged

void IVP1ChannelWidget::uniqueNameChanged ( const QString &  )
signalinherited

Member Data Documentation

◆ m_d

Imp* IVP12DDetViewsChannelWidget::m_d
private

Definition at line 87 of file IVP12DDetViewsChannelWidget.h.


The documentation for this class was generated from the following files:
xAOD::iterator
JetConstituentVector::iterator iterator
Definition: JetConstituentVector.cxx:68
IVP1ChannelWidget::registerSystem
void registerSystem(IVP1System *)
Definition: IVP1ChannelWidget.cxx:221
VP1GraphicsView::clearSelections
void clearSelections()
Definition: VP1GraphicsView.cxx:673
IVP12DDetViewsChannelWidget::DisallowMovable
@ DisallowMovable
Definition: IVP12DDetViewsChannelWidget.h:54
python.CaloRecoConfig.f
f
Definition: CaloRecoConfig.py:127
VP1TabWidget::tabText
QString tabText(int) const
Definition: VP1TabWidget.cxx:291
IVP1ChannelWidget::Imp::canregistersystem
bool canregistersystem
Definition: IVP1ChannelWidget.cxx:39
python.SystemOfUnits.s
int s
Definition: SystemOfUnits.py:131
IVP12DDetViewsChannelWidget::DisallowSelections
@ DisallowSelections
Definition: IVP12DDetViewsChannelWidget.h:51
python.PerfMonSerializer.p
def p
Definition: PerfMonSerializer.py:743
IVP12DDetViewsChannelWidget::StartDisabled
@ StartDisabled
Definition: IVP12DDetViewsChannelWidget.h:55
IVP12DDetViewsChannelWidget::AllowAll
@ AllowAll
Definition: IVP12DDetViewsChannelWidget.h:50
IVP1ChannelWidget::Imp::systems
std::set< IVP1System * > systems
Definition: IVP1ChannelWidget.cxx:35
index
Definition: index.py:1
hist_file_dump.d
d
Definition: hist_file_dump.py:137
IVP1ChannelWidget::contact_info
const QString & contact_info() const
Definition: IVP1ChannelWidget.cxx:191
IVP1ChannelWidget::TWODIMENSIONAL
@ TWODIMENSIONAL
Definition: IVP1ChannelWidget.h:46
VP1ColorSelectButton::setColor
void setColor(const QColor &)
Definition: VP1ColorSelectButton.cxx:95
IVP12DDetViewsChannelWidget::Imp::colorselectbutton
VP1ColorSelectButton * colorselectbutton
Definition: IVP12DDetViewsChannelWidget.cxx:58
IVP1ChannelWidget::Imp::information
const QString information
Definition: IVP1ChannelWidget.cxx:32
fillPileUpNoiseLumi.connect
string connect
Definition: fillPileUpNoiseLumi.py:70
IVP12DDetViewsChannelWidget::Imp::system2switchable
QList< QPair< IVP1System *, bool > > system2switchable
Definition: IVP12DDetViewsChannelWidget.cxx:50
skel.it
it
Definition: skel.GENtoEVGEN.py:423
IVP12DDetViewsSystem::getItemCollections_XY
QSet< VP1GraphicsItemCollection * > getItemCollections_XY() const
Definition: IVP12DDetViewsSystem.cxx:157
IVP1ChannelWidget::registerController
void registerController(QWidget *)
Definition: IVP1ChannelWidget.cxx:210
python.AthDsoLogger.out
out
Definition: AthDsoLogger.py:71
VP12DExaminerViewer::view
VP1GraphicsView * view() const
Definition: VP12DExaminerViewer.cxx:195
IVP1ChannelWidget::NUMBERS
@ NUMBERS
Definition: IVP1ChannelWidget.h:46
IVP12DDetViewsChannelWidget::RZ
@ RZ
Definition: IVP12DDetViewsChannelWidget.h:67
IVP1ChannelWidget::Imp::contact_info
const QString contact_info
Definition: IVP1ChannelWidget.cxx:33
IVP1ChannelWidget::emitRefreshInfoChanged
void emitRefreshInfoChanged()
Definition: IVP1ChannelWidget.cxx:268
IVP1ChannelWidget::HISTOGRAM
@ HISTOGRAM
Definition: IVP1ChannelWidget.h:46
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
IVP12DDetViewsChannelWidget::Imp::checkbox2system
QMap< QCheckBox *, IVP1System * > checkbox2system
Definition: IVP12DDetViewsChannelWidget.cxx:48
Preparation.batch
batch
Definition: Preparation.py:50
IVP1ChannelWidget::unique_name
const QString unique_name() const
Definition: IVP1ChannelWidget.cxx:175
IVP1ChannelWidget::Imp::state
State state
Definition: IVP1ChannelWidget.cxx:37
x
#define x
VP1String::str
static QString str(const QString &s)
Definition: VP1String.h:49
IVP12DDetViewsChannelWidget::m_d
Imp * m_d
Definition: IVP12DDetViewsChannelWidget.h:86
IVP12DDetViewsChannelWidget::Imp::system2startdisabled
QMap< IVP1System *, bool > system2startdisabled
Definition: IVP12DDetViewsChannelWidget.cxx:51
mapkey::sys
@ sys
Definition: TElectronEfficiencyCorrectionTool.cxx:42
IVP1ChannelWidget::systemRefreshInfoChanged
void systemRefreshInfoChanged(QString sysrefreshing, int nsysOn, int nsysOnRefreshed)
TruthTest.itE
itE
Definition: TruthTest.py:25
IVP12DDetViewsChannelWidget::DisallowSwitchable
@ DisallowSwitchable
Definition: IVP12DDetViewsChannelWidget.h:52
IVP1ChannelWidget::Imp::controller
QWidget * controller
Definition: IVP1ChannelWidget.cxx:36
IVP1System
Definition: IVP1System.h:36
createCoolChannelIdFile.buffer
buffer
Definition: createCoolChannelIdFile.py:12
IVP1ChannelWidget::UNKNOWN
@ UNKNOWN
Definition: IVP1ChannelWidget.h:46
lumiFormat.i
int i
Definition: lumiFormat.py:92
VP1GraphicsView::addItemCollection
void addItemCollection(VP1GraphicsItemCollection *)
Definition: VP1GraphicsView.cxx:380
z
#define z
IVP12DDetViewsSystem::getItemCollections_RZ
QSet< VP1GraphicsItemCollection * > getItemCollections_RZ() const
Definition: IVP12DDetViewsSystem.cxx:166
IVP1ChannelWidget::Imp::canregistercontroller
bool canregistercontroller
Definition: IVP1ChannelWidget.cxx:38
IVP1ChannelWidget::CONSTRUCTED
@ CONSTRUCTED
Definition: IVP1ChannelWidget.h:130
beamspotman.n
n
Definition: beamspotman.py:731
VP1GraphicsView::fitViewToContents
void fitViewToContents()
Definition: VP1GraphicsView.cxx:220
IVP1ChannelWidget::UNCREATED
@ UNCREATED
Definition: IVP1ChannelWidget.h:130
VP1GraphicsView::setDisallowMovable
void setDisallowMovable(VP1GraphicsItemCollection *, const bool &disallow=true)
Definition: VP1GraphicsView.cxx:918
IVP1ChannelWidget::Imp::timestamp
unsigned timestamp
Definition: IVP1ChannelWidget.cxx:42
IVP1System::REFRESHED
@ REFRESHED
Definition: IVP1System.h:143
IVP1ChannelWidget::Imp::name
const QString name
Definition: IVP1ChannelWidget.cxx:31
IVP1ChannelWidget::message
void message(QString)
IVP12DDetViewsChannelWidget::toggleSystemActive
void toggleSystemActive()
Definition: IVP12DDetViewsChannelWidget.cxx:190
VP1ColorSelectButton::color
QColor color() const
Definition: VP1ColorSelectButton.cxx:108
python.AtlRunQueryLib.options
options
Definition: AtlRunQueryLib.py:379
VP1GraphicsView::setDisallowInteractions
void setDisallowInteractions(VP1GraphicsItemCollection *, const bool &disallow=true)
Definition: VP1GraphicsView.cxx:901
IVP1ChannelWidget::uniqueNameChanged
void uniqueNameChanged(const QString &)
IVP12DDetViewsChannelWidget::Imp::updateSystemState
void updateSystemState(QCheckBox *)
Definition: IVP12DDetViewsChannelWidget.cxx:197
DeMoScan.runnumber
runnumber
Definition: DeMoScan.py:266
grepfile.ic
int ic
Definition: grepfile.py:33
IVP1System::ON
@ ON
Definition: IVP1System.h:144
VP1QtInventorUtils::sbcol2qcol
static QColor sbcol2qcol(const SbColor &)
Definition: VP1QtInventorUtils.cxx:1140
IVP1ChannelWidget::state
State state() const
Definition: IVP1ChannelWidget.cxx:102
IVP1ChannelWidget::restoreFromState
virtual void restoreFromState(QByteArray)
Definition: IVP1ChannelWidget.cxx:326
IVP1ChannelWidget::saveState
virtual QByteArray saveState()
Definition: IVP1ChannelWidget.cxx:320
IVP12DDetViewsChannelWidget::Imp::view_rz
VP1GraphicsView * view_rz
Definition: IVP12DDetViewsChannelWidget.cxx:43
IVP1ChannelWidget::IVP1ChannelWidget
IVP1ChannelWidget(const QString &name, const QString &information, const QString &contact_info)
Definition: IVP1ChannelWidget.cxx:46
id
SG::auxid_t id
Definition: Control/AthContainers/Root/debug.cxx:194
python.selection.number
number
Definition: selection.py:20
plotBeamSpotMon.b
b
Definition: plotBeamSpotMon.py:77
IVP1ChannelWidget::Imp::eventnumber
unsigned long long eventnumber
Definition: IVP1ChannelWidget.cxx:41
IVP12DDetViewsChannelWidget::Imp::channel
IVP12DDetViewsChannelWidget * channel
Definition: IVP12DDetViewsChannelWidget.cxx:41
VP1Msg::messageVerbose
static void messageVerbose(const QString &)
Definition: VP1Msg.cxx:84
IVP1ChannelWidget::Imp::runnumber
int runnumber
Definition: IVP1ChannelWidget.cxx:40
IVP12DDetViewsChannelWidget::setBackgroundColor
void setBackgroundColor(const QColor &)
Definition: IVP12DDetViewsChannelWidget.cxx:258
query_example.col
col
Definition: query_example.py:7
IVP12DDetViewsChannelWidget::Imp::system2itemcols
QMap< IVP12DSystem *, QSet< VP1GraphicsItemCollection * > > system2itemcols
Definition: IVP12DDetViewsChannelWidget.cxx:46
python.PyAthena.v
v
Definition: PyAthena.py:157
get_generator_info.version
version
Definition: get_generator_info.py:33
y
#define y
Base_Fragment.width
width
Definition: Sherpa_i/share/common/Base_Fragment.py:59
VP1ControllerHelper::compositionController
static QWidget * compositionController(const QList< IVP1System * > &systemsWithControllersAllowed, QMap< IVP1System *, QWidget * > &sys2tabpage, VP1TabWidget *&tabwidget, const QList< QPair< IVP1System *, bool > > &system2switchable, QMap< QCheckBox *, IVP1System * > &checkbox2system, VP1ColorSelectButton *&colorselectbutton, QWidget *extrawidget=0, bool nobgdcolorsel=false)
Definition: VP1ControllerHelper.cxx:28
IVP12DDetViewsChannelWidget::DisallowController
@ DisallowController
Definition: IVP12DDetViewsChannelWidget.h:53
IVP1ChannelWidget::READY
@ READY
Definition: IVP1ChannelWidget.h:130
IVP12DDetViewsChannelWidget::Imp::view_xy
VP1GraphicsView * view_xy
Definition: IVP12DDetViewsChannelWidget.cxx:42
IVP12DDetViewsChannelWidget::showControlsForSystem
void showControlsForSystem()
Definition: IVP12DDetViewsChannelWidget.cxx:267
IVP1ChannelWidget::Imp::cloneid
unsigned cloneid
Definition: IVP1ChannelWidget.cxx:34
IVP1ChannelWidget::name
const QString & name() const
Definition: IVP1ChannelWidget.cxx:180
IVP12DDetViewsChannelWidget::Imp::sys2tabpage
QMap< IVP1System *, QWidget * > sys2tabpage
Definition: IVP12DDetViewsChannelWidget.cxx:55
IVP12DDetViewsChannelWidget::Imp::systemsAllowedControllers
QList< IVP1System * > systemsAllowedControllers
Definition: IVP12DDetViewsChannelWidget.cxx:49
IVP1ChannelWidget::m_d
Imp * m_d
Definition: IVP1ChannelWidget.h:119
VP1GraphicsItemCollection
Definition: VP1GraphicsItemCollection.h:53
python.IoTestsLib.w
def w
Definition: IoTestsLib.py:200
IVP1ChannelWidget::THREEDIMENSIONAL
@ THREEDIMENSIONAL
Definition: IVP1ChannelWidget.h:46
test_AnalysisBaseEventLoopJob.aa
aa
Definition: test_AnalysisBaseEventLoopJob.py:37
VP12DExaminerViewer
Definition: VP12DExaminerViewer.h:26
python.compressB64.c
def c
Definition: compressB64.py:93
IVP12DDetViewsChannelWidget::Imp::first
bool first
Definition: IVP12DDetViewsChannelWidget.cxx:44
IVP12DDetViewsChannelWidget::XY
@ XY
Definition: IVP12DDetViewsChannelWidget.h:67
IVP1System::OFF
@ OFF
Definition: IVP1System.h:144
IVP1ChannelWidget::information
const QString & information() const
Definition: IVP1ChannelWidget.cxx:185
IVP12DDetViewsChannelWidget::Imp::tabwidget
VP1TabWidget * tabwidget
Definition: IVP12DDetViewsChannelWidget.cxx:56