#include "Picker.h" #include #include #include #include #include "THKGamma.h" #include "THKMCTrack.h" #include "THKCherenkov.h" #include "THKCherenkov2D.h" #include "TEveBoxSet.h" using std::cout; using std::endl; void Picker::Picked(TObject* obj) { if(obj==NULL)return; if(fInfo==nullptr) { cout<<" ERROR: no information object defined in Picker "<ClearTemporary(); TEveElement *el = dynamic_cast (obj); if(el){ if(el->GetUserData() !=NULL){ //cout<<" user data found "<GetUserData()<GetUserData()))+">"); } } THKCherenkov *C = dynamic_cast (obj); if(C){ C->Describe(this); return; } THKGamma *g = dynamic_cast (obj); if(g){ g->Describe(this); return; } THKMCTrack *mc = dynamic_cast (obj); if(mc) { mc->Describe(this); return; } THKCherenkov2D *c2 = dynamic_cast< THKCherenkov2D*> (obj); if(c2) { c2->Describe(this); return; } TEveBoxSet *bs = dynamic_cast (obj); if(bs) { Output(TString("You clicked on ")+TString(bs->GetName())+" "+TString(bs->GetTitle())); Output(" For information on individual hits do CTRL+ALT+(Left mouse click)"); return; } obj->ls(); Output(Form("%s %s ","User clicked on: ",obj->GetName())); Output(" of class "+TString(obj->ClassName())); } void Picker::Output(TString string) { if(fInfo!=nullptr) fInfo->AddToTemporary(string); cout<