69 void rd(
int hits=0,
bool clear=
false)
73 if (clear) gEventDisplay->
Clear();
75 if (hits & 0x1 ) gEventDisplay->Hits(event,1);
76 if (hits & 0x2 ) gEventDisplay->
EmcHits(event);
77 if (hits & 0x4 ) gEventDisplay->FtpcHits(event,1);
80 else gEventDisplay->
Tracks(event);
85 void skipe(
int nEvents=1) {
86 if(chain) chain->Skip(nEvents);
102 void ae(
int tracks=-1,
int hits=-1)
107 static int defaultTracks = 0;
108 static int defaultHits = 3;
110 if (tracks != -1 ) defaultTracks = tracks;
111 else tracks = defaultTracks;
113 if (hits != -1 ) defaultHits = hits;
114 else hits = defaultHits;
115 gEventDisplay->
Clear();
118 event = (
StEvent*)chain->GetDataSet(
"StEvent");
119 if (event && !event->trackNodes().empty())) {
123 printf(
" event is empty %p\n", event);
135 void Ed(
const char* file =
136 "/star/institutions/bnl/fine/testfiles/st_physics_10169042_raw_4030001.event.root"
137 ,
unsigned int nEvent=1,
const char * detectorNames=
"TPC")
140 if ( gSystem->AccessPathName(file)) {
142 <<
"** Error ** : The input file: <"<< file <<
"> does not exist !!!"
144 <<
" Please select the existing one and re-call the function: "
146 << endl <<
" root [0] Ed(\"new file ROOT file name\")"
148 << endl <<
"To draw the StEvent components with no detector geometry, use: "
150 << endl <<
" root [0] Ed(\"new file ROOT file name\",0)"
155 gROOT->Macro(
"Load.C");
156 gSystem->Load(
"StDetectorDbMaker");
157 gROOT->Macro(Form(
"bfc.C(%d,1,\"doevents\",\"%s\")",nEvent,file));
158 delete gEventDisplay;
162 printf(
"\n The display is ready!\n");
167 printf(
"method to see the next event\n");
171 printf(
"\tae() - to draw the default setting\n");
172 printf(
"\tae(1,1) - to change the default and draw the tracks and its tpc hits\n");
173 printf(
"\tae(0,2) - to change the default and draw the Bemc towers\n");
175 printf(
"method to see the next event\n");
virtual void Tracks(const StEvent *event, StTrackType type=global)
Add all tracks of the given type from the event to the display list.
virtual void SetBkColor(Color_t newBkColor)
Set the ROOT color as the widget background.
void rd(int hits=0, bool clear=false)
This function redraws all hits and/or tracks from the current event.
void ae(int tracks=-1, int hits=-1)
This function is to search for the next non-empty event and draw it by looping over StBFChain (readin...
void Ed(const char *file="/star/institutions/bnl/fine/testfiles/st_physics_10169042_raw_4030001.event.root", unsigned int nEvent=1, const char *detectorNames="TPC")
Main entry point to initialize the primitive "Event Display" and the STAR bfc chain.
virtual void EmcHits(const StEvent *event, const char *det="bemc")
Add all emcHits those can pass the internal filter from the given detector detId type from the event ...
Class StuDraw3DEvent - to draw the 3D StEvent primitives like StTrack, StHit, StVertex decorated with...
virtual void Clear(Option_t *opt="update")
Remove all objects from the list and update the screen if opt is "update".