36#include <Inventor/nodes/SoSeparator.h>
37#include <Inventor/nodes/SoMaterial.h>
38#include <Inventor/nodes/SoSwitch.h>
39#include "Inventor/nodes/SoDrawStyle.h"
40#include "Inventor/nodes/SoLightModel.h"
51#include <QTreeWidgetItem>
103 m_d->theclass =
this;
106 QString safetext(
text());
107 safetext.replace(
' ',
'_');
108 safetext.replace(
'[',
'_');
109 safetext.replace(
']',
'_');
110 safetext.replace(
'/',
'_');
111 safetext.replace(
'.',
'_');
112 safetext.replace(
',',
'_');
113 safetext.replace(
'<',
'_');
114 safetext.replace(
'>',
'_');
115 safetext.replace(
'&',
'_');
124 #ifndef BUILDVP1LIGHT
135#if defined BUILDVP1LIGHT
152 m_d->collSettingsButton->setMaterialText(
name());
157 collSwitch()->addChild(
m_d->collSettingsButton->vertexLightModel());
158 collSwitch()->addChild(
m_d->collSettingsButton->vertexDrawStyle());
173 connect(
m_d->collSettingsButton,SIGNAL(vertexSizeChanged(
int)),
this,SLOT(
setVertexSize(
int)));
191 if (!
m_d->collSettingsButton){
192 messageVerbose(
"No collSettingsButton set! Can't call init(), so crash is imminent...");
193 throw std::runtime_error(
"Vertex - No collSettingsButton set!");
195 return *
m_d->collSettingsButton;
206 #if defined BUILDVP1LIGHT
217 if( !(
systemBase()->getEvent())->retrieve( coll,
name().toStdString()).isSuccess() ) {
218 message(
"Error: Could not retrieve collection with key="+
name());
223 message(
"Error: Could not retrieve vertex collection with key="+
name());
232 if( ! coll->hasStore() ) {
233 message(
"No auxiliary store got associated to the Vertex container with key: " +
name());
240 for (
auto vertex : *coll) {
241 qInfo() <<
" (x, y, z) = (" << vertex->x() <<
", " << vertex->y() <<
", " << vertex->z() <<
")";
246 for ( it = coll->
begin() ; it != itEnd; ++it) {
263 return m_d->handlesList;
273 messageVerbose(
"VertexCollHandle::cut() - passing in handle of wrong type! Aborting.");
278 messageVerbose(
"VertexCollHandle::cut() - returning false as m_cut_rz_allwillfail is set.");
291 messageVerbose(
"Vertex x, y, z: " + QString::number(vertexX) +
", " + QString::number(vertexY)+
", " + QString::number(vertexZ));
328 m_d->handles.reserve(n);
336 message(
"ERROR - wrong handle type passed to VertexCollHandle::addHandle!");
339 m_d->handles.push_back(handle);
340 m_d->handlesList << handle;
346 m_d->itHandles =
m_d->handles.begin();
347 m_d->itHandlesEnd =
m_d->handles.end();
352 if (
m_d->itHandles==
m_d->itHandlesEnd)
355 return *(
m_d->itHandles++);
449 messageDebug(
"Warning: Ignoring state with wrong version");
459 if (extraWidgetState!=QByteArray())
466 messageDebug(
"VertexCollHandle::persistifiableState() - start...");
473 serialise.disableUnsavedChecks();
485 messageDebug(
"VertexCollHandle::persistifiableState() - end.");
486 return serialise.result();
AODCollHandleBase(AODSysCommonData *, const QString &name, xAOD::Type::ObjectType)
const AODSysCommonData * common() const
void recheckCutStatusOfAllHandles()
void recheckCutStatusOfAllNotVisibleHandles()
void recheckCutStatusOfAllVisibleHandles()
void setExtraWidgetsState(const QByteArray &)
QByteArray extraWidgetsState() const
void setupSettingsFromController(const AODSystemController *)
void update3DObjectsOfAllHandles()
void collVisibilityChanged(bool)
const QString & name() const
DataModel_detail::const_iterator< DataVector > const_iterator
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.
Interface for non-const operations on an auxiliary store.
QByteArray restoreByteArray()
void disableUnrestoredChecks()
void messageVerbose(const QString &) const
void message(const QString &) const
IVP1System * systemBase() const
void messageDebug(const QString &) const
bool contains(const double &x) const
QStringList getKeys() const
virtual void init(VP1MaterialButtonBase *button=0)
SoSwitch * collSwitch() const
Add this somewhere in your scenegraph (do not add any children here!)
void visibilityChanged(bool)
VertexCollHandle * theclass
VertexCollectionSettingsButton * collSettingsButton
std::vector< VertexHandle * >::iterator itHandles
std::vector< VertexHandle * >::iterator itHandlesEnd
QList< AODHandleBase * > handlesList
std::vector< VertexHandle * > handles
void cleanupPtrContainer(T &) const
static QStringList availableCollections(IVP1System *)
VertexCollHandle(AODSysCommonData *, const QString &name, xAOD::Type::ObjectType)
virtual void setState(const QByteArray &)
Provide specific implementation.
AODHandleBase * getNextHandle()
bool m_cut_ry_allwillfail
virtual QByteArray persistifiableState() const
Provide specific implementation.
virtual void setupSettingsFromControllerSpecific(const AODSystemController *)
For extensions specific to this collection.
virtual bool load()
Actually load the EDM objects.
void handleIterationBegin()
void setCutAllowedZ(const VP1Interval &)
QList< AODHandleBase * > getHandlesList() const
virtual ~VertexCollHandle()
void setCutAllowedY(const VP1Interval &)
bool m_cut_rz_allwillfail
void addHandle(AODHandleBase *)
void hintNumberOfHandlesInEvent(unsigned)
virtual bool cut(AODHandleBase *)
VP1Interval m_cut_allowedZ
virtual void init(VP1MaterialButtonBase *matBut=0)
void resetCachedValuesCuts()
const VertexCollectionSettingsButton & collSettingsButton() const
void setCutAllowedR(const VP1Interval &)
VP1Interval m_cut_allowedY
VP1Interval m_cut_allowedR
double getPositionZ() const
double getPositionX() const
double getPositionY() const
ObjectType
Type of objects that have a representation in the xAOD EDM.
@ Vertex
The object is a vertex.
VertexContainer_v1 VertexContainer
Definition of the current "Vertex container version".