Logo ROOT  
Reference Guide
No Matches
paramlist.C File Reference

Detailed Description

Demonstrates usage of simple configuration via TEveParamList class.

#include "TEveManager.h"
#include "TEveParamList.h"
#include "TQObject.h"
class TParamFollower
TQObject::Connect("TEveParamList", "ParamChanged(char*)",
"TParamFollower", this, "OnParamChanged(char*)");
virtual ~TParamFollower()
TQObject::Disconnect("TParamFollower", "ParamChanged(char*)",
this, "OnParamChanged(char*)");
void OnParamChanged(const char* parameter)
auto pl = dynamic_cast<TEveParamList*> (reinterpret_cast<TQObject*>(gTQSender));
printf("Change in param-list '%s', parameter '%s'.\n", pl->GetElementName(), parameter);
ClassDef(TParamFollower, 0);
void paramlist()
TEveParamList* x = nullptr;
x = new TEveParamList("Top config");
gEve->AddToListTree(x, false);
x->AddParameter(TEveParamList::FloatConfig_t("Pepe", 20, 0, 110));
x->AddParameter(TEveParamList::IntConfig_t("Dima", 100, 0, 110));
x->AddParameter(TEveParamList::BoolConfig_t("Chris", true));
x = new TEveParamList("Another config");
gEve->AddToListTree(x, false);
x->AddParameter(TEveParamList::FloatConfig_t("MagneticField", 4, -4, 4));
x->AddParameter(TEveParamList::FloatConfig_t("Temperature", 16, -20, 40));
new TParamFollower;
#define ClassDef(name, id)
Definition Rtypes.h:337
#define ClassImp(name)
Definition Rtypes.h:377
R__EXTERN TEveManager * gEve
R__EXTERN void * gTQSender
Definition TQObject.h:46
static TEveManager * Create(Bool_t map_window=kTRUE, Option_t *opt="FIV")
If global TEveManager* gEve is not set initialize it.
TGListTreeItem * AddToListTree(TEveElement *re, Bool_t open, TGListTree *lt=nullptr)
Collection of named parameters.
This is the ROOT implementation of the Qt object communication mechanism (see also http://www....
Definition TQObject.h:48
Bool_t Connect(const char *signal, const char *receiver_class, void *receiver, const char *slot)
Non-static method is used to connect from the signal of this object to the receiver slot.
Definition TQObject.cxx:869
Bool_t Disconnect(const char *signal=nullptr, void *receiver=nullptr, const char *slot=nullptr)
Disconnects signal of this object from slot of receiver.
Double_t x[n]
Definition legend1.C:17
Matevz Tadel

Definition in file paramlist.C.