3 #include "TPCSector2D.h"
5 #include <Alieve/TPCData.h>
6 #include <Alieve/TPCSectorData.h>
8 #include <AliTPCParam.h>
10 #include <TBuffer3D.h>
11 #include <TBuffer3DTypes.h>
12 #include <TVirtualPad.h>
13 #include <TVirtualViewer3D.h>
16 using namespace Alieve;
19 //______________________________________________________________________
22 // Displays TPC raw-data in 2D.
24 // fShowMax: true - display maximum value for given time interval
25 // false - display integral
26 // fAverage: only available when fShowMax = false; divide by time window width
28 // fUseTexture: use OpenGL textures to display data (fast rendering,
29 // updates take the same time)
34 /**************************************************************************/
36 TPCSector2D::TPCSector2D(const Text_t* n, const Text_t* t) :
47 TPCSector2D::~TPCSector2D()
50 /**************************************************************************/
52 void TPCSector2D::ComputeBBox()
54 const TPCSectorData::SegmentInfo& iSeg = TPCSectorData::GetInnSeg();
55 const TPCSectorData::SegmentInfo& o2Seg = TPCSectorData::GetOut2Seg();
57 #if ROOT_VERSION_CODE <= ROOT_VERSION(5,11,2)
62 Float_t w = o2Seg.GetNMaxPads()*o2Seg.GetPadWidth()/2;
65 fBBox[2] = iSeg.GetRLow();
66 fBBox[3] = o2Seg.GetRLow() + o2Seg.GetNRows()*o2Seg.GetPadHeight();
67 fBBox[4] = -0.5; // Fake z-width to 1 cm.
71 /**************************************************************************/
73 void TPCSector2D::Paint(Option_t* )
75 if(fRnrElement == kFALSE)
78 TBuffer3D buffer(TBuffer3DTypes::kGeneric);
83 buffer.fTransparency = 0;
84 fHMTrans.SetBuffer3D(buffer);
85 buffer.SetSectionsValid(TBuffer3D::kCore);
87 Int_t reqSections = gPad->GetViewer3D()->AddObject(buffer);
88 if (reqSections == TBuffer3D::kNone) {
92 Error("TPCSector2D::Paint", "only direct OpenGL rendering supported.");