ATLAS Offline Software
Loading...
Searching...
No Matches
VP1GeometrySystem Class Reference

#include <VP1GeometrySystem.h>

Inheritance diagram for VP1GeometrySystem:
Collaboration diagram for VP1GeometrySystem:

Classes

class  Imp

Public Types

typedef std::set< SoCamera * > CamList
typedef CamList::iterator CamListItr
enum  State { CONSTRUCTED =0 , REFRESHED , ERASED , UNCREATED }
enum  ActiveState { ON =0 , OFF }

Public Slots

void reiconizeToShowSpecificMuonChambers (const std::set< GeoPVConstLink > &)
void orientViewToMuonChamber (const GeoPVConstLink &chamberPV)
void setCurvedSurfaceRealism (int)
void muonChamberT0sChanged (const std::map< GeoPVConstLink, float > &, int)
 The map is the dt0 per chamber, plus a label identifier, which by convention (!) is 0=Moore, 1=Muonboy.

Signals

void appropriateMDTProjectionsChanged (int)
void plotSpectrum (QStack< QString > &, int copyNumber=-1)
void itemFromSystemSelected ()
void sysmessage (QString) const
void inactiveSystemTurnedActive ()
void needErase ()

Public Member Functions

 VP1GeometrySystem (const VP1GeoFlags::SubSystemFlags &SubSystemsTurnedOn=VP1GeoFlags::None, const QString &name="Geo")
virtual ~VP1GeometrySystem ()
void setGeometrySelectable (bool)
void setZoomToVolumeOnClick (bool)
void setOrientViewToMuonChambersOnClick (bool)
void setAutoAdaptMuonChambersToEventData (bool)
QWidget * buildController ()
void systemcreate (StoreGateSvc *detstore)
void buildPermanentSceneGraph (StoreGateSvc *detstore, SoSeparator *root)
void buildEventSceneGraph (StoreGateSvc *, SoSeparator *)
void userPickedNode (SoNode *pickedNode, SoPath *pickedPath)
void systemuncreate ()
QByteArray saveState ()
void restoreFromState (QByteArray)
void enableMuonChamberLabels (bool, bool)
 first is t0s, 2nd is hits
void ensureBuildController ()
void updateGUI ()
virtual void systemerase ()
void warnOnDisabledNotifications () const
void registerCamera (SoCamera *camera)
void registerViewer (SoQtViewer *viewer)
void registerSelectionNode (SoCooperativeSelection *)
void unregisterSelectionNode (SoCooperativeSelection *)
void setUserSelectionNotificationsEnabled (SoCooperativeSelection *selsel, bool enabled)
virtual void userSelectedSingleNode (SoCooperativeSelection *, SoNode *, SoPath *)
virtual void userDeselectedSingleNode (SoCooperativeSelection *, SoNode *, SoPath *)
virtual void userChangedSelection (SoCooperativeSelection *, const QSet< SoNode * > &, QSet< SoPath * >)
virtual void userClickedOnBgd ()
virtual void deselectAll (SoCooperativeSelection *exception_sel=0)
CamList getCameraList ()
virtual QWidget * buildExtraDisplayWidget ()
const QString & name () const
const QString & information () const
const QString & contact_info () const
QWidget * controllerWidget ()
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
StoreGateSvc * storeGate () const
StoreGateSvc * eventStore () const
StoreGateSvc * detectorStore () const
ISvcLocator * serviceLocator () const
IToolSvc * toolSvc () const
State state () const
ActiveState activeState () const

Static Public Member Functions

static bool verbose ()
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 Slots

void checkboxChanged ()
void updateTransparency ()
void adaptMuonChambersToEventData ()
void adaptMuonChambersStyleChanged ()
void emit_appropriateMDTProjectionsChanged ()
void autoAdaptPixelsOrSCT (bool, bool, bool, bool, bool, bool)
void autoAdaptMuonNSW (bool reset, bool stgc, bool mm, bool passiveSpacer, bool passiveStructure, bool passiveAPlate)
void autoAdaptHGTD (bool reset, bool modules, bool supportStructure, bool coolingLines, bool covers, bool moderator, bool servicesElectronics)
void autoAdaptITk (bool reset, bool pixelModules, bool pixelServices, bool pixelSupports, bool stripSensors, bool stripElectronics, bool stripServices, bool stripSupports)
void resetSubSystems (VP1GeoFlags::SubSystemFlags)
void autoExpandByVolumeOrMaterialName (bool, const QString &)
void autoIconifyByVolumeOrMaterialName (bool, const QString &)
void actionOnAllNonStandardVolumes (bool)
void volumeStateChangeRequested (VolumeHandle *, VP1GeoFlags::VOLSTATE)
void volumeResetRequested (VolumeHandle *)
void setShowVolumeOutLines (bool)
void saveMaterialsToFile (const QString &, bool)
void loadMaterialsFromFile (const QString &)
void setLabels (int)
void setLabelPosOffsets (const QList< int > &)

Protected Member Functions

void registerController (QWidget *)

Protected Attributes

Imp * m_d

Private Slots

void activateClickedOutside ()

Private Member Functions

SoSeparator * getSceneGraph () const
void create (StoreGateSvc *detstore)
void refresh (StoreGateSvc *storegate)
void erase ()
void uncreate ()
void disallowUpdateGUI ()
void allowUpdateGUI ()
void setChannel (IVP1ChannelWidget *)
IVP1ChannelWidget * channel () const
void deleteController ()
void setState (const State &)
void setActiveState (const ActiveState &, const bool &donttriggererase=true)
bool isRefreshing ()
void setRefreshing (const bool &)
void setCanRegisterController (const bool &)

Static Private Attributes

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

Detailed Description

Definition at line 33 of file VP1GeometrySystem.h.

Member Typedef Documentation

◆ CamList

typedef std::set<SoCamera*> IVP13DSystem::CamList
inherited

Definition at line 90 of file IVP13DSystem.h.

◆ CamListItr

typedef CamList::iterator IVP13DSystem::CamListItr
inherited

Definition at line 91 of file IVP13DSystem.h.

Member Enumeration Documentation

◆ ActiveState

enum IVP1System::ActiveState
inherited
Enumerator
ON 
OFF 

Definition at line 144 of file IVP1System.h.

144{ ON=0, OFF };//Whether it is part of the erase/refresh cycle.

◆ State

enum IVP1System::State
inherited
Enumerator
CONSTRUCTED 
REFRESHED 
ERASED 
UNCREATED 

Definition at line 143 of file IVP1System.h.

Constructor & Destructor Documentation

◆ VP1GeometrySystem()

VP1GeometrySystem::VP1GeometrySystem ( const VP1GeoFlags::SubSystemFlags & SubSystemsTurnedOn = VP1GeoFlags::None,
const QString & name = "Geo" )

Definition at line 306 of file VP1GeometrySystem.cxx.

308 "This system displays the geometry as defined in the GeoModel tree.",
309 "Riccardo.Maria.Bianchi@cern.ch"),
310 m_d(new Imp(this,SubSystemsTurnedOn))
311{
312}
IVP13DSystemSimple(const QString &name, const QString &information, const QString &contact_info)
const QString & name() const

◆ ~VP1GeometrySystem()

VP1GeometrySystem::~VP1GeometrySystem ( )
virtual

Definition at line 331 of file VP1GeometrySystem.cxx.

332{
333 delete m_d;
334 m_d = 0;
335}

Member Function Documentation

◆ actionOnAllNonStandardVolumes

void VP1GeometrySystem::actionOnAllNonStandardVolumes ( bool zap)
protectedslot

Definition at line 2043 of file VP1GeometrySystem.cxx.

2044{
2046 messageVerbose("Action on volumes with non-standard VRML representations. Target state is "+VP1GeoFlags::toString(target));
2047
2048 std::vector<std::pair<VolumeHandle::VolumeHandleListItr,VolumeHandle::VolumeHandleListItr> > roothandles;
2049 m_d->volumetreemodel->getRootHandles(roothandles);
2051
2052 bool save = m_d->sceneroot->enableNotify(false);
2053 m_d->phisectormanager->largeChangesBegin();
2054
2055 deselectAll();
2056
2057 for (unsigned i = 0; i<roothandles.size();++i) {
2058 it = roothandles.at(i).first;
2059 itE = roothandles.at(i).second;
2060 for(;it!=itE;++it) {
2061 m_d->changeStateOfVisibleNonStandardVolumesRecursively(*it,target);
2062 }
2063 }
2064
2065 m_d->phisectormanager->updateRepresentationsOfVolsAroundZAxis();
2066 m_d->phisectormanager->largeChangesEnd();
2067 if (save) {
2068 m_d->sceneroot->enableNotify(true);
2069 m_d->sceneroot->touch();
2070 }
2071}
virtual void deselectAll(SoCooperativeSelection *exception_sel=0)
void messageVerbose(const QString &) const
static QString toString(const VOLSTATE &)
VolumeHandleList::iterator VolumeHandleListItr
save(self, fileName="./columbo.out")
Definition checkTP.py:176

◆ activateClickedOutside

void IVP13DSystem::activateClickedOutside ( )
privateslotinherited

Definition at line 85 of file IVP13DSystem.cxx.

86{
87 if (!m_d->clickedoutsideScheduled)
88 return;
89 m_d->clickedoutsideScheduled = false;
91}
virtual void userClickedOnBgd()

◆ activeState()

IVP1System::ActiveState IVP1System::activeState ( ) const
inherited

Definition at line 135 of file IVP1System.cxx.

136{
137 return m_d->activeState;
138}

◆ adaptMuonChambersStyleChanged

void VP1GeometrySystem::adaptMuonChambersStyleChanged ( )
protectedslot

Definition at line 1593 of file VP1GeometrySystem.cxx.

1594{
1595 //Make all chamber representations dirty:
1596 std::map<PVConstLink,VolumeHandle*>::iterator it, itE=m_d->muonchambers_pv2handles.end();
1597 for (it=m_d->muonchambers_pv2handles.begin();it!=itE;++it)
1598 it->second->setMuonChamberDirty(true);
1599
1600 //Adapt immediately if necessary:
1601 if (m_d->controller->autoAdaptMuonChambersToEventData())
1604}
void emit_appropriateMDTProjectionsChanged()

◆ adaptMuonChambersToEventData

void VP1GeometrySystem::adaptMuonChambersToEventData ( )
protectedslot

Definition at line 1555 of file VP1GeometrySystem.cxx.

1556{
1557 if (m_d->muonchambers_pv2handles.empty())
1558 return;
1559
1560 std::set<GeoPVConstLink> allchambers;
1561 if (!m_d->sender2ChamberList.empty()) {
1562 allchambers = (m_d->sender2ChamberList.begin())->second;
1563 std::map<QObject*,std::set<GeoPVConstLink> >::iterator itLists,itListsE(m_d->sender2ChamberList.end());
1564 for (itLists = m_d->sender2ChamberList.begin(),++itLists;itLists != itListsE;++itLists) {
1565 allchambers.insert(itLists->second.begin(),itLists->second.end());
1566 }
1567 }
1568
1569 //Idea: Maybe just iconise them all and then selectively deiconise the few? Then we can avoid most searches!
1570 bool save = m_d->sceneroot->enableNotify(false);
1571 m_d->phisectormanager->largeChangesBegin();
1572
1573 deselectAll();
1574 std::map<PVConstLink,VolumeHandle*>::iterator it, itE=m_d->muonchambers_pv2handles.end();
1575 std::set<GeoPVConstLink>::iterator itchambersE = allchambers.end();
1576 for (it=m_d->muonchambers_pv2handles.begin();it!=itE;++it) {
1577 if (allchambers.find(it->first)==itchambersE)
1578 it->second->setState(VP1GeoFlags::ZAPPED);
1579 else {
1580 if (it->second->muonChamberDirty())
1581 m_d->updateTouchedMuonChamber(it->second);
1582 }
1583 }
1584 m_d->phisectormanager->updateRepresentationsOfVolsAroundZAxis();
1585 m_d->phisectormanager->largeChangesEnd();
1586 if (save) {
1587 m_d->sceneroot->enableNotify(true);
1588 m_d->sceneroot->touch();
1589 }
1590}

◆ allowUpdateGUI()

void IVP1System::allowUpdateGUI ( )
privateinherited

Definition at line 256 of file IVP1System.cxx.

257{
258 m_d->allowupdategui=true;
259}

◆ appropriateMDTProjectionsChanged

void VP1GeometrySystem::appropriateMDTProjectionsChanged ( int )
signal

◆ autoAdaptHGTD

void VP1GeometrySystem::autoAdaptHGTD ( bool reset,
bool modules,
bool supportStructure,
bool coolingLines,
bool covers,
bool moderator,
bool servicesElectronics )
protectedslot

Definition at line 2458 of file VP1GeometrySystem.cxx.

2459{
2460 VP1Msg::messageDebug("VP1GeometrySystem::autoAdaptHGTD()");
2461
2462 #ifndef BUILDVP1LIGHT
2464 return;
2465 #endif
2466
2467 if( reset )
2468 VP1Msg::messageDebug("resetting to full HGTD...");
2469
2471
2473 //Find subsystem:
2474 Imp::SubSystemInfo* subsys(0);
2475 for (Imp::SubSystemInfo*si : m_d->subsysInfoList) {
2476 if (si->flag == subSysFlag) {
2477 subsys = si;
2478 break;
2479 }
2480 }
2481 if (!subsys) {
2482 message("autoAdaptHGTD Error: Could not find subsystem");
2483 return;
2484 }
2485
2487 //Abort if corresponding subsystem is not built:
2488 if (!subsys->isbuilt) {
2489 VP1Msg::messageDebug("autoAdaptHGTD: Aborting since subsystem geometry not built yet");
2490 return;
2491 }
2492
2493 bool save = m_d->sceneroot->enableNotify(false);
2494 m_d->phisectormanager->largeChangesBegin();
2495
2496 for (VolumeHandle* volume : subsys->vollist) {
2497 if (reset) {
2498 volume->reset();
2500 } else {
2502 handles.push_back(volume);
2503
2504 for (unsigned i = 0; i < handles.size(); ++i) {
2505 handles.at(i)->initialiseChildren();
2506 for (VolumeHandle* child : std::ranges::subrange(
2507 handles.at(i)->childrenBegin(), handles.at(i)->childrenEnd()))
2508 handles.push_back(child);
2509 }
2510
2511 for (VolumeHandle* handle : handles)
2512 handle->setState(VP1GeoFlags::ZAPPED);
2513
2514 bool unzap(false);
2515 for (VolumeHandle* handle : handles) {
2516 const QString name = handle->getName();
2517 bool selected(false);
2518 if (modules && (name=="HGTDFlexPackage" ||
2519 name.startsWith("HGTDFlexTube") ||
2520 name=="HGTDHybrid" ||
2521 name=="HGTDGlueSensor" ||
2522 name=="HGTDGlueAsic" ||
2523 name.startsWith("HGTDSiSensor") ||
2524 name=="HGTDLGADInactive" ||
2525 name=="HGTDASIC")) {
2526 selected = true;
2527 } else if (supportStructure && (name=="HGTDSupportPlate" || name=="HGTDCoolingPlate")) {
2528 selected = true;
2529 } else if (coolingLines && name=="HGTDPeripheralCoolingLines") {
2530 selected = true;
2531 } else if (covers && (name=="HGTDFrontCover" ||
2532 name=="HGTDBackCover" ||
2533 name=="HGTDOuterRCover" ||
2534 name=="HGTDInnerRCover1" ||
2535 name=="HGTDInnerRCover2" ||
2536 name=="HGTDInnerRCover3")) {
2537 selected = true;
2538 } else if (moderator && (name=="HGTDModeratorIn" || name=="HGTDModeratorOut")) {
2539 selected = true;
2540 } else if (servicesElectronics && (name=="support_F_vol" ||
2541 name=="support_B_vol" ||
2542 name.startsWith("PowerBlock_") ||
2543 name.startsWith("VTRx_"))) {
2544 selected = true;
2545 }
2546
2547 if (selected) {
2548 unzap = true;
2550 VolumeHandle* parent = handle->parent();
2551 while (parent) {
2552 parent->setState(VP1GeoFlags::EXPANDED);
2553 parent = parent->parent();
2554 }
2555 }
2556 }
2557 if (!unzap)
2559 }
2560 }
2561
2562 m_d->phisectormanager->updateRepresentationsOfVolsAroundZAxis();
2563 m_d->phisectormanager->largeChangesEnd();
2564
2565 if (save) {
2566 m_d->sceneroot->enableNotify(true);
2567 m_d->sceneroot->touch();
2568 }
2569}
void message(const QString &) const
static bool hasHGTDGeometry()
static void messageDebug(const QString &)
Definition VP1Msg.cxx:39
std::vector< VolumeHandle * > VolumeHandleList
void setState(const VP1GeoFlags::VOLSTATE &state, bool autoExpandEther=true)
const std::string reset
virtual void handle(const Incident &inc)
Handle end of run incidents to save the metadata at that point.

◆ autoAdaptITk

void VP1GeometrySystem::autoAdaptITk ( bool reset,
bool pixelModules,
bool pixelServices,
bool pixelSupports,
bool stripSensors,
bool stripElectronics,
bool stripServices,
bool stripSupports )
protectedslot

Definition at line 2574 of file VP1GeometrySystem.cxx.

2575{
2576 VP1Msg::messageDebug("VP1GeometrySystem::autoAdaptITk()");
2577
2578 #ifndef BUILDVP1LIGHT
2580 return;
2581 #endif
2582
2583 bool save = m_d->sceneroot->enableNotify(false);
2584 m_d->phisectormanager->largeChangesBegin();
2585
2587 for (VP1GeoFlags::SubSystemFlag subSysFlag : flags) {
2588 Imp::SubSystemInfo* subsys(0);
2589 for (Imp::SubSystemInfo*si : m_d->subsysInfoList) {
2590 if (si->flag == subSysFlag) {
2591 subsys = si;
2592 break;
2593 }
2594 }
2595 if (!subsys) {
2596 message("autoAdaptITk Error: Could not find subsystem");
2597 continue;
2598 }
2599 if (!subsys->isbuilt) {
2600 VP1Msg::messageDebug("autoAdaptITk: Aborting since subsystem geometry not built yet");
2601 continue;
2602 }
2603
2604 bool isPixel(subSysFlag==VP1GeoFlags::ITkPixel);
2605 VolumeHandle::VolumeHandleListItr it(subsys->vollist.begin()),itE(subsys->vollist.end());
2606 for (;it!=itE;++it) {
2607 (*it)->initialiseChildren();
2608 if (reset) {
2609 (*it)->reset();
2610 (*it)->setState(VP1GeoFlags::EXPANDED);
2611 } else {
2612 m_d->selectITkComponent(*it, isPixel, pixelModules, pixelServices, pixelSupports, stripSensors, stripElectronics, stripServices, stripSupports);
2613 }
2614 }
2615 }
2616
2617 m_d->phisectormanager->updateRepresentationsOfVolsAroundZAxis();
2618 m_d->phisectormanager->largeChangesEnd();
2619
2620 if (save) {
2621 m_d->sceneroot->enableNotify(true);
2622 m_d->sceneroot->touch();
2623 }
2624}
static bool hasITkGeometry()

◆ autoAdaptMuonNSW

void VP1GeometrySystem::autoAdaptMuonNSW ( bool reset,
bool stgc,
bool mm,
bool passiveSpacer,
bool passiveStructure,
bool passiveAPlate )
protectedslot

Definition at line 2371 of file VP1GeometrySystem.cxx.

2372{
2373 VP1Msg::messageDebug("VP1GeometrySystem::autoAdaptMuonNSW()");
2374
2375 #ifndef BUILDVP1LIGHT
2376 // return if Muon and MuonNSW are not configured/present/ON
2378 return;
2379 #endif
2380
2381 if( reset )
2382 VP1Msg::messageDebug("resetting to full NSW...");
2383
2385
2387 //Find subsystem:
2388 Imp::SubSystemInfo* subsys(0);
2389 for (Imp::SubSystemInfo*si : m_d->subsysInfoList) {
2390 if (si->flag == subSysFlag) {
2391 subsys = si;
2392 break;
2393 }
2394 }
2395 if (!subsys) {
2396 message("autoAdaptMuonNSW Error: Could not find subsystem");
2397 return;
2398 }
2399
2400
2402 //Abort if corresponding subsystem is not built:
2403 if (!subsys->isbuilt) {
2404 VP1Msg::messageDebug("autoAdaptMuonNSW: Aborting since subsystem geometry not built yet");
2405 return;//Disabling now due to phi-sector problems if "click some phi sectors"->"adapt pixel"->"turn on pixel"
2406 }
2407 bool save = m_d->sceneroot->enableNotify(false);
2408 m_d->phisectormanager->largeChangesBegin();
2409
2410 VolumeHandle::VolumeHandleListItr it(subsys->vollist.begin()),itE(subsys->vollist.end());
2411
2412 // loop over first level children (i.e., 'NewSmallWheel')
2413 for (;it!=itE;++it) {
2414
2415 (*it)->initialiseChildren();
2416 (*it)->setState(VP1GeoFlags::CONTRACTED);
2417 VolumeHandle::VolumeHandleListItr itChl((*it)->childrenBegin()),itChlE((*it)->childrenEnd());
2418
2419 // loop over second level children (i.e., 'NSW_sTGC', 'NSW_MM')
2420 for (;itChl!=itChlE;++itChl) {
2421
2422 bool unzap( reset? true : false );
2423
2424 if ( !reset ) {
2425 (*itChl)->setState(VP1GeoFlags::ZAPPED);
2426 if ( (stgc) && (*itChl)->hasName("NSW_sTGC") ) {
2427 unzap = true;
2428 //m_d->showPixelModules(*itChl);
2429 } else if ( (mm) && (*itChl)->hasName("NSW_MM") ) {
2430 unzap = true;
2431 //m_d->showPixelModules(*itChl);
2432 } else if ( (passiveSpacer) && (*itChl)->hasName("NSW_Spacer") ) {
2433 unzap = true;
2434 } else if ( (passiveStructure) && (*itChl)->hasName("NSW_Aluminum_Structure_and_HUB") ) {
2435 unzap = true;
2436 } else if ( (passiveAPlate) && (*itChl)->hasName("A_Plate") ) {
2437 unzap = true;
2438 }
2439 }
2440 if (unzap) {
2441 (*itChl)->setState(VP1GeoFlags::EXPANDED);
2442 }
2443 }
2444 (*it)->setState(VP1GeoFlags::EXPANDED);
2445 }
2446
2447 m_d->phisectormanager->updateRepresentationsOfVolsAroundZAxis();
2448 m_d->phisectormanager->largeChangesEnd();
2449
2450 if (save) {
2451 m_d->sceneroot->enableNotify(true);
2452 m_d->sceneroot->touch();
2453 }
2454}
@ MuonEndcapStationNSW
Definition VP1GeoFlags.h:65
static bool hasMuonNSWGeometry()
static bool hasMuonGeometry()

◆ autoAdaptPixelsOrSCT

void VP1GeometrySystem::autoAdaptPixelsOrSCT ( bool pixel,
bool brl,
bool ecA,
bool ecC,
bool bcmA,
bool bcmC )
protectedslot

Definition at line 2263 of file VP1GeometrySystem.cxx.

2264{
2265 #ifndef BUILDVP1LIGHT
2267 return;
2268 #endif
2269 //VP1GeoFlags::SubSystemFlag subSysFlag( pixel ? VP1GeoFlags::Pixel : VP1GeoFlags::SCT );
2271
2272 bool bcm(bcmA||bcmC);
2273 bool ec(ecA||ecC);
2274
2276 //Find subsystem:
2277 Imp::SubSystemInfo* subsys(0);
2278 for (Imp::SubSystemInfo*si : m_d->subsysInfoList) {
2279 if (si->flag == subSysFlag) {
2280 subsys = si;
2281 break;
2282 }
2283 }
2284 if (!subsys) {
2285 message("AutoAdaptPixelsOrSCT Error: Could not find subsystem");
2286 return;
2287 }
2288
2289
2291 //Abort if corresponding subsystem is not built:
2292 if (!subsys->isbuilt) {
2293 VP1Msg::messageDebug("AutoAdaptPixelsOrSCT: Aborting since subsystem geometry not built yet");
2294 return;//Disabling now due to phi-sector problems if "click some phi sectors"->"adapt pixel"->"turn on pixel"
2295 }
2296 bool save = m_d->sceneroot->enableNotify(false);
2297 m_d->phisectormanager->largeChangesBegin();
2298 VolumeHandle::VolumeHandleListItr it(subsys->vollist.begin()),itE(subsys->vollist.end());
2299
2300 if (pixel) {
2301 // --> Pixel
2302 for (;it!=itE;++it) {
2303 (*it)->initialiseChildren();
2304 (*it)->setState(VP1GeoFlags::CONTRACTED);
2305 VolumeHandle::VolumeHandleListItr itChl((*it)->childrenBegin()),itChlE((*it)->childrenEnd());
2306 for (;itChl!=itChlE;++itChl) {
2307 bool unzap(false);
2308 (*itChl)->setState(VP1GeoFlags::ZAPPED);
2310 if (brl&&(*itChl)->hasName("barrelLog")) {
2311 unzap = true;
2312 m_d->showPixelModules(*itChl);
2313 } else if ((ec)&&(*itChl)->hasName("EndCapLog")) {
2314 if (((*itChl)->isPositiveZ()?ecA:ecC)) {
2315 m_d->showPixelModules(*itChl);
2316 unzap = true;
2317 }
2318 } else if (bcm&&(*itChl)->hasName("bcmModLog")) {
2319 if (((*itChl)->isPositiveZ()?bcmA:bcmC)) {
2320 (*itChl)->reset();
2321 (*itChl)->setState(VP1GeoFlags::EXPANDED);
2322 }
2323 }
2324 } else {
2325 if ((*itChl)->hasName("ITkPixelDetector")) {
2326 m_d->showITkPixelModules(*itChl, brl, ecA, ecC);
2327 unzap = true;
2328 }
2329 }
2330 if (unzap)
2331 (*itChl)->setState(VP1GeoFlags::EXPANDED);
2332 }
2333 (*it)->setState(VP1GeoFlags::EXPANDED);
2334 }
2335 } else {
2336 // --> SCT
2337 for (;it!=itE;++it) {
2338 (*it)->initialiseChildren();
2339 (*it)->setState(VP1GeoFlags::CONTRACTED);
2340 bool unzap(false);
2341 (*it)->setState(VP1GeoFlags::ZAPPED);
2343 if (brl&&(*it)->hasName("SCT_Barrel")) {
2344 unzap = true;
2345 m_d->showSCTBarrelModules(*it);
2346 } else if (ecA&&(*it)->hasName("SCT_ForwardA")) {
2347 unzap = true;
2348 m_d->showSCTEndcapModules(*it);
2349 } else if (ecC&&(*it)->hasName("SCT_ForwardC")) {
2350 unzap = true;
2351 m_d->showSCTEndcapModules(*it);
2352 }
2353 } else {
2354 m_d->showITkStripModules(*it, brl, ecA, ecC);
2355 unzap=true;
2356 }
2357 if (unzap)
2358 (*it)->setState(VP1GeoFlags::EXPANDED);
2359 }
2360 }
2361 m_d->phisectormanager->updateRepresentationsOfVolsAroundZAxis();
2362 m_d->phisectormanager->largeChangesEnd();
2363 if (save) {
2364 m_d->sceneroot->enableNotify(true);
2365 m_d->sceneroot->touch();
2366 }
2367}
static bool hasPixelGeometry()
static bool hasSCTGeometry()

◆ autoExpandByVolumeOrMaterialName

void VP1GeometrySystem::autoExpandByVolumeOrMaterialName ( bool bymatname,
const QString & targetname )
protectedslot

Definition at line 2074 of file VP1GeometrySystem.cxx.

2075{
2076 if (targetname.isEmpty()) {
2077 VP1Msg::messageDebug("targetname is empty.");
2078 return;
2079 }
2080
2081 messageVerbose("Auto expansions of visible volumes requested. Target all volumes with "
2082 +str(bymatname?"material name":"name")+" matching "+targetname);
2083
2084 QRegExp selregexp(targetname,Qt::CaseSensitive,QRegExp::Wildcard);
2085
2086 std::vector<std::pair<VolumeHandle::VolumeHandleListItr,VolumeHandle::VolumeHandleListItr> > roothandles;
2087 m_d->volumetreemodel->getRootHandles(roothandles);
2089
2090 bool save = m_d->sceneroot->enableNotify(false);
2091 m_d->phisectormanager->largeChangesBegin();
2092
2093 deselectAll();
2094
2095 for (unsigned i = 0; i<roothandles.size();++i) {
2096 it = roothandles.at(i).first;
2097 itE = roothandles.at(i).second;
2098 for(;it!=itE;++it)
2099 m_d->expandVisibleVolumesRecursively(*it,selregexp,bymatname);
2100 }
2101
2102 m_d->phisectormanager->updateRepresentationsOfVolsAroundZAxis();
2103 m_d->phisectormanager->largeChangesEnd();
2104 if (save) {
2105 m_d->sceneroot->enableNotify(true);
2106 m_d->sceneroot->touch();
2107 }
2108}
static QString str(const QString &s)
Definition VP1String.h:49

◆ autoIconifyByVolumeOrMaterialName

void VP1GeometrySystem::autoIconifyByVolumeOrMaterialName ( bool bymatname,
const QString & targetname )
protectedslot

Definition at line 2154 of file VP1GeometrySystem.cxx.

2155{
2156 if (targetname.isEmpty()) {
2157 VP1Msg::messageDebug("targetname is empty.");
2158 return;
2159 }
2160
2161 messageVerbose("Auto iconification/zapping of visible volumes requested. Target all volumes with "
2162 +str(bymatname?"material name":"name")+" matching "+targetname);
2163
2164 QRegExp selregexp(targetname,Qt::CaseSensitive,QRegExp::Wildcard);
2165
2166 std::vector<std::pair<VolumeHandle::VolumeHandleListItr,VolumeHandle::VolumeHandleListItr> > roothandles;
2167 m_d->volumetreemodel->getRootHandles(roothandles);
2169
2170 bool save = m_d->sceneroot->enableNotify(false);
2171 m_d->phisectormanager->largeChangesBegin();
2172
2173 deselectAll();
2174
2175 for (unsigned i = 0; i<roothandles.size();++i) {
2176 it = roothandles.at(i).first;
2177 itE = roothandles.at(i).second;
2178 for(;it!=itE;++it)
2179 m_d->iconifyVisibleVolumesRecursively(*it,selregexp,bymatname);
2180 }
2181
2182 m_d->phisectormanager->updateRepresentationsOfVolsAroundZAxis();
2183 m_d->phisectormanager->largeChangesEnd();
2184 if (save) {
2185 m_d->sceneroot->enableNotify(true);
2186 m_d->sceneroot->touch();
2187 }
2188}

◆ buildController()

QWidget * VP1GeometrySystem::buildController ( )
virtual

Reimplemented from IVP13DSystemSimple.

Definition at line 387 of file VP1GeometrySystem.cxx.

388{
389 message("VP1GeometrySystem::buildController");
390
391 m_d->controller = new GeoSysController(this);
392
393 m_d->phisectormanager = new PhiSectorManager(m_d->controller->phiSectionWidget(),this,this);
394
395
396 connect(m_d->controller,SIGNAL(showVolumeOutLinesChanged(bool)),this,SLOT(setShowVolumeOutLines(bool)));
397 setShowVolumeOutLines(m_d->controller->showVolumeOutLines());
398 connect(m_d->controller,SIGNAL(saveMaterialsToFile(QString,bool)),this,SLOT(saveMaterialsToFile(QString,bool)));
399 connect(m_d->controller,SIGNAL(loadMaterialsFromFile(QString)),this,SLOT(loadMaterialsFromFile(QString)));
400
401 connect(m_d->controller,SIGNAL(transparencyChanged(float)),this,SLOT(updateTransparency()));
402 connect (m_d->controller,SIGNAL(volumeStateChangeRequested(VolumeHandle*,VP1GeoFlags::VOLSTATE)),
403 this,SLOT(volumeStateChangeRequested(VolumeHandle*,VP1GeoFlags::VOLSTATE)));
404 connect (m_d->controller,SIGNAL(volumeResetRequested(VolumeHandle*)),
405 this,SLOT(volumeResetRequested(VolumeHandle*)));
406 connect(m_d->controller,SIGNAL(adaptMuonChambersToEventData()),this,SLOT(adaptMuonChambersToEventData()));
407 connect(m_d->controller,SIGNAL(muonChamberAdaptionStyleChanged(VP1GeoFlags::MuonChamberAdaptionStyleFlags)),
408 this,SLOT(adaptMuonChambersStyleChanged()));
409 connect(m_d->controller,SIGNAL(autoExpandByVolumeOrMaterialName(bool,QString)),this,SLOT(autoExpandByVolumeOrMaterialName(bool,QString)));
410 connect(m_d->controller,SIGNAL(autoIconifyByVolumeOrMaterialName(bool,QString)),this,SLOT(autoIconifyByVolumeOrMaterialName(bool,QString)));
411 connect(m_d->controller,SIGNAL(actionOnAllNonStandardVolumes(bool)),this,SLOT(actionOnAllNonStandardVolumes(bool)));
412 connect(m_d->controller,SIGNAL(autoAdaptPixelsOrSCT(bool,bool,bool,bool,bool,bool)),this,SLOT(autoAdaptPixelsOrSCT(bool,bool,bool,bool,bool,bool)));
413 connect(m_d->controller,SIGNAL(autoAdaptMuonNSW(bool,bool,bool,bool,bool,bool)),this,SLOT(autoAdaptMuonNSW(bool, bool,bool,bool,bool,bool)));
414 connect(m_d->controller,SIGNAL(autoAdaptHGTD(bool,bool,bool,bool,bool,bool,bool)),this,SLOT(autoAdaptHGTD(bool,bool,bool,bool,bool,bool,bool)));
415 connect(m_d->controller,SIGNAL(autoAdaptITk(bool,bool,bool,bool,bool,bool,bool,bool)),this,SLOT(autoAdaptITk(bool,bool,bool,bool,bool,bool,bool,bool)));
416 connect(m_d->controller,SIGNAL(resetSubSystems(VP1GeoFlags::SubSystemFlags)),this,SLOT(resetSubSystems(VP1GeoFlags::SubSystemFlags)));
417
418 connect(m_d->controller,SIGNAL(labelsChanged(int)),this,SLOT(setLabels(int)));
419 connect(m_d->controller,SIGNAL(labelPosOffsetChanged(QList<int>)),this,SLOT(setLabelPosOffsets(QList<int>)));
420 setLabels(m_d->controller->labels());
421
422
423 /* This is where we define the available different subsystems and their location in the geomodel tree.
424 *
425 * if the reg expr does not match any volume, the corresponding subsystem checkbox in the Geo GUI gets disabled.
426 *
427 * syntax: addSubSystem(VP1GeoFlags::SubSystemFlag&, // the associated system flag
428 QString& treetopregexp, // the regular expr for the top/root name of the main sub-detector system
429 QString& childrenregexp="", // the reg expr for the children of the main sub-detector
430 std::string& matname="", // a name we choose for displaying in VP1
431 bool negatetreetopregexp = false, // if we want to negate the top reg expr
432 bool negatechildrenregexp = false); // if we want to negate the children reg expr
433 const QString& grandchildrenregexp="", // the regex for granchildren of the main sub-detector
434 bool negategrandchildrenregexp = false // wheter we want to negate teh granchildren regex
435 */
436
438 m_d->addSubSystem( VP1GeoFlags::ITkPixel,"ITkPixel", "", "ITkPixel");
439 m_d->addSubSystem( VP1GeoFlags::ITkStrip,"ITkStrip", "", "ITkStrip");
440 } else {
441 m_d->addSubSystem( VP1GeoFlags::Pixel,"Pixel");
442 m_d->addSubSystem( VP1GeoFlags::SCT,"SCT");
443 m_d->addSubSystem( VP1GeoFlags::TRT,"TRT");
444 }
446 m_d->addSubSystem(VP1GeoFlags::HGTD, "HGTD", "", "HGTD");
447 }
448 m_d->addSubSystem( VP1GeoFlags::InDetServMat,"InDetServMat");
449 m_d->addSubSystem( VP1GeoFlags::LAr, ".*LAr.*");
450 m_d->addSubSystem( VP1GeoFlags::Tile,"Tile");
451 m_d->addSubSystem( VP1GeoFlags::CavernInfra,"CavernInfra");
452 m_d->addSubSystem( VP1GeoFlags::BeamPipe,"BeamPipe");
453 m_d->addSubSystem( VP1GeoFlags::LUCID,".*Lucid.*");
454 m_d->addSubSystem( VP1GeoFlags::ZDC,".*ZDC.*");
455 m_d->addSubSystem( VP1GeoFlags::ALFA,".*ALFA.*");
456 m_d->addSubSystem( VP1GeoFlags::AFP,".*AFP.*");
457 m_d->addSubSystem( VP1GeoFlags::ForwardRegion,".*ForwardRegion.*");
458
459 //The muon systems require special treatment, since we want to
460 //cherrypick below the treetop (this is the main reason for a lot
461 //of the ugly stuff in this class):
462 m_d->addSubSystem( VP1GeoFlags::MuonEndcapStationCSC,"Muon","CS.*","CSC");
463 m_d->addSubSystem( VP1GeoFlags::MuonEndcapStationTGC,"Muon","T(1|2|3|4).*","TGC");
464 m_d->addSubSystem( VP1GeoFlags::MuonEndcapStationMDT,"Muon","(EI|EM|EO|EE).*","EndcapMdt");
465 m_d->addSubSystem( VP1GeoFlags::MuonEndcapStationNSW,"Muon",".*ANON.*","MuonNSW",false, false, "NewSmallWheel.*");
466
467 m_d->addSubSystem( VP1GeoFlags::MuonBarrelStationInner,"Muon","(BI|BEE).*","BarrelInner");
468 m_d->addSubSystem( VP1GeoFlags::MuonBarrelStationMiddle,"Muon","BM.*","BarrelMiddle");
469 m_d->addSubSystem( VP1GeoFlags::MuonBarrelStationOuter,"Muon","BO.*","BarrelOuter");
470
471 //This last one is even more horrible. We want everything from the Muon treetop that is NOT included elsewhere:
472// m_d->addSubSystem( VP1GeoFlags::MuonToroidsEtc,"Muon","(CS|T1|T2|T3|T4|EI|EM|EO|EE|BI|BEE|BM|BO).*","Muon",false,true);
473
474 // Toroid
475 m_d->addSubSystem( VP1GeoFlags::BarrelToroid,"Muon",".*ANON.*","BarrelToroid", false, false, "BAR_Toroid.*");
476 m_d->addSubSystem( VP1GeoFlags::ToroidECA,"Muon",".*ANON.*","ToroidECA", false, false, "ECT_Toroids.*");
477// m_d->addSubSystem( VP1GeoFlags::ToroidECC,"Muon",".*ANON.*","ToroidECC", false, false, "ECT_Toroids");
478
479 // Muon Feet
480 m_d->addSubSystem( VP1GeoFlags::MuonFeet,"Muon",".*ANON.*","MuonFeet", false, false, "Feet.*");
481
482 // Muon shielding
483 m_d->addSubSystem( VP1GeoFlags::MuonShielding,"Muon",".*ANON.*","Shielding", false, false, "(JDSH|JTSH|JFSH).*");
484
485
486 // All muon stuff --> this will be linked to the "Services" checkbox in the GUI
487 // m_d->addSubSystem( VP1GeoFlags::MuonToroidsEtc,"Muon","(CS|T1|T2|T3|T4|EI|EM|EO|EE|BI|BEE|BM|BO).*","MuonEtc",false,true);
488 m_d->addSubSystem( VP1GeoFlags::MuonToroidsEtc,"Muon",".*(CS|T1|T2|T3|T4|EI|EM|EO|EE|BI|BEE|BM|BO).*","MuonEtc",false,true,"(ECT_Toroids|BAR_Toroid|Feet|NewSmallWheel|JDSH|JTSH|JFSH).*",true);
489
490 // m_d->addSubSystem( VP1GeoFlags::MuonToroidsEtc,"Muon","*.Feet.*","MuonEtc");
491
492 //This one MUST be added last. It will get slightly special treatment in various places!
493 m_d->addSubSystem( VP1GeoFlags::AllUnrecognisedVolumes,".*");
494
495
496 //Setup models/views for volume tree browser and zapped volumes list:
497 m_d->volumetreemodel = new VolumeTreeModel(m_d->controller->volumeTreeBrowser());
498 m_d->controller->volumeTreeBrowser()->header()->hide();
499 m_d->controller->volumeTreeBrowser()->uniformRowHeights();
500 m_d->controller->volumeTreeBrowser()->setModel(m_d->volumetreemodel);
501
502 return m_d->controller;
503}
@ MuonEndcapStationTGC
Definition VP1GeoFlags.h:47
@ AllUnrecognisedVolumes
Definition VP1GeoFlags.h:73
@ MuonBarrelStationInner
Definition VP1GeoFlags.h:42
@ MuonBarrelStationMiddle
Definition VP1GeoFlags.h:44
@ MuonBarrelStationOuter
Definition VP1GeoFlags.h:45
@ MuonEndcapStationCSC
Definition VP1GeoFlags.h:46
@ MuonEndcapStationMDT
Definition VP1GeoFlags.h:49
void loadMaterialsFromFile(const QString &)
void autoAdaptMuonNSW(bool reset, bool stgc, bool mm, bool passiveSpacer, bool passiveStructure, bool passiveAPlate)
void autoAdaptITk(bool reset, bool pixelModules, bool pixelServices, bool pixelSupports, bool stripSensors, bool stripElectronics, bool stripServices, bool stripSupports)
void autoAdaptHGTD(bool reset, bool modules, bool supportStructure, bool coolingLines, bool covers, bool moderator, bool servicesElectronics)
void resetSubSystems(VP1GeoFlags::SubSystemFlags)
void autoIconifyByVolumeOrMaterialName(bool, const QString &)
void volumeResetRequested(VolumeHandle *)
void autoAdaptPixelsOrSCT(bool, bool, bool, bool, bool, bool)
void volumeStateChangeRequested(VolumeHandle *, VP1GeoFlags::VOLSTATE)
void setLabelPosOffsets(const QList< int > &)
void autoExpandByVolumeOrMaterialName(bool, const QString &)
void actionOnAllNonStandardVolumes(bool)
void saveMaterialsToFile(const QString &, bool)

◆ buildEventSceneGraph()

void VP1GeometrySystem::buildEventSceneGraph ( StoreGateSvc * ,
SoSeparator *  )
inlinevirtual

Implements IVP13DSystemSimple.

Definition at line 55 of file VP1GeometrySystem.h.

55{}

◆ buildExtraDisplayWidget()

virtual QWidget * IVP13DSystem::buildExtraDisplayWidget ( )
inlinevirtualinherited

Definition at line 106 of file IVP13DSystem.h.

106{ return 0; }

◆ buildPermanentSceneGraph()

void VP1GeometrySystem::buildPermanentSceneGraph ( StoreGateSvc * detstore,
SoSeparator * root )
virtual

Reimplemented from IVP13DSystemSimple.

Definition at line 520 of file VP1GeometrySystem.cxx.

521{
522 m_d->sceneroot = root;
523
524 #ifndef BUILDVP1LIGHT
526 message("Error: GeoModel not configured properly in job.");
527 return;
528 }
529
530 //Get the world volume:
531 const GeoModelExperiment * theExpt;
532 if (!VP1SGAccessHelper(this,true).retrieve(theExpt,"ATLAS")) {
533 message("Error: Could not retrieve the ATLAS GeoModelExperiment from detector store");
534 return;
535 }
536 #endif
537
538 #ifdef BUILDVP1LIGHT
539 GeoModelExperiment* theExpt = m_d->getGeometry();
540 #endif
541 PVConstLink world(theExpt->getPhysVol());
542
543 if (!m_d->m_textSep) {
544 // FIXME!
545 // std::cout<<"Making new Text sep"<<std::endl;
546 m_d->m_textSep = new SoSeparator;
547 m_d->m_textSep->setName("TextSep");
548 m_d->m_textSep->ref();
549 }
550 m_d->sceneroot->addChild(m_d->m_textSep);
551
552 // FIXME - what if font is missing?
553 SoFont *myFont = new SoFont;
554 myFont->name.setValue("Arial");
555 myFont->size.setValue(12.0);
556 m_d->m_textSep->addChild(myFont);
557
558 bool save = root->enableNotify(false);
559
560 //Catch keyboard events:
561 SoEventCallback *catchEvents = new SoEventCallback();
562 catchEvents->addEventCallback(SoKeyboardEvent::getClassTypeId(),Imp::catchKbdState, m_d);
563 root->addChild(catchEvents);
564
565 root->addChild(m_d->controller->drawOptions());
566 root->addChild(m_d->controller->pickStyle());
567
568 if(VP1Msg::debug()){
569 qDebug() << "Configuring the default systems... - subsysInfoList len:" << (m_d->subsysInfoList).length();
570 }
571 // we switch on the systems flagged to be turned on at start
572 for (Imp::SubSystemInfo * subsys : m_d->subsysInfoList)
573 {
574 VP1Msg::messageDebug("Switching on this system: " + QString::fromStdString(subsys->matname) + " - " + subsys->flag);
575 bool on(m_d->initialSubSystemsTurnedOn & subsys->flag);
576 subsys->checkbox->setChecked( on );
577 subsys->checkbox->setEnabled(false);
578 subsys->checkbox->setToolTip("This sub-system is not available");
579 connect(subsys->checkbox,SIGNAL(toggled(bool)),this,SLOT(checkboxChanged()));
580 }
581
582 //Locate geometry info for the various subsystems, and add the info as appropriate:
583
584 QCheckBox * checkBoxOther = m_d->controller->subSystemCheckBox(VP1GeoFlags::AllUnrecognisedVolumes);
585
586 if(VP1Msg::debug()){
587 qDebug() << "Looping on volumes from the input GeoModel...";
588 }
589 GeoVolumeCursor av(world);
590 while (!av.atEnd()) {
591
592 std::string name = av.getName();
593 if(VP1Msg::debug()){
594 qDebug() << "volume name:" << QString::fromStdString(name);
595 }
596
597 // DEBUG
598 VP1Msg::messageDebug("DEBUG: Found GeoModel treetop: "+QString(name.c_str()));
599
600 //Let us see if we recognize this volume:
601 bool found = false;
602 for (Imp::SubSystemInfo * subsys : m_d->subsysInfoList) {
603 if (subsys->negatetreetopregexp!=subsys->geomodeltreetopregexp.exactMatch(name.c_str()))
604 {
605 if (subsys->checkbox==checkBoxOther&&found) {
606 continue;//The "other" subsystem has a wildcard which matches everything - but we only want stuff that is nowhere else.
607 }
608
609 if(VP1Msg::debug()){
610 qDebug() << (subsys->geomodeltreetopregexp).pattern() << subsys->geomodeltreetopregexp.exactMatch(name.c_str()) << subsys->negatetreetopregexp;
611 qDebug() << "setting 'found' to TRUE for pattern:" << (subsys->geomodeltreetopregexp).pattern();
612 }
613 found = true;
614 //We did... now, time to extract info:
615 subsys->treetopinfo.resize(subsys->treetopinfo.size()+1);
616 subsys->treetopinfo.back().pV = av.getVolume();
617 subsys->treetopinfo.back().xf = Amg::EigenTransformToCLHEP(av.getTransform());
618 subsys->treetopinfo.back().volname = av.getName();
619
620 //Add a switch for this system (turned off for now):
621 SoSwitch * sw = new SoSwitch();
622 //But add a separator on top of it (for caching):
623 subsys->soswitch = sw;
624 if (sw->whichChild.getValue() != SO_SWITCH_NONE)
625 sw->whichChild = SO_SWITCH_NONE;
626 SoSeparator * sep = new SoSeparator;
627 sep->addChild(sw);
628 root->addChild(sep);
629 //Enable the corresponding checkbox:
630 subsys->checkbox->setEnabled(true);
631 subsys->checkbox->setToolTip("Toggle the display of the "+subsys->checkbox->text()+" sub system");
632 //NB: Dont break here - several systems might share same treetop!
633 // break;
634 }
635 }
636 if (!found) {
637 message("Warning: Found unexpected GeoModel treetop: "+QString(name.c_str()));
638 }
639
640 av.next(); // increment volume cursor.
641 }
642
643 //Hide other cb if not needed:
644 if (!checkBoxOther->isEnabled())
645 checkBoxOther->setVisible(false);
646
647 //Build the geometry for those (available) subsystems that starts out being turned on:
648 for (Imp::SubSystemInfo * subsys : m_d->subsysInfoList) {
649 if (!subsys->soswitch||!subsys->checkbox->isChecked())
650 continue;
651 m_d->buildSystem(subsys);
652 //Enable in 3D view:
653 if (subsys->soswitch->whichChild.getValue() != SO_SWITCH_ALL)
654 subsys->soswitch->whichChild = SO_SWITCH_ALL;
655 //Enable in tree browser:
656 m_d->volumetreemodel->enableSubSystem(subsys->flag);
657 // new ModelTest(m_d->volumetreemodel, m_d->treeView_volumebrowser);
658 }
659 if (!m_d->restoredTopvolstates.isEmpty()) {
660 m_d->applyTopVolStates(m_d->restoredTopvolstates,false);
661 m_d->restoredTopvolstates.clear();
662 }
663 m_d->phisectormanager->updateRepresentationsOfVolsAroundZAxis();
664 root->enableNotify(save);
665 if (save)
666 root->touch();
667
668
669 if (m_d->controller->autoAdaptMuonChambersToEventData())
671
672 //To ensure we emit it once upon startup:
673 QTimer::singleShot(0, this, SLOT(emit_appropriateMDTProjectionsChanged()));
674}
double length(const pvec &v)
GeoPhysVol * getPhysVol()
Destructor.
static void catchKbdState(void *userData, SoEventCallback *CB)
static bool hasGeoModelExperiment()
static bool debug()
Definition VP1Msg.h:32
HepGeom::Transform3D EigenTransformToCLHEP(const Amg::Transform3D &eigenTransf)
Converts an Eigen-based Amg::Transform3D into a CLHEP-based HepGeom::Transform3D.

◆ channel()

IVP1ChannelWidget * IVP1System::channel ( ) const
privateinherited

Definition at line 275 of file IVP1System.cxx.

276{
277 if (VP1Msg::verbose()&&!m_d->channel){
278 messageVerbose("WARNING channel() returning NULL");
279 }
280 assert(m_d->channel);
281 return m_d->channel;
282}
static bool verbose()
Definition VP1Msg.h:31

◆ checkboxChanged

void VP1GeometrySystem::checkboxChanged ( )
protectedslot

Definition at line 782 of file VP1GeometrySystem.cxx.

783{
784 QCheckBox * cb = static_cast<QCheckBox*>(sender());
785 Imp::SubSystemInfo * subsys(0);
786 for (Imp::SubSystemInfo * ss : m_d->subsysInfoList) {
787 if (cb==ss->checkbox) {
788 subsys=ss;
789 break;
790 }
791 }
792 if (!subsys) {
793 message("ERROR: Unknown checkbox");
794 return;
795 }
796
797 SoSwitch * sw = subsys->soswitch;
798 assert(sw);
799 if (cb->isChecked()) {
800 SbBool save = sw->enableNotify(false);
801 if (sw->getNumChildren()==0) {
802 m_d->buildSystem(subsys);
803 m_d->phisectormanager->updateRepresentationsOfVolsAroundZAxis();//
804 }
805 if (sw->whichChild.getValue() != SO_SWITCH_ALL)
806 sw->whichChild = SO_SWITCH_ALL;
807 sw->enableNotify(save);
808 //Enable in tree browser:
809 m_d->volumetreemodel->enableSubSystem(subsys->flag);
810 // new ModelTest(m_d->volumetreemodel, m_d->treeView_volumebrowser);
811 if (save)
812 sw->touch();
813 } else {
814 if (sw->whichChild.getValue() != SO_SWITCH_NONE)
815 sw->whichChild = SO_SWITCH_NONE;
816 m_d->volumetreemodel->disableSubSystem(subsys->flag);
817 }
818}
static Double_t ss

◆ contact_info()

const QString & IVP1System::contact_info ( ) const
inherited

Definition at line 62 of file IVP1System.cxx.

63{
64 return m_d->contact_info;
65}

◆ controllerWidget()

QWidget * IVP1System::controllerWidget ( )
inherited

Definition at line 202 of file IVP1System.cxx.

202 {
203 if (VP1Msg::verbose()) {
204 messageVerbose("controllerWidget()");
205 messageVerbose("registerController m_d->state==ERASED = "+QString(m_d->state==ERASED?"true":"false"));
206 messageVerbose("registerController m_d->state==REFRESHED = "+QString(m_d->state==REFRESHED?"true":"false"));
207 }
208 assert(m_d->state==REFRESHED||m_d->state==ERASED);
209 return m_d->controller;
210 }

◆ create()

void IVP13DSystemSimple::create ( StoreGateSvc * detstore)
privatevirtualinherited

Implements IVP1System.

Definition at line 133 of file IVP13DSystemSimple.cxx.

134{
135 if(VP1Msg::verbose()){
136 messageVerbose("IVP13DSystemSimple create");
137 }
138 assert(!m_d->wasrefreshed);
139 assert(!m_d->wascreated);
140 ensureBuildController();//TODO: Move to refresh.
141 m_d->wascreated=true;
142 m_d->wasrefreshed=false;
143}

◆ deleteController()

void IVP1System::deleteController ( )
privateinherited

Definition at line 213 of file IVP1System.cxx.

214{
215 if (VP1Msg::verbose()){
216 messageVerbose("deleteController()");
217 }
218 if (m_d->controller)
219 m_d->controller->deleteLater();
220 m_d->controller = 0;
221}

◆ deselectAll()

void IVP13DSystem::deselectAll ( SoCooperativeSelection * exception_sel = 0)
virtualinherited

Reimplemented in VP1PrepRawDataSystem.

Definition at line 331 of file IVP13DSystem.cxx.

332{
333 static std::map<SoCooperativeSelection*,IVP13DSystem*>::iterator it, itE = Imp::selection2system.end();
334 for (it = Imp::selection2system.begin(); it!=itE;++it) {
335 if (it->second!=this)
336 continue;
337 if (it->first!=exception_sel) {
338 if (it->first->policy.getValue()!=SoCooperativeSelection::SINGLE) {
339 Imp::start_changeselection(this, it->first);
340 it->first->deselectAll();
341 Imp::finished_changeselection(this, it->first);
342 } else {
343 if (it->first->getList()->getLength()==1) {
344 Imp::start_changeselection(this, it->first);
345 SoPath * path = static_cast<SoPath*>(it->first->getList()->get(0));
346 Imp::made_deselection(it->first,path);
347 it->first->deselectAll();
348 Imp::finished_changeselection(this, it->first);
349 }
350 }
351 }
352 }
353}
static void start_changeselection(void *userdata, SoSelection *sel)
static void finished_changeselection(void *userdata, SoSelection *sel)
static std::map< SoCooperativeSelection *, IVP13DSystem * > selection2system
static void made_deselection(void *userdata, SoPath *path)
T * get(TKey *tobj)
get a TObject* from a TKey* (why can't a TObject be a TKey?)
Definition hcg.cxx:132
path
python interpreter configuration --------------------------------------—
Definition athena.py:130

◆ detectorStore()

StoreGateSvc * IVP1System::detectorStore ( ) const
inherited

Definition at line 318 of file IVP1System.cxx.

319{
321}
static StoreGateSvc * detectorStore()

◆ disallowUpdateGUI()

void IVP1System::disallowUpdateGUI ( )
privateinherited

Definition at line 250 of file IVP1System.cxx.

251{
252 m_d->allowupdategui=false;
253}

◆ emit_appropriateMDTProjectionsChanged

void VP1GeometrySystem::emit_appropriateMDTProjectionsChanged ( )
protectedslot

Definition at line 1607 of file VP1GeometrySystem.cxx.

1608{
1609 if (!m_d->controller) {
1610 message("emit_appropriateMDTProjectionsChanged called before controller built.");
1611 return;
1612 }
1613 VP1GeoFlags::MuonChamberAdaptionStyleFlags f(m_d->controller->muonChamberAdaptionStyle());
1614 bool option_openmdtchambers = f & VP1GeoFlags::OpenMDTChambers;
1615 bool option_hidetubes = f & VP1GeoFlags::HideMDTTubes;
1616 int i (option_openmdtchambers?(option_hidetubes?0:1):2);
1617 if ( m_d->last_appropriatemdtprojections != i ) {
1618 m_d->last_appropriatemdtprojections = i;
1620 }
1621}
void appropriateMDTProjectionsChanged(int)

◆ enableMuonChamberLabels()

void VP1GeometrySystem::enableMuonChamberLabels ( bool t0s,
bool hits )

first is t0s, 2nd is hits

Definition at line 3144 of file VP1GeometrySystem.cxx.

3144 {
3145 m_d->controller->setLabelsEnabled(t0s,hits);
3146}

◆ ensureBuildController()

void IVP13DSystemSimple::ensureBuildController ( )
inherited

Definition at line 90 of file IVP13DSystemSimple.cxx.

91{
92 if (m_d->controllerBuilt)
93 return;
94 m_d->controllerBuilt=true;
95 if(VP1Msg::verbose()){
96 messageVerbose("IVP13DSystemSimple build controller");
97 }
98 QWidget * controller = buildController();
99 if (controller)
100 registerController(controller);
101 if(VP1Msg::verbose()){
102 messageVerbose("IVP13DSystemSimple controller was = "+str(controller));
103 }
104}
virtual QWidget * buildController()
void registerController(QWidget *)

◆ erase()

void IVP13DSystemSimple::erase ( )
privatevirtualinherited

Implements IVP1System.

Definition at line 173 of file IVP13DSystemSimple.cxx.

174{
175 if(VP1Msg::verbose()){
176 messageVerbose("IVP13DSystemSimple::erase() start");
177 }
178 assert(m_d->wascreated);
179 assert(m_d->wasrefreshed);
180
181 bool saveE = m_d->rootE->enableNotify(false);
182
183 systemerase();
184 if(VP1Msg::verbose()){
185 messageVerbose("IVP13DSystemSimple::erase() Removing all event objects from scene");
187 }
188 m_d->rootE->removeAllChildren();
189
190 if (saveE) {
191 m_d->rootE->enableNotify(true);
192 m_d->rootE->touch();
193 }
194
195 m_d->wasrefreshed=false;
196 if(VP1Msg::verbose()){
197 messageVerbose("IVP13DSystemSimple::erase() end");
198 }
199}
void warnOnDisabledNotifications() const

◆ eventStore()

StoreGateSvc * IVP1System::eventStore ( ) const
inherited

Definition at line 312 of file IVP1System.cxx.

313{
315}
static StoreGateSvc * eventStore()

◆ getCameraList()

std::set< SoCamera * > IVP13DSystem::getCameraList ( )
inherited

Definition at line 395 of file IVP13DSystem.cxx.

396{
397 std::set<SoCamera*> cameralist = m_d->staticcameras;
398 std::set<SoQtViewer*>::const_iterator it, itE=m_d->viewers.end();
399 for (it=m_d->viewers.begin();it!=itE;++it) {
400 SoCamera*cam = (*it)->getCamera();
401 if (cam)
402 cameralist.insert(cam);
403 }
404
405 //m_d->camerasfromviewer
406 return cameralist;
407}

◆ getSceneGraph()

SoSeparator * IVP13DSystemSimple::getSceneGraph ( ) const
privatevirtualinherited

Implements IVP13DSystem.

Definition at line 127 of file IVP13DSystemSimple.cxx.

128{
129 return static_cast<SoSeparator*>(m_d->root);
130}

◆ inactiveSystemTurnedActive

void IVP1System::inactiveSystemTurnedActive ( )
signalinherited

◆ information()

const QString & IVP1System::information ( ) const
inherited

Definition at line 56 of file IVP1System.cxx.

57{
58 return m_d->information;
59}

◆ isRefreshing()

bool IVP1System::isRefreshing ( )
privateinherited

Definition at line 108 of file IVP1System.cxx.

109{
110 return m_d->refreshing;
111}

◆ itemFromSystemSelected

void IVP13DSystem::itemFromSystemSelected ( )
signalinherited

◆ loadMaterialsFromFile

void VP1GeometrySystem::loadMaterialsFromFile ( const QString & filename)
protectedslot

Definition at line 3070 of file VP1GeometrySystem.cxx.

3071{
3072 if (filename.isEmpty())
3073 return;
3074 QFileInfo fi(filename);
3075 if (!fi.exists()) {
3076 QMessageBox::critical(0, "Error - file does not exists: "+filename,
3077 "File does not exists: <i>"+filename+"</i>",QMessageBox::Ok,QMessageBox::Ok);
3078 return;
3079 }
3080 if (!fi.isReadable()) {
3081 QMessageBox::critical(0, "Error - file is not readable: "+filename,
3082 "File is not readable: <i>"+filename+"</i>",QMessageBox::Ok,QMessageBox::Ok);
3083 return;
3084 }
3085 //open file
3086 QFile file(filename);
3087 if (!file.open(QIODevice::ReadOnly)) {
3088 QMessageBox::critical(0, "Error - problems opening file "+filename,
3089 "Problems opening file: <i>"+filename+"</i>",QMessageBox::Ok,QMessageBox::Ok);
3090 return;
3091 }
3092 QByteArray byteArray64;
3093 QDataStream infile(&file);
3094 infile >> byteArray64;
3095 QByteArray byteArray = qUncompress(QByteArray::fromBase64(byteArray64));
3096
3097 VP1Deserialise s(byteArray,this);
3098 if (s.version()!=0) {
3099 QMessageBox::critical(0, "Error - File in wrong format "+filename,
3100 "File in wrong format: <i>"+filename+"</i>",QMessageBox::Ok,QMessageBox::Ok);
3101 return;
3102 }
3103 QString txtbegin, txtend;
3104 QByteArray baDet, baMat, baVol;
3105 txtbegin = s.restoreString();
3106 baDet = s.restoreByteArray();
3107 baMat = s.restoreByteArray();
3108 baVol = s.restoreByteArray();
3109 txtend = s.restoreString();
3110 s.disableUnrestoredChecks();
3111 if (txtbegin!="VP1GeoMaterialsBegin"||txtend!="VP1GeoMaterialsEnd") {
3112 QMessageBox::critical(0, "Error - File in wrong format "+filename,
3113 "File in wrong format: <i>"+filename+"</i>",QMessageBox::Ok,QMessageBox::Ok);
3114 return;
3115 }
3116
3117 m_d->ensureInitVisAttributes();
3118 m_d->detVisAttributes->applyState(baDet);
3119 m_d->matVisAttributes->applyState(baMat);
3120 m_d->volVisAttributes->applyState(baVol);
3121
3122 VolumeHandle* lastsel = m_d->controller->lastSelectedVolume();
3123 m_d->controller->setLastSelectedVolume(0);
3124 m_d->controller->setLastSelectedVolume(lastsel);
3125}
TFile * file

◆ message() [1/3]

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

Definition at line 336 of file IVP1System.cxx.

337{
338 if (receivers(SIGNAL(sysmessage(QString))) > 0){
340 }
341 else{
342 std::cout<<VP1Msg::prefix_msg()<<" ["<<m_d->name.toStdString()<<"]: "<<str.toStdString()<<std::endl;
343 }
344}
void sysmessage(QString) const
static const char * prefix_msg()
Definition VP1Msg.h:56

◆ message() [2/3]

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

Definition at line 400 of file IVP1System.cxx.

401{
402 if (addtostart.isEmpty()) {
403 message(l,addtoend);
404 return;
405 }
406 if (addtoend.isEmpty()) {
407 for (const QString& s : l)
408 message(addtostart+s);
409 } else {
410 for (const QString& s : l)
411 message(addtostart+s+addtoend);
412 }
413}

◆ message() [3/3]

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

Definition at line 362 of file IVP1System.cxx.

363{
364 if (addtoend.isEmpty()) {
365 for (const QString& s : l)
366 message(s);
367 } else {
368 for (const QString& s : l)
369 message(s+addtoend);
370 }
371}

◆ messageDebug() [1/3]

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

Definition at line 347 of file IVP1System.cxx.

348{
349 if (VP1Msg::debug())
350 std::cout<<VP1Msg::prefix_debug()<<" ["<<m_d->name.toStdString()<<"]: "<<str.toStdString()<<std::endl;
351}
static const char * prefix_debug()
Definition VP1Msg.h:57

◆ messageDebug() [2/3]

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

Definition at line 416 of file IVP1System.cxx.

417{
418 if (addtostart.isEmpty()) {
419 messageDebug(l,addtoend);
420 return;
421 }
422 if (addtoend.isEmpty()) {
423 for (const QString& s : l)
424 messageDebug(addtostart+s);
425 } else {
426 for (const QString& s : l)
427 messageDebug(addtostart+s+addtoend);
428 }
429}
void messageDebug(const QString &) const

◆ messageDebug() [3/3]

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

Definition at line 374 of file IVP1System.cxx.

375{
376 if (addtoend.isEmpty()) {
377 for (const QString& s : l)
378 messageDebug(s);
379 } else {
380 for (const QString& s : l)
381 messageDebug(s+addtoend);
382 }
383}

◆ messageVerbose() [1/3]

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

Definition at line 354 of file IVP1System.cxx.

355{
356 if (VP1Msg::verbose())
357 std::cout<<VP1Msg::prefix_verbose()<<" ["<<m_d->name.toStdString()<<"]: "<<str.toStdString()<<std::endl;
358}
static const char * prefix_verbose()
Definition VP1Msg.h:59

◆ messageVerbose() [2/3]

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

Definition at line 432 of file IVP1System.cxx.

433{
434 if (!VP1Msg::verbose())
435 return;
436 if (addtostart.isEmpty()) {
437 messageVerbose(l,addtoend);
438 return;
439 }
440 if (addtoend.isEmpty()) {
441 for (const QString& s : l)
442 messageVerbose(addtostart+s);
443 } else {
444 for (const QString& s : l)
445 messageVerbose(addtostart+s+addtoend);
446 }
447}

◆ messageVerbose() [3/3]

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

Definition at line 386 of file IVP1System.cxx.

387{
388 if (!VP1Msg::verbose())
389 return;
390 if (addtoend.isEmpty()) {
391 for (const QString& s : l)
393 } else {
394 for (const QString& s : l)
395 messageVerbose(s+addtoend);
396 }
397}

◆ muonChamberT0sChanged

void VP1GeometrySystem::muonChamberT0sChanged ( const std::map< GeoPVConstLink, float > & t0s,
int index )
slot

The map is the dt0 per chamber, plus a label identifier, which by convention (!) is 0=Moore, 1=Muonboy.

Definition at line 3148 of file VP1GeometrySystem.cxx.

3148 {
3149 messageVerbose("muonChamberT0sChanged for this many chambers:"+str(t0s.size()));
3150 if (index>=m_d->chamberT0s.size())
3151 message("ERROR: chamber t0 index out of bounds!");
3152 else
3153 m_d->chamberT0s[index]=&t0s;
3154}
str index
Definition DeMoScan.py:362

◆ name()

const QString & IVP1System::name ( ) const
inherited

Definition at line 50 of file IVP1System.cxx.

51{
52 return m_d->name;
53}

◆ needErase

void IVP1System::needErase ( )
signalinherited

◆ orientViewToMuonChamber

void VP1GeometrySystem::orientViewToMuonChamber ( const GeoPVConstLink & chamberPV)
slot

Definition at line 1783 of file VP1GeometrySystem.cxx.

1784{
1785 if (!m_d->sceneroot)
1786 return;
1787
1788 //Find relevant muon subsystem info:
1789 Imp::SubSystemInfo * subsys = m_d->chamberPVToMuonSubSystemInfo(chamberPV);
1790 if (!subsys) {
1791 message("Error: Asked to orient view to chamber volume '"
1792 +QString(chamberPV->getLogVol()->getName().c_str())
1793 +"', which doesn't fit the known format of any chamber!");
1794 return;
1795 }
1796
1797 //Subsystem must be available:
1798 if (!subsys->soswitch) {//NB: Could as well look at checkbox enabled state instead of whether sw pointer is null.
1799 message("Warning: Asked to orient view to muon chamber volume which is not available. Perhaps muon geometry was not built?");
1800 return;
1801 }
1802
1803 //Find handle for the muon chamber (possibly ensure that relevant muon subsystem is build):
1804 std::map<PVConstLink,VolumeHandle*>::iterator itChamber = m_d->muonchambers_pv2handles.find(chamberPV);
1805 if (itChamber==m_d->muonchambers_pv2handles.end()) {
1806 //Probably the muon relevant muon system was not initialised. Build and try again:
1807 m_d->buildSystem(subsys);
1808 itChamber = m_d->muonchambers_pv2handles.find(chamberPV);
1809 if (itChamber==m_d->muonchambers_pv2handles.end()) {
1810 message("Error: Asked to orient view to chamber volume '"
1811 +QString(chamberPV->getLogVol()->getName().c_str())
1812 +"', but could not find chamber handle!");
1813 return;
1814 }
1815 }
1816 VolumeHandle * chamberHandle = itChamber->second;
1817
1818 //Figure out if we are MDT, CSC or TGC (if not we print warning and abort);
1819
1820 std::string name = chamberHandle->getNameStdString();
1821
1822 bool isCSCOrTGC = name.size()>=2 && ( (name[0]=='C' && name[1]=='S') || (name[0]=='T') );
1823 if (!isCSCOrTGC&&!(name.size()>=1&&(name[0]=='E'||name[0]=='B'))) {
1824 //Neither CSC, TGC or MDT:
1825 message("orientViewToMuonChamber Warning: Not CSC, TGC or MDT station!");
1826 return;
1827 }
1828
1829 bool save = subsys->soswitch->enableNotify(false);//Disable notifications to avoid chamber flickering in for a moment.
1830
1831 //If subsystem soswitch is turned off, we turn it on temporarily
1832 int32_t soswitch_val = subsys->soswitch->whichChild.getValue();
1833 if (soswitch_val!=SO_SWITCH_ALL)
1834 subsys->soswitch->whichChild = SO_SWITCH_ALL;
1835
1836 VP1GeoFlags::VOLSTATE oldChamberState = chamberHandle->state();
1837 chamberHandle->setState(VP1GeoFlags::CONTRACTED);
1838
1839 SoSeparator * chambersep = chamberHandle->nodeSoSeparator();
1840 if (chambersep) {
1841 std::set<SoCamera*> cameras = getCameraList();
1842 std::set<SoCamera*>::iterator it,itE = cameras.end();
1843 for (it=cameras.begin();it!=itE;++it) {
1844 //Find desired camera orientation (must be parallel to tubes - and
1845 //we choose the one of the possible orientations which is closest to
1846 //current camera orientation - i.e. loop over tubes and try both
1847 //positive and negative directions of each tube.
1848
1849 SbRotation camrot = (*it)->orientation.getValue();
1850 SbVec3f cameraDir(0, 0, -1); // init to default view direction vector
1851 camrot.multVec(cameraDir, cameraDir);
1852 SbVec3f cameraUpVec(0, 1, 0); // init to default up vector
1853 camrot.multVec(cameraUpVec, cameraUpVec);
1854
1855 std::pair<SbVec3f,SbVec3f> chamberdirections;
1856 if (isCSCOrTGC) {
1857 //CSC/TGC chamber - look at top TRD shape for directions
1858 chamberdirections = m_d->getClosestCSCOrTGCEdgeDirections(cameraDir,chamberHandle);
1859 } else {
1860 //MDT chamber - look at tubes for direction
1861 chamberdirections = m_d->getClosestMuonDriftTubeDirections(cameraDir,cameraUpVec,chamberHandle);
1862 }
1863 SbVec3f newdirection = - chamberdirections.first;
1864 SbVec3f newup(cameraUpVec);
1865 const float epsilon(0.00001f);
1866 if (m_d->previousAlignedChamberHandle==chamberHandle&&cameraDir.equals(newdirection,epsilon)) {
1867 //If we already zoomed in the direction of the chamber,
1868 //subsequent requests aligns the upvector along the other chamber
1869 //axes.
1870 SbRotation rot(cameraDir,0.5*M_PI);
1871 SbVec3f chambdir1 = chamberdirections.second;
1872 SbVec3f chambdir2,chambdir3,chambdir4;
1873 rot.multVec(chambdir1,chambdir2);
1874 rot.multVec(chambdir2,chambdir3);
1875 rot.multVec(chambdir3,chambdir4);
1876 if (cameraUpVec.equals(chambdir1,epsilon)) {
1877 newup = chambdir2;
1878 } else if (cameraUpVec.equals(chambdir2,epsilon)) {
1879 newup = chambdir3;
1880 } else if (cameraUpVec.equals(chambdir3,epsilon)) {
1881 newup = chambdir4;
1882 } else if (cameraUpVec.equals(chambdir4,epsilon)) {
1883 newup = chambdir1;
1884 } else {
1885 //Take the closest one...
1886 float cos1 = chambdir1.dot(cameraUpVec);
1887 float cos2 = chambdir2.dot(cameraUpVec);
1888 float cos3 = chambdir3.dot(cameraUpVec);
1889 float cos4 = chambdir4.dot(cameraUpVec);
1890 float maxcos = std::max(std::max(cos1,cos2),std::max(cos3,cos4));
1891 if (cos1==maxcos)
1892 newup = chambdir1;
1893 else if (cos2==maxcos)
1894 newup = chambdir2;
1895 else if (cos3==maxcos)
1896 newup = chambdir3;
1897 else
1898 newup = chambdir4;
1899 }
1900 }
1901
1902 //Zoom to chamber with given orientation - and we make sure the
1903 //chamber is attached while we initiate the zoom (so the camera
1904 //helper can use a boundaryboxaction to find the bounding box):
1905 VP1CameraHelper::animatedZoomToSubTree(*it,m_d->sceneroot,chambersep,1.0, 100.0, 100.0, 1.0,newdirection,newup);
1906 }
1907 }
1908
1909 chamberHandle->setState(oldChamberState);
1910 if (soswitch_val!=SO_SWITCH_ALL)
1911 subsys->soswitch->whichChild.setValue(soswitch_val);
1912 if (save) {
1913 subsys->soswitch->enableNotify(true);
1914 subsys->soswitch->touch();
1915 }
1916 m_d->previousAlignedChamberHandle=chamberHandle;
1917
1918}
#define M_PI
CamList getCameraList()
static VP1CameraHelper * animatedZoomToSubTree(SoCamera *camera, SoGroup *sceneroot, SoNode *subtreeroot, double duration_in_secs=1.0, double clipVolPercent=100.0, double lastClipVolPercent=100.0, double slack=1.0, const SbVec3f &lookat=SbVec3f(999, 999, 999), const SbVec3f &upvec=SbVec3f(999, 999, 999), bool varySpeed=true, bool forceCircular=false)
std::string getNameStdString() const
VP1GeoFlags::VOLSTATE state() const
SoSeparator * nodeSoSeparator() const

◆ plotSpectrum

void VP1GeometrySystem::plotSpectrum ( QStack< QString > & ,
int copyNumber = -1 )
signal

◆ refresh()

void IVP13DSystemSimple::refresh ( StoreGateSvc * storegate)
privatevirtualinherited

Implements IVP1System.

Definition at line 146 of file IVP13DSystemSimple.cxx.

147{
148 assert(m_d->wascreated);
149 assert(!m_d->wasrefreshed);
150
151 if (m_d->first) {
152 if(VP1Msg::verbose()){
153 messageVerbose("IVP13DSystemSimple first refresh - so calling create methods (i.e. delayed create).");
154 }
156 m_d->first = false;
157 m_d->root->removeChild(m_d->rootR);
159 m_d->root->addChild(m_d->rootR);
160 }
161
162 m_d->root->removeChild(m_d->rootE);
163 updateGUI();
164 buildEventSceneGraph(sg, m_d->rootE);
165 updateGUI();
166 m_d->root->addChild(m_d->rootE);
167
168 m_d->wasrefreshed=true;
169
170}
virtual void systemcreate(StoreGateSvc *detstore)
virtual void buildPermanentSceneGraph(StoreGateSvc *detstore, SoSeparator *root)
virtual void buildEventSceneGraph(StoreGateSvc *sg, SoSeparator *root)=0
StoreGateSvc * detectorStore() const

◆ registerCamera()

void IVP13DSystem::registerCamera ( SoCamera * camera)
inherited

Definition at line 410 of file IVP13DSystem.cxx.

410 {
411 if (!cam)
412 return;
413 m_d->staticcameras.insert(cam);
414 cam->ref();
415}

◆ registerController()

void IVP1System::registerController ( QWidget * w)
protectedinherited

Definition at line 224 of file IVP1System.cxx.

225{
226 if (VP1Msg::verbose()) {
227 messageVerbose("registerController ");
228 messageVerbose("registerController m_d->canregistercontroller = "+QString(m_d->canregistercontroller?"true":"false"));
229 messageVerbose("registerController m_d->state==CONSTRUCTED = "+QString(m_d->state==CONSTRUCTED?"true":"false"));
230 messageVerbose("registerController m_d->controller==0 = "+QString(m_d->controller==0?"true":"false"));
231 messageVerbose("registerController w!=0 = "+QString(w!=0?"true":"false"));
232 }
233 if (!m_d->canregistercontroller)
234 message("ERROR: Please don't register controllers after create().");
235 if (m_d->state!=CONSTRUCTED)
236 message("ERROR: Please only register controllers in CONSTRUCTED state.");
237 if (!w) {
238 message("ERROR: Attempt to register null controller.");
239 return;
240 }
241 if (m_d->controller) {
242 message("ERROR: Attempt to register controller twice.");
243 return;
244 }
245 m_d->controller = w;
246 w->setParent(0);
247}

◆ registerSelectionNode()

void IVP13DSystem::registerSelectionNode ( SoCooperativeSelection * selection)
inherited

Definition at line 257 of file IVP13DSystem.cxx.

258{
259 if (!selection) {
260 message("registerSelectionNode Error: NULL selection pointer!");
261 return;
262 }
264 message("registerSelectionNode Error: Trying to register selection node more than once!");
265 return;
266 }
267
268 selection->addSelectionCallback( Imp::made_selection, selection );
269 selection->addDeselectionCallback( Imp::made_deselection, selection );
270 selection->addStartCallback( Imp::start_changeselection, this );
271 selection->addFinishCallback( Imp::finished_changeselection, this );
272 selection->addClickOutsideCallback( Imp::clickedoutside, this );
273
275 selection->ref();
276
277 messageVerbose("selection node registered");
278}
static void clickedoutside(void *userdata, SoCooperativeSelection *sel)
static void made_selection(void *userdata, SoPath *path)
const std::string selection
std::string find(const std::string &s)
return a remapped string
Definition hcg.cxx:140

◆ registerViewer()

void IVP13DSystem::registerViewer ( SoQtViewer * viewer)
inherited

Definition at line 418 of file IVP13DSystem.cxx.

419{
420 if (!viewer)
421 return;
422 m_d->viewers.insert(viewer);
423}

◆ reiconizeToShowSpecificMuonChambers

void VP1GeometrySystem::reiconizeToShowSpecificMuonChambers ( const std::set< GeoPVConstLink > & chambers)
slot

Definition at line 1624 of file VP1GeometrySystem.cxx.

1625{
1626 //Update map of touched chamber lists:
1627 bool listChanged(m_d->sender2ChamberList.find(sender())!=m_d->sender2ChamberList.end()?
1628 (chambers != m_d->sender2ChamberList[sender()]):true);
1629 m_d->sender2ChamberList[sender()] = chambers;
1630
1631 //Trigger update if list changed and in auto mode:
1632 if ( listChanged && m_d->controller->autoAdaptMuonChambersToEventData() )
1634}

◆ resetSubSystems

void VP1GeometrySystem::resetSubSystems ( VP1GeoFlags::SubSystemFlags f)
protectedslot

Definition at line 1533 of file VP1GeometrySystem.cxx.

1534{
1535 if (!f) {
1536 return;
1537 }
1538
1539 deselectAll();
1540 for (Imp::SubSystemInfo*si : m_d->subsysInfoList) {
1541 if (si->flag & f) {
1542 if (!si->isbuilt) {
1543 continue;
1544 }
1545 VolumeHandle::VolumeHandleListItr it(si->vollist.begin()),itE(si->vollist.end());
1546 for (;it!=itE;++it) {
1547 messageDebug("resetting volume --> " + (*it)->getName() );
1548 (*it)->reset();
1549 }
1550 }
1551 }
1552}

◆ restoreFromState()

void VP1GeometrySystem::restoreFromState ( QByteArray ba)
virtual

Reimplemented from IVP1System.

Definition at line 1346 of file VP1GeometrySystem.cxx.

1346 {
1347 VP1Deserialise state(ba,this);
1348 if (state.version()<0||state.version()>7) {
1349 message("Warning: State data in .vp1 file is in wrong format - ignoring!");
1350 return;
1351 }
1352 if (state.version()<=5) {
1353 message("Warning: State data in .vp1 file is in obsolete format - ignoring!");
1354 return;
1355 }
1356
1358 IVP13DSystemSimple::restoreFromState(state.restoreByteArray());
1359
1360 //Controller:
1361 m_d->controller->restoreSettings(state.restoreByteArray());
1362
1363 //Subsystem checkboxes:
1364 VP1GeoFlags::SubSystemFlags flags;
1365 QMap<QString,bool> subsysstate = state.restore<QMap<QString,bool> >();
1366 for (Imp::SubSystemInfo * subsys : m_d->subsysInfoList) {
1367 state.widgetHandled(subsys->checkbox);
1368 if (subsysstate.contains(subsys->checkbox->text())&&subsysstate[subsys->checkbox->text()])
1369 flags |= subsys->flag;
1370 }
1371 m_d->initialSubSystemsTurnedOn = flags;
1372
1373 //Volume states:
1374 QMap<quint32,QByteArray> topvolstates;
1375 topvolstates = state.restore<QMap<quint32,QByteArray> >();
1376 if (m_d->sceneroot)//(for some reason) we already have been in buildPermanentScenegraph
1377 m_d->applyTopVolStates(topvolstates,true);
1378 else
1379 m_d->restoredTopvolstates = topvolstates;//save until buildPermanentScenegraph
1380
1381 if (state.version()>=7) {
1382 m_d->ensureInitVisAttributes();
1383 m_d->detVisAttributes->applyState(state.restoreByteArray());
1384 m_d->matVisAttributes->applyState(state.restoreByteArray());
1385 m_d->volVisAttributes->applyState(state.restoreByteArray());
1386 }
1387
1388 state.disableUnrestoredChecks();//We do the testing in the controller
1389
1390 //Special:
1391 if (m_d->controller->autoAdaptMuonChambersToEventData())
1393}
virtual void restoreFromState(QByteArray)
State state() const

◆ saveMaterialsToFile

void VP1GeometrySystem::saveMaterialsToFile ( const QString & filename,
bool onlyChangedMaterials )
protectedslot

Definition at line 3031 of file VP1GeometrySystem.cxx.

3032{
3033 if (filename.isEmpty())
3034 return;
3035
3036 //If file exists, ask to overwrite.
3037 QFileInfo fi(filename);
3038 if (fi.exists()) {
3039 if (!fi.isWritable()) {
3040 QMessageBox::critical(0, "Error - could not save to file "+filename,
3041 "Could not save to file: <i>"+filename+"</i>"
3042 +"<br/><br/>Reason: File exists already and is write protected",QMessageBox::Ok,QMessageBox::Ok);
3043 return;
3044 }
3045 }
3046
3047 QFile file(filename);
3048 if (!file.open(QIODevice::WriteOnly)) {
3049 QMessageBox::critical(0, "Error - problems writing to file "+filename,
3050 "Problems writing to file: <i>"+filename+"</i>",QMessageBox::Ok,QMessageBox::Ok);
3051 return;
3052 }
3053
3054 m_d->ensureInitVisAttributes();
3055 VP1Serialise s(0/*version*/,this);
3056 //Save some file ID info!!
3057 s.save(QString("VP1GeoMaterialsBegin"));
3058 s.save(m_d->detVisAttributes->getState(onlyChangedMaterials));
3059 s.save(m_d->matVisAttributes->getState(onlyChangedMaterials));
3060 s.save(m_d->volVisAttributes->getState(onlyChangedMaterials));
3061 s.save(QString("VP1GeoMaterialsEnd"));
3062 s.disableUnsavedChecks();
3063
3064 QDataStream outfile(&file);
3065 outfile<<qCompress(s.result()).toBase64();
3066
3067}

◆ saveState()

QByteArray VP1GeometrySystem::saveState ( )
virtual

Reimplemented from IVP1System.

Definition at line 1307 of file VP1GeometrySystem.cxx.

1307 {
1308
1310
1311 VP1Serialise serialise(7/*version*/,this);
1313
1314 //Controller:
1315 serialise.save(m_d->controller->saveSettings());
1316
1317 //Subsystem checkboxes:
1318 QMap<QString,bool> subsysstate;
1319 for (Imp::SubSystemInfo * subsys : m_d->subsysInfoList) {
1320 serialise.widgetHandled(subsys->checkbox);
1321 subsysstate.insert(subsys->checkbox->text(),subsys->checkbox->isChecked());
1322 }
1323 serialise.save(subsysstate);
1324
1325 //Volume states:
1326 QMap<quint32,QByteArray> topvolstates;
1327 for (Imp::SubSystemInfo * subsys : m_d->subsysInfoList) {
1328 if (m_d->controller->autoAdaptMuonChambersToEventData()&&subsys->hasMuonChambers())
1329 continue;//No need to store muon chamber data which will anyway be auto-adapted away.
1330 VolumeHandle::VolumeHandleListItr it(subsys->vollist.begin()),itE(subsys->vollist.end());
1331 for (;it!=itE;++it)
1332 topvolstates.insert((*it)->hashID(),(*it)->getPersistifiableState());
1333 }
1334 serialise.save(topvolstates);
1335
1336 m_d->ensureInitVisAttributes();
1337 serialise.save(m_d->detVisAttributes->getState());//version 7+
1338 serialise.save(m_d->matVisAttributes->getState());//version 7+
1339 serialise.save(m_d->volVisAttributes->getState());//version 7+
1340
1341 serialise.disableUnsavedChecks();//We do the testing in the controller
1342 return serialise.result();
1343}
virtual QByteArray saveState()
void serialise(const std::vector< const IRoiDescriptor * > &rois, roiserial_type &s)
serialise an entire vector of IRoiDescriptors

◆ serviceLocator()

ISvcLocator * IVP1System::serviceLocator ( ) const
inherited

Definition at line 324 of file IVP1System.cxx.

325{
327}
static ISvcLocator * serviceLocator()

◆ setActiveState()

void IVP1System::setActiveState ( const ActiveState & s,
const bool & donttriggererase = true )
privateinherited

Definition at line 162 of file IVP1System.cxx.

163{
164 //First handle case where we dont actually change state. Only
165 //special consideration is OFF->OFF where we have to do something if
166 //we need to erase:
167 if (m_d->activeState==OFF&&s==OFF&&(m_d->state==REFRESHED||m_d->refreshing)&&!donttriggererase) {
168 needErase();
169 m_d->channel->emitRefreshInfoChanged();
170 return;
171 } else if (m_d->activeState==s) {
172 m_d->channel->emitRefreshInfoChanged();
173 return;
174 }
175
176 //Ok, we know that we are either ON->OFF or OFF->ON.
177 m_d->activeState = s;
178
179 if (s==ON) {
180 //OFF->ON: We might need a refresh, so send out a signal for the scheduler:
182 } else {
183 //ON->OFF: We might need an erase signal:
184 if ((m_d->state==REFRESHED||m_d->refreshing)&&!donttriggererase) {
185 needErase();
186 }
187 }
188 m_d->channel->emitRefreshInfoChanged();
189}
void inactiveSystemTurnedActive()
void needErase()

◆ setAutoAdaptMuonChambersToEventData()

void VP1GeometrySystem::setAutoAdaptMuonChambersToEventData ( bool b)

Definition at line 357 of file VP1GeometrySystem.cxx.

358{
360 if (m_d->controller->autoAdaptMuonChambersToEventData()!=b) {
361 m_d->controller->setAutoAdaptMuonChambersToEventData(b);
362 if (b)
364 }
365}

◆ setCanRegisterController()

void IVP1System::setCanRegisterController ( const bool & c)
privateinherited

Definition at line 285 of file IVP1System.cxx.

286{
287 if (VP1Msg::verbose()){
288 messageVerbose("setCanRegisterController called with"+QString(c?"true":"false"));
289 }
290 m_d->canregistercontroller=c;
291}

◆ setChannel()

void IVP1System::setChannel ( IVP1ChannelWidget * cw)
privateinherited

Definition at line 94 of file IVP1System.cxx.

95{
96 if (VP1Msg::verbose()) {
97 messageVerbose("setChannel ");
98 messageVerbose("setChannel m_d->state==CONSTRUCTED = "+QString(m_d->state==CONSTRUCTED?"true":"false"));
99 messageVerbose("setChannel cw!=0 = "+QString(cw!=0?"true":"false"));
100 }
101 assert(!m_d->channel);
102 assert(cw);
103 assert(m_d->state==CONSTRUCTED);
104 m_d->channel = cw;
105}

◆ setCurvedSurfaceRealism

void VP1GeometrySystem::setCurvedSurfaceRealism ( int val)
slot

Definition at line 1504 of file VP1GeometrySystem.cxx.

1505{
1507 if (val<0||val>100) {
1508 message("setCurvedSurfaceRealism Error: Value "+str(val)+"out of range!");
1509 return;
1510 }
1511 m_d->controller->setComplexity(val==100?1.0:(val==0?0.0:val/100.0));
1512}

◆ setGeometrySelectable()

void VP1GeometrySystem::setGeometrySelectable ( bool b)

Definition at line 338 of file VP1GeometrySystem.cxx.

338 {
340 m_d->controller->setGeometrySelectable(b);
341}

◆ setLabelPosOffsets

void VP1GeometrySystem::setLabelPosOffsets ( const QList< int > & )
protectedslot
Parameters
-offsets

Definition at line 3128 of file VP1GeometrySystem.cxx.

3129{
3130 messageVerbose("setLabelPosOffsets called");
3131 setLabels(m_d->controller->labels());
3132}

◆ setLabels

void VP1GeometrySystem::setLabels ( int i)
protectedslot

Definition at line 3134 of file VP1GeometrySystem.cxx.

3134 {
3135 messageVerbose("setLabels "+str(i)+" for this many chambers:"+str(m_d->muonchambers_pv2handles.size()));
3136 // loop over all contained volumes (all visible volumes?) and update labels.
3137 // Just muons to start with
3138 std::map<PVConstLink,VolumeHandle*>::const_iterator it = m_d->muonchambers_pv2handles.begin(), itEnd = m_d->muonchambers_pv2handles.end();
3139 for (; it!=itEnd ; ++it){
3140 if (it->second->isInMuonChamber()) it->second->updateLabels(); // currently only do labels for Muon volumes
3141 }
3142}

◆ setOrientViewToMuonChambersOnClick()

void VP1GeometrySystem::setOrientViewToMuonChambersOnClick ( bool b)

Definition at line 350 of file VP1GeometrySystem.cxx.

351{
353 m_d->controller->setOrientViewToMuonChambersOnClick(b);
354}

◆ setRefreshing()

void IVP1System::setRefreshing ( const bool & b)
privateinherited

Definition at line 114 of file IVP1System.cxx.

115{
116 if (VP1Msg::verbose()){
117 messageVerbose("setRefreshing() called with b="+QString(b?"true":"false"));
118 }
119 if (b) {
120 assert(m_d->state==ERASED);
121 } else {
122 assert(m_d->state==REFRESHED);
123 }
124 m_d->refreshing = b;
125}

◆ setShowVolumeOutLines

void VP1GeometrySystem::setShowVolumeOutLines ( bool b)
protectedslot

Definition at line 3022 of file VP1GeometrySystem.cxx.

3023{
3024 std::map<SoSeparator*,VolumeHandle*>::iterator it,itE(m_d->sonodesep2volhandle.end());
3025 for (it =m_d->sonodesep2volhandle.begin();it!=itE;++it)
3027}
static void setShowVolumeOutlines(SoGroup *nodesep, bool showvol)

◆ setState()

void IVP1System::setState ( const State & s)
privateinherited

Definition at line 141 of file IVP1System.cxx.

142{
143#ifndef NDEBUG
144 assert (m_d->state != s);
145 assert(s!=CONSTRUCTED);
146 if (s==REFRESHED) {
147 assert(m_d->state==ERASED);
148 }
149 if (s==ERASED) {
150 assert(m_d->state==REFRESHED||m_d->state==CONSTRUCTED);
151 }
152 if (s==UNCREATED) {
153 assert(m_d->state==ERASED);
154 }
155#endif
156 m_d->state = s;
157 if (s==REFRESHED||s==ERASED)
158 m_d->channel->emitRefreshInfoChanged();
159}

◆ setUserSelectionNotificationsEnabled()

void IVP13DSystem::setUserSelectionNotificationsEnabled ( SoCooperativeSelection * sel,
bool enabled )
inherited

Definition at line 310 of file IVP13DSystem.cxx.

311{
312 if (!selection) {
313 message("setUserSelectionNotificationsEnabled Error: NULL selection pointer!");
314 return;
315 }
317 message("setUserSelectionNotificationsEnabled Error: Called for selection which was never registered!");
318 return;
319 }
320 if (enabled != m_d->selectionsWithDisabledNotifications.contains(selection))
321 return;
322
323 if (enabled)
324 m_d->selectionsWithDisabledNotifications.remove(selection);
325 else
326 m_d->selectionsWithDisabledNotifications << selection;
327
328}

◆ setZoomToVolumeOnClick()

void VP1GeometrySystem::setZoomToVolumeOnClick ( bool b)

Definition at line 344 of file VP1GeometrySystem.cxx.

344 {
346 m_d->controller->setZoomToVolumeOnClick(b);
347}

◆ state()

IVP1System::State IVP1System::state ( ) const
inherited

Definition at line 129 of file IVP1System.cxx.

130{
131 return m_d->state;
132}

◆ storeGate()

StoreGateSvc * IVP1System::storeGate ( ) const
inlineinherited

Definition at line 119 of file IVP1System.h.

119{ return eventStore(); }//OBSOLETE NAME. Use eventStore() instead.
StoreGateSvc * eventStore() const

◆ str() [1/30]

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]

QString VP1String::str ( const bool b)
inlinestaticinherited

Definition at line 53 of file VP1String.h.

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

◆ str() [3/30]

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

Definition at line 50 of file VP1String.h.

50{ return c; }

◆ str() [4/30]

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

Definition at line 81 of file VP1String.h.

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

◆ str() [5/30]

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>
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>
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>
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]

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}
static QColor sbcol2qcol(const SbColor &)

◆ 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)+")"; }
#define y
#define x

◆ 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)+")"; }
#define 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>
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]

QString VP1String::str ( int n)
inlinestaticinherited

Definition at line 77 of file VP1String.h.

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

◆ str() [24/30]

QString VP1String::str ( long n)
inlinestaticinherited

Definition at line 75 of file VP1String.h.

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

◆ str() [25/30]

QString VP1String::str ( qlonglong n)
inlinestaticinherited

Definition at line 79 of file VP1String.h.

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

◆ str() [26/30]

QString VP1String::str ( qulonglong n)
inlinestaticinherited

Definition at line 80 of file VP1String.h.

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

◆ str() [27/30]

QString VP1String::str ( short int n)
inlinestaticinherited

Definition at line 73 of file VP1String.h.

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

◆ str() [28/30]

QString VP1String::str ( uint n)
inlinestaticinherited

Definition at line 78 of file VP1String.h.

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

◆ str() [29/30]

QString VP1String::str ( ulong n)
inlinestaticinherited

Definition at line 76 of file VP1String.h.

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

◆ str() [30/30]

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

Definition at line 74 of file VP1String.h.

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

◆ sysmessage

void IVP1System::sysmessage ( QString ) const
signalinherited

◆ systemcreate()

void VP1GeometrySystem::systemcreate ( StoreGateSvc * detstore)
virtual

Reimplemented from IVP13DSystemSimple.

Definition at line 507 of file VP1GeometrySystem.cxx.

508{
509 m_d->ensureInitVisAttributes();
510}

◆ systemerase()

void IVP13DSystemSimple::systemerase ( )
virtualinherited

Reimplemented in VP1AODSystem, VP1CaloCellSystem, VP1CaloClusterSystem, VP1CaloHitLegoSystem, VP1CaloLegoSystem, VP1PrepRawDataSystem, VP1RawDataSystem, VP1TrackSystem, and VP1VertexSystem.

Definition at line 28 of file IVP13DSystemSimple.cxx.

29{
30 // messageVerbose("WARNING: Did not reimplement systemerase!");
31}

◆ systemuncreate()

void VP1GeometrySystem::systemuncreate ( )
virtual

Reimplemented from IVP13DSystemSimple.

Definition at line 316 of file VP1GeometrySystem.cxx.

317{
318
319 m_d->volumetreemodel->cleanup();
320 delete m_d->matVisAttributes; m_d->matVisAttributes = 0;
321 delete m_d->detVisAttributes; m_d->detVisAttributes = 0;
322 delete m_d->volVisAttributes; m_d->volVisAttributes = 0;
323
324 for (Imp::SubSystemInfo * subsys : m_d->subsysInfoList)
325 delete subsys;
326 m_d->subsysInfoList.clear();
327
328}

◆ toolSvc()

IToolSvc * IVP1System::toolSvc ( ) const
inherited

Definition at line 330 of file IVP1System.cxx.

331{
332 return VP1AthenaPtrs::toolSvc();
333}
static IToolSvc * toolSvc()

◆ uncreate()

void IVP13DSystemSimple::uncreate ( )
privatevirtualinherited

Reimplemented from IVP1System.

Definition at line 202 of file IVP13DSystemSimple.cxx.

203{
204
205 if(VP1Msg::verbose()){
206 messageDebug("uncreate()...");
207 }
208
209 assert(m_d->wascreated);
210 assert(!m_d->wasrefreshed);
211 m_d->rootE->enableNotify(false);
212 m_d->rootR->enableNotify(false);
214 m_d->root->removeAllChildren();
215 m_d->rootE->removeAllChildren();
216 m_d->rootR->removeAllChildren();
217 m_d->wascreated=false;
218}
virtual void systemuncreate()

◆ unregisterSelectionNode()

void IVP13DSystem::unregisterSelectionNode ( SoCooperativeSelection * selection)
inherited

Definition at line 281 of file IVP13DSystem.cxx.

282{
283 if (!selection) {
284 message("unregisterSelectionNode Error: NULL selection pointer!");
285 return;
286 }
288 message("registerSelectionNode Error: Trying to unregister unknown selection node!");
289 return;
290 }
291
292 selection->removeSelectionCallback( Imp::made_selection, selection );
293 selection->removeDeselectionCallback( Imp::made_deselection, selection );
294 selection->removeStartCallback( Imp::start_changeselection, this );
295 selection->removeFinishCallback( Imp::finished_changeselection, this );
296 selection->removeClickOutsideCallback( Imp::clickedoutside, this );
297
299 if (m_d->selectionsWithDisabledNotifications.contains(selection))
300 m_d->selectionsWithDisabledNotifications.remove(selection);
301 selection->unref();
302
303 messageVerbose("selection node unregistered");
304
305}

◆ updateGUI()

void IVP13DSystemSimple::updateGUI ( )
inlineinherited

Definition at line 89 of file IVP13DSystemSimple.h.

◆ updateTransparency

void VP1GeometrySystem::updateTransparency ( )
protectedslot

Definition at line 1517 of file VP1GeometrySystem.cxx.

1518{
1520
1521 float transparency = m_d->controller->transparency();
1522
1523 VolumeHandle* lastSelVol = m_d->controller->lastSelectedVolume();
1524 m_d->controller->setLastSelectedVolume(0);
1525 m_d->ensureInitVisAttributes();
1526 m_d->detVisAttributes->overrideTransparencies(transparency);
1527 m_d->matVisAttributes->overrideTransparencies(transparency);
1528 m_d->volVisAttributes->overrideTransparencies(transparency);
1529 m_d->controller->setLastSelectedVolume(lastSelVol);
1530}

◆ userChangedSelection()

void IVP13DSystem::userChangedSelection ( SoCooperativeSelection * ,
const QSet< SoNode * > & ,
QSet< SoPath * >  )
virtualinherited

◆ userClickedOnBgd()

void IVP13DSystem::userClickedOnBgd ( )
virtualinherited

Reimplemented in VP1AODSystem, VP1CaloReadoutSystem, VP1PrepRawDataSystem, and VP1TrackSystem.

Definition at line 62 of file IVP13DSystem.cxx.

62{}

◆ userDeselectedSingleNode()

void IVP13DSystem::userDeselectedSingleNode ( SoCooperativeSelection * ,
SoNode * ,
SoPath *  )
virtualinherited

Reimplemented in VP1AODSystem, VP1PrepRawDataSystem, and VP1TrackSystem.

Definition at line 60 of file IVP13DSystem.cxx.

60{}

◆ userPickedNode()

void VP1GeometrySystem::userPickedNode ( SoNode * pickedNode,
SoPath * pickedPath )
virtual

Reimplemented from IVP13DSystemSimple.

Definition at line 821 of file VP1GeometrySystem.cxx.

822{
823
825 // We want to find the volumehandle for the volume. To do so, we look //
826 // for the SoSeparator identifying the actual picked shape node, and //
827 // use it to look up the handle: //
829
830 //Looking for the identifying "nodesep", there are three scenarios
831 //for the type signatures of the final part of the path:
832 //
833 // 1) Most shapes:
834 // nodesep -> pickedNode (but we must pop to a group node in case of SoCylinders)
835 //
836 // 2) Volumes Around Z (all phi sectors enabled):
837 // nodesep -> switch -> pickedNode
838 //
839 // 3) Volumes Around Z (only some phi sectors enabled):
840 // nodesep -> switch -> sep -> pickedNode
841 //
842 // In the third scenario we also have to pop the path, in order for
843 // all phi-slices of the part gets highlighted (since more than one
844 // soshape node represents the volume).
845
846
847 VP1Msg::messageDebug("VP1GeometrySystem::userPickedNode()");
848
849 if (pickedPath->getNodeFromTail(0)->getTypeId()==SoCylinder::getClassTypeId())
850 pickedPath->pop();
851
852 if (pickedPath->getLength()<5) {
853 message("Path too short");
854 return;
855 }
856
857 SoSeparator * nodesep(0);
858
859 if (pickedPath->getNodeFromTail(1)->getTypeId()==SoSeparator::getClassTypeId()
860 && pickedPath->getNodeFromTail(2)->getTypeId()==SoSwitch::getClassTypeId()
861 && pickedPath->getNodeFromTail(3)->getTypeId()==SoSeparator::getClassTypeId())
862 {
863 //Scenario 3:
864 nodesep = static_cast<SoSeparator*>(pickedPath->getNodeFromTail(3));
865 pickedPath->pop();//To get highlighting of siblings also.
866 }
867 else if (pickedPath->getNodeFromTail(1)->getTypeId()==SoSwitch::getClassTypeId()
868 && pickedPath->getNodeFromTail(2)->getTypeId()==SoSeparator::getClassTypeId())
869 {
870 //Scenario 2:
871 nodesep = static_cast<SoSeparator*>(pickedPath->getNodeFromTail(2));
872 }
873 else if (pickedPath->getNodeFromTail(1)->getTypeId()==SoSeparator::getClassTypeId()) {
874 //Scenario 1 (normal):
875 nodesep = static_cast<SoSeparator*>(pickedPath->getNodeFromTail(1));
876 }
877 if (!nodesep) {
878 message("Unexpected picked path");
879 return;
880 }
881 if ( (!(nodesep)) || (m_d->sonodesep2volhandle.find(nodesep) == m_d->sonodesep2volhandle.end()) ) {
882 message("Problems finding volume handle");
883 return;
884 }
885 VolumeHandle * volhandle = m_d->sonodesep2volhandle[nodesep];
886 if (!volhandle) {
887 message("Found NULL volume handle");
888 return;
889 }
890
892 // Next thing to do is to check whether volume was clicked on with a //
893 // modifier of SHIFT/CTRL/Z. If so, we have to change the state on //
894 // the volume handle. Otherwise, we need to print some information: //
896
897 //For focus reason, and since Qt doesn't allow standard keys such as
898 //'z' as modifiers, we check for keypress states using a combination
899 //of the inventor and Qt way
900
901 bool shift_isdown = (Qt::ShiftModifier & QApplication::keyboardModifiers());
902// || ( m_d->kbEvent && (SO_KEY_PRESS_EVENT(m_d->kbEvent, SoKeyboardEvent::LEFT_SHIFT)||
903// SO_KEY_PRESS_EVENT(m_d->kbEvent, SoKeyboardEvent::RIGHT_SHIFT)) ) );
904
905 if (shift_isdown) {
906 //Parent of volume should be put in CONTRACTED state.
907 deselectAll();
908 if (volhandle->parent())
910 m_d->phisectormanager->updateRepresentationsOfVolsAroundZAxis();
911 return;
912 }
913
914 bool ctrl_isdown = (Qt::ControlModifier & QApplication::keyboardModifiers());
915// || ( m_d->kbEvent && (SO_KEY_PRESS_EVENT(m_d->kbEvent, SoKeyboardEvent::LEFT_CONTROL)||
916// SO_KEY_PRESS_EVENT(m_d->kbEvent, SoKeyboardEvent::RIGHT_CONTROL)) ) );
917
918 if (ctrl_isdown) {
919 //Volume should be put in EXPANDED state if it has children.
920 deselectAll();
921 if (volhandle->nChildren()>0) {
923 }
924 m_d->phisectormanager->updateRepresentationsOfVolsAroundZAxis();
925 return;
926 }
927
928 bool z_isdown = m_d->kbEvent && SO_KEY_PRESS_EVENT(m_d->kbEvent,SoKeyboardEvent::Z);
929 if (z_isdown) {
930 //Volume should be put in ZAPPED state.
931 deselectAll();
932 volhandle->setState(VP1GeoFlags::ZAPPED);
933 message("===> Zapping Node: "+volhandle->getName());
934 // std::cout<<"Zapped VH="<<volhandle<<std::endl;
935 return;
936 }
937
939 // Depending on settings, we are to realign the camera if the //
940 // clicked volume is (daughter of) a muon chamber //
942
943 bool orientedView(false);
944 if (m_d->controller->orientViewToMuonChambersOnClick() && volhandle->isInMuonChamber()) {
945 //Volume is an, or is daughter of an, MDT, CSC or TGC chamber
947 orientedView = true;
948 //Now we must fix the tail of the pickedPath to ensure we
949 //select the correct node corresponding to the clicked volume
950 //again (it might have become attached/detached by the call to
951 //orientViewToMuonChamber):
952 if (!VP1QtInventorUtils::changePathTail(pickedPath,m_d->sceneroot,volhandle->nodeSoSeparator())) {
953 message("Warning: Failed to relocate picked node.");
954 deselectAll();
955 }
956 }
957
959 // Zoom to volume //
961
962 //Nb: We don't do this if we already oriented to the muon chamber above.
963 if (!orientedView&&m_d->controller->zoomToVolumeOnClick()) {
964 if (m_d->sceneroot&&volhandle->nodeSoSeparator()) {
965 std::set<SoCamera*> cameras = getCameraList();
966 std::set<SoCamera*>::iterator it,itE = cameras.end();
967 for (it=cameras.begin();it!=itE;++it) {
968 VP1CameraHelper::animatedZoomToSubTree(*it,m_d->sceneroot,volhandle->nodeSoSeparator(),2.0,1.0);
969 }
970 }
971 }
972
973
975 // Update last-select controls //
977
978 m_d->controller->setLastSelectedVolume(volhandle);
979
981 // OK, time to print some information for the volume //
983
984 message("===> Selected Node: "+volhandle->getName());
985 // std::cout<<"VolHandle = "<<volhandle<<std::endl;
986 if (m_d->controller->printInfoOnClick_Shape()) {
987 for (const QString& str : DumpShape::shapeToStringList(volhandle->geoPVConstLink()->getLogVol()->getShape()))
988 message(str);
989 }
990
991 if (m_d->controller->printInfoOnClick_Material()) {
992 message("===> Material:");
993 for (const QString& line : VP1GeomUtils::geoMaterialToStringList(volhandle->geoMaterial()))
994 message(" "+line);
995 }
996
997 if ( m_d->controller->printInfoOnClick_CopyNumber() ) {
998 int cn = volhandle->copyNumber();
999 message("===> CopyNo : "+(cn>=0?QString::number(cn):QString(cn==-1?"Invalid":"Error reconstructing copynumber")));
1000 }
1001
1002 if ( m_d->controller->printInfoOnClick_Transform() ) {
1003
1004 float translation_x, translation_y, translation_z, rotaxis_x, rotaxis_y, rotaxis_z, rotangle_radians;
1006 translation_x, translation_y, translation_z,
1007 rotaxis_x, rotaxis_y, rotaxis_z, rotangle_radians );
1008 message("===> Local Translation:");
1009 message(" x = "+QString::number(translation_x/CLHEP::mm)+" mm");
1010 message(" y = "+QString::number(translation_y/CLHEP::mm)+" mm");
1011 message(" z = "+QString::number(translation_z/CLHEP::mm)+" mm");
1012 message("===> Local Rotation:");
1013 message(" axis x = "+QString::number(rotaxis_x));
1014 message(" axis y = "+QString::number(rotaxis_y));
1015 message(" axis z = "+QString::number(rotaxis_z));
1016 message(" angle = "+QString::number(rotangle_radians*180.0/M_PI)+" deg");
1018 translation_x, translation_y, translation_z,
1019 rotaxis_x, rotaxis_y, rotaxis_z, rotangle_radians );
1020 message("===> Global Translation:");
1021 message(" x = "+QString::number(translation_x/CLHEP::mm)+" mm");
1022 message(" y = "+QString::number(translation_y/CLHEP::mm)+" mm");
1023 message(" z = "+QString::number(translation_z/CLHEP::mm)+" mm");
1024 message("===> Global Rotation:");
1025 message(" axis x = "+QString::number(rotaxis_x));
1026 message(" axis y = "+QString::number(rotaxis_y));
1027 message(" axis z = "+QString::number(rotaxis_z));
1028 message(" angle = "+QString::number(rotangle_radians*180.0/M_PI)+" deg");
1029 }
1030
1031 if (m_d->controller->printInfoOnClick_Tree()) {
1032 std::ostringstream str;
1033 GeoPrintGraphAction pg(str);
1034 volhandle->geoPVConstLink()->exec(&pg);
1035 message("===> Tree:");
1036 for (const QString& line : QString(str.str().c_str()).split("\n"))
1037 message(" "+line);
1038 }
1039
1040 if (m_d->controller->printInfoOnClick_Mass()) {
1041 //FIXME: Move the mass calculations to the volume handles, and let
1042 //the common data cache some of the volume information by
1043 //logVolume).
1044 message("===> Total Mass &lt;===");
1045 message("Inclusive "+QString::number(Imp::inclusiveMass(volhandle->geoPVConstLink())/CLHEP::kilogram)+" kg");
1046 message("Exclusive "+QString::number(Imp::exclusiveMass(volhandle->geoPVConstLink())/CLHEP::kilogram)+" kg");
1047 }
1048
1049 if (m_d->controller->printInfoOnClick_MuonStationInfo()&&volhandle->isInMuonChamber()) {
1050 PVConstLink pvlink = volhandle->topLevelParent()->geoPVConstLink();
1051 std::map<PVConstLink,VolumeHandle*>::const_iterator itChamber = m_d->muonchambers_pv2handles.find(pvlink);
1052 #ifndef BUILDVP1LIGHT
1053 if (itChamber!=m_d->muonchambers_pv2handles.end()) {
1054 m_d->ensureInitPV2MuonStationMap();
1055 std::map<GeoPVConstLink,const MuonGM::MuonStation*>::const_iterator itStation(m_d->pv2MuonStation.find(pvlink));
1056 if (itStation!=m_d->pv2MuonStation.end()) {
1057 message("===> Muon station &lt;===");
1058 message(" ",m_d->stationInfo(itStation->second));
1059 }
1060 }
1061 #endif
1062 }
1063
1065 // Emit a signal for the VP1UtilitySystems::PartSpect system //
1067 QStack<QString> partspectPath, extras;
1068 QString detFactoryName;
1069
1070 VolumeHandle *parentVH(volhandle), *childVH(volhandle);
1071 m_d->createPathExtras(volhandle,detFactoryName,extras);
1072
1073 do {
1074 parentVH = parentVH->parent();
1075 PVConstLink parentPVLink = parentVH ? parentVH->geoPVConstLink() : childVH->geoPVConstLink()->getParent();
1076 if (parentPVLink) {
1077 int indexOfChild = parentVH ? childVH->childNumber() : parentPVLink->indexOf(childVH->geoPVConstLink()).value();
1078
1079 std::string childPVName = parentPVLink->getNameOfChildVol(indexOfChild);
1080 QString pathEntry = childPVName=="ANON" ? detFactoryName+childVH->getName() : QString(childPVName.c_str());
1081
1082 std::optional<int> childCopyNo = parentPVLink->getIdOfChildVol(indexOfChild);
1083 if(childCopyNo) {
1084 QString strCopyNo;
1085 strCopyNo.setNum(*childCopyNo);
1086 pathEntry += ("::"+strCopyNo);
1087 }
1088 partspectPath.push(pathEntry);
1089 childVH = parentVH;
1090 }
1091 }while(parentVH);
1092
1093 while(!extras.isEmpty())
1094 partspectPath.push(extras.pop());
1095
1096 partspectPath.push("Atlas::Atlas");
1097
1098 // Emit the signal
1099 //volhandle cannot be NULL here (coverity 16287)
1100 //int cn=(!volhandle) ? -1 : volhandle->copyNumber();
1101 int cn=volhandle->copyNumber();
1102 plotSpectrum(partspectPath,cn);
1103}
static QStringList shapeToStringList(const GeoShape *shape)
Definition DumpShape.cxx:34
static QStringList geoMaterialToStringList(const GeoMaterial *)
static double inclusiveMass(const PVConstLink &pv)
static double exclusiveMass(const PVConstLink &pv)
void orientViewToMuonChamber(const GeoPVConstLink &chamberPV)
void plotSpectrum(QStack< QString > &, int copyNumber=-1)
static void decodeTransformation(const SbMatrix &, float &translation_x, float &translation_y, float &translation_z, float &rotaxis_x, float &rotaxis_y, float &rotaxis_z, float &rotangle_radians)
static bool changePathTail(SoPath *path, SoNode *commonBranchPoint, SoNode *newtail)
const SbMatrix & getGlobalTransformToVolume() const
const GeoMaterial * geoMaterial() const
QString getName() const
SbMatrix getLocalTransformToVolume() const
VolumeHandle * topLevelParent()
GeoPVConstLink geoPVConstLink() const
int copyNumber() const
bool isInMuonChamber() const
VolumeHandle * parent()
unsigned nChildren() const

◆ userSelectedSingleNode()

void IVP13DSystem::userSelectedSingleNode ( SoCooperativeSelection * ,
SoNode * ,
SoPath *  )
virtualinherited

Reimplemented in VP1AODSystem, VP1PrepRawDataSystem, and VP1TrackSystem.

Definition at line 59 of file IVP13DSystem.cxx.

59{}

◆ verbose()

bool IVP1System::verbose ( )
inlinestaticinherited

Definition at line 86 of file IVP1System.h.

86{ return s_vp1verbose; }// Returns true if env var VP1_VERBOSE_OUTPUT=1
static const bool s_vp1verbose
Definition IVP1System.h:158

◆ volumeResetRequested

void VP1GeometrySystem::volumeResetRequested ( VolumeHandle * vh)
protectedslot

Definition at line 3012 of file VP1GeometrySystem.cxx.

3013{
3014 if (!vh)
3015 return;
3016 deselectAll();
3017 vh->reset();
3018 m_d->phisectormanager->updateRepresentationsOfVolsAroundZAxis();
3019}

◆ volumeStateChangeRequested

void VP1GeometrySystem::volumeStateChangeRequested ( VolumeHandle * vh,
VP1GeoFlags::VOLSTATE state )
protectedslot

Definition at line 3001 of file VP1GeometrySystem.cxx.

3002{
3003 //might not use this slot presently...
3004 if (!vh)
3005 return;
3006 deselectAll();
3007 vh->setState(state);
3008 m_d->phisectormanager->updateRepresentationsOfVolsAroundZAxis();
3009}

◆ warnOnDisabledNotifications()

void IVP13DSystemSimple::warnOnDisabledNotifications ( ) const
inherited

Definition at line 221 of file IVP13DSystemSimple.cxx.

222{
223 QList<SoNode*> nodesR;
224 QList<SoNode*> nodesE;
225 m_d->getNodesWithDisabledNotifications(m_d->rootR, nodesR);
226 m_d->getNodesWithDisabledNotifications(m_d->rootE, nodesE);
227 if (!nodesR.isEmpty()) {
228 message("WARNING: Found "+str(nodesR.count())+" node"+QString(nodesR.count()>1?"s":0)+" with disabled notifications in permanent scenegraph:");
229 for (SoNode * node : nodesR)
230 message(" => Node ("+str(node)+") of type "+QString(node->getTypeId().getName().getString())+", named "+QString(node->getName().getString()));
231 }
232 if (!nodesE.isEmpty()) {
233 message("WARNING: Found "+str(nodesE.count())+" node"+QString(nodesE.count()>1?"s":0)+" with disabled notifications in event scenegraph:");
234 for (SoNode * node : nodesE)
235 message(" => Node ("+str(node)+") of type "+QString(node->getTypeId().getName().getString())+", named "+QString(node->getName().getString()));
236 }
237}

Member Data Documentation

◆ m_d

Imp* VP1GeometrySystem::m_d
protected

Definition at line 106 of file VP1GeometrySystem.h.

◆ s_vp1verbose

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

Definition at line 158 of file IVP1System.h.


The documentation for this class was generated from the following files: