17 #include <TClonesArray.h>
18 #include <TEveManager.h>
19 #include <TEvePointSet.h>
22 :
FairTask(
"FairTutorialDet4PointDraw")
25 , fEventManager(nullptr)
29 , fGlobalCoordinates(kTRUE)
37 , fEventManager(nullptr)
41 , fGlobalCoordinates(kTRUE)
57 fPointList =
static_cast<TClonesArray*
>(fManager->
GetObject(GetName()));
58 if (
nullptr == fPointList) {
59 LOG(error) <<
"FairTutorialDet4PointDraw::Init() branch " << GetName()
60 <<
" not found! Task will be deactivated.";
76 Int_t npoints = fPointList->GetEntriesFast();
79 TEvePointSet* q =
new TEvePointSet(GetName(), npoints, TEvePointSelectorConsumer::kTVT_XYZ);
81 q->SetMarkerColor(fColor);
82 q->SetMarkerSize(1.5);
83 q->SetMarkerStyle(fStyle);
87 for (Int_t i = 0; i < npoints; ++i) {
98 Double_t x = point->
GetX();
99 Double_t y = point->
GetY();
100 Double_t z = point->
GetZ();
102 if (!fGlobalCoordinates) {
103 Double_t local[3] = {x, y, z};
112 q->SetNextPoint(x, y, z);
117 gEve->Redraw3D(kFALSE);
126 gEve->RemoveElement(fq, fEventManager);
list of container factories
virtual void Exec(Option_t *option)
static FairRun * Instance()
static FairRootManager * Instance()
TObject * GetObject(const char *BrName)
FairTutorialDet4PointDraw()
FairParSet * getContainer(const Text_t *)
virtual InitStatus Init()
Bool_t IsGlobalCoordinateSystem()
FairRuntimeDb * GetRuntimeDb(void)
static FairEventManager * Instance()
virtual void SetParContainers()
void LocalToGlobal(Double_t *local, Double_t *global, Int_t detID)
Int_t GetDetectorID() const