ROOT  6.07/01
Reference Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
runplugin.C
Go to the documentation of this file.
1 #include "iterplugin.cxx"
2 
3 iterplugin *plugin = 0;
4 
5 void runplugin()
6 {
7 //+ Creates and runs a simple iterator plugin connected to TGeoPainter iterator.
8 // It demonstrates the possibility to dynamically change the color of drawn
9 // volumes acording some arbitrary criteria *WITHOUT* changing the color of the
10 // same volume drawn on branches that do not match the criteria.
11 //
12 // To run:
13 // root[0] .L iterplugin.cxx+
14 // root[1] .x runplugin.C
15 // root[2] select(2,kMagenta);
16 // root[3] select(3,kBlue)
17 // ...
18 
19  gROOT->ProcessLine(".x $ROOTSYS/tutorials/geom/rootgeom.C");
20  plugin = new iterplugin();
22 }
23 
24 void select(Int_t replica=1, Int_t color=kGreen)
25 {
26 // Change current color. Replica range: 1-4
27  plugin->Select(replica, color);
29 }
virtual void ModifiedPad(Bool_t update=kFALSE) const =0
void runplugin()
Definition: runplugin.C:5
#define gROOT
Definition: TROOT.h:344
int Int_t
Definition: RtypesCore.h:41
Definition: Rtypes.h:61
iterplugin * plugin
Definition: runplugin.C:3
R__EXTERN TGeoManager * gGeoManager
Definition: TGeoManager.h:556
void select(Int_t replica=1, Int_t color=kGreen)
Definition: runplugin.C:24
virtual void SetIteratorPlugin(TGeoIteratorPlugin *plugin)=0
TVirtualGeoPainter * GetGeomPainter()
Make a default painter if none present. Returns pointer to it.