11#include "FairDataSourceI.h"
12#include "FairTCASource.h"
16#include <TClonesArray.h>
17#include <TEveManager.h>
18#include <TEvePointSet.h>
19#include <TEveTreeTools.h>
24 : FairPointSetDraw(name, color, mstyle, iVerbose)
35 LOG(debug) <<
"CbmTimeslicePixelHitSetDraw::Init()";
38 FairPointSetDraw::Init();
41 FairRootManager* fManager = FairRootManager::Instance();
42 fCbmEvents =
dynamic_cast<TClonesArray*
>(fManager->GetObject(
"CbmEvent"));
44 LOG(fatal) <<
"CbmTimeslicePixelHitSetDraw::Init() => CbmEvents branch not found! Task will be deactivated";
50 std::string sName = GetName();
51 if (
"MvdHit" == sName) {
54 else if (
"StsHit" == sName) {
57 else if (
"RichHit" == sName) {
60 else if (
"MuchHit" == sName) {
63 else if (
"TrdHit" == sName) {
66 else if (
"TofHit" == sName) {
69 else if (
"PsdHit" == sName) {
72 else if (
"BmonHit" == sName) {
79 if (IsActive()) {
return kSUCCESS; }
98 LOG(debug) <<
"CbmTimeslicePixelHitSetDraw::GotoEvent " << uEventIdx <<
" target " << GetName();
100 if (
fCbmEvents->GetEntriesFast() <=
static_cast<Int_t
>(uEventIdx)) {
101 LOG(fatal) <<
"CbmTimeslicePixelHitSetDraw::GotoEvent() => Failure, tried to load event " << uEventIdx
102 <<
" while only " <<
fCbmEvents->GetEntriesFast() <<
" events available in this TS!!!";
112 if (iNbHitsInTs < iNbHitsInEvent) {
113 LOG(fatal) <<
"CbmTimeslicePixelHitSetDraw::GotoEvent() => Failure, more " << GetName() <<
" in event " << uEventIdx
114 <<
" than available in the TS: " << iNbHitsInEvent <<
" VS " << iNbHitsInTs;
121 TEvePointSet* q =
new TEvePointSet(GetName(), iNbHitsInEvent, TEvePointSelectorConsumer::kTVT_XYZ);
123 q->SetMarkerColor(fColor);
124 q->SetMarkerSize(1.5);
125 q->SetMarkerStyle(fStyle);
127 for (int32_t iHitIdxInEvt = 0; iHitIdxInEvt < iNbHitsInEvent; ++iHitIdxInEvt) {
129 q->SetNextPoint(vec.X(), vec.Y(), vec.Z());
133 gEve->Redraw3D(kFALSE);
150 LOG(fatal) <<
"CbmTimesliceRecoTracks::GetVector() => Failure, object not derived from CbmPixelHit";
152 LOG(debug) <<
"-I- CbmTimeslicePixelHitSetDraw::GetVector: " << p->
GetX() <<
" " << p->
GetY() <<
" " << p->
GetZ();
ClassImp(CbmConverterManager)
Class characterising one event by a collection of links (indices) to data objects,...
size_t GetNofData() const
static CbmTimesliceManager * Instance()
void GotoEvent(uint32_t uEventIdx)
Load hits from selected event in timeslice. RESERVED FOR GUI CALLS!
CbmTimeslicePixelHitSetDraw(const char *name, Color_t color, Style_t mstyle, Int_t iVerbose=1)
Constructor.
virtual InitStatus Init()
FairDataSourceI * fLocalDataSourcePtr
TVector3 GetVector(TObject *obj)
virtual void Exec(Option_t *option)
TClonesArray * fCbmEvents