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

#include <MissingEtCollHandle.h>

Inheritance diagram for MissingEtCollHandle:
Collaboration diagram for MissingEtCollHandle:

Classes

class  Imp

Public Slots

void setCutAllowedPhi (const QList< VP1Interval > &)
void setVisible (bool)
void possibleChangeMatTranspOrBrightness ()

Signals

void visibilityChanged (bool)

Public Member Functions

virtual void hintNumberOfHandlesInEvent (unsigned)
void addHandle (AODHandleBase *)
virtual void handleIterationBegin ()
virtual AODHandleBasegetNextHandle ()
QList< AODHandleBase * > getHandlesList () const
 MissingEtCollHandle (AODSysCommonData *, const QString &name, xAOD::Type::ObjectType type)
virtual ~MissingEtCollHandle ()
virtual void init (VP1MaterialButtonBase *matBut=0)
virtual void setupSettingsFromControllerSpecific (const AODSystemController *)
 For extensions specific to this collection.
const MissingEtCollectionSettingsButtoncollSettingsButton () const
QByteArray persistifiableState () const
 Provide specific implementation.
void setState (const QByteArray &)
 Provide specific implementation.
void setupSettingsFromController (const AODSystemController *)
const QString & name () const
const AODSysCommonDatacommon () const
AODSysCommonDatacommon ()
const VP1ExtraSepLayerHelpersepHelper () const
VP1ExtraSepLayerHelpersepHelper ()
void setSepHelper (VP1ExtraSepLayerHelper *sh)
virtual void dumpToJSON (std::ofstream &) const
xAOD::Type::ObjectType xAODType () const
 Dummy implementation does nothing.
void recheckCutStatusOfAllVisibleHandles ()
void recheckCutStatusOfAllNotVisibleHandles ()
void recheckCutStatusOfAllHandles ()
void update3DObjectsOfAllHandles ()
void updateMaterialOfAllHandles ()
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 ()
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 QStringList availableCollections (IVP1System *)
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 bool load ()
virtual bool cut (AODHandleBase *)
virtual QColor defaultColor () const
const QList< VP1Interval > & getCutAllowedPhi ()
bool getPhiAllowall ()
template<class T>
void cleanupPtrContainer (T &) const
void recheckCutStatus (AODHandleBase *)
qint32 provideCollTypeID () const
virtual QString provideSection () const
virtual QString provideSectionToolTip () const
virtual QString provideText () const
virtual void assignDefaultMaterial (SoMaterial *) const
virtual QString matButtonToolTip () const
QList< QWidget * > provideExtraWidgetsForGuiRow () const
QByteArray extraWidgetsState () const
void setExtraWidgetsState (const QByteArray &)
QList< QWidget * > provideWidgetsForGuiRow () const
virtual QString checkBoxToolTip () const
virtual void collMaterialTransparencyAndBrightnessChanged ()
virtual QByteArray providePersistifiableID () const
void setHelperClassName (const QString &n)

Private Slots

void resetCachedValuesCuts ()
void setMetSize (int size)
void colourByComboBoxItemChanged ()
void collVisibilityChanged (bool)

Private Member Functions

void fillObjectBrowser ()
void updateObjectBrowserVisibilityCounts ()

Private Attributes

Impm_d
QList< VP1Intervalm_cut_allowedPhi
bool m_cut_phi_allowall
bool m_cut_phi_allwillfail
Impm_dbase
int m_nshownhandles
xAOD::Type::ObjectType m_type
AODSysCommonDatam_commonData
VP1ExtraSepLayerHelperm_sephelper
QString m_helpername
IVP1Systemm_system

Static Private Attributes

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

Detailed Description

Definition at line 27 of file MissingEtCollHandle.h.

Constructor & Destructor Documentation

◆ MissingEtCollHandle()

MissingEtCollHandle::MissingEtCollHandle ( AODSysCommonData * cd,
const QString & name,
xAOD::Type::ObjectType type )

Definition at line 102 of file MissingEtCollHandle.cxx.

104{
105 m_d->theclass = this;
106 m_d->updateGUICounter = 0;
107 m_d->collSettingsButton=0;
108
109
110 //The object names should not contain all sorts of funky chars (mat button style sheets wont work for instance):
111 QString safetext(text());
112 safetext.replace(' ','_');
113 safetext.replace('[','_');
114 safetext.replace(']','_');
115 safetext.replace('/','_');
116 safetext.replace('.','_');
117 safetext.replace(',','_');
118 safetext.replace('<','_');
119 safetext.replace('>','_');
120 safetext.replace('&','_');
121
122 // m_d->defaultParametersMaterial = new SoMaterial;
123 // m_d->defaultParametersMaterial->setName(("MissingEtCollHandle"+safetext).toStdString().c_str());
124 // m_d->defaultParametersMaterial->ref();
125 // m_d->matButton->setDefaultParameterMaterial(m_d->defaultParametersMaterial); FIXME
126}
AODCollHandleBase(AODSysCommonData *, const QString &name, xAOD::Type::ObjectType)
const QString & name() const
QString text() const

◆ ~MissingEtCollHandle()

MissingEtCollHandle::~MissingEtCollHandle ( )
virtual

Definition at line 129 of file MissingEtCollHandle.cxx.

130{
131 // m_d->defaultParametersMaterial->unref();
132
133 // clean the QList<handle>
134 for(AODHandleBase* handle : m_d->handles) {
135 delete handle;
136 }
137
138 // TODO: implemet this del
139 // if (m_d->bTaggingSwitch) m_d->bTaggingSwitch->unref();
140
141 delete m_d;
142}

Member Function Documentation

◆ addHandle()

void MissingEtCollHandle::addHandle ( AODHandleBase * ah)
virtual

Implements AODCollHandleBase.

Definition at line 175 of file MissingEtCollHandle.cxx.

176{
177 MissingEtHandle* handle = dynamic_cast<MissingEtHandle* >(ah);
178 if (!handle) {
179 message("ERROR - wrong handle type passed to MissingEtCollHandle::addHandle!");
180 return;
181 }
182 m_d->handles.push_back(handle); // for the vector<handle>
183 m_d->handlesList << handle; // for the QList<handle>
184}
void message(const QString &) const

◆ 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 AODCollHandleBase::assignDefaultMaterial ( SoMaterial * m) const
protectedvirtualinherited

Implements VP1StdCollection.

Definition at line 495 of file AODCollHandleBase.cxx.

496{
497 messageDebug("AODCollHandleBase::assignDefaultMaterial()");
498 VP1QtInventorUtils::setMatColor( m, defaultColor(), 0.18/*brightness*/ );
499}
virtual QColor defaultColor() const =0
void messageDebug(const QString &) const
static void setMatColor(SoMaterial *, const double &r, const double &g, const double &b, const double &brightness=0.0, const double &transp=0.0)

◆ availableCollections()

QStringList MissingEtCollHandle::availableCollections ( IVP1System * sys)
static

Definition at line 66 of file MissingEtCollHandle.cxx.

67 {
68 return VP1SGContentsHelper(sys).getKeys<xAOD::MissingETContainer>();
69 }

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

◆ cleanupPtrContainer()

template<class T>
void AODCollHandleBase::cleanupPtrContainer ( T & ) const
protectedinherited

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

◆ collSettingsButton()

const MissingEtCollectionSettingsButton & MissingEtCollHandle::collSettingsButton ( ) const

Definition at line 262 of file MissingEtCollHandle.cxx.

262 {
263 if (!m_d->collSettingsButton){
264 messageVerbose("MET - No collSettingsButton set! Can't call init(), so crash is imminent...");
265 throw std::runtime_error("MET - No collSettingsButton set!");
266 }
267 return *m_d->collSettingsButton;
268}
void messageVerbose(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 AODCollHandleBase::collVisibilityChanged ( bool vis)
privateslotinherited

Definition at line 393 of file AODCollHandleBase.cxx.

394{
395 if (VP1Msg::verbose())
396 messageVerbose("AODCollHandleBase::collVisibilityChanged => "+str(vis));
397
398 if (!m_sephelper)
399 m_sephelper = new VP1ExtraSepLayerHelper(collSep());
400
401 if (!m_dbase->objBrowseTree)
403
404 if (vis){
405 recheckCutStatusOfAllNotVisibleHandles();//Fixme -> ofallhandles? All must be not visible anyway...
406 if (m_dbase->objBrowseTree) m_dbase->objBrowseTree->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled); // selectable, enabled
407 }else{
409 // QTreeWidget* trkObjBrowser = common()->controller()->trackObjBrowser();
410 // if (m_dbase->objBrowseTree && trkObjBrowser) {
411 // trkObjBrowser->takeTopLevelItem(trkObjBrowser->indexOfTopLevelItem(m_dbase->objBrowseTree));
412 // delete m_dbase->objBrowseTree; m_dbase->objBrowseTree=0;
413 // }
414 // FIXME - need to loop through handles setting pointers to deleted QTreeWidgetItems
415 if (m_dbase->objBrowseTree) m_dbase->objBrowseTree->setFlags(Qt::ItemFlags()); // not selectable, not enabled
416 }
417}
void recheckCutStatusOfAllNotVisibleHandles()
void recheckCutStatusOfAllVisibleHandles()
VP1ExtraSepLayerHelper * m_sephelper
static bool verbose()
Definition VP1Msg.h:31
SoSeparator * collSep() const
All 3D objects from this coll.
static QString str(const QString &s)
Definition VP1String.h:49

◆ colourByComboBoxItemChanged

void AODCollHandleBase::colourByComboBoxItemChanged ( )
privateslotinherited

Definition at line 536 of file AODCollHandleBase.cxx.

537{
538 messageVerbose("AODCollHandleBase::colourByComboBoxItemChanged()");
539 messageVerbose("Collection detail level combo box changed index");
540
541 messageVerbose("TO BE IMPLEMENTED!!!");
542 /*
543 if (m_dbase->comboBox_colourby->currentText()==Imp::comboBoxEntry_ColourByRandom())
544 setColourBy(COLOUR_RANDOM);
545 else
546 setColourBy(COLOUR_PERCOLLECTION);
547 */
548}

◆ common() [1/2]

AODSysCommonData * AODCollHandleBase::common ( )
inlineinherited

Definition at line 89 of file AODCollHandleBase.h.

89{ return m_commonData; }
AODSysCommonData * m_commonData

◆ common() [2/2]

const AODSysCommonData * AODCollHandleBase::common ( ) const
inlineinherited

Definition at line 88 of file AODCollHandleBase.h.

88{ return m_commonData; }

◆ cut()

bool MissingEtCollHandle::cut ( AODHandleBase * c)
protectedvirtual

Implements AODCollHandleBase.

Definition at line 453 of file MissingEtCollHandle.cxx.

453 {
454 messageVerbose("MissingEtCollHandle::cut()");
455
456 if (MissingEtHandle* handle = dynamic_cast<MissingEtHandle*>(c))
457 {
458
459 // //------ ENERGY CUTS
460 // messageVerbose("jet's energy, allowedPt^2, PtAll: - " + QString::number(handle->energyForCuts()) + " - " + getCutAllowedPt().toString() + " - " + QString::number(int(getPtAllowall())) );
461 // double jEnergy = handle->energyForCuts();
462 // double jEnergySqr = jEnergy * jEnergy; // in AODCollHandleBase the allowedPt is stored as squared, to avoid square-root operations
463 // if (!getPtAllowall() && !getCutAllowedPt().contains(jEnergySqr) ) {
464 // messageVerbose("Pt cut not passed");
465 // return false;
466 // }
467 //
468 // //------ ETA CUTS
469 // messageVerbose("jet's eta, etaCut, EtaAll: " + QString::number(handle->eta()) + " - " + getCutAllowedEta().toString() + " - " + QString::number(int(getEtaAllowall())) );
470 // if (!getEtaAllowall() && !getCutAllowedEta().contains(handle->eta())) {
471 // messageVerbose("Eta cut not passed");
472 // return false;
473 // }
474 //
475 //------ PHI CUTS
476 if (!getPhiAllowall() ) {
477 double phi = handle->phi();
478 bool ok(false);
479 for (const VP1Interval& phirange : getCutAllowedPhi() ) {
480 messageVerbose("MET phi, phiCut, PhiAll: " + QString::number(phi) + " - " + phirange.toString() + " - " + QString::number(int(getPhiAllowall())) );
481 if (phirange.contains(phi)||phirange.contains(phi+2*M_PI)||phirange.contains(phi-2*M_PI)) {
482 ok = true;
483 break;
484 }
485 }
486 if (!ok) {
487 messageVerbose("Phi cut not passed");
488 return false;
489 }
490 }
491
492
493 } // if(dynamic_cast)
494 else{
495 messageVerbose("Not a MissingEtCollHandle. Check your code! Returning 'false'...");
496// if (! AODCollHandleBase::cut(c)) // AODCollHandleBase::cut is pure virtual, now
497 return false;
498 }
499
500 return true; //default
501
502}
#define M_PI
Scalar phi() const
phi method
const QList< VP1Interval > & getCutAllowedPhi()

◆ decrementNShownHandles()

void AODCollHandleBase::decrementNShownHandles ( )
inlineinherited

Definition at line 133 of file AODCollHandleBase.h.

◆ defaultColor()

virtual QColor MissingEtCollHandle::defaultColor ( ) const
inlineprotectedvirtual

Implements AODCollHandleBase.

Definition at line 71 of file MissingEtCollHandle.h.

71{ return QColor::fromRgbF(1.f, 1.f, 1.f); } // default color: White

◆ dumpToJSON()

virtual void AODCollHandleBase::dumpToJSON ( std::ofstream & ) const
inlinevirtualinherited

◆ extraWidgetsState()

QByteArray AODCollHandleBase::extraWidgetsState ( ) const
protectedvirtualinherited

Reimplemented from VP1StdCollection.

Definition at line 510 of file AODCollHandleBase.cxx.

511{
512 VP1Serialise serialise(0/*version*/,systemBase());
513 // serialise.save(m_dbase->comboBox_colourby);
514 // serialise.disableUnsavedChecks();
515 return serialise.result();
516}
IVP1System * systemBase() const
void serialise(const std::vector< const IRoiDescriptor * > &rois, roiserial_type &s)
serialise an entire vector of IRoiDescriptors

◆ fillObjectBrowser()

void AODCollHandleBase::fillObjectBrowser ( )
privateinherited

Definition at line 431 of file AODCollHandleBase.cxx.

432{
433 QElapsedTimer t;
434 t.start();
435 messageVerbose("AODCollHandleBase::fillObjectBrowser called for "+name());
436
437 QTreeWidget* trkObjBrowser = common()->controller()->objBrowser();
438 if (!trkObjBrowser) {
439 messageVerbose("AODCollHandleBase::fillObjectBrowser: no common()->controller()->objBrowser(). Aborting");
440 return;
441 }
442 // if (!nShownHandles()) {
443 // messageVerbose("AODCollHandleBase::fillObjectBrowser: no shown handles, so leaving.");
444 // return; // don't bother with hidden collection
445 // }
446
447 trkObjBrowser->setUpdatesEnabled(false);
448
449 bool firstTime=false;
450 if (!m_dbase->objBrowseTree) {
451 m_dbase->objBrowseTree = new QTreeWidgetItem(0);
452 firstTime=true;
453 messageVerbose("AODCollHandleBase::fillObjectBrowser: First time so creating QTreeWidgetItem.");
454 } else {
455 int index = trkObjBrowser->indexOfTopLevelItem(m_dbase->objBrowseTree);
456 if (index==-1 ) {
457 messageVerbose("Missing from WidgetTree! Will continue but something must be wrong");
458 }
459 }
460
461 messageVerbose("AODCollHandleBase::fillObjectBrowser about to start looping over handles at "+QString::number(t.elapsed())+" ms");
462
463 QList<QTreeWidgetItem *> list;
465 AODHandleBase* handle=0;
466 unsigned int i=0;
467 unsigned int numVisible=0;
468 while ((handle=getNextHandle()))
469 {
470 if (firstTime){
471 handle->fillObjectBrowser(list);
472 } else {
473 handle->updateObjectBrowser();
474 }
475
476 // messageVerbose("AODCollHandleBase::fillObjectBrowser for handle completed in "+QString::number(t.elapsed()));
477
478 if (handle->visible() ) numVisible++;
479 i++;
480 }
481
482 QString text(QString(": (")+QString::number(numVisible)+QString("/")+QString::number(i)+QString(") visible"));
483
484 m_dbase->objBrowseTree->setText(0, name());
485 m_dbase->objBrowseTree->setText(1, text);
486 m_dbase->objBrowseTree->addChildren(list);
487 trkObjBrowser->addTopLevelItem(m_dbase->objBrowseTree);
488 trkObjBrowser->setUpdatesEnabled(true);
489
490 messageVerbose("AODCollHandleBase::fillObjectBrowser completed in "+QString::number(t.elapsed())+" ms");
491
492}
const AODSysCommonData * common() const
virtual void handleIterationBegin()=0
virtual AODHandleBase * getNextHandle()=0
void updateObjectBrowser()
Update object browser QTreeWidgetItem.
bool visible() const
virtual void fillObjectBrowser(QList< QTreeWidgetItem * > &list)
Create and fill the object browser QTreeWidgetItem.
const AODSystemController * controller() const
QTreeWidget * objBrowser() const
Returns a pointer to the Track Object Browser (if it exists)
str index
Definition DeMoScan.py:362
list(name, path='/')
Definition histSizes.py:38

◆ getCutAllowedPhi()

const QList< VP1Interval > & MissingEtCollHandle::getCutAllowedPhi ( )
inlineprotected

Definition at line 75 of file MissingEtCollHandle.h.

75{return m_cut_allowedPhi; };
QList< VP1Interval > m_cut_allowedPhi

◆ getHandlesList()

QList< AODHandleBase * > MissingEtCollHandle::getHandlesList ( ) const
virtual

Implements AODCollHandleBase.

Definition at line 202 of file MissingEtCollHandle.cxx.

203{
204 messageVerbose("AODCollHandleBase::getHandlesList()");
205 return m_d->handlesList;
206}

◆ getNextHandle()

AODHandleBase * MissingEtCollHandle::getNextHandle ( )
virtual

Implements AODCollHandleBase.

Definition at line 194 of file MissingEtCollHandle.cxx.

194 {
195 if (m_d->itHandles==m_d->itHandlesEnd)
196 return 0;
197 else
198 return *(m_d->itHandles++);
199}

◆ getPhiAllowall()

bool MissingEtCollHandle::getPhiAllowall ( )
inlineprotected

Definition at line 76 of file MissingEtCollHandle.h.

76{return m_cut_phi_allowall; };

◆ 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

◆ handleIterationBegin()

void MissingEtCollHandle::handleIterationBegin ( )
virtual

Implements AODCollHandleBase.

Definition at line 187 of file MissingEtCollHandle.cxx.

188{
189 m_d->itHandles = m_d->handles.begin();
190 m_d->itHandlesEnd = m_d->handles.end();
191}

◆ helperClassName()

const QString & VP1HelperClassBase::helperClassName ( ) const
inlineinherited

Definition at line 51 of file VP1HelperClassBase.h.

51{ return m_helpername; }

◆ hintNumberOfHandlesInEvent()

void MissingEtCollHandle::hintNumberOfHandlesInEvent ( unsigned n)
virtual

Implements AODCollHandleBase.

Definition at line 169 of file MissingEtCollHandle.cxx.

170{
171 m_d->handles.reserve(n);
172}

◆ incrementNShownHandles()

void AODCollHandleBase::incrementNShownHandles ( )
inlineinherited

Definition at line 132 of file AODCollHandleBase.h.

132{ ++m_nshownhandles; }

◆ init()

void MissingEtCollHandle::init ( VP1MaterialButtonBase * matBut = 0)
virtual

Implements AODCollHandleBase.

Definition at line 145 of file MissingEtCollHandle.cxx.

146{
147 // std::cout<<"MissingEtCollHandle::init 1"<<std::endl;
148
149 // m_d->matButton = new MissingEtCollectionSettingsButton; // TODO: update for jet
150 // m_d->matButton->setMaterialText(name());
151 m_d->collSettingsButton = new MissingEtCollectionSettingsButton;
152 m_d->collSettingsButton->setMaterialText(name());
153
154 // std::cout<<"Calling VP1StdCollection::init with m_d->matButton (MissingEtCollectionSettingsButton)="<<m_d->matButton<<std::endl;
155 VP1StdCollection::init(m_d->collSettingsButton);//this call is required. Passing in m_d->collSettingsButton means we have the more complex button.
156 setupSettingsFromController(common()->controller());
157 connect(this,SIGNAL(visibilityChanged(bool)),this,SLOT(collVisibilityChanged(bool)));
158
159 // std::cout<<"MissingEtCollHandle::init 2"<<std::endl;
160 // std::cout<<"swi: "<<collSwitch()<<std::endl;
161 // std::cout<<"sep: "<<collSep()<<std::endl;
162 // std::cout<<"mat: "<<material()<<std::endl;
163
164 // collSwitch()->addChild(m_d->collSettingsButton->trackLightModel()); // TODO: update for jets
165 // collSwitch()->addChild(m_d->collSettingsButton->trackDrawStyle()); // TODO: update for jets
166}
void setupSettingsFromController(const AODSystemController *)
virtual void init(VP1MaterialButtonBase *button=0)
void visibilityChanged(bool)

◆ 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 MissingEtCollHandle::load ( )
protectedvirtual

Implements VP1StdCollection.

Definition at line 394 of file MissingEtCollHandle.cxx.

395{
396 messageVerbose("loading MissingEt collection");
397
398 //Get collection:
399 const xAOD::MissingETContainer * coll(nullptr);
400
401 #if defined BUILDVP1LIGHT
402 // Retrieve objects from the event
403 if( !(systemBase()->getEvent())->retrieve( coll, name().toStdString()).isSuccess() ) {
404 QString errMsg = "Failed to retrieve " + name();
405 message("Error: Could not retrieve collection with key="+name());
406 return false;
407 }
408 #else
409 if (!VP1SGAccessHelper(systemBase()).retrieve(coll, name())) {
410 message("Error: Could not retrieve MET collection with key="+name());
411 return false;
412 }
413 #endif // BUILDVP1LIGHT
414
415 // // Retrieve the xAOD particles:
416 // const xAOD::MissingETContainer* xaod = evtStore()->retrieve<const xAOD::MissingETContainer>( m_JetCollection );
417
418 // Check that the auxiliary store association was made successfully:
419 if( ! coll->hasStore() ) {
420 message("No auxiliary store got associated to the MET container with key: " +name());
421 }
422
423 // This is needed for now, until the issues around the DV code are
424 // sorted out...
425 const_cast< xAOD::MissingETContainer* >( coll )->setStore(
426 ( SG::IAuxStore* ) coll->getConstStore() );
427
428 //Make appropriate Jet handles:
429 // hintNumberOfTracksInEvent(coll->size());
430 xAOD::MissingETContainer::const_iterator it, itEnd = coll->end();
431 for ( it = coll->begin() ; it != itEnd; ++it) {
432 m_d->possiblyUpdateGUI();
433 if (!*it) {
434 messageDebug("WARNING: Ignoring null MET pointer.");
435 continue;
436 }
437 /*
438 if ((*it)->charge()==0.0) {
439 messageDebug("WARNING: Ignoring Jet which claims to be neutral (charge()==0.0).");
440 continue;
441 }
442 */
443 addHandle(new MissingEtHandle(this,*it));
444 }
445
446 return true;
447}
DataModel_detail::const_iterator< DataVector > const_iterator
Definition DataVector.h:838
void addHandle(AODHandleBase *)
retrieve(aClass, aKey=None)
Definition PyKernel.py:110

◆ matButtonToolTip()

virtual QString AODCollHandleBase::matButtonToolTip ( ) const
inlineprotectedvirtualinherited

Reimplemented from VP1StdCollection.

Definition at line 156 of file AODCollHandleBase.h.

156{ return "Edit cuts/properties/material for "+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}

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

◆ name()

const QString & AODCollHandleBase::name ( ) const
inherited

Definition at line 130 of file AODCollHandleBase.cxx.

131{
132 return m_dbase->name;
133}

◆ nShownHandles()

int AODCollHandleBase::nShownHandles ( )
inlineinherited

Definition at line 129 of file AODCollHandleBase.h.

129{ 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 MissingEtCollHandle::persistifiableState ( ) const
virtual

Provide specific implementation.

Reimplemented from AODCollHandleBase.

Definition at line 552 of file MissingEtCollHandle.cxx.

553{
554 messageDebug("MissingEtCollHandle::persistifiableState() - start...");
555
556 // if (!m_d->matButton) {
557 // message("ERROR: persistifiableState() called before init()");
558 // return QByteArray();
559 // }
560
561
562 VP1Serialise serialise(1/*version*/);
563
564 // settings
565 serialise.disableUnsavedChecks();
566
567 // SAVE THE CHECKED/UNCHECKED STATUS OF THE COLLECTION
568 serialise.save(visible());
569
570 // SAVE THE MATERIAL BUTTON
571 //Q_ASSERT(m_d->matButton&&"Did you forget to call init() on this VP1StdCollection?");
572 //serialise.save(m_d->matButton->saveState());
573
574 // SAVE THE EXTRA-STATES
575 serialise.save(extraWidgetsState());//version 1+
576
577 // SAVE MATERIAL SETTINGS / CUTS
578 serialise.save(m_d->collSettingsButton->saveState());
579
580 messageDebug("MissingEtCollHandle::persistifiableState() - end.");
581 return serialise.result();
582}
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()

◆ problemsLoading()

bool VP1StdCollection::problemsLoading ( ) const
inherited

Definition at line 154 of file VP1StdCollection.cxx.

155{
156 return m_d->problemsloading;
157}

◆ provideCollTypeID()

qint32 AODCollHandleBase::provideCollTypeID ( ) const
protectedvirtualinherited

Reimplemented from VP1StdCollection.

Definition at line 375 of file AODCollHandleBase.cxx.

376{
377 return m_type; // This is the xAOD::Type::ObjectType value
378}
xAOD::Type::ObjectType m_type

◆ provideExtraWidgetsForGuiRow()

QList< QWidget * > AODCollHandleBase::provideExtraWidgetsForGuiRow ( ) const
protectedvirtualinherited

Reimplemented from VP1StdCollection.

Definition at line 503 of file AODCollHandleBase.cxx.

504{
505 // return QList<QWidget*>() << m_dbase->comboBox_colourby;
506 return QList<QWidget*>();
507}

◆ 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 AODCollHandleBase::provideSection ( ) const
protectedvirtualinherited

Implements VP1Collection.

Definition at line 380 of file AODCollHandleBase.cxx.

380 {
381
382 std::stringstream ss;
383 ss << m_type;
384 QString section = QString::fromStdString(ss.str());
385 return section;
386}
static Double_t ss
QString section() const

◆ provideSectionToolTip()

QString AODCollHandleBase::provideSectionToolTip ( ) const
protectedvirtualinherited

Reimplemented from VP1Collection.

Definition at line 388 of file AODCollHandleBase.cxx.

388 {
389 return QString("TODO!");
390}

◆ provideText()

virtual QString AODCollHandleBase::provideText ( ) const
inlineprotectedvirtualinherited

Implements VP1StdCollection.

Definition at line 153 of file AODCollHandleBase.h.

153{ return name(); };//FIXME

◆ 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 AODCollHandleBase::recheckCutStatus ( AODHandleBase * handle)
protectedinherited

Definition at line 137 of file AODCollHandleBase.cxx.

138{
139 messageVerbose("AODCollHandleBase::recheckCutStatus() & visible="+str(visible()));
140 handle->setVisible( visible() && cut(handle));
141}
virtual bool cut(AODHandleBase *)=0
void setVisible(bool)
use by the collection handle.

◆ recheckCutStatusOfAllHandles()

void AODCollHandleBase::recheckCutStatusOfAllHandles ( )
inherited

Definition at line 203 of file AODCollHandleBase.cxx.

204{
205 messageVerbose("AODCollHandleBase::recheckCutStatusOfAllHandles()");
206 if (!isLoaded())
207 return;
210 AODHandleBase* handle=0;
211 while ((handle=getNextHandle()))
212 {
213 if (handle->visible())
214 recheckCutStatus(handle);
215 }
218
219 message("recheckCutStatusOfAllHandles: "+str(nShownHandles())+"/"+str(getHandlesList().count())+" pass cuts");
220}
void recheckCutStatus(AODHandleBase *)
virtual QList< AODHandleBase * > getHandlesList() const =0
void updateObjectBrowserVisibilityCounts()
virtual void largeChangesEnd()
virtual void largeChangesBegin()
int count(std::string s, const std::string &regx)
count how many occurances of a regx are in a string
Definition hcg.cxx:146

◆ recheckCutStatusOfAllNotVisibleHandles()

void AODCollHandleBase::recheckCutStatusOfAllNotVisibleHandles ( )
inherited

Definition at line 177 of file AODCollHandleBase.cxx.

178{
179 messageVerbose("AODCollHandleBase::recheckCutStatusOfAllNotVisibleHandles");
180
181 if (!isLoaded()){
182 messageVerbose("AODCollHandleBase::recheckCutStatusOfAllNotVisibleHandles - not yet loaded. Aborting.");
183 return;
184 }
185
187 AODHandleBase* handle=0;
188 // unsigned int i=0;
190 while ((handle=getNextHandle()))
191 {
192 // std::cout<<"Looking at handle "<<++i<<" with visible="<<handle->visible()<<std::endl;
193 if (!handle->visible())
194 recheckCutStatus(handle);
195 }
198
199 message("recheckCutStatusOfAllNotVisibleHandles: "+str(nShownHandles())+"/"+str(getHandlesList().count())+" pass cuts");
200}

◆ recheckCutStatusOfAllVisibleHandles()

void AODCollHandleBase::recheckCutStatusOfAllVisibleHandles ( )
inherited

Definition at line 144 of file AODCollHandleBase.cxx.

145{
146 messageVerbose("AODCollHandleBase::recheckCutStatusOfAllVisibleHandles");
147
148 if (!isLoaded())
149 return;
150
151 //This method is called when a cut is tightened - thus we better start by deselectAll to avoid weird highlighting issues.
152 common()->system()->deselectAll();
153
156 AODHandleBase* handle=0;
157 while ((handle=getNextHandle()))
158 {
159 if (handle->visible())
160 recheckCutStatus(handle);
161 }
162 // handle=getNextHandle();
163 // recheckCutStatus(handle);
164
165 // std::vector<AODHandleBase*>::iterator it(m_dbase->handles.begin()),itE(m_dbase->handles.end());
166 // for (;it!=itE;++it) {
167 // if ((*it)->visible())
168 // recheckCutStatus(*it);
169 // }
172
173 message("recheckCutStatusOfAllVisibleHandles: "+str(nShownHandles())+"/"+str(getHandlesList().count())+" pass cuts");
174}
const VP1AODSystem * system() const
virtual void deselectAll(SoCooperativeSelection *exception_sel=0)

◆ resetCachedValuesCuts

void MissingEtCollHandle::resetCachedValuesCuts ( )
privateslot

Definition at line 246 of file MissingEtCollHandle.cxx.

247{
248 // TODO: it is not used so far! Check Other collections and update accordingly
249
250 // kinetic cuts
251 setCutAllowedPhi(m_d->collSettingsButton->cutAllowedPhi());
252 // other settings
253 setMetSize(m_d->collSettingsButton->metLength());
254
255}
void setCutAllowedPhi(const QList< VP1Interval > &)

◆ 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

◆ sepHelper() [1/2]

VP1ExtraSepLayerHelper * AODCollHandleBase::sepHelper ( )
inlineinherited

Definition at line 91 of file AODCollHandleBase.h.

91{ return m_sephelper; }//For attaching/detaching.

◆ sepHelper() [2/2]

const VP1ExtraSepLayerHelper * AODCollHandleBase::sepHelper ( ) const
inlineinherited

Definition at line 90 of file AODCollHandleBase.h.

90{ return m_sephelper; }//For attaching/detaching.

◆ setCutAllowedPhi

void MissingEtCollHandle::setCutAllowedPhi ( const QList< VP1Interval > & allowedPhi)
slot

Definition at line 514 of file MissingEtCollHandle.cxx.

515{
516 VP1Msg::messageVerbose("MissingEtCollHandle::setCutAllowedPhi() - signal received in setCutAllowedPhi.");
517
518 if (m_cut_allowedPhi==allowedPhi)
519 return;
520
521 m_cut_allowedPhi = allowedPhi;
522
523 m_cut_phi_allowall = m_cut_allowedPhi.count()==1 && m_cut_allowedPhi.at(0).isAllR();
524 m_cut_phi_allwillfail = m_cut_allowedPhi.isEmpty(); // || m_cut_allowedPtSq.isEmpty() || m_cut_allowedEta.isEmpty();
525
526 if (m_cut_phi_allowall) {
528 return;
529 }
532 return;
533 }
534
535 // Test: is the current interval larger than the previous one?
536 //bool relaxcut = allowedPhi.contains(m_cut_allowedPhi); // TODO: implement this 'contains' function
537 // Store the current interval
538// m_cut_allowedPhi = allowedPhi;
539
540// if (relaxcut)
541// recheckCutStatusOfAllNotVisibleHandles();
542// else
543// recheckCutStatusOfAllVisibleHandles();
544
546 recheckCutStatusOfAllNotVisibleHandles(); // Redundant, but needed! TODO: remove this when new 'contains' is ready
547
548 return;
549}
static void messageVerbose(const QString &)
Definition VP1Msg.cxx:84

◆ setExtraWidgetsState()

void AODCollHandleBase::setExtraWidgetsState ( const QByteArray & ba)
protectedvirtualinherited

Reimplemented from VP1StdCollection.

Definition at line 519 of file AODCollHandleBase.cxx.

520{
521 messageDebug(" AODCollHandleBase::setExtraWidgetsState() - ba: " + ba);
522
523 if (ba.isEmpty())
524 messageVerbose("ExtraWidgetState ByteArray is empty.");
525
526 // VP1Deserialise state(ba, systemBase());
527 // if (state.version()!=0)
528 // return;//just ignore silently... i guess we ought to warn?
529 // state.restore(m_dbase->comboBox_colourby);
530 // state.disableUnrestoredChecks();
531 // colourByComboBoxItemChanged();
532}

◆ setHelperClassName()

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

Definition at line 59 of file VP1HelperClassBase.h.

◆ setMetSize

void MissingEtCollHandle::setMetSize ( int size)
privateslot

Definition at line 309 of file MissingEtCollHandle.cxx.

310{
311 messageVerbose("signal received: metSizeChanged ("+str(size)+")");
312
314}

◆ setSepHelper()

void AODCollHandleBase::setSepHelper ( VP1ExtraSepLayerHelper * sh)
inlineinherited

Definition at line 92 of file AODCollHandleBase.h.

92{ m_sephelper=sh; }//For attaching/detaching.

◆ setState()

void MissingEtCollHandle::setState ( const QByteArray & state)
virtual

Provide specific implementation.

Reimplemented from AODCollHandleBase.

Definition at line 585 of file MissingEtCollHandle.cxx.

586{
587 messageDebug("MissingEtCollHandle::setState()");
588
589 VP1Deserialise des(state);
590 des.disableUnrestoredChecks();
591 if (des.version()!=0&&des.version()!=1) {
592 messageDebug("Warning: Ignoring state with wrong version");
593 return;
594 }
595
596 // save state
597
598 bool vis = des.restoreBool();
599
600 // QByteArray matState = des.restoreByteArray();
601 // m_d->matButton->restoreFromState(matState);
602 QByteArray extraWidgetState = des.version()>=1 ? des.restoreByteArray() : QByteArray();
603 setVisible(vis);
604
605 if (extraWidgetState!=QByteArray())
606 setExtraWidgetsState(extraWidgetState);
607
608 // MATERIAL SETTINGS / CUTS
609 messageDebug("restoring material collection button...");
610 des.restore(m_d->collSettingsButton);
611
612 messageDebug("reset all caches storing values for cuts...");
614
615 messageDebug("recheck all handles...");
617
618}
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 AODCollHandleBase::setupSettingsFromController ( const AODSystemController * controller)
inherited

Definition at line 112 of file AODCollHandleBase.cxx.

113{
114 messageVerbose("setupSettingsFromController start");
115 if (!controller) {
116 message("Not properly initialized: controller pointer is zero.");
117 return;
118 }
119
121 // connect(common()->system(),SIGNAL(newHandleSelected( const AODHandleBase&)),this,SLOT(handleSelectionChanged()));
123
125 messageVerbose("setupSettingsFromController end");
126}
virtual void setupSettingsFromControllerSpecific(const AODSystemController *)
For extensions specific to this collection.

◆ setupSettingsFromControllerSpecific()

void MissingEtCollHandle::setupSettingsFromControllerSpecific ( const AODSystemController * )
virtual

For extensions specific to this collection.

Reimplemented from AODCollHandleBase.

Definition at line 210 of file MissingEtCollHandle.cxx.

210 {
211
212 //cuts
213 // connect(m_d->collSettingsButton,SIGNAL(cutAllowedPtChanged(const VP1Interval&)),this,SLOT(setCutAllowedPt(const VP1Interval&)));
214 // setCutAllowedPt(m_d->collSettingsButton->cutAllowedPt());
215 //
216 // connect(m_d->collSettingsButton,SIGNAL(cutAllowedEtaChanged(const VP1Interval&)),this,SLOT(setCutAllowedEta(const VP1Interval&)));
217 // setCutAllowedEta(m_d->collSettingsButton->cutAllowedEta());
218 //
219 // connect(m_d->collSettingsButton,SIGNAL(cutAllowedPhiChanged(const QList<VP1Interval>&)),this,SLOT(setCutAllowedPhi(const QList<VP1Interval>&)));
220 // setCutAllowedPhi(m_d->collSettingsButton->cutAllowedPhi());
221
222 // // Parameters
223 // connect(m_d->collSettingsButton,SIGNAL(showParametersChanged(bool)), this,SLOT(showParametersChanged(bool)));
224 // connect(m_d->collSettingsButton,SIGNAL(colourParametersByTypeChanged(bool)),this,SLOT(showParametersChanged(bool)));
225 // Just reusing the same slot, since it doesn't
226
227 // scale
228 //connect(m_d->collSettingsButton,SIGNAL(scaleChanged(const double&)),this,SLOT(setScale(const double&)));
229 //setScale( this->scale() );
230
231 // MET length and thickness
232 connect(m_d->collSettingsButton,SIGNAL(metSizeChanged(int)),this,SLOT(setMetSize(int)));
233 setMetSize(m_d->collSettingsButton->metLength());
234
235 // Phi cut
236 connect(m_d->collSettingsButton,SIGNAL(cutAllowedPhiChanged(const QList<VP1Interval>&)),this,SLOT(setCutAllowedPhi(const QList<VP1Interval>&)));
237 setCutAllowedPhi(m_d->collSettingsButton->cutAllowedPhi());
238
239 // random jet colors
240 // connect(m_d->collSettingsButton,SIGNAL(rerandomise()),this,SLOT(rerandomise()));
241 // connect(m_d->collSettingsButton,SIGNAL(randomJetColoursChanged(const bool&)),this,SLOT(setRandomJetColours(const bool&)));
242 // setRandomJetColours(m_d->collSettingsButton->randomJetColours());
243}

◆ 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

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

◆ update3DObjectsOfAllHandles()

void AODCollHandleBase::update3DObjectsOfAllHandles ( )
inherited

Definition at line 223 of file AODCollHandleBase.cxx.

224{
225 if (!isLoaded())
226 return;
227 if (VP1Msg::verbose())
228 messageVerbose("update3DObjectsOfAllHandles start");
231 AODHandleBase* handle=0;
232 while ((handle=getNextHandle()))
233 handle->update3DObjects();
234
236 messageVerbose("update3DObjectsOfAllHandles end");
237}
virtual void update3DObjects()
Called after some configuration changes, or when the object is first created. Must be overloaded by c...

◆ updateMaterialOfAllHandles()

void AODCollHandleBase::updateMaterialOfAllHandles ( )
inherited

Definition at line 240 of file AODCollHandleBase.cxx.

241{
242 if (!isLoaded())
243 return;
244 messageVerbose("updateMaterialOfAllHandles start");
247 AODHandleBase* handle=0;
248 while ((handle=getNextHandle()))
249 handle->updateMaterial();
251 messageVerbose("updateMaterialOfAllHandles end");
252}
void updateMaterial()
Called after some configuration related to material changes.

◆ updateObjectBrowserVisibilityCounts()

void AODCollHandleBase::updateObjectBrowserVisibilityCounts ( )
privateinherited

Definition at line 419 of file AODCollHandleBase.cxx.

419 {
420 messageVerbose("AODCollHandleBase::updateObjectBrowserVisibilityCounts called for "+name());
421 QTreeWidget* trkObjBrowser = common()->controller()->objBrowser();
422 if (!trkObjBrowser || !m_dbase->objBrowseTree) {
423 messageVerbose("AODCollHandleBase::updateObjectBrowserVisibilityCounts: no common()->controller()->objBrowser() and/or d->objBrowseTree. Aborting");
424 messageVerbose("trkObjBrowser: "+str(trkObjBrowser)+"\t d->objBrowseTree: "+str(m_dbase->objBrowseTree));
425 return;
426 }
427 QString text(QString(": (")+QString::number(nShownHandles())+QString("/")+QString::number(getHandlesList().count())+QString(") visible"));
428 m_dbase->objBrowseTree->setText(1, text);
429}

◆ 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

◆ xAODType()

xAOD::Type::ObjectType AODCollHandleBase::xAODType ( ) const
inlineinherited

Dummy implementation does nothing.

This is actually the same as is returned by provideCollTypeID(), but this is public and more clearly named.

Definition at line 97 of file AODCollHandleBase.h.

Member Data Documentation

◆ m_commonData

AODSysCommonData* AODCollHandleBase::m_commonData
privateinherited

Definition at line 190 of file AODCollHandleBase.h.

◆ m_cut_allowedPhi

QList<VP1Interval> MissingEtCollHandle::m_cut_allowedPhi
private

Definition at line 97 of file MissingEtCollHandle.h.

◆ m_cut_phi_allowall

bool MissingEtCollHandle::m_cut_phi_allowall
private

Definition at line 98 of file MissingEtCollHandle.h.

◆ m_cut_phi_allwillfail

bool MissingEtCollHandle::m_cut_phi_allwillfail
private

Definition at line 99 of file MissingEtCollHandle.h.

◆ m_d

Imp* MissingEtCollHandle::m_d
private

Definition at line 95 of file MissingEtCollHandle.h.

◆ m_dbase

Imp* AODCollHandleBase::m_dbase
privateinherited

Definition at line 186 of file AODCollHandleBase.h.

◆ m_helpername

QString VP1HelperClassBase::m_helpername
privateinherited

Definition at line 67 of file VP1HelperClassBase.h.

◆ m_nshownhandles

int AODCollHandleBase::m_nshownhandles
privateinherited

Definition at line 188 of file AODCollHandleBase.h.

◆ m_sephelper

VP1ExtraSepLayerHelper* AODCollHandleBase::m_sephelper
privateinherited

Definition at line 191 of file AODCollHandleBase.h.

◆ m_system

IVP1System* VP1HelperClassBase::m_system
privateinherited

Definition at line 68 of file VP1HelperClassBase.h.

◆ m_type

xAOD::Type::ObjectType AODCollHandleBase::m_type
privateinherited

Definition at line 189 of file AODCollHandleBase.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: