ATLAS Offline Software
VolumeTreeModel.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 #include <QColor>
7 #include <cassert>
8 #include <iostream>
9 #include <utility>
10 
12 //NB: Since the QModelIndices uses void pointers, the VolumeHandle,
13 //SectionInfo and SubSystem classes must derive from the same
14 //base class before we know which class we can cast to.
15 //
16 //In order to not add any unnecessary overhead to VolumeHandle (which
17 //has a copy of the entire GeoModel tree), we let SectionInfo and
18 //SubSystem both inherit from VolumeHandle, and we use the
19 //m_childNumber field (which is always non-negative for actual
20 //VolumeHandles) of VolumeHandle to indicate the type:
21 //
22 // -2: SectionInfo
23 // -1: SubSystem
24 // 0+: Regular VolumeHandle
25 //
26 // This is taken care of by the constructors of the two derived
27 // classes, and four helper methods below makes the conversions a
28 // breeze (even though its a bit hackish behind the scenes)
30 
31 //____________________________________________________________________
33 public:
34  //Static definitions of sections and which subsystems goes in which sections:
36  static std::map<SECTION,QString> section2string;
37  static std::map<VP1GeoFlags::SubSystemFlag,SECTION> subsysflag2section;
38  static std::map<VP1GeoFlags::SubSystemFlag,QString> subsysflag2string;
40 
41  //Class for the dynamic information of a given subsystem:
42  class SectionInfo;
43  class SubSystem: public VolumeHandle {
44  public:
46  : VolumeHandle(0,0, GeoPVConstLink(), -1),
47  section(si), subsysflag(sf) {}
49  VolumeHandle::VolumeHandleListItr volItr, volItrE(volhandlelist.end());
50  for (volItr = volhandlelist.begin();volItr!=volItrE;++volItr)
51  delete (*volItr);//This is where volume handles are deleted
52  }
53  //
57  QString name;
58  };
59  //lists/maps for the added subsystems:
60  std::map<VP1GeoFlags::SubSystemFlag,SubSystem*> flag2subsystems;
61  //Map to quickly find subsystem from volumehandle. Only contains volumehandles from enabled subsystems:
62  std::map<VolumeHandle*,SubSystem*> volhandle2subsystem;
63 
64  //Class for the dynamic information about sections and their daughter subsystems:
65  class SectionInfo: public VolumeHandle {
66  public:
67  SectionInfo(SECTION sf): VolumeHandle(0,0, GeoPVConstLink(), -2),sectionflag(sf) {}
68  //
70  QList<SubSystem*> enabledSubSystems;
71  QList<SubSystem*> disabledSubSystems;
72  QString name;
73  };
74  //Lists of these sections:
75  QList<SectionInfo*> allSections;
76  QList<SectionInfo*> activeSections;
77 
78  //Convenience methods for dealing with the void pointers from the QModelIndices:
79  static VolumeHandle* handlePointer(const QModelIndex& idx) { return static_cast<VolumeHandle*>(idx.internalPointer()); }
80  static bool isSectionInfoPointer(VolumeHandle* handle) { return handle->childNumber()==-2; }
81  static bool isSubSystemPointer(VolumeHandle* handle) { return handle->childNumber()==-1; }
82  static bool isRegularVolumeHandle(VolumeHandle* handle) { return handle->childNumber()>=0; }
83  static SectionInfo * sectionInfoPointer (VolumeHandle* handle) { return handle->childNumber()==-2 ? static_cast<SectionInfo*>(handle) : 0; }
84  static SubSystem * subSystemPointer (VolumeHandle* handle) { return handle->childNumber()==-1 ? static_cast<SubSystem*>(handle) : 0; }
87 
88 };
89 
90 //Static variables:
91 std::map<VolumeTreeModel::Imp::SECTION,QString> VolumeTreeModel::Imp::section2string;
92 std::map<VP1GeoFlags::SubSystemFlag,VolumeTreeModel::Imp::SECTION> VolumeTreeModel::Imp::subsysflag2section;
93 std::map<VP1GeoFlags::SubSystemFlag,QString> VolumeTreeModel::Imp::subsysflag2string;
94 
95 //____________________________________________________________________
97 {
98  Imp::subsysflag2section[subsysflag] = section;
99  Imp::subsysflag2string[subsysflag] = std::move(subsysname);
100 }
101 
102 //____________________________________________________________________
104  : QAbstractItemModel(parent), m_d(new Imp())
105 {
106  if (Imp::section2string.empty()) {
107  Imp::section2string[Imp::UNKNOWN] = "Unknown";
108  Imp::section2string[Imp::INDET] = "Inner Detector";
109  Imp::section2string[Imp::CALO] = "Calorimeters";
110  Imp::section2string[Imp::MUON] = "Muon Spectrometer";
111  Imp::section2string[Imp::MISC] = "Miscellaneous";
112  }
115  // Inner Detector
122  // Calorimeters
125  //Toroids
127  Imp::defineSubSystem(VP1GeoFlags::ToroidECA,"Toroid EndCap side A",Imp::MUON);
128  Imp::defineSubSystem(VP1GeoFlags::ToroidECC,"Toroid EndCap side C",Imp::MUON);
129  // Structure
133  // Muon chambers
141  // Beam Pipe
143  // FWD detectors
147  // Cavern
149  }
150 }
151 
152 //____________________________________________________________________
154 {
155  //This is where we delete all SectionInfo/SubSystem pointers (and thus also all VolumeHandles):
157  for (it = m_d->flag2subsystems.begin();it!=itE;++it)
158  disableSubSystem(it->first);
159  for (it = m_d->flag2subsystems.begin();it!=itE;++it)
160  delete it->second;
162  delete section;
163 }
164 
165 //____________________________________________________________________
167 {
168  delete m_d;
169 }
170 
171 //____________________________________________________________________
173  const VolumeHandle::VolumeHandleList& roothandles )
174 {
175  //NB: This method does not need to be super-fast, thus we do a lot
176  //of not-so-fast iterations over maps/lists rather than keep extra
177  //maps/lists around.
178 
179  //Check whether we added this subsystem already:
180  bool found(false);
182  for(Imp::SubSystem* subsys : (section->enabledSubSystems+section->disabledSubSystems)) {
183  if (subsys->subsysflag==flag) {
184  found=true;
185  break;
186  }
187  }
188  }
189 
190  if (found) {
191  std::cout<<"VolumeTreeModel::addSubSystem Error: System has already been added!"<<std::endl;
192  return;
193  }
194 
195  //Determine section flag:
196  Imp::SECTION sectionflag;
198  std::cout<<"VolumeTreeModel::addSubSystem Error: Unknown system flag! Please update the code!"<<std::endl;
199  sectionflag=Imp::UNKNOWN;
200  } else {
201  sectionflag=Imp::subsysflag2section[flag];
202  }
203 
204  //Find the section belonging to the system (create a new one if
205  //needed - i.e. if this is the first subsystem in a given section):
207  found = false;
208  for(Imp::SectionInfo* sec : m_d->allSections) {
209  if (sec->sectionflag==sectionflag) {
210  //std::cout << "added section: " << sec->sectionflag << std::endl;
211  section = sec;
212  break;
213  }
214  }
215 
216  if (!section) {
217  section = new Imp::SectionInfo(sectionflag);
218  //section->sectionflag = sectionflag;
219  if (Imp::section2string.find(sectionflag)==Imp::section2string.end())
220  section->name = "Unknown Section Flag";
221  else
222  section->name = Imp::section2string[sectionflag];
224  //We dont add it to m_d->activeSections since the subsystem (and
225  //thus the section since it has no other subsystems) is considered
226  //disabled until enabled by a call to enableSubSystem().
227  }
228 
229  //Create SubSystem instance for this subsystem and give it the roothandles:
230  Imp::SubSystem * subsys = new Imp::SubSystem(section,flag);
231  //subsys->section = section;
232  //subsys->subsysflag = flag;
234  subsys->name = "Unknown subsystem flag";
235  else
236  subsys->name = Imp::subsysflag2string[flag];
237  subsys->volhandlelist = roothandles;
238 
239  //Add the subsystem pointer to the relevant maps:
240  section->disabledSubSystems << subsys;
241  m_d->flag2subsystems[flag]=subsys;
242 }
243 
244 //____________________________________________________________________
246 {
247  beginResetModel(); // see: http://doc.qt.io/qt-5/qabstractitemmodel-obsolete.html
248 
249  //Check the subsystem was added previously:
250  if (m_d->flag2subsystems.find(flag)==m_d->flag2subsystems.end()) {
251  std::cout<<"VolumeTreeModel::enableSubSystem Error: System never added!"<<std::endl;
252  return;
253  }
254  Imp::SubSystem * subsys = m_d->flag2subsystems[flag];
255  //Find the appropriate section:
257  for(Imp::SectionInfo* sec : m_d->allSections) {
258  if (sec->enabledSubSystems.contains(subsys)) {
259  //It is already enabled
260  assert(!sec->disabledSubSystems.contains(subsys));
261  return;
262  }
263  if (sec->disabledSubSystems.contains(subsys)) {
264  assert(!sec->enabledSubSystems.contains(subsys));
265  section=sec;
266  break;
267  }
268  }
269  assert(section);
270  if (!section) {
271  std::cout<<"VolumeTreeModel::enableSubSystem Error: Did not find section of subsystem!."<<std::endl;
272  return;
273  }
274  //Move the subsystem from the disabled to the enabled list:
275  section->enabledSubSystems << subsys;//Fixme: Ordering.
276  section->disabledSubSystems.removeAll(subsys);
277  //If the newly added subsystem is the only enabled subsystem, the section needs to be enabled as well:
278  if (section->enabledSubSystems.count()==1) {
279  assert(!m_d->activeSections.contains(section));
280  m_d->activeSections << section;//Fixme: Ordering.
281  }
282  //Put volume handle pointers into quick subsystem access map:
283  for (VolumeHandle* volhandle : subsys->volhandlelist ) {
284  m_d->volhandle2subsystem[volhandle] = subsys;
285  }
286 
287  endResetModel();
288 
289 }
290 
291 //____________________________________________________________________
293 {
294  beginResetModel(); // see: http://doc.qt.io/qt-5/qabstractitemmodel-obsolete.html
295 
296  //If it was not even added previously we can just return:
297  if (m_d->flag2subsystems.find(flag)==m_d->flag2subsystems.end())
298  return;
299 
300  Imp::SubSystem * subsys = m_d->flag2subsystems[flag];
301  //Find the appropriate section:
303  for(Imp::SectionInfo* sec : m_d->allSections) {
304  if (sec->disabledSubSystems.contains(subsys)) {
305  //It is already disabled
306  assert(!sec->enabledSubSystems.contains(subsys));
307  return;
308  }
309  if (sec->enabledSubSystems.contains(subsys)) {
310  assert(!sec->disabledSubSystems.contains(subsys));
311  section=sec;
312  break;
313  }
314  }
315  assert(section);
316  if (!section) {
317  std::cout<<"VolumeTreeModel::disableSubSystem Error: Did not find section of subsystem!."<<std::endl;
318  return;
319  }
320 
321  //Move the subsystem from the enabled to the disabled list:
322  section->disabledSubSystems << subsys;
323  section->enabledSubSystems.removeAll(subsys);
324  //If the newly disabled subsystem was the only enabled subsystem, the section needs to be disabled as well:
325  if (section->enabledSubSystems.count()==0) {
326  assert(m_d->activeSections.contains(section));
327  m_d->activeSections.removeAll(section);
328  }
329 
330  //Remove volume handle pointers from quick subsystem access map:
331  for (VolumeHandle* volhandle : subsys->volhandlelist ) {
332  Q_ASSERT(m_d->volhandle2subsystem.find(volhandle)!=m_d->volhandle2subsystem.end());
333  m_d->volhandle2subsystem.erase(m_d->volhandle2subsystem.find(volhandle));
334  }
335 
336  endResetModel();
337 // reset();//Fixme: use proper insert rows/colums/etc. instead!
338 }
339 
340 //____________________________________________________________________
341 void VolumeTreeModel::getRootHandles(std::vector<std::pair<VolumeHandle::VolumeHandleListItr,VolumeHandle::VolumeHandleListItr> >& out) const
342 {
343  out.clear();
344  out.reserve(m_d->flag2subsystems.size());
346  for (it = m_d->flag2subsystems.begin();it!=itE;++it)
347  out.push_back(std::pair<VolumeHandle::VolumeHandleListItr,VolumeHandle::VolumeHandleListItr>
348  (it->second->volhandlelist.begin(),it->second->volhandlelist.end()));
349 
350 }
351 
352 //____________________________________________________________________
353 QModelIndex VolumeTreeModel::index(int row, int column, const QModelIndex &parent) const
354 {
355  //Check that row and column are in allowed ranges (positive and within row/column count of parent):
356  if (!hasIndex(row, column, parent))
357  return QModelIndex();
358 
359  if (!parent.isValid()) {
360  //We must return the index of a section label:
361  Q_ASSERT(row<m_d->activeSections.count());
362  return createIndex(row, column, m_d->activeSections.at(row));
363  }
364 
365  VolumeHandle * parentHandle = Imp::handlePointer(parent);
366 
367  if (Imp::isRegularVolumeHandle(parentHandle)) {
368  if (!parentHandle->childrenAreInitialised())
369  parentHandle->initialiseChildren();//Fixme: It seems that it is occasionally necessary to do this. Why?? Why not fetchMore??
370  VolumeHandle * childHandle = parentHandle->child(row);
371  Q_ASSERT(childHandle);
372  return createIndex(row, column, childHandle);
373  }
374 
375  if (Imp::isSubSystemPointer(parentHandle)) {
376  //Return index of top-level volume:
377  Q_ASSERT(unsigned(row)<Imp::subSystemPointer(parentHandle)->volhandlelist.size());
378  return createIndex(row, column, Imp::subSystemPointer(parentHandle)->volhandlelist.at(row));
379  }
380 
381  //Must be SectionInfo:
382  Q_ASSERT(Imp::isSectionInfoPointer(parentHandle));
383  Q_ASSERT(row<Imp::sectionInfoPointer(parentHandle)->enabledSubSystems.count());
384  return createIndex(row, column, Imp::sectionInfoPointer(parentHandle)->enabledSubSystems.at(row));
385 }
386 
387 //____________________________________________________________________
388 QModelIndex VolumeTreeModel::parent(const QModelIndex& index) const
389 {
390  if (!index.isValid())
391  return QModelIndex();
392 
393  //See if we have a volumeHandle as index:
394  VolumeHandle *childHandle = Imp::handlePointer(index);
395 
396  if (Imp::isRegularVolumeHandle(childHandle)) {
397  VolumeHandle *parentHandle = childHandle->parent();
398  if (parentHandle)
399  return createIndex(parentHandle->childNumber(), 0, parentHandle);
400 
401  //childHandle has 0 parent pointer => parent must be a subsystem label:
402  Q_ASSERT(m_d->volhandle2subsystem.find(childHandle)!=m_d->volhandle2subsystem.end());
403  Imp::SubSystem * subsys = m_d->volhandle2subsystem[childHandle];
404  Q_ASSERT(subsys);
405  Q_ASSERT(subsys->section->enabledSubSystems.contains(subsys));
406  return createIndex(subsys->section->enabledSubSystems.indexOf(subsys), 0, subsys);
407  }
408 
409 
410  if (Imp::isSubSystemPointer(childHandle)) {
411  //Index is a SubSystem => parent must be a section label:
412  Q_ASSERT(m_d->activeSections.contains(Imp::subSystemPointer(childHandle)->section));
413  return createIndex(m_d->activeSections.indexOf(Imp::subSystemPointer(childHandle)->section), 0, Imp::subSystemPointer(childHandle)->section);
414  }
415 
416  //Must be SectionInfo => parent is root (i.e. invalid):
417  Q_ASSERT(Imp::isSectionInfoPointer(childHandle));
418  return QModelIndex();
419 }
420 
421 //____________________________________________________________________
422 int VolumeTreeModel::rowCount(const QModelIndex& parent) const
423 {
424  if (parent.column() > 0)
425  return 0;
426 
427  if (!parent.isValid())
428  return m_d->activeSections.size();//Number of active sections
429 
430  VolumeHandle * parentHandle = Imp::handlePointer(parent);
431 
432  if (Imp::isRegularVolumeHandle(parentHandle)) {
433  return parentHandle->nChildren();
434  }
435 
436  if (Imp::isSubSystemPointer(parentHandle)) {
437  return Imp::subSystemPointer(parentHandle)->volhandlelist.size();
438  }
439 
440  //Must be SectionInfo pointer:
441  Q_ASSERT(Imp::isSectionInfoPointer(parentHandle));
442  return Imp::sectionInfoPointer(parentHandle)->enabledSubSystems.count();
443 }
444 
445 //____________________________________________________________________
446 QVariant VolumeTreeModel::data(const QModelIndex& index, int role) const
447 {
448  if ((role!=Qt::DisplayRole&&role!=Qt::ForegroundRole)||!index.isValid())
449  return QVariant();
450 
451  VolumeHandle *volumeHandle = Imp::handlePointer(index);
452  if (Imp::isRegularVolumeHandle(volumeHandle)) {
453  if (role==Qt::ForegroundRole) {
454  if (volumeHandle->isAttached())
455  return QVariant();
456  else
457  return QColor::fromRgbF( 0.5, 0.5, 0.5 );
458  }
459  //DisplayRole:
460  if (volumeHandle->nChildren()>1)
461  return volumeHandle->getName()+" ["+QString::number(volumeHandle->nChildren())+"]";
462  else
463  return volumeHandle->getName();
464  }
465 
466  if (role==Qt::ForegroundRole)
467  return QVariant();
468 
469  if (Imp::isSubSystemPointer(volumeHandle))
470  return Imp::subSystemPointer(volumeHandle)->name;
471 
472  Q_ASSERT(Imp::isSectionInfoPointer(volumeHandle));
473  return Imp::sectionInfoPointer(volumeHandle)->name;
474 }
475 
476 
477 //____________________________________________________________________
478 Qt::ItemFlags VolumeTreeModel::flags(const QModelIndex &index) const
479 {
480  if (!index.isValid())
481  return Qt::ItemFlags();
482 
484  return Qt::ItemIsEnabled | Qt::ItemIsSelectable;
485  else
486  return Qt::ItemIsEnabled;
487 }
488 
489 //____________________________________________________________________
490 QVariant VolumeTreeModel::headerData(int /*section*/, Qt::Orientation /*orientation*/,int /*role*/) const
491 {
492  return QVariant();
493 }
494 
495 //____________________________________________________________________
496 bool VolumeTreeModel::canFetchMore( const QModelIndex & parent ) const
497 {
498  if (!parent.isValid())
499  return false;
500 
501  VolumeHandle * parentHandle = Imp::handlePointer(parent);
502 
503  if (Imp::isRegularVolumeHandle(parentHandle)&&!parentHandle->childrenAreInitialised())
504  return true;
505 
506  return false;
507 }
508 
509 //____________________________________________________________________
510 void VolumeTreeModel::fetchMore( const QModelIndex & parent )
511 {
512  if (!parent.isValid())
513  return;//should probably never happen
514 
515  VolumeHandle* parentHandle = Imp::handlePointer(parent);
516 
517  if (Imp::isRegularVolumeHandle(parentHandle)&&!parentHandle->childrenAreInitialised()) {
518  // beginInsertRows(parent,0,int(parentHandle->nChildren())-1);
519  parentHandle->initialiseChildren();
520  layoutChanged();//fixme??
521  // endInsertRows();
522  return;
523  }
524 }
525 
526 //____________________________________________________________________
527 bool VolumeTreeModel::hasChildren ( const QModelIndex & parent ) const
528 {
529  return rowCount(parent)>0;//Our rowCount is relatively fast (no looping to count).
530 }
xAOD::iterator
JetConstituentVector::iterator iterator
Definition: JetConstituentVector.cxx:68
VP1GeoFlags::MuonBarrelStationInner
@ MuonBarrelStationInner
Definition: VP1GeoFlags.h:42
query_example.row
row
Definition: query_example.py:24
VP1GeoFlags::ToroidECA
@ ToroidECA
Definition: VP1GeoFlags.h:58
VP1GeoFlags::MuonShielding
@ MuonShielding
Definition: VP1GeoFlags.h:62
find
std::string find(const std::string &s)
return a remapped string
Definition: hcg.cxx:135
VolumeTreeModel::Imp::defineSubSystem
static void defineSubSystem(VP1GeoFlags::SubSystemFlag, QString, SECTION)
Definition: VolumeTreeModel.cxx:96
VolumeTreeModel::Imp::SectionInfo::disabledSubSystems
QList< SubSystem * > disabledSubSystems
Definition: VolumeTreeModel.cxx:71
VolumeTreeModel::Imp::isRegularVolumeHandle
static bool isRegularVolumeHandle(VolumeHandle *handle)
Definition: VolumeTreeModel.cxx:82
VolumeTreeModel::Imp::SubSystem::SubSystem
SubSystem(SectionInfo *si, VP1GeoFlags::SubSystemFlag sf)
Definition: VolumeTreeModel.cxx:45
index
Definition: index.py:1
VolumeTreeModel::fetchMore
void fetchMore(const QModelIndex &parent)
Definition: VolumeTreeModel.cxx:510
VP1GeoFlags::InDetServMat
@ InDetServMat
Definition: VP1GeoFlags.h:37
VolumeTreeModel::parent
QModelIndex parent(const QModelIndex &) const
Definition: VolumeTreeModel.cxx:388
VP1GeoFlags::ToroidECC
@ ToroidECC
Definition: VP1GeoFlags.h:60
VolumeTreeModel::index
QModelIndex index(int, int, const QModelIndex &) const
Definition: VolumeTreeModel.cxx:353
VP1GeoFlags::Pixel
@ Pixel
Definition: VP1GeoFlags.h:34
VolumeTreeModel::Imp::section2string
static std::map< SECTION, QString > section2string
Definition: VolumeTreeModel.cxx:36
VolumeTreeModel::Imp::sectionInfoPointer
static SectionInfo * sectionInfoPointer(VolumeHandle *handle)
Definition: VolumeTreeModel.cxx:83
CSV_InDetExporter.new
new
Definition: CSV_InDetExporter.py:145
VolumeTreeModel::Imp::SubSystem
Definition: VolumeTreeModel.cxx:43
skel.it
it
Definition: skel.GENtoEVGEN.py:423
VP1GeoFlags::BeamPipe
@ BeamPipe
Definition: VP1GeoFlags.h:52
python.AthDsoLogger.out
out
Definition: AthDsoLogger.py:71
VolumeHandle::child
VolumeHandle * child(int index) const
Definition: VolumeHandle.h:150
VolumeTreeModel::Imp::SubSystem::section
SectionInfo * section
Definition: VolumeTreeModel.cxx:54
DeMoUpdate.column
dictionary column
Definition: DeMoUpdate.py:1110
VolumeTreeModel::Imp::allSections
QList< SectionInfo * > allSections
Definition: VolumeTreeModel.cxx:75
VolumeTreeModel::Imp::SubSystem::subsysflag
VP1GeoFlags::SubSystemFlag subsysflag
Definition: VolumeTreeModel.cxx:55
VolumeTreeModel::headerData
QVariant headerData(int section, Qt::Orientation orientation, int role) const
Definition: VolumeTreeModel.cxx:490
VolumeTreeModel::Imp::flag2subsystems
std::map< VP1GeoFlags::SubSystemFlag, SubSystem * > flag2subsystems
Definition: VolumeTreeModel.cxx:60
VolumeTreeModel::Imp::SubSystem::name
QString name
Definition: VolumeTreeModel.cxx:57
VolumeTreeModel::disableSubSystem
void disableSubSystem(VP1GeoFlags::SubSystemFlag flag)
Definition: VolumeTreeModel.cxx:292
VolumeTreeModel::Imp::SectionInfo::enabledSubSystems
QList< SubSystem * > enabledSubSystems
Definition: VolumeTreeModel.cxx:70
VolumeHandle::parent
VolumeHandle * parent()
Definition: VolumeHandle.h:144
VolumeTreeModel::Imp
Definition: VolumeTreeModel.cxx:32
empty
bool empty(TH1 *h)
Definition: computils.cxx:294
VolumeTreeModel::Imp::INDET
@ INDET
Definition: VolumeTreeModel.cxx:35
VP1GeoFlags::MuonFeet
@ MuonFeet
Definition: VP1GeoFlags.h:61
VolumeHandle::childrenAreInitialised
bool childrenAreInitialised() const
Definition: VolumeHandle.h:146
VolumeTreeModel::Imp::SubSystem::volhandlelist
VolumeHandle::VolumeHandleList volhandlelist
Definition: VolumeTreeModel.cxx:56
TruthTest.itE
itE
Definition: TruthTest.py:25
VP1GeoFlags::MuonToroidsEtc
@ MuonToroidsEtc
Definition: VP1GeoFlags.h:63
mergePhysValFiles.end
end
Definition: DataQuality/DataQualityUtils/scripts/mergePhysValFiles.py:93
VolumeTreeModel::getRootHandles
void getRootHandles(std::vector< std::pair< VolumeHandle::VolumeHandleListItr, VolumeHandle::VolumeHandleListItr > > &) const
Definition: VolumeTreeModel.cxx:341
VP1GeoFlags::MuonEndcapStationNSW
@ MuonEndcapStationNSW
Definition: VP1GeoFlags.h:65
VolumeTreeModel::canFetchMore
bool canFetchMore(const QModelIndex &parent) const
Definition: VolumeTreeModel.cxx:496
VP1GeoFlags::MuonEndcapStationCSC
@ MuonEndcapStationCSC
Definition: VP1GeoFlags.h:46
VP1GeoFlags::ForwardRegion
@ ForwardRegion
Definition: VP1GeoFlags.h:66
VolumeTreeModel::Imp::handlePointer
static VolumeHandle * handlePointer(const QModelIndex &idx)
Definition: VolumeTreeModel.cxx:79
VolumeTreeModel::Imp::SectionInfo::name
QString name
Definition: VolumeTreeModel.cxx:72
VolumeTreeModel::enableSubSystem
void enableSubSystem(VP1GeoFlags::SubSystemFlag flag)
Definition: VolumeTreeModel.cxx:245
VP1GeoFlags::MuonEndcapStationMDT
@ MuonEndcapStationMDT
Definition: VP1GeoFlags.h:49
VolumeTreeModel::Imp::CALO
@ CALO
Definition: VolumeTreeModel.cxx:35
master.flag
bool flag
Definition: master.py:29
VolumeTreeModel::Imp::SectionInfo::SectionInfo
SectionInfo(SECTION sf)
Definition: VolumeTreeModel.cxx:67
VolumeTreeModel::Imp::UNKNOWN
@ UNKNOWN
Definition: VolumeTreeModel.cxx:35
VolumeTreeModel.h
VolumeTreeModel::Imp::MISC
@ MISC
Definition: VolumeTreeModel.cxx:35
VP1GeoFlags::LAr
@ LAr
Definition: VP1GeoFlags.h:39
VP1GeoFlags::MuonEndcapStationTGC
@ MuonEndcapStationTGC
Definition: VP1GeoFlags.h:47
test_pyathena.parent
parent
Definition: test_pyathena.py:15
VolumeHandle::initialiseChildren
void initialiseChildren()
Definition: VolumeHandle.cxx:136
VolumeHandle::nChildren
unsigned nChildren() const
Definition: VolumeHandle.h:149
VolumeTreeModel::addSubSystem
void addSubSystem(VP1GeoFlags::SubSystemFlag flag, const VolumeHandle::VolumeHandleList &roothandles)
Definition: VolumeTreeModel.cxx:172
VolumeTreeModel::Imp::SECTION
SECTION
Definition: VolumeTreeModel.cxx:35
VolumeHandle
Definition: VolumeHandle.h:21
VP1GeoFlags::None
@ None
Definition: VP1GeoFlags.h:32
VolumeHandle::VolumeHandleList
std::vector< VolumeHandle * > VolumeHandleList
Definition: VolumeHandle.h:64
VolumeTreeModel::flags
Qt::ItemFlags flags(const QModelIndex &index) const
Definition: VolumeTreeModel.cxx:478
VolumeTreeModel::cleanup
void cleanup()
Definition: VolumeTreeModel.cxx:153
python.selection.number
number
Definition: selection.py:20
VolumeHandle::childNumber
int childNumber() const
Definition: VolumeHandle.h:151
VolumeHandle::getName
QString getName() const
Definition: VolumeHandle.cxx:169
VolumeTreeModel::data
QVariant data(const QModelIndex &, int) const
Definition: VolumeTreeModel.cxx:446
VolumeTreeModel::Imp::SectionInfo
Definition: VolumeTreeModel.cxx:65
VolumeTreeModel::rowCount
int rowCount(const QModelIndex &) const
Definition: VolumeTreeModel.cxx:422
VP1GeoFlags::LUCID
@ LUCID
Definition: VP1GeoFlags.h:55
VolumeTreeModel::Imp::volhandle2subsystem
std::map< VolumeHandle *, SubSystem * > volhandle2subsystem
Definition: VolumeTreeModel.cxx:62
VP1GeoFlags::MuonBarrelStationMiddle
@ MuonBarrelStationMiddle
Definition: VP1GeoFlags.h:44
VolumeTreeModel::Imp::subsysflag2string
static std::map< VP1GeoFlags::SubSystemFlag, QString > subsysflag2string
Definition: VolumeTreeModel.cxx:38
CondAlgsOpts.found
int found
Definition: CondAlgsOpts.py:101
VolumeHandle::isAttached
bool isAttached() const
Definition: VolumeHandle.cxx:501
mapkey::sf
@ sf
Definition: TElectronEfficiencyCorrectionTool.cxx:38
VolumeTreeModel::VolumeTreeModel
VolumeTreeModel(QObject *parent=0)
Definition: VolumeTreeModel.cxx:103
VolumeTreeModel::Imp::activeSections
QList< SectionInfo * > activeSections
Definition: VolumeTreeModel.cxx:76
VolumeHandle::VolumeHandleListItr
VolumeHandleList::iterator VolumeHandleListItr
Definition: VolumeHandle.h:65
LArNewCalib_DelayDump_OFC_Cali.idx
idx
Definition: LArNewCalib_DelayDump_OFC_Cali.py:69
VP1GeoFlags::MuonBarrelStationOuter
@ MuonBarrelStationOuter
Definition: VP1GeoFlags.h:45
VolumeTreeModel::hasChildren
bool hasChildren(const QModelIndex &parent=QModelIndex()) const
Definition: VolumeTreeModel.cxx:527
VP1GeoFlags::SubSystemFlag
SubSystemFlag
Definition: VP1GeoFlags.h:30
VP1GeoFlags::BarrelToroid
@ BarrelToroid
Definition: VP1GeoFlags.h:41
VolumeTreeModel::Imp::MUON
@ MUON
Definition: VolumeTreeModel.cxx:35
VolumeTreeModel::Imp::SubSystem::~SubSystem
~SubSystem()
Definition: VolumeTreeModel.cxx:48
VolumeTreeModel::Imp::subsysflag2section
static std::map< VP1GeoFlags::SubSystemFlag, SECTION > subsysflag2section
Definition: VolumeTreeModel.cxx:37
VP1GeoFlags::SCT
@ SCT
Definition: VP1GeoFlags.h:35
section
void section(const std::string &sec)
Definition: TestTriggerMenuAccess.cxx:22
VolumeTreeModel::Imp::SectionInfo::sectionflag
SECTION sectionflag
Definition: VolumeTreeModel.cxx:69
VolumeTreeModel::Imp::subSystemPointer
static SubSystem * subSystemPointer(VolumeHandle *handle)
Definition: VolumeTreeModel.cxx:84
VolumeTreeModel::~VolumeTreeModel
virtual ~VolumeTreeModel()
Definition: VolumeTreeModel.cxx:166
VP1GeoFlags::CavernInfra
@ CavernInfra
Definition: VP1GeoFlags.h:51
VolumeTreeModel::Imp::isSubSystemPointer
static bool isSubSystemPointer(VolumeHandle *handle)
Definition: VolumeTreeModel.cxx:81
VP1GeoFlags::ZDC
@ ZDC
Definition: VP1GeoFlags.h:56
VolumeTreeModel::m_d
Imp * m_d
Definition: VolumeTreeModel.h:46
VP1GeoFlags::TRT
@ TRT
Definition: VP1GeoFlags.h:36
VolumeTreeModel::Imp::isSectionInfoPointer
static bool isSectionInfoPointer(VolumeHandle *handle)
Definition: VolumeTreeModel.cxx:80
VP1GeoFlags::Tile
@ Tile
Definition: VP1GeoFlags.h:40