33#include <Inventor/C/errors/debugerror.h>
34#include <Inventor/nodes/SoSeparator.h>
35#include <Inventor/nodes/SoSwitch.h>
36#include <Inventor/nodes/SoMaterial.h>
37#include "Inventor/nodes/SoDrawStyle.h"
38#include "Inventor/nodes/SoLightModel.h"
47#if defined BUILDVP1LIGHT
80 m_d->updateGUICounter = 0;
81 m_d->collSettingsButton=0;
82 m_d->shouldLoad = shouldLoad;
85 QString safetext(
text());
86 safetext.replace(
' ',
'_');
87 safetext.replace(
'[',
'_');
88 safetext.replace(
']',
'_');
89 safetext.replace(
'/',
'_');
90 safetext.replace(
'.',
'_');
91 safetext.replace(
',',
'_');
92 safetext.replace(
'<',
'_');
93 safetext.replace(
'>',
'_');
94 safetext.replace(
'&',
'_');
115 m_d->collSettingsButton->setMaterialText(
name());
126 collSwitch()->addChild(
m_d->collSettingsButton->trackLightModel());
127 collSwitch()->addChild(
m_d->collSettingsButton->trackDrawStyle());
140 connect(
m_d->collSettingsButton,SIGNAL(cutAllowedPhiChanged(
const QList<VP1Interval>&)),
this,SLOT(
setCutAllowedPhi(
const QList<VP1Interval>&)));
148 connect(
m_d->collSettingsButton,SIGNAL(colourParametersByTypeChanged(
bool)),
this,SLOT(
showParametersChanged(
bool)));
167 if (!
m_d->collSettingsButton){
168 messageVerbose(
"No collSettingsButton set! Can't call init(), so crash is imminent...");
169 throw std::runtime_error(
"TrackParticle - No collSettingsButton set!");
171 return *
m_d->collSettingsButton;
177 if (!
m_d->shouldLoad){
178 messageVerbose(
"not loading TrackParticle collection - contains associated objects.");
186 #if defined BUILDVP1LIGHT
188 if( !(
systemBase()->getEvent())->retrieve( coll,
name().toStdString()).isSuccess() ) {
189 message(
"Error: Could not retrieve collection with key="+
name());
194 message(
"Error: Could not retrieve track particle collection with key="+
name());
203 if( ! coll->hasStore() ) {
204 message(
"No auxiliary store got associated to the TrackParticle container with key: " +
name());
215 for ( it = coll->
begin() ; it != itEnd; ++it) {
216 m_d->possiblyUpdateGUI();
218 messageDebug(
"WARNING: Ignoring null TrackParticle pointer.");
221 if ((*it)->charge()==0.0) {
222 messageDebug(
"WARNING: Ignoring TrackParticle which claims to be neutral (charge()==0.0).");
245 messageVerbose(
"IParticleCollHandle_TrackParticle::showParametersChanged to "+
str(val));
250 messageVerbose(
"IParticleCollHandle_TrackParticle::propagationOptionsChanged");
255 str <<
"\""<<
name().toLatin1().data()<<
"\":{";
259 if (handle->visible()) {
260 if (num)
str <<
",\n";
261 handle->dumpToJSON(
str);
const AODSysCommonData * common() 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.
IParticleCollHandleBase(AODSysCommonData *, const QString &name, xAOD::Type::ObjectType)
void setCutAllowedPt(const VP1Interval &)
virtual bool cut(AODHandleBase *)
QList< AODHandleBase * > getHandlesList() const
void setCutAllowedPhi(const QList< VP1Interval > &)
void addHandle(AODHandleBase *)
void setCutAllowedEta(const VP1Interval &)
TrackParticleCollectionSettingsButton * collSettingsButton
IParticleCollHandle_TrackParticle * theclass
virtual void dumpToJSON(std::ofstream &) const
virtual bool cut(AODHandleBase *)
virtual void init(VP1MaterialButtonBase *matBut=0)
static QStringList availableCollections(IVP1System *)
virtual ~IParticleCollHandle_TrackParticle()
void showParametersChanged(bool)
void propagationOptionsChanged()
IParticleCollHandle_TrackParticle(AODSysCommonData *, const QString &name, xAOD::Type::ObjectType type, bool shouldLoad=true)
shouldLoad is used to disable the call to load if the collhandle is for temporary (read: associated) ...
void resetCachedValuesCuts()
const TrackParticleCollectionSettingsButton & collSettingsButton() const
virtual void setupSettingsFromControllerSpecific(const AODSystemController *)
For extensions specific to this collection.
Interface for non-const operations on an auxiliary store.
void messageVerbose(const QString &) const
void message(const QString &) const
IVP1System * systemBase() const
void messageDebug(const QString &) 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)
ObjectType
Type of objects that have a representation in the xAOD EDM.
@ TrackParticle
The object is a charged track particle.
TrackParticleContainer_v1 TrackParticleContainer
Definition of the current "TrackParticle container version".