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

#include <AscObjSelectionManager.h>

Inheritance diagram for AscObjSelectionManager:
Collaboration diagram for AscObjSelectionManager:

Classes

class  Imp
 

Public Types

enum  MODE { SINGLE, TOGGLE, SHIFT }
 

Signals

void currentSelectionChanged (const QList< AssociatedObjectHandleBase * > &)
 

Public Member Functions

 AscObjSelectionManager (SoSeparator *eventRoot, IVP13DSystem *, TrackSystemController *)
 
void aboutTodelete ()
 
virtual ~AscObjSelectionManager ()
 
SoSeparator * getAscObjAttachSep () const
 
MODE mode () const
 
void setMode (MODE)
 
void pretendUserClicked (AssociatedObjectHandleBase *)
 
void ensureDeselected (const QList< AssociatedObjectHandleBase * > &)
 
void ensureSelected (const QList< AssociatedObjectHandleBase * > &)
 
void deselectAll ()
 
QList< AssociatedObjectHandleBase * > currentSelection () const
 
SoSeparator * eventRoot ()
 
void setSystemBasePointer (IVP1System *sys)
 
void message (const QString &) const
 
void message (const QStringList &, const QString &addtoend="") const
 
void message (const QString &addtostart, const QStringList &, const QString &addtoend="") const
 
void messageDebug (const QString &) const
 
void messageDebug (const QStringList &, const QString &addtoend="") const
 
void messageDebug (const QString &addtostart, const QStringList &, const QString &addtoend="") const
 
void messageVerbose (const QString &) const
 
void messageVerbose (const QStringList &, const QString &addtoend="") const
 
void messageVerbose (const QString &addtostart, const QStringList &, const QString &addtoend="") const
 
IVP1SystemsystemBase () const
 
QString helperClassName () const
 

Static Public Member Functions

static QString toString (MODE)
 
static bool verbose ()
 
static void warnUndeletedInstances ()
 
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 Member Functions

void setHelperClassName (const QString &n)
 

Private Slots

void ascObjDetailLevelChanged ()
 

Private Member Functions

bool handleUserSelectedSingleNode (SoCooperativeSelection *, SoNode *, SoPath *, AssociatedObjectHandleBase *&)
 
void userClickedOnBgd ()
 
void registerAscObj (SoSeparator *simple, SoSeparator *detailed, AssociatedObjectHandleBase *)
 
void unregisterAscObj (SoSeparator *simple, SoSeparator *detailed)
 

Private Attributes

Impm_d
 
QString m_helpername
 
IVP1Systemm_system
 

Static Private Attributes

static const bool s_vp1verbose = VP1QtUtils::environmentVariableIsOn("VP1_VERBOSE_OUTPUT")
 

Friends

class VP1TrackSystem
 
class AssociatedObjectHandleBase
 

Detailed Description

Definition at line 37 of file AscObjSelectionManager.h.

Member Enumeration Documentation

◆ MODE

Enumerator
SINGLE 
TOGGLE 
SHIFT 

Definition at line 52 of file AscObjSelectionManager.h.

52 { SINGLE, TOGGLE, SHIFT };

Constructor & Destructor Documentation

◆ AscObjSelectionManager()

AscObjSelectionManager::AscObjSelectionManager ( SoSeparator *  eventRoot,
IVP13DSystem sys,
TrackSystemController controller 
)

Definition at line 89 of file AscObjSelectionManager.cxx.

90  : QObject(sys), VP1HelperClassBase(sys,"AscObjSelectionManager"), m_d(new Imp(this,event_root,sys,controller))
91 {
92  connect(controller,SIGNAL(assocObjDetailLevelChanged(TrackCommonFlags::DETAILLEVEL)),this,SLOT(ascObjDetailLevelChanged()));
94 }

◆ ~AscObjSelectionManager()

AscObjSelectionManager::~AscObjSelectionManager ( )
virtual

Definition at line 103 of file AscObjSelectionManager.cxx.

104 {
105  //Fixme: sanity check that maps are cleared.
106  delete m_d;
107 }

Member Function Documentation

◆ aboutTodelete()

void AscObjSelectionManager::aboutTodelete ( )

Definition at line 97 of file AscObjSelectionManager.cxx.

98 {
99  //fixme: clear maps and emit signals!
100 }

◆ ascObjDetailLevelChanged

void AscObjSelectionManager::ascObjDetailLevelChanged ( )
privateslot

Definition at line 381 of file AscObjSelectionManager.cxx.

382 {
383  messageVerbose("Signal received in ascObjDetailLevelChanged slot");
384  if (m_d->selAscObjHandles.isEmpty()) {
385  m_d->sel_assocobjs->deselectAll();
386  return;
387  }
388  const SoPathList * pathlist = m_d->sel_assocobjs->getList();
389  if (!pathlist||pathlist->getLength()!=m_d->selAscObjHandles.count())
390  return;
391 
392  const bool isSimpleMode = (m_d->controller->assocObjDetailLevel()==TrackCommonFlags::SIMPLE);
393  int i(0);
395  SoPath * path = (*pathlist)[i++];
396  if (!path)
397  continue;
399  (isSimpleMode?handle->shapeSimple():handle->shapeDetailed()))) {
400  message("Warning: Failed to relocate picked node.");
401  deselectAll();
402  return;
403  }
404  }
405 }

◆ currentSelection()

QList< AssociatedObjectHandleBase * > AscObjSelectionManager::currentSelection ( ) const

Definition at line 408 of file AscObjSelectionManager.cxx.

409 {
410  return m_d->selAscObjHandles;
411 }

◆ currentSelectionChanged

void AscObjSelectionManager::currentSelectionChanged ( const QList< AssociatedObjectHandleBase * > &  )
signal

◆ deselectAll()

void AscObjSelectionManager::deselectAll ( )

Definition at line 326 of file AscObjSelectionManager.cxx.

327 {
328  if (m_d->selAscObjHandles.isEmpty())
329  return;
330  m_d->selAscObjHandles.clear();
333 }

◆ ensureDeselected()

void AscObjSelectionManager::ensureDeselected ( const QList< AssociatedObjectHandleBase * > &  handles)

Definition at line 336 of file AscObjSelectionManager.cxx.

337 {
338  if (handles.isEmpty())
339  return;
340  QList<AssociatedObjectHandleBase*> selHandlesBefore = m_d->selAscObjHandles;
341  for (AssociatedObjectHandleBase*handle : handles)
342  m_d->selAscObjHandles.removeAll(handle);
343  if (selHandlesBefore!=m_d->selAscObjHandles) {
346  }
347 }

◆ ensureSelected()

void AscObjSelectionManager::ensureSelected ( const QList< AssociatedObjectHandleBase * > &  handles)

Definition at line 350 of file AscObjSelectionManager.cxx.

351 {
352  if (handles.isEmpty())
353  return;
354  if (m_d->mode==SINGLE) {
355  //Single selections
356  if (handles.count()>1)
357  message("WARNING: ensureSelected called with more than one handle in SINGLE mode. Ignoring all but the first.");
358  if (m_d->selAscObjHandles.contains(handles.at(0)))
359  return;
360  m_d->selAscObjHandles.clear();
361  m_d->selAscObjHandles << handles.at(0);
364  } else {
365  //Multi selections allowed
366  QList<AssociatedObjectHandleBase*> selHandlesBefore = m_d->selAscObjHandles;
367  for (AssociatedObjectHandleBase*handle : handles) {
368  if (!m_d->selAscObjHandles.contains(handle))
369  m_d->selAscObjHandles << handle;
370  }
372  if (selHandlesBefore!=m_d->selAscObjHandles) {
375  }
376  }
377 
378 }

◆ eventRoot()

SoSeparator * AscObjSelectionManager::eventRoot ( )

Definition at line 413 of file AscObjSelectionManager.cxx.

414 {
415  return m_d->eventRoot;
416 }

◆ getAscObjAttachSep()

SoSeparator * AscObjSelectionManager::getAscObjAttachSep ( ) const

Definition at line 135 of file AscObjSelectionManager.cxx.

136 {
137  return m_d->sel_assocobjs_click;
138 }

◆ handleUserSelectedSingleNode()

bool AscObjSelectionManager::handleUserSelectedSingleNode ( SoCooperativeSelection sel,
SoNode *  ,
SoPath *  pickedPath,
AssociatedObjectHandleBase *&  pickedHandle 
)
private

Definition at line 233 of file AscObjSelectionManager.cxx.

234 {
235  messageVerbose("handleUserSelectedSingleNode");
236  pickedHandle = nullptr;
237  if (sel==m_d->sel_assocobjs) {
238  messageVerbose(" => ignore selections for m_d->sel_assocobjs");
239  return true;//We simply ignore those
240  }
241  if (sel!=m_d->sel_assocobjs_click) {
242  messageVerbose(" => We don't handle this selection.");
243  return false;
244  }
245 
246  AssociatedObjectHandleBase* handle = m_d->ascObjHandle(pickedPath);
247  m_d->sel_assocobjs_click->deselectAll();
248  if (!handle) {
249  message("ERROR: Unknown associated object.");
250  return true;
251  }
252  messageVerbose(" => Found handle. Mode is "+toString(m_d->mode)+", and number of previously selected handles is "+str(m_d->selAscObjHandles.count()));
253  pickedHandle = handle;
254  pretendUserClicked(handle);//we are not really pretending in this case of course...
255  return true;
256 }

◆ helperClassName()

QString VP1HelperClassBase::helperClassName ( ) const
inlineinherited

Definition at line 51 of file VP1HelperClassBase.h.

51 { return m_helpername; }

◆ message() [1/3]

void VP1HelperClassBase::message ( const QString &  str) const
inherited

Definition at line 49 of file VP1HelperClassBase.cxx.

50 {
51  if (m_helpername.isEmpty()) {
52  if (m_system)
54  else
55  std::cout<<VP1Msg::prefix_msg()<<" [nameless helper class]: "<<str.toStdString()<<std::endl;
56  } else {
57  if (m_system)
58  m_system->message("["+m_helpername+"] " + str);
59  else
60  std::cout<<VP1Msg::prefix_msg()<<" ["<<m_helpername.toStdString()<<"]: "<<str.toStdString()<<std::endl;
61  }
62 }

◆ message() [2/3]

void VP1HelperClassBase::message ( const QString &  addtostart,
const QStringList &  l,
const QString &  addtoend = "" 
) const
inherited

Definition at line 131 of file VP1HelperClassBase.cxx.

132 {
133  if (addtostart.isEmpty()) {
134  message(l,addtoend);
135  return;
136  }
137  if (addtoend.isEmpty()) {
138  for (QString s : l)
139  message(addtostart+s);
140  } else {
141  for (QString s : l)
142  message(addtostart+s+addtoend);
143  }
144 }

◆ message() [3/3]

void VP1HelperClassBase::message ( const QStringList &  l,
const QString &  addtoend = "" 
) const
inherited

Definition at line 91 of file VP1HelperClassBase.cxx.

92 {
93  if (addtoend.isEmpty()) {
94  for (QString s : l)
95  message(s);
96  } else {
97  for (QString s : l)
98  message(s+addtoend);
99  }
100 }

◆ messageDebug() [1/3]

void VP1HelperClassBase::messageDebug ( const QString &  str) const
inherited

Definition at line 65 of file VP1HelperClassBase.cxx.

66 {
67  if (!VP1Msg::debug())
68  return;
69  std::string sysstring(m_system ? " in "+m_system->name().toStdString() : std::string(""));
70  if (m_helpername.isEmpty()) {
71  std::cout<<VP1Msg::prefix_debug()<<" [helper"<<sysstring<<"]: "<<str.toStdString()<<std::endl;
72  } else {
73  std::cout<<VP1Msg::prefix_debug()<<" ["<<m_helpername.toStdString()<<sysstring<<"]: "<<str.toStdString()<<std::endl;
74  }
75 }

◆ messageDebug() [2/3]

void VP1HelperClassBase::messageDebug ( const QString &  addtostart,
const QStringList &  l,
const QString &  addtoend = "" 
) const
inherited

Definition at line 147 of file VP1HelperClassBase.cxx.

148 {
149  if (!VP1Msg::debug())
150  return;
151  if (addtostart.isEmpty()) {
152  messageDebug(l,addtoend);
153  return;
154  }
155  if (addtoend.isEmpty()) {
156  for (QString s : l)
157  messageDebug(addtostart+s);
158  } else {
159  for (QString s : l)
160  messageDebug(addtostart+s+addtoend);
161  }
162 }

◆ messageDebug() [3/3]

void VP1HelperClassBase::messageDebug ( const QStringList &  l,
const QString &  addtoend = "" 
) const
inherited

Definition at line 103 of file VP1HelperClassBase.cxx.

104 {
105  if (!VP1Msg::debug())
106  return;
107  if (addtoend.isEmpty()) {
108  for (QString s : l)
109  messageDebug(s);
110  } else {
111  for (QString s : l)
112  messageDebug(s+addtoend);
113  }
114 }

◆ messageVerbose() [1/3]

void VP1HelperClassBase::messageVerbose ( const QString &  str) const
inherited

Definition at line 78 of file VP1HelperClassBase.cxx.

79 {
80  if (!VP1Msg::verbose())
81  return;
82  std::string sysstring(m_system ? " in "+m_system->name().toStdString() : std::string(""));
83  if (m_helpername.isEmpty()) {
84  std::cout<<VP1Msg::prefix_verbose()<<" [helper"<<sysstring<<"]: "<<str.toStdString()<<std::endl;
85  } else {
86  std::cout<<VP1Msg::prefix_verbose()<<" ["<<m_helpername.toStdString()<<sysstring<<"]: "<<str.toStdString()<<std::endl;
87  }
88 }

◆ messageVerbose() [2/3]

void VP1HelperClassBase::messageVerbose ( const QString &  addtostart,
const QStringList &  l,
const QString &  addtoend = "" 
) const
inherited

Definition at line 165 of file VP1HelperClassBase.cxx.

166 {
167  if (!VP1Msg::verbose())
168  return;
169  if (addtostart.isEmpty()) {
170  messageVerbose(l,addtoend);
171  return;
172  }
173  if (addtoend.isEmpty()) {
174  for (QString s : l)
175  messageVerbose(addtostart+s);
176  } else {
177  for (QString s : l)
178  messageVerbose(addtostart+s+addtoend);
179  }
180 }

◆ messageVerbose() [3/3]

void VP1HelperClassBase::messageVerbose ( const QStringList &  l,
const QString &  addtoend = "" 
) const
inherited

Definition at line 117 of file VP1HelperClassBase.cxx.

118 {
119  if (!VP1Msg::verbose())
120  return;
121  if (addtoend.isEmpty()) {
122  for (QString s : l)
123  messageVerbose(s);
124  } else {
125  for (QString s : l)
126  messageVerbose(s+addtoend);
127  }
128 }

◆ mode()

AscObjSelectionManager::MODE AscObjSelectionManager::mode ( ) const

Definition at line 119 of file AscObjSelectionManager.cxx.

120 {
121  return m_d->mode;
122 }

◆ pretendUserClicked()

void AscObjSelectionManager::pretendUserClicked ( AssociatedObjectHandleBase handle)

Definition at line 259 of file AscObjSelectionManager.cxx.

260 {
261  assert(handle);
262  if (!handle)
263  return;
264  const bool alreadyselected = m_d->selAscObjHandles.contains(handle);
266  QList<AssociatedObjectHandleBase*> selHandlesBefore = m_d->selAscObjHandles;
267 
268  if (m_d->mode==SINGLE) {
269  if (m_d->selAscObjHandles.isEmpty()) {
270  //Add handle to selection.
271  m_d->selAscObjHandles << handle;
273  m_d->system->message(handle->clicked());
274  } else {
275  //Clear selection.
276  m_d->selAscObjHandles.clear();
277  //Add if not already selected:
278  if (!alreadyselected) {
279  m_d->selAscObjHandles << handle;
281  m_d->system->message(handle->clicked());
282  }
283  }
284  } else if (m_d->mode==SHIFT) {
285  if (Imp::shiftIsDown()) {
286  if (alreadyselected)
287  m_d->selAscObjHandles.removeAll(handle);
288  else
289  m_d->selAscObjHandles << handle;
290  } else {
291  m_d->selAscObjHandles.clear();
292  if (!alreadyselected)
293  m_d->selAscObjHandles << handle;
294  }
295  } else if (m_d->mode==TOGGLE) {
296  if (alreadyselected) {
297  m_d->selAscObjHandles.removeAll(handle);
298  } else {
299  m_d->selAscObjHandles << handle;
300  }
301  } else {
302  message("ERROR: Should not happen!");
303  deselectAll();
304  return;
305  }
307 
308  if (selHandlesBefore!=m_d->selAscObjHandles) {
311  }
312 }

◆ registerAscObj()

void AscObjSelectionManager::registerAscObj ( SoSeparator *  simple,
SoSeparator *  detailed,
AssociatedObjectHandleBase handle 
)
private

Definition at line 140 of file AscObjSelectionManager.cxx.

141 {
142  if (VP1Msg::verbose()) {
143  if (!simple||!detailed||!handle) {
144  message("registerAscObj ERROR: Received null pointer!");
145  return;
146  }
148  itE = m_d->ascobjs_simpleToHandle.end();
149  for (it=m_d->ascobjs_simpleToHandle.begin();it!=itE;++it) {
150  if (it->first==simple||it->second==handle)
151  message("registerAscObj ERROR: Simple separator/handle already registered!");
152  }
154  for (it=m_d->ascobjs_detailedToHandle.begin();it!=itE;++it) {
155  if (it->first==detailed||it->second==handle)
156  message("registerAscObj ERROR: Detailed separator/handle already registered!");
157  }
158  }
159  m_d->ascobjs_simpleToHandle[simple]=handle;
160  m_d->ascobjs_detailedToHandle[detailed]=handle;
161 }

◆ setHelperClassName()

void VP1HelperClassBase::setHelperClassName ( const QString &  n)
inlineprotectedinherited

Definition at line 59 of file VP1HelperClassBase.h.

59 { m_helpername = n; }

◆ setMode()

void AscObjSelectionManager::setMode ( MODE  m)

Definition at line 125 of file AscObjSelectionManager.cxx.

126 {
127  if (m_d->mode==m)
128  return;
129  message("Mode changed to "+toString(m));
130  m_d->mode=m;
131 }

◆ setSystemBasePointer()

void VP1HelperClassBase::setSystemBasePointer ( IVP1System sys)
inherited

Definition at line 197 of file VP1HelperClassBase.cxx.

198 {
199  m_system = sys;
200  if (VP1Msg::verbose()){
201  vp1helperclassbase_instanceMap[this] = (m_system?m_system->name():QString(""));
202  }
203 }

◆ 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); }

◆ systemBase()

IVP1System* VP1HelperClassBase::systemBase ( ) const
inlineinherited

Definition at line 50 of file VP1HelperClassBase.h.

50 { return m_system; }

◆ toString()

QString AscObjSelectionManager::toString ( MODE  m)
static

Definition at line 110 of file AscObjSelectionManager.cxx.

111 {
112  if (m==SINGLE) return "SINGLE";
113  else if (m==TOGGLE) return "TOGGLE";
114  else if (m==SHIFT) return "SHIFT";
115  else return "UNKNOWN(ERROR)";
116 }

◆ unregisterAscObj()

void AscObjSelectionManager::unregisterAscObj ( SoSeparator *  simple,
SoSeparator *  detailed 
)
private

Definition at line 164 of file AscObjSelectionManager.cxx.

165 {
166  if (VP1Msg::verbose()) {
167  if (!simple||!detailed) {
168  message("unregisterAscObj ERROR: Received null pointer!");
169  return;
170  }
171  }
173  if (itSimple==m_d->ascobjs_simpleToHandle.end()) {
174  message("unregisterAscObj ERROR: Not previously registered simple sep!");
175  } else {
176  m_d->ascobjs_simpleToHandle.erase(itSimple);
177  }
179  if (itDetailed==m_d->ascobjs_detailedToHandle.end()) {
180  message("unregisterAscObj ERROR: Not previously registered detailed sep!");
181  } else {
182  m_d->ascobjs_detailedToHandle.erase(itDetailed);
183  }
184 }

◆ userClickedOnBgd()

void AscObjSelectionManager::userClickedOnBgd ( )
private

Definition at line 316 of file AscObjSelectionManager.cxx.

317 {
318  if (m_d->mode==TOGGLE)
319  return;
320  if (m_d->mode==SHIFT&&Imp::shiftIsDown())
321  return;
322  deselectAll();
323 }

◆ verbose()

static bool VP1HelperClassBase::verbose ( )
inlinestaticinherited

Definition at line 32 of file VP1HelperClassBase.h.

32 { return s_vp1verbose; } // Returns true if env var VP1_VERBOSE_OUTPUT=1

◆ warnUndeletedInstances()

void VP1HelperClassBase::warnUndeletedInstances ( )
staticinherited

Definition at line 183 of file VP1HelperClassBase.cxx.

184 {
185  if (vp1helperclassbase_instanceMap.empty())
186  return;
187  std::cout << "WARNING: Detected "<<vp1helperclassbase_instanceMap.size()<<" undeleted helper class instances:"<<std::endl;
188 
189  std::map<VP1HelperClassBase*,QString>::iterator it,itE(vp1helperclassbase_instanceMap.end());
190  for (it = vp1helperclassbase_instanceMap.begin();it!=itE;++it) {
191  std::cout << " ==> "<<it->first<<": "<<it->first->m_helpername.toStdString()
192  << (it->second.isEmpty()?QString(""):" (in system "+it->second+")").toStdString()<<std::endl;
193  }
194 }

Friends And Related Function Documentation

◆ AssociatedObjectHandleBase

friend class AssociatedObjectHandleBase
friend

Definition at line 85 of file AscObjSelectionManager.h.

◆ VP1TrackSystem

friend class VP1TrackSystem
friend

Definition at line 72 of file AscObjSelectionManager.h.

Member Data Documentation

◆ m_d

Imp* AscObjSelectionManager::m_d
private

Definition at line 95 of file AscObjSelectionManager.h.

◆ m_helpername

QString VP1HelperClassBase::m_helpername
privateinherited

Definition at line 67 of file VP1HelperClassBase.h.

◆ m_system

IVP1System* VP1HelperClassBase::m_system
privateinherited

Definition at line 68 of file VP1HelperClassBase.h.

◆ s_vp1verbose

const bool VP1HelperClassBase::s_vp1verbose = VP1QtUtils::environmentVariableIsOn("VP1_VERBOSE_OUTPUT")
staticprivateinherited

Definition at line 69 of file VP1HelperClassBase.h.


The documentation for this class was generated from the following files:
xAOD::iterator
JetConstituentVector::iterator iterator
Definition: JetConstituentVector.cxx:68
python.SystemOfUnits.second
int second
Definition: SystemOfUnits.py:120
AssociatedObjectHandleBase
Definition: AssociatedObjectHandleBase.h:35
AscObjSelectionManager::deselectAll
void deselectAll()
Definition: AscObjSelectionManager.cxx:326
AscObjSelectionManager::Imp::system
IVP13DSystem * system
Definition: AscObjSelectionManager.cxx:67
python.SystemOfUnits.s
int s
Definition: SystemOfUnits.py:131
python.SystemOfUnits.m
int m
Definition: SystemOfUnits.py:91
athena.path
path
python interpreter configuration --------------------------------------—
Definition: athena.py:128
TrackCommonFlags::SIMPLE
@ SIMPLE
Definition: TrackCommonFlags.h:39
AscObjSelectionManager::toString
static QString toString(MODE)
Definition: AscObjSelectionManager.cxx:110
AscObjSelectionManager::Imp::ascObjHandle
AssociatedObjectHandleBase * ascObjHandle(const SoPath *)
Definition: AscObjSelectionManager.cxx:187
hist_file_dump.d
d
Definition: hist_file_dump.py:137
AscObjSelectionManager::TOGGLE
@ TOGGLE
Definition: AscObjSelectionManager.h:52
VP1HelperClassBase::m_helpername
QString m_helpername
Definition: VP1HelperClassBase.h:67
VP1HelperClassBase::messageVerbose
void messageVerbose(const QString &) const
Definition: VP1HelperClassBase.cxx:78
AscObjSelectionManager::Imp::selAscObjHandles
QList< AssociatedObjectHandleBase * > selAscObjHandles
Definition: AscObjSelectionManager.cxx:79
AscObjSelectionManager::Imp::sel_assocobjs_click
SoCooperativeSelection * sel_assocobjs_click
Definition: AscObjSelectionManager.cxx:70
VP1HelperClassBase::s_vp1verbose
static const bool s_vp1verbose
Definition: VP1HelperClassBase.h:69
fillPileUpNoiseLumi.connect
string connect
Definition: fillPileUpNoiseLumi.py:70
AscObjSelectionManager::SINGLE
@ SINGLE
Definition: AscObjSelectionManager.h:52
skel.it
it
Definition: skel.GENtoEVGEN.py:396
TrackSystemController::assocObjDetailLevel
TrackCommonFlags::DETAILLEVEL assocObjDetailLevel() const
Definition: TrackSystemController.cxx:1764
VP1Msg::debug
static bool debug()
Definition: VP1Msg.h:32
UploadAMITag.l
list l
Definition: UploadAMITag.larcaf.py:158
VP1HelperClassBase::m_system
IVP1System * m_system
Definition: VP1HelperClassBase.h:68
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
x
#define x
VP1String::str
static QString str(const QString &s)
Definition: VP1String.h:49
AscObjSelectionManager::m_d
Imp * m_d
Definition: AscObjSelectionManager.h:94
VP1HelperClassBase::messageDebug
void messageDebug(const QString &) const
Definition: VP1HelperClassBase.cxx:65
mapkey::sys
@ sys
Definition: TElectronEfficiencyCorrectionTool.cxx:42
TruthTest.itE
itE
Definition: TruthTest.py:25
AscObjSelectionManager::pretendUserClicked
void pretendUserClicked(AssociatedObjectHandleBase *)
Definition: AscObjSelectionManager.cxx:259
AscObjSelectionManager::Imp::ascobjs_simpleToHandle
std::map< SoSeparator *, AssociatedObjectHandleBase * > ascobjs_simpleToHandle
Definition: AscObjSelectionManager.cxx:73
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
VP1Msg::prefix_msg
static const char * prefix_msg()
Definition: VP1Msg.h:56
lumiFormat.i
int i
Definition: lumiFormat.py:85
z
#define z
beamspotman.n
n
Definition: beamspotman.py:731
sel
sel
Definition: SUSYToolsTester.cxx:97
AscObjSelectionManager::ascObjDetailLevelChanged
void ascObjDetailLevelChanged()
Definition: AscObjSelectionManager.cxx:381
IVP1System::name
const QString & name() const
Definition: IVP1System.cxx:50
hist_file_dump.f
f
Definition: hist_file_dump.py:135
AscObjSelectionManager::Imp::updateSelectionVisuals
void updateSelectionVisuals()
Definition: AscObjSelectionManager.cxx:213
TrackSystemController::printInfoOnSingleSelection
bool printInfoOnSingleSelection() const
Definition: TrackSystemController.cxx:1969
AscObjSelectionManager::Imp::eventRoot
SoSeparator * eventRoot
Definition: AscObjSelectionManager.cxx:66
VP1QtInventorUtils::sbcol2qcol
static QColor sbcol2qcol(const SbColor &)
Definition: VP1QtInventorUtils.cxx:1142
python.selection.number
number
Definition: selection.py:20
plotBeamSpotMon.b
b
Definition: plotBeamSpotMon.py:77
VP1Msg::prefix_debug
static const char * prefix_debug()
Definition: VP1Msg.h:57
python.PyAthena.v
v
Definition: PyAthena.py:154
VP1Msg::prefix_verbose
static const char * prefix_verbose()
Definition: VP1Msg.h:59
y
#define y
AscObjSelectionManager::Imp::controller
TrackSystemController * controller
Definition: AscObjSelectionManager.cxx:68
AscObjSelectionManager::SHIFT
@ SHIFT
Definition: AscObjSelectionManager.h:52
std::sort
void sort(typename std::reverse_iterator< DataModel_detail::iterator< DVL > > beg, typename std::reverse_iterator< DataModel_detail::iterator< DVL > > end, const Compare &comp)
Specialization of sort for DataVector/List.
Definition: DVL_algorithms.h:623
AscObjSelectionManager::Imp::mode
MODE mode
Definition: AscObjSelectionManager.cxx:69
AssociatedObjectHandleBase::shapeSimple
SoSeparator * shapeSimple() const
Definition: AssociatedObjectHandleBase.cxx:200
VP1HelperClassBase::message
void message(const QString &) const
Definition: VP1HelperClassBase.cxx:49
TrackCommonFlags::DETAILLEVEL
DETAILLEVEL
Definition: TrackCommonFlags.h:39
str
Definition: BTagTrackIpAccessor.cxx:11
AscObjSelectionManager::Imp::shiftIsDown
static bool shiftIsDown()
Definition: AscObjSelectionManager.cxx:82
AssociatedObjectHandleBase::shapeDetailed
SoSeparator * shapeDetailed() const
Definition: AssociatedObjectHandleBase.cxx:206
VP1Msg::verbose
static bool verbose()
Definition: VP1Msg.h:31
AssociatedObjectHandleBase::clicked
virtual QStringList clicked()=0
VP1HelperClassBase::VP1HelperClassBase
VP1HelperClassBase(IVP1System *sys=0, QString helpername="")
Definition: VP1HelperClassBase.cxx:28
AscObjSelectionManager::Imp::ascobjs_detailedToHandle
std::map< SoSeparator *, AssociatedObjectHandleBase * > ascobjs_detailedToHandle
Definition: AscObjSelectionManager.cxx:74
python.compressB64.c
def c
Definition: compressB64.py:93
AscObjSelectionManager::currentSelectionChanged
void currentSelectionChanged(const QList< AssociatedObjectHandleBase * > &)
AscObjSelectionManager::Imp::sel_assocobjs
SoCooperativeSelection * sel_assocobjs
Definition: AscObjSelectionManager.cxx:71
VP1QtInventorUtils::changePathTail
static bool changePathTail(SoPath *path, SoNode *commonBranchPoint, SoNode *newtail)
Definition: VP1QtInventorUtils.cxx:1348
IVP1System::message
void message(const QString &) const
Definition: IVP1System.cxx:336