ATLAS Offline Software
Loading...
Searching...
No Matches
PRDCollHandleBase Class Referenceabstract

#include <PRDCollHandleBase.h>

Inherits VP1StdCollection.

Inherited by PRDCollHandle_CSC, PRDCollHandle_CSC_Strip, PRDCollHandle_MDT, PRDCollHandle_MM, PRDCollHandle_Pixel, PRDCollHandle_RPC, PRDCollHandle_SCT, PRDCollHandle_SpacePoints, PRDCollHandle_TGC, PRDCollHandle_TRT, and PRDCollHandle_sTGC.

Collaboration diagram for PRDCollHandleBase:

Classes

class  Imp

Public Types

enum  DETAIL { SIMPLE , DETAILED , AUTO }
enum  COLOURMETHOD { ByTechOnly , BySegment , ByTrack , BySegmentAndTrack }

Public Slots

void setGeneralPRDDetailLevel (DETAIL)
void setColourMethod (PRDCollHandleBase::COLOURMETHOD)
void setDrawErrors (bool)
void setDrawRDOs (bool)
void setHighLightOutliers (bool)
void setHighLightWeight (const double &)
void setAllowedEta (const VP1Interval &)
void setAllowedPhi (const QList< VP1Interval > &)
void setVisible (bool)
void possibleChangeMatTranspOrBrightness ()

Signals

void detailLevelChanged ()
void visibilityChanged (bool)

Public Member Functions

 PRDCollHandleBase (PRDDetType::Type, PRDSysCommonData *, const QString &key)
virtual void init (VP1MaterialButtonBase *mat=0)
virtual ~PRDCollHandleBase ()
void setupSettingsFromController (PRDSystemController *)
virtual bool load ()
PRDSysCommonDatacommon () const
VP1ExtraSepLayerHelpersephelperDetailedNodes () const
VP1ExtraSepLayerHelpersephelperSimpleNodes () const
SoMaterial * highLightMaterial () const
bool highLightOutliers () const
double highLightWeight () const
bool drawErrors () const
bool drawRDOs () const
void getLODSeparators (int index, VP1ExtraSepLayerHelper *&sephelper_detail, VP1ExtraSepLayerHelper *&sephelper_simple)
COLOURMETHOD colourMethod () const
bool colourByTracks () const
bool colourBySegments () const
DETAIL detailLevel () const
bool simpleDetailLevel () const
int nShownHandles ()
void incrementNShownHandles ()
void decrementNShownHandles ()
bool visible () const
bool isLoaded () const
bool problemsLoading () const
QString text () const
SoSwitch * collSwitch () const
 Add this somewhere in your scenegraph (do not add any children here!)
SoSeparator * collSep () const
 All 3D objects from this coll.
SoMaterial * material () const
double collMaterialTransparency () const
double collMaterialBrightness () const
virtual void largeChangesBegin ()
virtual void largeChangesEnd ()
virtual QByteArray persistifiableState () const
 Provide default implementation based on widget list + version.
virtual void setState (const QByteArray &)
 Provide default implementation based on widget list + version.
qint32 collTypeID () const
QByteArray persistifiableID () const
QString section () const
QString sectionToolTip () const
virtual QList< QWidget * > widgetsForGuiRow () const
void setSystemBasePointer (IVP1System *sys)
void message (const QString &) const
void message (const QStringList &, const QString &addtoend="") const
void message (const QString &addtostart, const QStringList &, const QString &addtoend="") const
void messageDebug (const QString &) const
void messageDebug (const QStringList &, const QString &addtoend="") const
void messageDebug (const QString &addtostart, const QStringList &, const QString &addtoend="") const
void messageVerbose (const QString &) const
void messageVerbose (const QStringList &, const QString &addtoend="") const
void messageVerbose (const QString &addtostart, const QStringList &, const QString &addtoend="") const
IVP1SystemsystemBase () const
const QString & helperClassName () const

Static Public Member Functions

static QString toString (const DETAIL &)
static QString toString (const COLOURMETHOD &)
static VP1CollStates getStates (const QList< VP1Collection * > &)
static void applyStates (const QList< VP1Collection * > &, const VP1CollStates &)
static void updateStates (VP1CollStates &state, const VP1CollStates &newInfo)
template<class T>
static QList< VP1Collection * > toBaseCollList (const QList< T * > &)
static bool verbose ()
static void warnUndeletedInstances ()
static QString str (const QString &s)
static QString str (const char *c)
static QString str (const bool b)
static QString str (const QColor &)
static QString str (const SbColor &)
static QString str (const VP1Interval &)
static QString str (const SbVec2d &)
static QString str (const SbVec2f &)
static QString str (const SbVec2s &)
static QString str (const SbVec3d &)
static QString str (const SbVec3f &)
static QString str (const SbVec3s &)
static QString str (const SbVec4d &)
static QString str (const SbVec4f &)
static QString str (short int n)
static QString str (unsigned short int n)
static QString str (long n)
static QString str (ulong n)
static QString str (int n)
static QString str (uint n)
static QString str (qlonglong n)
static QString str (qulonglong n)
static QString str (const double &d)
static QString str (const float &f)
static QString str (const void *)
template<class T>
static QString str (const T *t)
template<class T>
static QString str (const QFlags< T > &f)
template<class T>
static QString str (const HepGeom::BasicVector3D< T > &t)
static QString str (const Amg::Vector3D &t)
template<class T>
static QString str (const QList< T > &t)

Protected Member Functions

virtual void setupSettingsFromControllerSpecific (PRDSystemController *)
virtual PRDHandleBaseaddPRD (const Trk::PrepRawData *)=0
virtual DETAIL defaultDetailLevel () const
void addHandle (PRDHandleBase *)
std::vector< PRDHandleBase * > & getPrdHandles ()
const std::vector< PRDHandleBase * > & getPrdHandles () const
virtual void postLoadInitialisation ()
virtual bool cut (PRDHandleBase *)=0
virtual void eraseEventDataSpecific ()
template<class T>
void cleanupPtrContainer (T &) const
virtual float lodArea () const
void recheckCutStatus (PRDHandleBase *)
void recheckCutStatusOfAllHandles ()
void recheckCutStatusOfAllVisibleHandles ()
void recheckCutStatusOfAllNotVisibleHandles ()
qint32 provideCollTypeID () const
virtual QString provideText () const
virtual void assignDefaultMaterial (SoMaterial *) const
virtual QColor defaultColor () const =0
QString provideSection () const
QString provideSectionToolTip () const
QList< QWidget * > provideExtraWidgetsForGuiRow () const
QByteArray extraWidgetsState () const
void setExtraWidgetsState (const QByteArray &)
QList< QWidget * > provideWidgetsForGuiRow () const
virtual QString checkBoxToolTip () const
virtual QString matButtonToolTip () const
virtual void collMaterialTransparencyAndBrightnessChanged ()
virtual QByteArray providePersistifiableID () const
void setHelperClassName (const QString &n)

Private Slots

void detailComboBoxItemChanged ()
void collVisibilityChanged (bool)

Private Attributes

Impm_d
PRDSysCommonDatam_common
int m_nshownhandles
COLOURMETHOD m_colourmethod
double m_highlightweight
QString m_helpername
IVP1Systemm_system

Static Private Attributes

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

Detailed Description

Definition at line 25 of file PRDCollHandleBase.h.

Member Enumeration Documentation

◆ COLOURMETHOD

Enumerator
ByTechOnly 
BySegment 
ByTrack 
BySegmentAndTrack 

Definition at line 71 of file PRDCollHandleBase.h.

◆ DETAIL

Enumerator
SIMPLE 
DETAILED 
AUTO 

Definition at line 66 of file PRDCollHandleBase.h.

66{ SIMPLE, DETAILED, AUTO };//AUTO => Use Level of detail (SoLOD nodes) to switch between simple/detailed shapes.

Constructor & Destructor Documentation

◆ PRDCollHandleBase()

PRDCollHandleBase::PRDCollHandleBase ( PRDDetType::Type type,
PRDSysCommonData * cd,
const QString & key )

Definition at line 80 of file PRDCollHandleBase.cxx.

81 : VP1StdCollection(cd->system(),"PRDCollHandle_"+PRDDetType::typeToString(type)+"_"+key), m_d(new Imp), m_common(cd),m_nshownhandles(0),
83{
84 m_d->theclass = this;
85 m_d->detType = type;
86 m_d->storegate_key = key;
87 m_d->highlightmaterial = 0;
88 m_d->highlightoutliers = false;
89 m_d->drawerrors = false;
90 m_d->drawrdos = false;
91 m_d->sephelper_detail = 0;
92 m_d->sephelper_simple = 0;
93 m_d->sep_lods = 0;
94 m_d->comboBox_detailLevel = new QComboBox;
95 m_d->comboBox_detailLevel->setToolTip("Level of realism in representation"
96 " (\"Auto\" switches mode based on distance to camera)");
97 m_d->comboBox_detailLevel->addItems(QStringList()<<"Low"<<"Auto"<<"High");//Low==simple, High==detailed. Don't change order.
98 m_d->generalprddetaillevel = SIMPLE;
99 m_d->comboBox_detailLevel->setCurrentIndex(0);//corresponds to simple.
100 connect(m_d->comboBox_detailLevel,SIGNAL(currentIndexChanged(int)),this,SLOT(detailComboBoxItemChanged()));
101 connect(this,SIGNAL(visibilityChanged(bool)),this,SLOT(collVisibilityChanged(bool)));
102}
PRDSysCommonData * m_common
COLOURMETHOD m_colourmethod
static QString typeToString(const Type &)
void visibilityChanged(bool)
VP1StdCollection(IVP1System *, const QString &helperClassName)

◆ ~PRDCollHandleBase()

PRDCollHandleBase::~PRDCollHandleBase ( )
virtual

Definition at line 132 of file PRDCollHandleBase.cxx.

133{
134 //Lod sep-helpers:
135 std::map<int,std::pair<SoLevelOfDetail*,std::pair<VP1ExtraSepLayerHelper*,VP1ExtraSepLayerHelper*> > >::iterator it, itE = m_d->regionindex2lodhelpers.end();
136 for (it = m_d->regionindex2lodhelpers.begin();it!=itE;++it) {
137 delete it->second.second.first;
138 delete it->second.second.second;
139 it->second.first->unref();
140 }
141 m_d->regionindex2lodhelpers.clear();
142
143 //Cleanup separators:
144 if (m_d->sephelper_detail) {
145 SoSeparator * sep_detail = m_d->sephelper_detail->topSeparator();
146 delete m_d->sephelper_detail;
147 sep_detail->unref();
148 }
149 if (m_d->sephelper_simple) {
150 SoSeparator * sep_simple = m_d->sephelper_simple->topSeparator();
151 delete m_d->sephelper_simple;
152 sep_simple->unref();
153 }
154 if (m_d->sep_lods)
155 m_d->sep_lods->unref();
156
157 cleanupPtrContainer(m_d->prdhandles);
158
159 if (m_d->highlightmaterial)
160 m_d->highlightmaterial->unref();
161
162 delete m_d;
163}
void cleanupPtrContainer(T &) const

Member Function Documentation

◆ addHandle()

void PRDCollHandleBase::addHandle ( PRDHandleBase * handle)
protected

Definition at line 500 of file PRDCollHandleBase.cxx.

501{
502 if (handle)
503 m_d->prdhandles.push_back(handle);
504}

◆ addPRD()

◆ applyStates()

void VP1Collection::applyStates ( const QList< VP1Collection * > & cols,
const VP1CollStates & states )
staticinherited

Definition at line 108 of file VP1Collection.cxx.

109{
110 VP1Msg::messageDebug("VP1Collection::applyStates() - start...");
111 for (VP1Collection* col : cols)
112 if (states.contains(col->persistifiableID()))
113 col->setState(states.value(col->persistifiableID()));
114 VP1Msg::messageDebug("VP1Collection::applyStates() - end.");
115}
VP1Collection(IVP1System *sys=0, const QString &helperClassName="VP1Collection")
static void messageDebug(const QString &)
Definition VP1Msg.cxx:39

◆ assignDefaultMaterial()

void PRDCollHandleBase::assignDefaultMaterial ( SoMaterial * m) const
protectedvirtual

Implements VP1StdCollection.

Definition at line 762 of file PRDCollHandleBase.cxx.

763{
764 VP1QtInventorUtils::setMatColor( m, defaultColor(), 0.18/*brightness*/ );
765}
virtual QColor defaultColor() const =0
static void setMatColor(SoMaterial *, const double &r, const double &g, const double &b, const double &brightness=0.0, const double &transp=0.0)

◆ checkBoxToolTip()

virtual QString VP1StdCollection::checkBoxToolTip ( ) const
inlineprotectedvirtualinherited

Reimplemented in VP1MissingEtCaloHandle, VP1MissingEtHandle, and VP1MissingEtTruthHandle.

Definition at line 76 of file VP1StdCollection.h.

76{ return "Collection "+text(); }
QString text() const

◆ cleanupPtrContainer()

template<class T>
void PRDCollHandleBase::cleanupPtrContainer ( T & t) const
protected

Definition at line 151 of file PRDCollHandleBase.h.

152{
153 typename T::iterator it(t.begin()), itE(t.end());
154 for (;it!=itE;++it)
155 delete *it;
156 t.clear();
157}

◆ collMaterialBrightness()

double VP1StdCollection::collMaterialBrightness ( ) const
inherited

Definition at line 342 of file VP1StdCollection.cxx.

343{
344 return m_d->lastMatBrightness;
345}

◆ collMaterialTransparency()

double VP1StdCollection::collMaterialTransparency ( ) const
inherited

Definition at line 336 of file VP1StdCollection.cxx.

337{
338 return m_d->lastMatTransparency;
339}

◆ collMaterialTransparencyAndBrightnessChanged()

virtual void VP1StdCollection::collMaterialTransparencyAndBrightnessChanged ( )
inlineprotectedvirtualinherited

Reimplemented in TrackCollHandleBase.

Definition at line 79 of file VP1StdCollection.h.

79{}

◆ collSep()

SoSeparator * VP1StdCollection::collSep ( ) const
inherited

All 3D objects from this coll.

belongs under here.

Definition at line 212 of file VP1StdCollection.cxx.

213{
214 if (!m_d->collsep)
215 message("ERROR: collSep() called before init()");
216 return m_d->collsep;
217}
void message(const QString &) const

◆ collSwitch()

SoSwitch * VP1StdCollection::collSwitch ( ) const
inherited

Add this somewhere in your scenegraph (do not add any children here!)

Definition at line 204 of file VP1StdCollection.cxx.

205{
206 if (!m_d->theswitch)
207 message("ERROR: collSwitch() called before init()");
208 return m_d->theswitch;
209}

◆ collTypeID()

qint32 VP1StdCollection::collTypeID ( ) const
inherited

Definition at line 315 of file VP1StdCollection.cxx.

316{
317 if (!m_d->idProvided) {
318 m_d->idProvided = true;
319 m_d->id = provideCollTypeID();
320 }
321 return m_d->id;
322}
virtual qint32 provideCollTypeID() const

◆ collVisibilityChanged

void PRDCollHandleBase::collVisibilityChanged ( bool vis)
privateslot

Definition at line 214 of file PRDCollHandleBase.cxx.

215{
216 if (VP1Msg::verbose())
217 messageVerbose("TrackCollHandleBase::collVisibilityChanged => "+str(vis));
218 if (vis)
219 recheckCutStatusOfAllNotVisibleHandles();//Fixme -> ofallhandles? All must be not visible anyway...
220 else
222}
void recheckCutStatusOfAllNotVisibleHandles()
void recheckCutStatusOfAllVisibleHandles()
void messageVerbose(const QString &) const
static bool verbose()
Definition VP1Msg.h:31
static QString str(const QString &s)
Definition VP1String.h:49

◆ colourBySegments()

bool PRDCollHandleBase::colourBySegments ( ) const
inline

Definition at line 75 of file PRDCollHandleBase.h.

◆ colourByTracks()

bool PRDCollHandleBase::colourByTracks ( ) const
inline

Definition at line 74 of file PRDCollHandleBase.h.

◆ colourMethod()

COLOURMETHOD PRDCollHandleBase::colourMethod ( ) const
inline

Definition at line 73 of file PRDCollHandleBase.h.

73{ return m_colourmethod; }

◆ common()

PRDSysCommonData * PRDCollHandleBase::common ( ) const
inline

Definition at line 49 of file PRDCollHandleBase.h.

49{ return m_common; }

◆ cut()

◆ decrementNShownHandles()

void PRDCollHandleBase::decrementNShownHandles ( )
inline

Definition at line 125 of file PRDCollHandleBase.h.

125{ --m_nshownhandles; }

◆ defaultColor()

◆ defaultDetailLevel()

virtual DETAIL PRDCollHandleBase::defaultDetailLevel ( ) const
inlineprotectedvirtual

Reimplemented in PRDCollHandle_MDT, PRDCollHandle_MM, and PRDCollHandle_Pixel.

Definition at line 97 of file PRDCollHandleBase.h.

97{ return AUTO; }

◆ detailComboBoxItemChanged

void PRDCollHandleBase::detailComboBoxItemChanged ( )
privateslot

Definition at line 412 of file PRDCollHandleBase.cxx.

413{
414 messageVerbose("Collection detail level combo box changed index");
415 switch(m_d->comboBox_detailLevel->currentIndex()) {
416 case 1:
418 break;
419 case 2:
421 break;
422 default:
423 case 0:
425 break;
426 }
427}
void setGeneralPRDDetailLevel(DETAIL)

◆ detailLevel()

PRDCollHandleBase::DETAIL PRDCollHandleBase::detailLevel ( ) const

Definition at line 430 of file PRDCollHandleBase.cxx.

431{
432 return m_d->generalprddetaillevel;
433}

◆ detailLevelChanged

void PRDCollHandleBase::detailLevelChanged ( )
signal

◆ drawErrors()

bool PRDCollHandleBase::drawErrors ( ) const

Definition at line 625 of file PRDCollHandleBase.cxx.

626{
627 return m_d->drawerrors;
628}

◆ drawRDOs()

bool PRDCollHandleBase::drawRDOs ( ) const

Definition at line 631 of file PRDCollHandleBase.cxx.

632{
633 return m_d->drawrdos;
634}

◆ eraseEventDataSpecific()

virtual void PRDCollHandleBase::eraseEventDataSpecific ( )
inlineprotectedvirtual

Reimplemented in PRDCollHandle_MDT, PRDCollHandle_MM, PRDCollHandle_SCT, and PRDCollHandle_SpacePoints.

Definition at line 105 of file PRDCollHandleBase.h.

105{}

◆ extraWidgetsState()

QByteArray PRDCollHandleBase::extraWidgetsState ( ) const
protectedvirtual

Reimplemented from VP1StdCollection.

Definition at line 816 of file PRDCollHandleBase.cxx.

817{
818 VP1Serialise serialise(0/*version*/,systemBase());
819 serialise.save(m_d->comboBox_detailLevel);
820 serialise.disableUnsavedChecks();
821 return serialise.result();
822}
IVP1System * systemBase() const
void serialise(const std::vector< const IRoiDescriptor * > &rois, roiserial_type &s)
serialise an entire vector of IRoiDescriptors

◆ getLODSeparators()

void PRDCollHandleBase::getLODSeparators ( int index,
VP1ExtraSepLayerHelper *& sephelper_detail,
VP1ExtraSepLayerHelper *& sephelper_simple )

Definition at line 472 of file PRDCollHandleBase.cxx.

473{
474 const float complexity = 0.3f;//Fixme: Hardcoded here.
475 std::map<int,std::pair<SoLevelOfDetail*,std::pair<VP1ExtraSepLayerHelper*,VP1ExtraSepLayerHelper*> > >::iterator it = m_d->regionindex2lodhelpers.find(index);
476 if (it!=m_d->regionindex2lodhelpers.end()) {
477 sephelper_detail = it->second.second.first;
478 sephelper_simple = it->second.second.second;
479 //To try to scale somehow different regions to change at "the same time":
480 it->second.first->screenArea.setValue(lodArea()*(sephelper_detail->topSeparator()->getNumChildren()+1)/(complexity+0.5f));
481 return;
482 }
483 SoLevelOfDetail * lod = new SoLevelOfDetail;
484 SoSeparator * sep_detail = new SoSeparator;
485 SoSeparator * sep_simple = new SoSeparator;
486 lod->addChild(sep_detail);
487 lod->addChild(sep_simple);
488 lod->screenArea.setValue(lodArea()/(complexity+0.5f));
489 m_d->sep_lods->addChild(lod);
490 sephelper_detail = new VP1ExtraSepLayerHelper(sep_detail);
491 sephelper_simple = new VP1ExtraSepLayerHelper(sep_simple);
492
493 lod->ref();
494 m_d->regionindex2lodhelpers[index] =
495 std::pair<SoLevelOfDetail*,std::pair<VP1ExtraSepLayerHelper*,VP1ExtraSepLayerHelper*> >
496 (lod,std::pair<VP1ExtraSepLayerHelper*,VP1ExtraSepLayerHelper*>(sephelper_detail,sephelper_simple));
497}
virtual float lodArea() const
SoSeparator * topSeparator() const
str index
Definition DeMoScan.py:362

◆ getPrdHandles() [1/2]

std::vector< PRDHandleBase * > & PRDCollHandleBase::getPrdHandles ( )
protected

Definition at line 507 of file PRDCollHandleBase.cxx.

508{
509 return m_d->prdhandles;
510}

◆ getPrdHandles() [2/2]

const std::vector< PRDHandleBase * > & PRDCollHandleBase::getPrdHandles ( ) const
protected

Definition at line 513 of file PRDCollHandleBase.cxx.

514{
515 return m_d->prdhandles;
516}

◆ getStates()

VP1CollStates VP1Collection::getStates ( const QList< VP1Collection * > & cols)
staticinherited

Definition at line 92 of file VP1Collection.cxx.

93{
94 VP1Msg::messageDebug("VP1Collection::getStates() - start...");
95
97 for (VP1Collection* col : cols) {
98 VP1Msg::messageDebug("inserting collection: " + col->section() );
99 states.insert(col->persistifiableID(),col->persistifiableState());
100 }
101
102 VP1Msg::messageDebug("VP1Collection::getStates() - end.");
103
104 return states;
105}
QMap< QByteArray, QByteArray > VP1CollStates

◆ helperClassName()

const QString & VP1HelperClassBase::helperClassName ( ) const
inlineinherited

Definition at line 51 of file VP1HelperClassBase.h.

51{ return m_helpername; }

◆ highLightMaterial()

SoMaterial * PRDCollHandleBase::highLightMaterial ( ) const

Definition at line 637 of file PRDCollHandleBase.cxx.

638{
639 return m_d->highlightmaterial;
640}

◆ highLightOutliers()

bool PRDCollHandleBase::highLightOutliers ( ) const

Definition at line 619 of file PRDCollHandleBase.cxx.

620{
621 return m_d->highlightoutliers;
622}

◆ highLightWeight()

double PRDCollHandleBase::highLightWeight ( ) const
inline

Definition at line 59 of file PRDCollHandleBase.h.

59{ return m_highlightweight; }

◆ incrementNShownHandles()

void PRDCollHandleBase::incrementNShownHandles ( )
inline

Definition at line 124 of file PRDCollHandleBase.h.

124{ ++m_nshownhandles; }

◆ init()

void PRDCollHandleBase::init ( VP1MaterialButtonBase * mat = 0)
virtual

Reimplemented from VP1StdCollection.

Definition at line 105 of file PRDCollHandleBase.cxx.

106{
107 VP1StdCollection::init();//this call is required
108
109 SoSeparator * sep_detail = new SoSeparator;
110 sep_detail->setName("PRDColl_sep_detail");
111 SoSeparator * sep_simple = new SoSeparator;
112 sep_simple->setName("PRDColl_sep_simple");
113 m_d->sep_lods = new SoSeparator;
114 m_d->sep_lods->setName("PRDColl_sep_lods");
115 sep_detail->ref();
116 sep_simple->ref();
117 m_d->sep_lods->ref();
118
119 m_d->sephelper_detail = new VP1ExtraSepLayerHelper(sep_detail,128);
120 m_d->sephelper_simple = new VP1ExtraSepLayerHelper(sep_simple,128);
121
122 setupSettingsFromController(common()->controller());
123
124 //Setup detail level:
126 m_d->updateDetailSepAttachments();
127
128}
void setupSettingsFromController(PRDSystemController *)
PRDSysCommonData * common() const
virtual DETAIL defaultDetailLevel() const
virtual void init(VP1MaterialButtonBase *button=0)

◆ isLoaded()

bool VP1StdCollection::isLoaded ( ) const
inherited

Definition at line 148 of file VP1StdCollection.cxx.

149{
150 return m_d->loaded;
151}

◆ largeChangesBegin()

void VP1StdCollection::largeChangesBegin ( )
virtualinherited

Reimplemented in VP1CaloClusterCollection.

Definition at line 228 of file VP1StdCollection.cxx.

229{
230 if (!m_d->collsep)
231 message("ERROR: largeChangesBegin() called before init()");
232 m_d->collsep->enableNotify(false);
233 ++(m_d->largechangescount_sep);
234 m_d->theswitch->enableNotify(false);
235 ++(m_d->largechangescount_switch);
236}

◆ largeChangesEnd()

void VP1StdCollection::largeChangesEnd ( )
virtualinherited

Reimplemented in VP1CaloClusterCollection.

Definition at line 239 of file VP1StdCollection.cxx.

240{
241 if (!m_d->collsep)
242 message("ERROR: largeChangesEnd() called before init()");
243 if (m_d->largechangescount_sep>0) {
244 if (--(m_d->largechangescount_sep)==0) {
245 m_d->collsep->enableNotify(true);
246 m_d->collsep->touch();
247 }
248 }
249 if (m_d->largechangescount_switch>0) {
250 if (--(m_d->largechangescount_switch)==0) {
251 m_d->theswitch->enableNotify(true);
252 m_d->theswitch->touch();
253 }
254 }
255}

◆ load()

bool PRDCollHandleBase::load ( )
virtual

Implements VP1StdCollection.

Reimplemented in PRDCollHandle_SpacePoints.

Definition at line 166 of file PRDCollHandleBase.cxx.

166 {
167 bool safeToLoad(false);
168 switch (m_d->detType){
169 case PRDDetType::TRT:
171 break;
174 break;
175 case PRDDetType::SCT:
177 break;
178 case PRDDetType::CSC:
180 case PRDDetType::RPC:
181 case PRDDetType::TGC:
182 case PRDDetType::MDT:
183 case PRDDetType::MM:
184 case PRDDetType::sTGC:
186 break;
187 default:
188 safeToLoad = false;
189 }
190
191 if (!safeToLoad){
192 message("Required geometry not enabled in job.");
193 return false;
194 }
195
196 switch (m_d->detType){
197 case PRDDetType::TRT: return m_d->actualLoad<InDet::TRT_DriftCircleContainer>();
198 case PRDDetType::Pixel: return m_d->actualLoad<InDet::PixelClusterContainer>();
199 case PRDDetType::SCT: return m_d->actualLoad<InDet::SCT_ClusterContainer>();
200 case PRDDetType::CSC: return m_d->actualLoad<Muon::CscPrepDataContainer>();
201 case PRDDetType::CSCstrip: return m_d->actualLoad<Muon::CscStripPrepDataContainer>();
202 case PRDDetType::RPC: return m_d->actualLoad<Muon::RpcPrepDataContainer>();
203 case PRDDetType::TGC: return m_d->actualLoad<Muon::TgcPrepDataContainer>();
204 case PRDDetType::MDT: return m_d->actualLoad<Muon::MdtPrepDataContainer>();
205 case PRDDetType::MM: return m_d->actualLoad<Muon::MMPrepDataContainer>();
206 case PRDDetType::sTGC: return m_d->actualLoad<Muon::sTgcPrepDataContainer>();
207 //SpacePoints implements their own load.
208 default:
209 return false;
210 }
211}
Trk::PrepRawDataContainer< TRT_DriftCircleCollection > TRT_DriftCircleContainer
Trk::PrepRawDataContainer< SCT_ClusterCollection > SCT_ClusterContainer
Trk::PrepRawDataContainer< PixelClusterCollection > PixelClusterContainer
static bool hasTRTGeometry()
static bool hasPixelGeometry()
static bool hasSCTGeometry()
static bool hasMuonGeometry()
MuonPrepDataContainerT< RpcPrepData > RpcPrepDataContainer
MuonPrepDataContainerT< TgcPrepData > TgcPrepDataContainer
MuonPrepDataContainerT< MdtPrepData > MdtPrepDataContainer
MuonPrepDataContainerT< CscStripPrepData > CscStripPrepDataContainer
MuonPrepDataContainerT< sTgcPrepData > sTgcPrepDataContainer
MuonPrepDataContainerT< MMPrepData > MMPrepDataContainer
MuonPrepDataContainerT< CscPrepData > CscPrepDataContainer

◆ lodArea()

virtual float PRDCollHandleBase::lodArea ( ) const
inlineprotectedvirtual

Reimplemented in PRDCollHandle_CSC, PRDCollHandle_CSC_Strip, PRDCollHandle_MDT, PRDCollHandle_MM, PRDCollHandle_Pixel, PRDCollHandle_RPC, PRDCollHandle_SCT, PRDCollHandle_SpacePoints, PRDCollHandle_sTGC, PRDCollHandle_TGC, and PRDCollHandle_TRT.

Definition at line 111 of file PRDCollHandleBase.h.

111{ return 500.0f*500.0f; }//Reimplement Override to tune LOD shift for a given collection.

◆ matButtonToolTip()

virtual QString VP1StdCollection::matButtonToolTip ( ) const
inlineprotectedvirtualinherited

Reimplemented in AODCollHandleBase.

Definition at line 77 of file VP1StdCollection.h.

77{ return "Edit the material of "+text(); }

◆ material()

SoMaterial * VP1StdCollection::material ( ) const
inherited

Definition at line 220 of file VP1StdCollection.cxx.

221{
222 if (!m_d->material)
223 message("ERROR: material() called before init()");
224 return m_d->material;
225}

◆ message() [1/3]

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

Definition at line 49 of file VP1HelperClassBase.cxx.

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

◆ message() [2/3]

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

Definition at line 131 of file VP1HelperClassBase.cxx.

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

◆ message() [3/3]

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

Definition at line 91 of file VP1HelperClassBase.cxx.

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

◆ messageDebug() [1/3]

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

Definition at line 65 of file VP1HelperClassBase.cxx.

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

◆ messageDebug() [2/3]

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

Definition at line 147 of file VP1HelperClassBase.cxx.

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

◆ messageDebug() [3/3]

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

Definition at line 103 of file VP1HelperClassBase.cxx.

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

◆ messageVerbose() [1/3]

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

Definition at line 78 of file VP1HelperClassBase.cxx.

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

◆ messageVerbose() [2/3]

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

Definition at line 165 of file VP1HelperClassBase.cxx.

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

◆ messageVerbose() [3/3]

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

Definition at line 117 of file VP1HelperClassBase.cxx.

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

◆ nShownHandles()

int PRDCollHandleBase::nShownHandles ( )
inline

Definition at line 121 of file PRDCollHandleBase.h.

121{ return m_nshownhandles; }

◆ persistifiableID()

QByteArray VP1Collection::persistifiableID ( ) const
inherited

Definition at line 49 of file VP1Collection.cxx.

50{
51 VP1Msg::messageDebug("VP1Collection::persistifiableID()");
52
53 if (!m_d->persistIDProvided) {
54 m_d->persistIDProvided = true;
55 m_d->persistID = providePersistifiableID().toHex();//toHex() necessary for some unknown reason!
56 //Without it keys in maps are apparently considered similar! (Qt bug??)
57 }
58 return m_d->persistID;
59}
virtual QByteArray providePersistifiableID() const =0

◆ persistifiableState()

QByteArray VP1StdCollection::persistifiableState ( ) const
virtualinherited

Provide default implementation based on widget list + version.

Implements VP1Collection.

Reimplemented in AODCollHandleBase, IParticleCollHandle_CaloCluster, IParticleCollHandle_Jet, IParticleCollHandleBase, MissingEtCollHandle, TrackCollHandleBase, and VertexCollHandle.

Definition at line 270 of file VP1StdCollection.cxx.

271{
272 messageDebug("VP1StdCollection::persistifiableState()");
273
274 if (!m_d->material) {
275 message("ERROR: persistifiableState() called before init()");
276 return QByteArray();
277 }
278 VP1Serialise serialise(1/*version*/);
279 serialise.disableUnsavedChecks();
280 serialise.save(m_d->visible);
281 Q_ASSERT(m_d->material&&"Did you forget to call init() on this VP1StdCollection?");
282 serialise.save(m_d->material);
283 serialise.save(extraWidgetsState());//version 1+
284 return serialise.result();
285}
virtual QByteArray extraWidgetsState() const

◆ possibleChangeMatTranspOrBrightness

void VP1StdCollection::possibleChangeMatTranspOrBrightness ( )
slotinherited

Definition at line 348 of file VP1StdCollection.cxx.

349{
350 double t = m_d->matButton->lastAppliedTransparency();
351 double b = m_d->matButton->lastAppliedBrightness();
352 if ( m_d->lastMatTransparency == t && m_d->lastMatBrightness == b )
353 return;
354 m_d->lastMatTransparency = t;
355 m_d->lastMatBrightness = b;
357}
virtual void collMaterialTransparencyAndBrightnessChanged()

◆ postLoadInitialisation()

virtual void PRDCollHandleBase::postLoadInitialisation ( )
inlineprotectedvirtual

Reimplemented in PRDCollHandle_MDT, PRDCollHandle_MM, PRDCollHandle_SCT, and PRDCollHandle_SpacePoints.

Definition at line 103 of file PRDCollHandleBase.h.

103{}

◆ problemsLoading()

bool VP1StdCollection::problemsLoading ( ) const
inherited

Definition at line 154 of file VP1StdCollection.cxx.

155{
156 return m_d->problemsloading;
157}

◆ provideCollTypeID()

qint32 PRDCollHandleBase::provideCollTypeID ( ) const
protectedvirtual

Reimplemented from VP1StdCollection.

Definition at line 750 of file PRDCollHandleBase.cxx.

751{
752 return PRDDetType::typeToInt(m_d->detType);
753}
static qint32 typeToInt(const Type &t)

◆ provideExtraWidgetsForGuiRow()

QList< QWidget * > PRDCollHandleBase::provideExtraWidgetsForGuiRow ( ) const
protectedvirtual

Reimplemented from VP1StdCollection.

Definition at line 810 of file PRDCollHandleBase.cxx.

811{
812 return QList<QWidget*>() << m_d->comboBox_detailLevel;
813}

◆ providePersistifiableID()

QByteArray VP1StdCollection::providePersistifiableID ( ) const
protectedvirtualinherited

Implements VP1Collection.

Reimplemented in VP1MissingEtHandle.

Definition at line 325 of file VP1StdCollection.cxx.

326{
327 VP1Serialise serialise(-10/*version*/);//we use negative versions here (0 and -10 already used),
328 //to allow derived classes to use positive numbers.
329 serialise.disableUnsavedChecks();
330 serialise.save(collTypeID());
331 serialise.save(text());
332 return serialise.result();
333}
qint32 collTypeID() const

◆ provideSection()

QString PRDCollHandleBase::provideSection ( ) const
protectedvirtual

Implements VP1Collection.

Definition at line 768 of file PRDCollHandleBase.cxx.

769{
770 switch (m_d->detType) {
772 case PRDDetType::SCT:
773 case PRDDetType::TRT:
774 return "Inner Detector PRDs";
776 return "ID Space Points";
777 case PRDDetType::CSC:
779 case PRDDetType::RPC:
780 case PRDDetType::TGC:
781 case PRDDetType::MDT:
782 case PRDDetType::MM:
783 case PRDDetType::sTGC:
784 return "Muon Spectrometer PRDs";
785 default: return "Unknown Section";
786 }
787}

◆ provideSectionToolTip()

QString PRDCollHandleBase::provideSectionToolTip ( ) const
protectedvirtual

Reimplemented from VP1Collection.

Definition at line 790 of file PRDCollHandleBase.cxx.

791{
792 switch (m_d->detType) {
794 case PRDDetType::SCT:
795 case PRDDetType::TRT:
796 return "Inner Detector PRD collections in event";
798 return "Space Point collections in event";
799 case PRDDetType::CSC:
801 case PRDDetType::RPC:
802 case PRDDetType::TGC:
803 case PRDDetType::MDT:
804 return "Muon Spectrometer PRD collections in event";
805 default: return "Error: PRDDetType not recognised.";
806 }
807}

◆ provideText()

QString PRDCollHandleBase::provideText ( ) const
protectedvirtual

Implements VP1StdCollection.

Definition at line 756 of file PRDCollHandleBase.cxx.

757{
758 return m_d->storegate_key;
759}

◆ provideWidgetsForGuiRow()

QList< QWidget * > VP1StdCollection::provideWidgetsForGuiRow ( ) const
protectedvirtualinherited

Implements VP1Collection.

Definition at line 258 of file VP1StdCollection.cxx.

259{
260 m_d->extraWidgets = provideExtraWidgetsForGuiRow();
261
262 QList<QWidget*> l;
263 l << m_d->checkBox;
264 l << m_d->matButton;
265 l << m_d->extraWidgets;
266 return l;
267}
virtual QList< QWidget * > provideExtraWidgetsForGuiRow() const
l
Printing final latex table to .tex output file.

◆ recheckCutStatus()

void PRDCollHandleBase::recheckCutStatus ( PRDHandleBase * handle)
protected

Definition at line 519 of file PRDCollHandleBase.cxx.

520{
521 handle->setVisible( visible() && cut(handle) && m_d->etaPhiCut(handle) );
522}
virtual bool cut(PRDHandleBase *)=0
void setVisible(bool)

◆ recheckCutStatusOfAllHandles()

void PRDCollHandleBase::recheckCutStatusOfAllHandles ( )
protected

Definition at line 566 of file PRDCollHandleBase.cxx.

567{
568 messageVerbose("PRDCollHandleBase::recheckCutStatusOfAllHandles");
569
570 common()->system()->deselectAll();
571
573 std::vector<PRDHandleBase*>::iterator it(m_d->prdhandles.begin()),itE(m_d->prdhandles.end());
574 int i(0);
575 for (;it!=itE;++it) {
576 recheckCutStatus(*it);
577 if (!(i++%200))
578 systemBase()->updateGUI();//since called from ::actualLoad<..>(..)
579 }
581 if (visible()) message("Have "+QString::number(getPrdHandles().size())+" ("+QString::number(nShownHandles())+" shown) PRDs");
582}
virtual void deselectAll(SoCooperativeSelection *exception_sel=0)
void updateGUI()
std::vector< PRDHandleBase * > & getPrdHandles()
void recheckCutStatus(PRDHandleBase *)
IVP13DSystem * system() const
virtual void largeChangesEnd()
virtual void largeChangesBegin()

◆ recheckCutStatusOfAllNotVisibleHandles()

void PRDCollHandleBase::recheckCutStatusOfAllNotVisibleHandles ( )
protected

Definition at line 603 of file PRDCollHandleBase.cxx.

604{
605 messageVerbose("PRDCollHandleBase::recheckCutStatusOfAllNotVisibleHandles");
606
608 std::vector<PRDHandleBase*>::iterator it(m_d->prdhandles.begin()),itE(m_d->prdhandles.end());
609 for (;it!=itE;++it) {
610 if (!(*it)->visible())
611 recheckCutStatus(*it);
612 }
614 if (visible()) message("Have "+QString::number(getPrdHandles().size())+" ("+QString::number(nShownHandles())+" shown) PRDs");
615}

◆ recheckCutStatusOfAllVisibleHandles()

void PRDCollHandleBase::recheckCutStatusOfAllVisibleHandles ( )
protected

Definition at line 585 of file PRDCollHandleBase.cxx.

586{
587 messageVerbose("PRDCollHandleBase::recheckCutStatusOfAllVisibleHandles");
588 if (!visible()) return;
589 //This method is called when a cut is tightened - thus we better start by deselectAll to avoid weird highlighting issues.
590 common()->system()->deselectAll();
591
593 std::vector<PRDHandleBase*>::iterator it(m_d->prdhandles.begin()),itE(m_d->prdhandles.end());
594 for (;it!=itE;++it) {
595 if ((*it)->visible())
596 recheckCutStatus(*it);
597 }
599 if (visible()) message("Have "+QString::number(getPrdHandles().size())+" ("+QString::number(nShownHandles())+" shown) PRDs");
600}

◆ section()

QString VP1Collection::section ( ) const
inherited

Definition at line 72 of file VP1Collection.cxx.

73{
74 if (!m_d->sectionProvided) {
75 m_d->sectionProvided = true;
76 m_d->section = provideSection();
77 }
78 return m_d->section;
79}
virtual QString provideSection() const =0

◆ sectionToolTip()

QString VP1Collection::sectionToolTip ( ) const
inherited

Definition at line 82 of file VP1Collection.cxx.

83{
84 if (!m_d->sectionToolTipProvided) {
85 m_d->sectionToolTipProvided = true;
86 m_d->sectionToolTip = provideSectionToolTip();
87 }
88 return m_d->sectionToolTip;
89}
virtual QString provideSectionToolTip() const

◆ sephelperDetailedNodes()

VP1ExtraSepLayerHelper * PRDCollHandleBase::sephelperDetailedNodes ( ) const

Definition at line 400 of file PRDCollHandleBase.cxx.

401{
402 return m_d->sephelper_detail;
403}

◆ sephelperSimpleNodes()

VP1ExtraSepLayerHelper * PRDCollHandleBase::sephelperSimpleNodes ( ) const

Definition at line 406 of file PRDCollHandleBase.cxx.

407{
408 return m_d->sephelper_simple;
409}

◆ setAllowedEta

void PRDCollHandleBase::setAllowedEta ( const VP1Interval & e)
slot

Definition at line 836 of file PRDCollHandleBase.cxx.

837{
838 if (m_d->allowedEta==e)
839 return;
840 bool relaxed(e.contains(m_d->allowedEta));
841 bool tightened(m_d->allowedEta.contains(e));
842 m_d->allowedEta=e;
843 if (relaxed)
845 else if (tightened)
847 else
849}

◆ setAllowedPhi

void PRDCollHandleBase::setAllowedPhi ( const QList< VP1Interval > & l)
slot

Definition at line 852 of file PRDCollHandleBase.cxx.

853{
854 if (m_d->allowedPhi==l)
855 return;
856 m_d->allowedPhi=l;
858}

◆ setColourMethod

void PRDCollHandleBase::setColourMethod ( PRDCollHandleBase::COLOURMETHOD cm)
slot

Definition at line 710 of file PRDCollHandleBase.cxx.

711{
712 if (m_colourmethod==cm)
713 return;
715
717 std::vector<PRDHandleBase*>::iterator it(m_d->prdhandles.begin()),itE(m_d->prdhandles.end());
718 for (;it!=itE;++it) {
719 (*it)->updateMaterial();
720 //Fixme: Improve performance by only calling on those that are on tracks/segments as relevant.
721 }
723
724}

◆ setDrawErrors

void PRDCollHandleBase::setDrawErrors ( bool b)
slot

Definition at line 659 of file PRDCollHandleBase.cxx.

660{
661 if (m_d->drawerrors==b)
662 return;
663 m_d->drawerrors = b;
665 std::vector<PRDHandleBase*>::iterator it(m_d->prdhandles.begin()),itE(m_d->prdhandles.end());
666 for (;it!=itE;++it) {
667 (*it)->update3DObjects();
668 //Fixme: Improve performance by only calling updateMaterial() on
669 //those that are outliers on at least one track.
670 }
672}

◆ setDrawRDOs

void PRDCollHandleBase::setDrawRDOs ( bool b)
slot

Definition at line 675 of file PRDCollHandleBase.cxx.

676{
677 if (m_d->drawrdos==b)
678 return;
679 m_d->drawrdos = b;
681 std::vector<PRDHandleBase*>::iterator it(m_d->prdhandles.begin()),itE(m_d->prdhandles.end());
682 for (;it!=itE;++it) {
683 (*it)->update3DObjects();
684 //Fixme: Improve performance by only calling updateMaterial() on
685 //those that are outliers on at least one track.
686 }
688}

◆ setExtraWidgetsState()

void PRDCollHandleBase::setExtraWidgetsState ( const QByteArray & ba)
protectedvirtual

Reimplemented from VP1StdCollection.

Definition at line 825 of file PRDCollHandleBase.cxx.

826{
827 VP1Deserialise state(ba, systemBase());
828 if (state.version()!=0)
829 return;//just ignore silently... i guess we ought to warn?
830 state.restore(m_d->comboBox_detailLevel);
831 state.disableUnrestoredChecks();
833}

◆ setGeneralPRDDetailLevel

void PRDCollHandleBase::setGeneralPRDDetailLevel ( DETAIL dm)
slot

Definition at line 436 of file PRDCollHandleBase.cxx.

437{
438 if (m_d->generalprddetaillevel==dm)
439 return;
440 m_d->generalprddetaillevel = dm;
441 messageVerbose("Detail level changed");
442// common()->system()->deselectAll();
443
444 //Update gui combobox:
445 int targetIndex(0);
446 switch(m_d->generalprddetaillevel) {
447 case AUTO:
448 targetIndex = 1;
449 break;
450 case DETAILED:
451 targetIndex = 2;
452 break;
453 default:
454 case SIMPLE:
455 targetIndex = 0;
456 break;
457 }
458 if (targetIndex!=m_d->comboBox_detailLevel->currentIndex()) {
459 bool save = m_d->comboBox_detailLevel->blockSignals(true);
460 m_d->comboBox_detailLevel->setCurrentIndex(targetIndex);
461 m_d->comboBox_detailLevel->blockSignals(save);
462 }
463
464 //Actual changes to 3D representation:
465 m_d->updateDetailSepAttachments();
466
468
469}
void detailLevelChanged()

◆ setHelperClassName()

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

Definition at line 59 of file VP1HelperClassBase.h.

◆ setHighLightOutliers

void PRDCollHandleBase::setHighLightOutliers ( bool b)
slot

Definition at line 643 of file PRDCollHandleBase.cxx.

644{
645 if (m_d->highlightoutliers==b)
646 return;
647 m_d->highlightoutliers = b;
649 std::vector<PRDHandleBase*>::iterator it(m_d->prdhandles.begin()),itE(m_d->prdhandles.end());
650 for (;it!=itE;++it) {
651 (*it)->updateMaterial();
652 //Fixme: Improve performance by only calling updateMaterial() on
653 //those that are outliers on at least one track.
654 }
656}

◆ setHighLightWeight

void PRDCollHandleBase::setHighLightWeight ( const double & hlw)
slot

Definition at line 692 of file PRDCollHandleBase.cxx.

693{
694 if (m_highlightweight == hlw)
695 return;
696 m_highlightweight = hlw;
698 std::vector<PRDHandleBase*>::iterator it(m_d->prdhandles.begin()),itE(m_d->prdhandles.end());
699 for (;it!=itE;++it) {
700 if (m_d->highlightoutliers || (*it)->highLight())
701 (*it)->updateMaterial();
702 //Fixme: We can improve performance here by investigating whether
703 //the handle actually is an outlier for at least one track, or if
704 //highlighting is at all applicable for the collection (maybe it is turned off).
705 }
707}

◆ setState()

void VP1StdCollection::setState ( const QByteArray & state)
virtualinherited

Provide default implementation based on widget list + version.

Implements VP1Collection.

Reimplemented in AODCollHandleBase, IParticleCollHandle_CaloCluster, IParticleCollHandle_Jet, IParticleCollHandleBase, MissingEtCollHandle, TrackCollHandleBase, and VertexCollHandle.

Definition at line 288 of file VP1StdCollection.cxx.

289{
290 if (!m_d->material) {
291 message("ERROR: setState(..) called before init()");
292 return;
293 }
294 VP1Deserialise des(state);
295 des.disableUnrestoredChecks();
296 if (des.version()!=0&&des.version()!=1) {
297 messageDebug("Warning: Ignoring state with wrong version");
298 return;
299 }
300 bool vis = des.restoreBool();
301
302 QByteArray matState = des.restoreByteArray();
303 QByteArray extraWidgetState = des.version()>=1 ? des.restoreByteArray() : QByteArray();
304
306 m_d->matButton->copyValuesFromMaterial(m_d->material);
307 // m_d->material->restoreFromState(matState);
308 setVisible(vis);
309
310 if (extraWidgetState!=QByteArray())
311 setExtraWidgetsState(extraWidgetState);
312}
static bool deserialiseSoMaterial(QByteArray &, SoMaterial *&)
virtual void setExtraWidgetsState(const QByteArray &)

◆ setSystemBasePointer()

void VP1HelperClassBase::setSystemBasePointer ( IVP1System * sys)
inherited

Definition at line 197 of file VP1HelperClassBase.cxx.

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

◆ setupSettingsFromController()

void PRDCollHandleBase::setupSettingsFromController ( PRDSystemController * controller)

Definition at line 527 of file PRDCollHandleBase.cxx.

528{
529 assert(controller);
531
532 collSep()->addChild(controller->drawOptions(m_d->detType));
533
534 m_d->highlightmaterial = controller->getHighLightMaterial();
535 m_d->highlightmaterial->ref();
536
537 connect(controller,SIGNAL(highLightOutliersChanged(bool)),this,SLOT(setHighLightOutliers(bool)));
539
540 connect(controller,SIGNAL(colourMethodChanged(PRDCollHandleBase::COLOURMETHOD)),this,SLOT(setColourMethod(PRDCollHandleBase::COLOURMETHOD)));
541 setColourMethod(controller->colourMethod());
542
543 connect(controller,SIGNAL(drawErrorsChanged(bool)),this,SLOT(setDrawErrors(bool)));
544 setDrawErrors(controller->drawErrors());
545
546 connect(controller,SIGNAL(drawRDOsChanged(bool)),this,SLOT(setDrawRDOs(bool)));
547 setDrawRDOs(controller->drawRDOs());
548
549 connect(controller,SIGNAL(highLightMaterialWeightChanged(const double&)),this,SLOT(setHighLightWeight(const double&)));
551
552 connect(controller,SIGNAL(cutAllowedEtaChanged(const VP1Interval&)),
553 this,SLOT(setAllowedEta(const VP1Interval&)));
554 setAllowedEta(controller->cutAllowedEta());
555
556 connect(controller,SIGNAL(cutAllowedPhiChanged(const QList<VP1Interval>&)),
557 this,SLOT(setAllowedPhi(const QList<VP1Interval>&)));
558 setAllowedPhi(controller->cutAllowedPhi());
559
562}
void setColourMethod(PRDCollHandleBase::COLOURMETHOD)
void setHighLightWeight(const double &)
void setAllowedPhi(const QList< VP1Interval > &)
void setAllowedEta(const VP1Interval &)
virtual void setupSettingsFromControllerSpecific(PRDSystemController *)
SoMaterial * getHighLightMaterial()
PRDCollHandleBase::COLOURMETHOD colourMethod() const
SoGroup * drawOptions(PRDDetType::Type) const
VP1Interval cutAllowedEta() const
double highLightMaterialWeight() const
QList< VP1Interval > cutAllowedPhi() const
SoSeparator * collSep() const
All 3D objects from this coll.

◆ setupSettingsFromControllerSpecific()

virtual void PRDCollHandleBase::setupSettingsFromControllerSpecific ( PRDSystemController * )
inlineprotectedvirtual

◆ setVisible

void VP1StdCollection::setVisible ( bool b)
slotinherited

Definition at line 160 of file VP1StdCollection.cxx.

161{
162 if (m_d->visible==b||problemsLoading())
163 return;
164 m_d->visible=b;
165 messageVerbose("Visible state ("+text()+") => "+str(m_d->visible));
166
167 //Possibly load:
168 if (m_d->visible&&!m_d->loaded) {
169 m_d->loaded = true;
170 m_d->theswitch->whichChild = SO_SWITCH_NONE;
171 bool ok = load();
172 if (!ok) {
173 m_d->problemsloading = true;
174 m_d->visible = false;
175 m_d->checkBox->blockSignals(true);
176 m_d->checkBox->setChecked(false);
177 m_d->checkBox->setToolTip("Problems encountered during attempt to load this collection");
178 for (QWidget*w : widgetsForGuiRow())
179 w->setEnabled(false);
180 message("Problems loading "+text());
181 return;
182 }
183 m_d->theswitch->addChild(m_d->material);
184 m_d->theswitch->addChild(m_d->collsep);
185 }
186
187 Q_ASSERT(!problemsLoading());
188
189 //Update checkbox and switch:
190 if (m_d->checkBox->isChecked()!=m_d->visible) {
191 bool save = m_d->checkBox->blockSignals(true);
192 m_d->checkBox->setChecked(m_d->visible);
193 if (!save)
194 m_d->checkBox->blockSignals(false);
195 }
196 if ((m_d->theswitch->whichChild.getValue()==SO_SWITCH_ALL) != m_d->visible)
197 m_d->theswitch->whichChild = ( m_d->visible ? SO_SWITCH_ALL : SO_SWITCH_NONE );
198
199 visibilityChanged(m_d->visible);
200}
virtual QList< QWidget * > widgetsForGuiRow() const
virtual bool load()=0
bool problemsLoading() const

◆ simpleDetailLevel()

bool PRDCollHandleBase::simpleDetailLevel ( ) const
inline

Definition at line 78 of file PRDCollHandleBase.h.

78{ return detailLevel()==SIMPLE; }
DETAIL detailLevel() 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); }

◆ systemBase()

IVP1System * VP1HelperClassBase::systemBase ( ) const
inlineinherited

Definition at line 50 of file VP1HelperClassBase.h.

50{ return m_system; }

◆ text()

QString VP1StdCollection::text ( ) const
inherited

Definition at line 132 of file VP1StdCollection.cxx.

133{
134 if (!m_d->textProvided) {
135 m_d->textProvided = true;
136 m_d->text = provideText();
137 }
138 return m_d->text;
139}
virtual QString provideText() const =0

◆ toBaseCollList()

template<class T>
QList< VP1Collection * > VP1Collection::toBaseCollList ( const QList< T * > & in)
staticinherited

Definition at line 80 of file VP1Collection.h.

81{
82 QList<VP1Collection*> l;
83 for (T * t : in)
84 l << static_cast<T*>(t);
85 return l;
86}

◆ toString() [1/2]

QString PRDCollHandleBase::toString ( const COLOURMETHOD & cm)
static

Definition at line 738 of file PRDCollHandleBase.cxx.

739{
740 switch (cm) {
741 case ByTechOnly: return "ByTechOnly";
742 case BySegment: return "BySegment";
743 case ByTrack: return "ByTrack";
744 case BySegmentAndTrack: return "BySegmentAndTrack";
745 default: return "Unknown (ERROR)";
746 }
747}

◆ toString() [2/2]

QString PRDCollHandleBase::toString ( const DETAIL & d)
static

Definition at line 727 of file PRDCollHandleBase.cxx.

728{
729 switch (d) {
730 case SIMPLE: return "SIMPLE";
731 case DETAILED: return "DETAILED";
732 case AUTO: return "AUTO";
733 default: return "Unknown (ERROR)";
734 }
735}

◆ updateStates()

void VP1Collection::updateStates ( VP1CollStates & state,
const VP1CollStates & newInfo )
staticinherited

Definition at line 118 of file VP1Collection.cxx.

119{
120 VP1Msg::messageDebug("VP1Collection::updateStates() - start...");
121 QMapIterator<QByteArray,QByteArray> it(newInfo);
122 while (it.hasNext()) {
123 it.next();
124 state.insert(it.key(),it.value());
125 }
126 VP1Msg::messageDebug("VP1Collection::updateStates() - end.");
127}

◆ verbose()

bool VP1HelperClassBase::verbose ( )
inlinestaticinherited

Definition at line 32 of file VP1HelperClassBase.h.

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

◆ visibilityChanged

void VP1StdCollection::visibilityChanged ( bool )
signalinherited

◆ visible()

bool VP1StdCollection::visible ( ) const
inherited

Definition at line 142 of file VP1StdCollection.cxx.

143{
144 return m_d->visible;
145}

◆ warnUndeletedInstances()

void VP1HelperClassBase::warnUndeletedInstances ( )
staticinherited

Definition at line 183 of file VP1HelperClassBase.cxx.

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

◆ widgetsForGuiRow()

QList< QWidget * > VP1Collection::widgetsForGuiRow ( ) const
virtualinherited

Definition at line 62 of file VP1Collection.cxx.

63{
64 if (!m_d->widgetsForGuiRowProvided) {
65 m_d->widgetsForGuiRowProvided = true;
66 m_d->widgetsForGuiRow = provideWidgetsForGuiRow();
67 }
68 return m_d->widgetsForGuiRow;
69}
virtual QList< QWidget * > provideWidgetsForGuiRow() const =0

Member Data Documentation

◆ m_colourmethod

COLOURMETHOD PRDCollHandleBase::m_colourmethod
private

Definition at line 146 of file PRDCollHandleBase.h.

◆ m_common

PRDSysCommonData* PRDCollHandleBase::m_common
private

Definition at line 144 of file PRDCollHandleBase.h.

◆ m_d

Imp* PRDCollHandleBase::m_d
private

Definition at line 142 of file PRDCollHandleBase.h.

◆ m_helpername

QString VP1HelperClassBase::m_helpername
privateinherited

Definition at line 67 of file VP1HelperClassBase.h.

◆ m_highlightweight

double PRDCollHandleBase::m_highlightweight
private

Definition at line 147 of file PRDCollHandleBase.h.

◆ m_nshownhandles

int PRDCollHandleBase::m_nshownhandles
private

Definition at line 145 of file PRDCollHandleBase.h.

◆ m_system

IVP1System* VP1HelperClassBase::m_system
privateinherited

Definition at line 68 of file VP1HelperClassBase.h.

◆ s_vp1verbose

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

Definition at line 69 of file VP1HelperClassBase.h.


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