//##################################################################################
AliEVEHOMERManager::AliEVEHOMERManager( TString xmlFile ) :
- Reve::RenderElementList("AliEVEHOMERManager"),
+ TEveElementList("AliEVEHOMERManager"),
fLibManager(new AliHLTHOMERLibManager),
fXMLFile(xmlFile),
//##################################################################################
AliEVEHOMERManager::AliEVEHOMERManager( const AliEVEHOMERManager& m) :
- Reve::RenderElementList(m.GetName(), m.GetTitle())
+ TEveElementList(m.GetName(), m.GetTitle())
{
// see header file for class documentation
@brief Manager for HOMER in offline
*/
-#include <Reve/RenderElement.h>
+#include <TEveElement.h>
#include "TString.h"
#include "TDOMParser.h"
* @ingroup alihlt_homer
*/
-class AliEVEHOMERManager : public Reve::RenderElementList
+class AliEVEHOMERManager : public TEveElementList
{
public:
#include <TGNumberEntry.h>
#include <TGColorSelect.h>
#include <TGDoubleSlider.h>
-
-using namespace Reve;
-
//______________________________________________________________________
// AliEVEHOMERManagerEditor
//
#include "AliEVEHOMERSource.h"
-using namespace Reve;
-//using namespace Alieve;
-
//______________________________________________________________________
// AliEVEHOMERSource
//
ClassImp(AliEVEHOMERSource)
AliEVEHOMERSource::AliEVEHOMERSource(const Text_t* n, const Text_t* t) :
- Reve::RenderElement(),
+ TEveElement(),
TNamed(n, t),
fSource(0)
{}
AliEVEHOMERSource::AliEVEHOMERSource(AliHLTHOMERSourceDesc* src, const Text_t* n, const Text_t* t) :
- Reve::RenderElement(),
+ TEveElement(),
TNamed(n, t),
fSource(src)
{}
#ifndef ALIEVE_AliEVEHOMERSource_H
#define ALIEVE_AliEVEHOMERSource_H
-#include <Reve/Reve.h>
-#include <Reve/RenderElement.h>
+#include <TEveElement.h>
#include <TNamed.h>
class AliHLTHOMERSourceDesc;
-class AliEVEHOMERSource : public Reve::RenderElement,
+class AliEVEHOMERSource : public TEveElement,
public TNamed
{
private:
#include "AliEVEHOMERSourceList.h"
-using namespace Reve;
-//using namespace Alieve;
-
//______________________________________________________________________
// AliEVEHOMERSourceList
//
ClassImp(AliEVEHOMERSourceList)
AliEVEHOMERSourceList::AliEVEHOMERSourceList(const Text_t* n, const Text_t* t) :
- Reve::RenderElementList(n, t)
+ TEveElementList(n, t)
{
}
#ifndef ALIEVE_AliEVEHOMERSourceList_H
#define ALIEVE_AliEVEHOMERSourceList_H
-#include <Reve/Reve.h>
-#include <Reve/RenderElement.h>
+#include <TEveElement.h>
#include <TObject.h>
-class AliEVEHOMERSourceList : public Reve::RenderElementList
+class AliEVEHOMERSourceList : public TEveElementList
{
private:
AliEVEHOMERSourceList(const AliEVEHOMERSourceList&); // Not implemented
// $Header$
#include "EventAlieve.h"
-#include <Reve/Reve.h>
-#include <Reve/ReveManager.h>
+#include <TEveUtil.h>
+#include <TEveManager.h>
#include <AliRunLoader.h>
#include <AliRun.h>
#include <TROOT.h>
#include <TSystem.h>
-
-using namespace Reve;
using namespace Alieve;
//______________________________________________________________________
Event::Event() :
- EventBase(),
+ TEveEventManager(),
fPath (), fEventId (0),
fRunLoader (0),
{}
Event::Event(TString path, Int_t ev) :
- EventBase("AliEVE Event"),
+ TEveEventManager("AliEVE Event"),
fPath (path), fEventId(-1),
fRunLoader (0),
void Event::Open()
{
- static const Exc_t eH("Event::Open ");
+ static const TEveException eH("Event::Open ");
gSystem->ExpandPathName(fPath);
- if(fPath[0] != '/')
+ if (fPath[0] != '/')
fPath = Form("%s/%s", gSystem->WorkingDirectory(), fPath.Data());
Int_t runNo = -1;
TString ga_path(Form("%s/galice.root", fPath.Data()));
- if(gSystem->AccessPathName(ga_path, kReadPermission) == kFALSE)
+ if (gSystem->AccessPathName(ga_path, kReadPermission) == kFALSE)
{
fRunLoader = AliRunLoader::Open(ga_path);
if (fRunLoader)
}
if (fRunLoader == 0)
{
- if(fgAssertRunLoader)
+ if (fgAssertRunLoader)
throw(eH + "Bootstraping of run-loader failed. Its precence was requested.");
else
Warning(eH, "Bootstraping of run-loader failed.");
TString esd_path(Form("%s/AliESDs.root", fPath.Data()));
- if(gSystem->AccessPathName(esd_path, kReadPermission) == kFALSE)
+ if (gSystem->AccessPathName(esd_path, kReadPermission) == kFALSE)
{
fESDFile = new TFile(esd_path);
- if(fESDFile->IsZombie() == kFALSE)
+ if (fESDFile->IsZombie() == kFALSE)
{
fESD = new AliESDEvent();
fESDTree = (TTree*) fESDFile->Get("esdTree");
// Check if ESDfriends exists and attach the branch
TString p = Form("%s/AliESDfriends.root", fPath.Data());
- if(gSystem->AccessPathName(p, kReadPermission) == kFALSE)
+ if (gSystem->AccessPathName(p, kReadPermission) == kFALSE)
{
fESDfriendExists = kTRUE;
fESDTree->SetBranchStatus ("ESDfriend*", 1);
void Event::GotoEvent(Int_t event)
{
- static const Exc_t eH("Event::GotoEvent ");
+ static const TEveException eH("Event::GotoEvent ");
Int_t maxEvent = 0;
- if(fRunLoader)
+ if (fRunLoader)
maxEvent = fRunLoader->GetNumberOfEvents() - 1;
- else if(fESDTree)
+ else if (fESDTree)
maxEvent = fESDTree->GetEntries() - 1;
else
throw(eH + "neither RunLoader nor ESD loaded.");
- if(event < 0 || event > maxEvent)
+ if (event < 0 || event > maxEvent)
throw(eH + Form("event %d not present, available range [%d, %d].",
event, 0, maxEvent));
- ReveManager::RedrawDisabler rd(gReve);
- gReve->Redraw3D(kFALSE, kTRUE); // Enforce drop of all logicals.
+ TEveManager::TRedrawDisabler rd(gEve);
+ gEve->Redraw3D(kFALSE, kTRUE); // Enforce drop of all logicals.
// !!! MT this is somewhat brutal; at least optionally, one could be
// a bit gentler, checking for objs owning their external refs and having
SetName(Form("Event %d", fEventId));
UpdateItems();
- if(fRunLoader) {
- if(fRunLoader->GetEvent(fEventId) != 0)
+ if (fRunLoader) {
+ if (fRunLoader->GetEvent(fEventId) != 0)
throw(eH + "failed getting required event.");
}
- if(fESDTree) {
- if(fESDTree->GetEntry(fEventId) <= 0)
+ if (fESDTree) {
+ if (fESDTree->GetEntry(fEventId) <= 0)
throw(eH + "failed getting required event from ESD.");
if (fESDfriendExists)
AliRunLoader* Event::AssertRunLoader()
{
- static const Exc_t eH("Event::AssertRunLoader ");
+ static const TEveException eH("Event::AssertRunLoader ");
- if(gEvent == 0)
+ if (gEvent == 0)
throw(eH + "ALICE event not ready.");
- if(gEvent->fRunLoader == 0)
+ if (gEvent->fRunLoader == 0)
throw(eH + "AliRunLoader not initialised.");
return gEvent->fRunLoader;
}
AliESDEvent* Event::AssertESD()
{
- static const Exc_t eH("Event::AssertESD ");
+ static const TEveException eH("Event::AssertESD ");
- if(gEvent == 0)
+ if (gEvent == 0)
throw(eH + "ALICE event not ready.");
- if(gEvent->fESD == 0)
+ if (gEvent->fESD == 0)
throw(eH + "AliESD not initialised.");
return gEvent->fESD;
}
AliESDfriend* Event::AssertESDfriend()
{
- static const Exc_t eH("Event::AssertESDfriend ");
+ static const TEveException eH("Event::AssertESDfriend ");
- if(gEvent == 0)
+ if (gEvent == 0)
throw(eH + "ALICE event not ready.");
- if(gEvent->fESDfriend == 0)
+ if (gEvent->fESDfriend == 0)
throw(eH + "AliESDfriend not initialised.");
return gEvent->fESDfriend;
}
TGeoManager* Event::AssertGeometry()
{
- static const Exc_t eH("Event::AssertGeometry ");
+ static const TEveException eH("Event::AssertGeometry ");
if (AliGeomManager::GetGeometry() == 0)
{
#ifndef ALIEVE_Event_H
#define ALIEVE_Event_H
-#include <Reve/EventBase.h>
+#include <TEveEventManager.h>
class AliRunLoader;
class AliESDEvent;
namespace Alieve {
-class Event : public Reve::EventBase
+class Event : public TEveEventManager
{
private:
Event(const Event&); // Not implemented
#include <TMath.h>
#include <TVector3.h>
-#include <Reve/TTreeTools.h>
-#include <Reve/ZTrans.h>
+#include <TEveTreeTools.h>
+#include <TEveTrans.h>
#include "ITSDigitsInfo.h"
#include <AliITSCalibrationSDD.h>
#include <AliITSRawStreamSPD.h>
#include <AliITSRawStreamSDD.h>
#include <AliITSRawStreamSSD.h>
-
-using namespace Reve;
using namespace Alieve;
using namespace std;
ITSDigitsInfo::ITSDigitsInfo() :
TObject(),
- ReferenceCount(),
+ TEveRefCnt(),
fSPDmap(), fSDDmap(), fSSDmap(),
fTree (0),
fGeom (0),
void ITSDigitsInfo::InitInternals()
{
- static const Exc_t eH("ITSDigitsInfo::InitInternals ");
+ static const TEveException eH("ITSDigitsInfo::InitInternals ");
fGeom = new AliITSgeom();
fGeom->ReadNewFile("$REVESYS/alice-data/ITSgeometry.det");
TVector3 v;
Double_t x[9];
Int_t lay, lad, det;
- ZTrans mx;
+ TEveTrans mx;
for(Int_t id = idx0; id<idx1; id++){
fGeom->GetModuleId(id, lay, lad, det);
if(sel->fLayer==lay || sel->fLayer==-1)
#ifndef ALIEVE_ITSDigitsInfo_H
#define ALIEVE_ITSDigitsInfo_H
-#include <Reve/Reve.h>
+#include <TEveUtil.h>
#include <map>
#include <vector>
/**************************************************************************/
// ITSDigitsInfo
/**************************************************************************/
-class ITSDigitsInfo : public TObject, public Reve::ReferenceCount
+class ITSDigitsInfo : public TObject, public TEveRefCnt
{
ITSDigitsInfo(const ITSDigitsInfo&); // Not implemented
ITSDigitsInfo& operator=(const ITSDigitsInfo&); // Not implemented
#include <AliITSdigitSSD.h>
#include <TStyle.h>
-
-using namespace Reve;
using namespace Alieve;
Bool_t ITSModule::fgStaticInitDone = kFALSE;
-FrameBox* ITSModule::fgSPDFrameBox = 0;
-FrameBox* ITSModule::fgSDDFrameBox = 0;
-FrameBox* ITSModule::fgSSDFrameBox = 0;
+TEveFrameBox* ITSModule::fgSPDFrameBox = 0;
+TEveFrameBox* ITSModule::fgSDDFrameBox = 0;
+TEveFrameBox* ITSModule::fgSSDFrameBox = 0;
-RGBAPalette* ITSModule::fgSPDPalette = 0;
-RGBAPalette* ITSModule::fgSDDPalette = 0;
-RGBAPalette* ITSModule::fgSSDPalette = 0;
+TEveRGBAPalette* ITSModule::fgSPDPalette = 0;
+TEveRGBAPalette* ITSModule::fgSDDPalette = 0;
+TEveRGBAPalette* ITSModule::fgSSDPalette = 0;
//__________________________________________________________________________
// ITSModule
/**************************************************************************/
ITSModule::ITSModule(const Text_t* n, const Text_t* t) :
- QuadSet(n, t),
+ TEveQuadSet(n, t),
fInfo(0),
fID(-1), fDetID(-1),
fLayer(-1), fLadder(-1), fDet(-1),
{}
ITSModule::ITSModule(Int_t gid, ITSDigitsInfo* info) :
- QuadSet(Form("ITS module %d", gid)),
+ TEveQuadSet(Form("ITS module %d", gid)),
fInfo (0),
fID(-1), fDetID(-1),
fLayer(-1), fLadder(-1), fDet(-1),
Float_t dx = info->fSegSPD->Dx()*0.00005;
Float_t dz = 3.50;
- fgSPDFrameBox = new FrameBox();
+ fgSPDFrameBox = new TEveFrameBox();
fgSPDFrameBox->SetAAQuadXZ(-dx, 0, -dz, 2*dx, 2*dz);
fgSPDFrameBox->SetFrameColor((Color_t) 31);
fgSPDFrameBox->SetFrameFill(kTRUE);
fgSPDFrameBox->IncRefCount();
- fgSPDPalette = new RGBAPalette(info->fSPDMinVal,info->fSPDMaxVal);
+ fgSPDPalette = new TEveRGBAPalette(info->fSPDMinVal,info->fSPDMaxVal);
fgSPDPalette->IncRefCount();
}
Float_t dx = info->fSegSDD->Dx()*0.0001;
Float_t dz = info->fSegSDD->Dz()*0.00005;
- fgSDDFrameBox = new FrameBox();
+ fgSDDFrameBox = new TEveFrameBox();
fgSDDFrameBox->SetAAQuadXZ(-dx, 0, -dz, 2*dx, 2*dz);
fgSDDFrameBox->SetFrameColor((Color_t) 32);
fgSDDFrameBox->SetFrameFill(kTRUE);
fgSDDFrameBox->IncRefCount();
- fgSDDPalette = new RGBAPalette(info->fSDDMinVal,info->fSDDMaxVal);
+ fgSDDPalette = new TEveRGBAPalette(info->fSDDMinVal,info->fSDDMaxVal);
fgSDDPalette->SetLimits(0, info->fSDDHighLim); // Set proper ADC range.
fgSDDPalette->IncRefCount();
}
Float_t dx = info->fSegSSD->Dx()*0.00005;
Float_t dz = info->fSegSSD->Dz()*0.00005;
- fgSSDFrameBox = new FrameBox();
+ fgSSDFrameBox = new TEveFrameBox();
fgSSDFrameBox->SetAAQuadXZ(-dx, 0, -dz, 2*dx, 2*dz);
fgSSDFrameBox->SetFrameColor((Color_t) 33);
fgSSDFrameBox->SetFrameFill(kTRUE);
fgSSDFrameBox->IncRefCount();
- fgSSDPalette = new RGBAPalette(info->fSSDMinVal,info->fSSDMaxVal);
+ fgSSDPalette = new TEveRGBAPalette(info->fSSDMinVal,info->fSSDMaxVal);
fgSSDPalette->SetLimits(0, info->fSSDHighLim); // Set proper ADC range.
fgSSDPalette->IncRefCount();
}
void ITSModule::SetID(Int_t gid, Bool_t trans)
{
- static const Exc_t eH("ITSModule::SetID ");
+ static const TEveException eH("ITSModule::SetID ");
if(fInfo == 0)
throw(eH + "ITSDigitsInfo not set.");
{
// Here we still use 'z' for the name of axial coordinates.
// The transforamtion matrix aplied rotates y -> z.
- // We need this as QuadSet offers optimized treatment for
+ // We need this as TEveQuadSet offers optimized treatment for
// quads in the x-y plane.
// printf("its module load quads \n");
case 0: { // SPD
AliITSsegmentationSPD* seg = fInfo->fSegSPD;
- Reset(QT_RectangleXZFixedY, kFALSE, 32);
+ Reset(kQT_RectangleXZFixedY, kFALSE, 32);
for (Int_t k=0; k<ndigits; ++k)
{
case 1: { // SDD
AliITSsegmentationSDD *seg = fInfo->fSegSDD;
- Reset(QT_RectangleXZFixedY, kFALSE, 32);
+ Reset(kQT_RectangleXZFixedY, kFALSE, 32);
for (Int_t k=0; k<ndigits; ++k)
{
case 2: { // SSD
AliITSsegmentationSSD* seg = fInfo->fSegSSD;
- Reset(QT_LineXZFixedY, kFALSE, 32);
+ Reset(kQT_LineXZFixedY, kFALSE, 32);
Float_t ap, an; // positive/negative angles -> offsets
seg->Angles(ap, an);
void ITSModule::DigitSelected(Int_t idx)
{
- // Override control-click from QuadSet
+ // Override control-click from TEveQuadSet
- DigitBase* qb = GetDigit(idx);
+ DigitBase_t* qb = GetDigit(idx);
TObject* obj = qb->fId.GetObject();
AliITSdigit* d = dynamic_cast<AliITSdigit*>(obj);
printf("ITSModule::QuadSelected "); Print();
#ifndef ALIEVE_ITSModule_H
#define ALIEVE_ITSModule_H
-#include <Reve/QuadSet.h>
+#include <TEveQuadSet.h>
#include <Alieve/ITSDigitsInfo.h>
namespace Alieve {
-class ITSModule : public Reve::QuadSet
+class ITSModule : public TEveQuadSet
{
ITSModule(const ITSModule&); // Not implemented
ITSModule& operator=(const ITSModule&); // Not implemented
virtual void Print(Option_t* opt="") const;
- static Reve::FrameBox* fgSPDFrameBox;
- static Reve::FrameBox* fgSDDFrameBox;
- static Reve::FrameBox* fgSSDFrameBox;
+ static TEveFrameBox* fgSPDFrameBox;
+ static TEveFrameBox* fgSDDFrameBox;
+ static TEveFrameBox* fgSSDFrameBox;
- static Reve::RGBAPalette* fgSPDPalette;
- static Reve::RGBAPalette* fgSDDPalette;
- static Reve::RGBAPalette* fgSSDPalette;
+ static TEveRGBAPalette* fgSPDPalette;
+ static TEveRGBAPalette* fgSDDPalette;
+ static TEveRGBAPalette* fgSSDPalette;
ClassDef(ITSModule, 1);
};
#include "ITSDigitsInfo.h"
#include "ITSScaledModule.h"
-#include "Reve/ReveManager.h"
-#include "Reve/RGEditor.h"
-#include "Reve/GridStepper.h"
-#include "Reve/GLTextNS.h"
-#include "Reve/ZTrans.h"
+#include <TEveManager.h>
+#include <TEveGedEditor.h>
+#include <TEveGridStepper.h>
+#include <TEveGLText.h>
+#include <TEveTrans.h>
#include <TObject.h>
// #include <FTFont.h>
#include <TGLAxis.h>
#include <TGLViewer.h>
-
-using namespace Reve;
using namespace Alieve;
//______________________________________________________________________
ClassImp(ITSModuleStepper)
ITSModuleStepper::ITSModuleStepper(ITSDigitsInfo* di) :
- RenderElementList("ITS 2DStore", "ITSModuleStepper", kTRUE),
+ TEveElementList("ITS 2DStore", "ITSModuleStepper", kTRUE),
fPosition(0),
fWActiveCol(45),
fFontCol(8)
{
- // override member from base RenderElementList
+ // override member from base TEveElementList
fChildClass = ITSScaledModule::Class();
SetMainColorPtr(&fWCol);
fDigitsInfo->IncRefCount();
- fStepper = new GridStepper();
+ fStepper = new TEveGridStepper();
fStepper->SetNs(5, 4);
fScaleInfo = new DigitScaleInfo();
fText->SetGLTextAngles(0, 0, 0);
fText->SetTextSize(fTextSize);
- gReve->GetGLViewer()->AddOverlayElement(this);
+ gEve->GetGLViewer()->AddOverlayElement(this);
}
ITSModuleStepper::~ITSModuleStepper()
{
- gReve->GetGLViewer()->RemoveOverlayElement(this);
+ gEve->GetGLViewer()->RemoveOverlayElement(this);
fScaleInfo->DecRefCount();
fDigitsInfo->DecRefCount();
void ITSModuleStepper::Capacity()
{
- Int_t N = fStepper->Nx*fStepper->Ny;
- if(N != GetNChildren())
+ Int_t N = fStepper->GetNx()*fStepper->GetNy();
+ if (N != GetNChildren())
{
DestroyElements();
- for(Int_t m=0; m<N; m++)
+ for (Int_t m=0; m<N; m++)
{
AddElement(new ITSScaledModule(m, fDigitsInfo, fScaleInfo));
}
void ITSModuleStepper::Apply()
{
// printf("ITSModuleStepper::Apply fPosition %d \n", fPosition);
- gReve->DisableRedraw();
+ gEve->DisableRedraw();
Capacity();
UInt_t idx = fPosition;
{
ITSScaledModule* mod = dynamic_cast<ITSScaledModule*>(*childit);
mod->SetID(fIDs[idx], kFALSE);
- ZTrans& tr = mod->RefHMTrans();
+ TEveTrans& tr = mod->RefHMTrans();
tr.UnitTrans();
tr.RotateLF(3,2,TMath::PiOver2());
tr.RotateLF(1,3,TMath::PiOver2());
mz = -2*fp[2];
// fit width first
- Double_t sx = fStepper->Dx;
- Double_t sy = (mx*fStepper->Dx)/mz;
- if(sy > fStepper->Dy)
+ Double_t sx = fStepper->GetDx();
+ Double_t sy = (mx*fStepper->GetDx())/mz;
+ if(sy > fStepper->GetDy())
{
// printf("fit width \n");
- sy = fStepper->Dy;
- sx = (mz*fStepper->Dx)/mx;
+ sy = fStepper->GetDy();
+ sx = (mz*fStepper->GetDx())/mx;
}
Float_t scale = (fExpandCell*sx)/mz;
tr.Scale(scale, scale, scale);
Float_t p[3];
fStepper->GetPosition(p);
- tr.SetPos(p[0]+0.5*fStepper->Dx, p[1]+0.5*fStepper->Dy, p[2]+0.5*fStepper->Dz);
+ tr.SetPos(p[0]+0.5*fStepper->GetDx(), p[1]+0.5*fStepper->GetDy(), p[2]+0.5*fStepper->GetDz());
if(mod->GetSubDetID() == 2)
mod->SetName(Form("SSD %d", idx));
fStepper->Reset();
ElementChanged();
- gReve->EnableRedraw();
+ gEve->EnableRedraw();
}
/**************************************************************************/
glPushAttrib(GL_ENABLE_BIT | GL_POLYGON_BIT);
glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
UChar_t color[4];
- if(fWActive == id)
- ColorFromIdx(fWActiveCol, color);
+ if (fWActive == id)
+ TEveUtil::ColorFromIdx(fWActiveCol, color);
else
- ColorFromIdx(fWCol, color);
+ TEveUtil:: ColorFromIdx(fWCol, color);
glColor4ubv(color);
glBegin(GL_QUADS);
glLoadName(id);
UChar_t color[4];
- if(fWActive == id)
- ColorFromIdx(fWActiveCol, color);
+ if (fWActive == id)
+ TEveUtil::ColorFromIdx(fWActiveCol, color);
else
- ColorFromIdx(fWCol, color);
+ TEveUtil::ColorFromIdx(fWCol, color);
glColor4ubv(color);
Float_t xs = dx/4, ys = dy/4;
glLoadIdentity();
glTranslatef(1 -x- dx, -1+y*4, 0);
ITSModule* qs = dynamic_cast<ITSModule*>(*BeginChildren());
- RGBAPalette* p = qs->GetPalette();
+ TEveRGBAPalette* p = qs->GetPalette();
glBegin(GL_QUAD_STRIP);
glColor4ubv(p->ColorFromValue(p->GetMinVal()));
glVertex2f(0, 0);
//______________________________________________________________________
void ITSModuleStepper::RenderCellIDs()
{
- fText->SetTextSize(fStepper->Dy*0.1);
+ fText->SetTextSize(fStepper->GetDy()*0.1);
fText->SetTextColor(fFontCol);
Double_t x, y, z;
Double_t sx, sy, sz;
if(idx < fIDs.size())
{
ITSScaledModule* mod = dynamic_cast<ITSScaledModule*>(*childit);
- ZTrans& tr = mod->RefHMTrans();
+ TEveTrans& tr = mod->RefHMTrans();
TString name = Form("%d",mod->GetID());
tr.GetPos(x,y,z);
- x += fStepper->Dx*0.5;
- y -= fStepper->Dy*0.5;
+ x += fStepper->GetDx()*0.5;
+ y -= fStepper->GetDy()*0.5;
z += 0.4; // !!! MT hack - cross check with overlay rendering.
Float_t llx, lly, llz, urx, ury, urz;
fText->BBox(name, llx, lly, llz, urx, ury, urz);
break;
}
case 7:
- gReve->GetEditor()->DisplayRenderElement(*BeginChildren());
+ gEve->GetEditor()->DisplayElement(*BeginChildren());
break;
case 8:
#include <TNamed.h>
#include <TGLOverlay.h>
-#include <Reve/RenderElement.h>
-#include <Reve/GridStepper.h>
+#include <TEveElement.h>
+#include <TEveGridStepper.h>
#include <vector>
class ITSDigitsInfo;
class DigitScaleInfo;
-class ITSModuleStepper : public Reve::RenderElementList,
+class ITSModuleStepper : public TEveElementList,
public TGLOverlayElement
{
friend class ITSModuleStepperGL;
DigitScaleInfo* fScaleInfo;
Int_t fSubDet;
- Reve::GridStepper* fStepper;
+ TEveGridStepper* fStepper;
TGLAxis* fAxis;
TGLText* fText;
Float_t fTextSize;
void RenderCellIDs();
// module ID navigation
- Int_t Nxy(){ return fStepper->Nx*fStepper->Ny; }
- void AddToList( Int_t modID ){ fIDs.push_back(modID);}
- void ResetList(){ fIDs.clear();}
+ Int_t Nxy() const { return fStepper->GetNx()*fStepper->GetNy(); }
+ void AddToList(Int_t modID) { fIDs.push_back(modID);}
+ void ResetList() { fIDs.clear();}
void SetFirst(Int_t first);
public:
virtual void Render(TGLRnrCtx& rnrCtx);
// stepper
- Reve::GridStepper* GetStepper(){return fStepper;}
- void SetStepper(Reve::GridStepper* s){ fStepper = s; Apply();}
+ TEveGridStepper* GetStepper() { return fStepper; }
+ void SetStepper(TEveGridStepper* s) { fStepper = s; Apply(); }
Int_t GetCurrentPage();
Int_t GetPages();
void Apply();
void Capacity();
-
// getters/setters
- Color_t GetWColor(){ return fWCol; };
- void SetWColor(Color_t c){ fWCol = c; }
- TGLText* GetFont(){ return fText; }
- void SetGLText(TGLText* t) {fText = t;}
+ Color_t GetWColor() { return fWCol; }
+ void SetWColor(Color_t c) { fWCol = c; }
+ TGLText* GetFont() { return fText; }
+ void SetGLText(TGLText* t) { fText = t; }
ClassDef(ITSModuleStepper, 0);
};
#include "ITSModuleStepperEditor.h"
#include <Alieve/ITSModuleStepper.h>
-#include <Reve/GridStepperEditor.h>
-#include <Reve/ReveManager.h>
+#include <TEveGridStepperEditor.h>
+#include <TEveManager.h>
#include <TVirtualPad.h>
#include <TColor.h>
#include <TGNumberEntry.h>
#include <TGColorSelect.h>
#include <TGDoubleSlider.h>
-
-using namespace Reve;
using namespace Alieve;
//______________________________________________________________________
{
MakeTitle("ITSModuleStepper");
- fStepper = new GridStepperSubEditor(this);
+ fStepper = new TEveGridStepperSubEditor(this);
fStepper->Connect("Changed()", "Alieve::ITSModuleStepperEditor", this, "UpdateStore()");
AddFrame(fStepper, new TGLayoutHints(kLHintsTop | kLHintsExpandX, 2, 0, 0, 0));
}
{
fM->Apply();
Update();
- gReve->Redraw3D(kTRUE);
+ gEve->Redraw3D(kTRUE);
}
class TGNumberEntry;
class TGColorSelect;
-namespace Reve
-{
-class GridStepperSubEditor;
-}
+class TEveGridStepperSubEditor;
namespace Alieve {
protected:
ITSModuleStepper* fM; // fModel dynamic-casted to ITSModuleStepperEditor
- Reve::GridStepperSubEditor* fStepper;
+ TEveGridStepperSubEditor* fStepper;
public:
ITSModuleStepperEditor(const TGWindow* p=0, Int_t width=170, Int_t height=30, UInt_t options = kChildFrame, Pixel_t back=GetDefaultFrameBackground());
#include <AliITSdigitSPD.h>
#include <AliITSdigitSDD.h>
#include <AliITSdigitSSD.h>
-
-using namespace Reve;
using namespace Alieve;
//______________________________________________________________________
fScale = s;
ITSScaledModule* sm;
- std::list<RenderElement*>::iterator i = fBackRefs.begin();
+ std::list<TEveElement*>::iterator i = fBackRefs.begin();
while (i != fBackRefs.end())
{
sm = dynamic_cast<ITSScaledModule*>(*i);
fSyncPalette = kTRUE;
ITSScaledModule* sm;
- std::list<RenderElement*>::iterator i = fBackRefs.begin();
+ std::list<TEveElement*>::iterator i = fBackRefs.begin();
while (i != fBackRefs.end())
{
sm = dynamic_cast<ITSScaledModule*>(*i);
{
// Here we still use 'z' for the name of axial coordinates.
// The transforamtion matrix aplied rotates y -> z.
- // We need this as QuadSet offers optimized treatment for
+ // We need this as TEveQuadSet offers optimized treatment for
// quads in the x-y plane.
TClonesArray *digits;
case 0:
{
// SPD
- Reset(QT_RectangleXZFixedY, kFALSE, 32);
+ Reset(kQT_RectangleXZFixedY, kFALSE, 32);
fNCz = fInfo->fSPDScaleZ[scale];
fNCx = fInfo->fSPDScaleX[scale];
case 1:
{
// SDD
- Reset(QT_RectangleXZFixedY, kFALSE, 32);
+ Reset(kQT_RectangleXZFixedY, kFALSE, 32);
fNCz = fInfo->fSDDScaleZ[scale];
fNCx = fInfo->fSDDScaleX[scale];
case 2:
{
// SSD
- Reset(QT_LineXZFixedY, kFALSE, 32);
+ Reset(kQT_LineXZFixedY, kFALSE, 32);
AliITSsegmentationSSD* seg = fInfo->fSegSSD;
Float_t ap, an; // positive/negative angles -> offsets
v = Nint(Sqrt(sd->sqr_sum) / sd->N);
break;
}
- DigitBase* qb = GetDigit(i);
+ DigitBase_t* qb = GetDigit(i);
qb->fValue = v;
}
}
void ITSScaledModule::DigitSelected(Int_t idx)
{
- // Override control-click from QuadSet
+ // Override control-click from TEveQuadSet
printf("ITSScaledModule::DigitSelected "); Print();
- DigitBase* qb = GetDigit(idx);
+ DigitBase_t* qb = GetDigit(idx);
TObject* obj = qb->fId.GetObject();
ScaledDigit* sd = dynamic_cast<ScaledDigit*>(obj);
TClonesArray *digits = fInfo->GetDigits(fID, fDetID);
#ifndef ALIEVE_ITSScaledModule_H
#define ALIEVE_ITSScaledModule_H
-#include <Reve/Reve.h>
+#include <TEveUtil.h>
#include <Alieve/ITSModule.h>
#include <TQObject.h>
// DigitScaleInfo
/**************************************************************************/
-class DigitScaleInfo : public TQObject, public Reve::ReferenceBackPtr
+class DigitScaleInfo : public TQObject, public TEveRefBackPtr
{
public:
enum StatType_e { ST_Occup, ST_Average, ST_Rms };
#include "ITSScaledModuleEditor.h"
#include <Alieve/ITSScaledModule.h>
-#include <Reve/ZTransEditor.h>
-#include <Reve/RGValuators.h>
+#include <TEveTransEditor.h>
+#include <TEveGValuators.h>
#include <TVirtualPad.h>
#include <TColor.h>
#include <TGNumberEntry.h>
#include <TGColorSelect.h>
#include <TGComboBox.h>
-
-using namespace Reve;
using namespace Alieve;
//______________________________________________________________________
#define ALIEVE_ITSScaledModuleEditor_H
#include <TGedFrame.h>
-#include <Reve/RGBAPaletteEditor.h>
+#include <TEveRGBAPaletteEditor.h>
class TGNumberEntry;
class TGColorSelect;
class TGComboBox;
-namespace Reve
-{
-class RGValuator;
-class RGDoubleValuator;
-class RGBAPalette;
-}
+class TEveGValuator;
+class TEveGDoubleValuator;
+class TEveRGBAPalette;
namespace Alieve {
ClassImp(JetPlane)
JetPlane::JetPlane(Int_t iev) :
- RenderElementList(Form("JetPlane %i",iev), Form("%i",iev)),
+ TEveElementList(Form("JetPlane %i",iev), Form("%i",iev)),
fMinEta (-1.5 ),
fMaxEta ( 1.5 ),
#ifndef ALIEVE_JetPlane_H
#define ALIEVE_JetPlane_H
-#include <Reve/Reve.h>
-#include <Reve/RenderElement.h>
-#include <Reve/ZTrans.h>
+#include <TEveUtil.h>
+#include <TEveElement.h>
+#include <TEveTrans.h>
#include <TAtt3D.h>
#include <TAttBBox.h>
namespace Alieve {
-class JetPlane : public Reve::RenderElementList,
+class JetPlane : public TEveElementList,
public TAtt3D,
public TAttBBox
{
Color_t fGridColor;
- Reve::ZTrans fHMTrans;
+ TEveTrans fHMTrans;
std::vector<AliAODJet> fJets;
std::vector<AliAODTrack> fTracks;
virtual Bool_t CanEditMainColor() { return kTRUE; }
virtual Bool_t CanEditMainHMTrans() { return kTRUE; }
- virtual Reve::ZTrans* PtrMainHMTrans() { return &fHMTrans; }
+ virtual TEveTrans* PtrMainHMTrans() { return &fHMTrans; }
virtual void ComputeBBox();
virtual void Paint(Option_t* option = "");
- Reve::ZTrans& RefHMTrans() { return fHMTrans; }
+ TEveTrans& RefHMTrans() { return fHMTrans; }
void SetTransMatrix(Double_t* carr) { fHMTrans.SetFrom(carr); }
void SetTransMatrix(const TGeoMatrix& mat) { fHMTrans.SetFrom(mat); }
#include "JetPlaneEditor.h"
#include <Alieve/JetPlane.h>
-#include <Reve/RGValuators.h>
+#include <TEveGValuators.h>
#include <TVirtualPad.h>
#include <TColor.h>
#include <TGDoubleSlider.h>
#include <TGFrame.h>
#include <TGTab.h>
-
-using namespace Reve;
using namespace Alieve;
//______________________________________________________________________
AddFrame(fRnrTracks, new TGLayoutHints(kLHintsTop, 1, 1, 1, 1));
fRnrTracks->Connect("Clicked()", "Alieve::JetPlaneEditor", this, "DoRnrTracks()");
- fEnergyScale = new RGValuator(this, "Length scale:", 110, 0);
+ fEnergyScale = new TEveGValuator(this, "Length scale:", 110, 0);
fEnergyScale->SetLabelWidth(labelW);
fEnergyScale->SetNELength(6);
fEnergyScale->Build();
fEnergyScale->Connect("ValueSet(Double_t)", "Alieve::JetPlaneEditor", this, "DoEnergyScale()");
AddFrame(fEnergyScale, new TGLayoutHints(kLHintsTop, 1, 1, 1, 1));
- fEnergyColorScale = new RGValuator(this, "Color scale:", 110, 0);
+ fEnergyColorScale = new TEveGValuator(this, "Color scale:", 110, 0);
fEnergyColorScale->SetLabelWidth(labelW);
fEnergyColorScale->SetNELength(6);
fEnergyColorScale->Build();
fEnergyColorScale->Connect("ValueSet(Double_t)", "Alieve::JetPlaneEditor", this, "DoEnergyColorScale()");
AddFrame(fEnergyColorScale, new TGLayoutHints(kLHintsTop, 1, 1, 1, 1));
- fOneSelection = new TGRadioButton(this, "&One Track/Jet");
- fTwoSelection = new TGRadioButton(this, "&Two Track/Jet");
+ fOneSelection = new TGRadioButton(this, "&One TEveTrack/Jet");
+ fTwoSelection = new TGRadioButton(this, "&Two TEveTrack/Jet");
AddFrame(fOneSelection, new TGLayoutHints(kLHintsTop, 1, 1, 1, 1));
AddFrame(fTwoSelection, new TGLayoutHints(kLHintsTop, 1, 1, 1, 1));
fOneSelection->Connect("Clicked()", "Alieve::JetPlaneEditor", this, "DoOneSelection()");
fTwoSelection->Connect("Clicked()", "Alieve::JetPlaneEditor", this, "DoTwoSelection()");
- // fInformationSetup = new TGTextButton(this, "Track/Jet Print");
+ // fInformationSetup = new TGTextButton(this, "TEveTrack/Jet Print");
// AddFrame(fInformationSetup, new TGLayoutHints(kLHintsTop | kLHintsLeft, 2, 0, 2, 2));
// fInformationSetup->Connect("Clicked()", "Alieve::JetPlaneEditor", this, "DoStaticDataWindow()");
}
fL3 = new TGLayoutHints(kLHintsTop | kLHintsLeft, 5, 5, 5, 5);
- TGCompositeFrame *tf = fTab->AddTab("One Track/Jet");
+ TGCompositeFrame *tf = fTab->AddTab("One TEveTrack/Jet");
// fF1 = new TGCompositeFrame(tf, 60, 20, kVerticalFrame);
// fF1->AddFrame(new TGTextButton(fF1, "&Test button", 0), fL3);
MapSubwindows();
Resize();
- SetWindowName("Track/Jet Common Setup");
+ SetWindowName("TEveTrack/Jet Common Setup");
}
JetPlaneEditor::StaticDataWindow::~StaticDataWindow()
class TGNumberEntry;
class TGColorSelect;
-namespace Reve
-{
- class RGValuator;
-}
+class TEveGValuator;
namespace Alieve {
-// class RGValuator;
+// class TEveGValuator;
class JetPlane;
// TGSomeWidget* fXYZZ;
TGCheckButton* fRnrJets;
TGCheckButton* fRnrTracks;
- Reve::RGValuator* fEnergyScale;
- Reve::RGValuator* fEnergyColorScale;
+ TEveGValuator* fEnergyScale;
+ TEveGValuator* fEnergyColorScale;
TGButton *fOneSelection, *fTwoSelection;
TGButton *fInformationSetup;
#include "JetPlaneGL.h"
#include <Alieve/JetPlane.h>
-#include <Reve/GLUtilNS.h>
#include <TGLRnrCtx.h>
#include <TGLSelectRecord.h>
#include <TColor.h>
#include <TStyle.h>
#include <TROOT.h>
-
-using namespace Reve;
using namespace Alieve;
//______________________________________________________________________
// Show axis tick marks and labels
{
- GLUtilNS::GL_Capability_Switch lights_off(GL_LIGHTING, false);
+ TGLCapabilitySwitch lights_off(GL_LIGHTING, false);
TGLAxis ap;
ap.SetLineColor(fM->fGridColor);
if (rec.GetN() == 3)
{
AliAODTrack v = fM->fTracks[rec.GetItem(2)];
- printf("Track 4-momentum: %f, %f, %f, %f \n", v.Px(),v.Py(),v.Pz(),v.Pt() );
+ printf("TEveTrack 4-momentum: %f, %f, %f, %f \n", v.Px(),v.Py(),v.Pz(),v.Pt() );
printf("Eta-Phi values: %f, %f\n", v.Eta(), v.Phi());
}
}
track2State = 1;
}
- printf("Jet: %i, Track: %i \n", jet1State, track1State);
- printf("Jet: %i, Track: %i \n\n", jet2State, track2State);
+ printf("Jet: %i, TEveTrack: %i \n", jet1State, track1State);
+ printf("Jet: %i, TEveTrack: %i \n\n", jet2State, track2State);
if(jet1State && jet2State)
{
#include <AliStack.h>
#include <AliTrackReference.h>
-#include "Reve/Track.h"
-#include "Reve/RenderElement.h"
+#include <TEveTrack.h>
+#include <TEveElement.h>
#include <algorithm>
#include <map>
//______________________________________________________________________
// KineTools
//
-
-using namespace Reve;
using namespace Alieve;
using namespace std;
/**************************************************************************/
-void KineTools::SetDaughterPathMarks(RenderElement* cont, AliStack* stack, Bool_t recurse)
+void KineTools::SetDaughterPathMarks(TEveElement* cont, AliStack* stack, Bool_t recurse)
{
// Import daughters birth points.
- RenderElement::List_i iter = cont->BeginChildren();
+ TEveElement::List_i iter = cont->BeginChildren();
while(iter != cont->EndChildren())
{
- Track* track = dynamic_cast<Track*>(*iter);
+ TEveTrack* track = dynamic_cast<TEveTrack*>(*iter);
TParticle* p = stack->Particle(track->GetLabel());
if(p->GetNDaughters()) {
Int_t d0 = p->GetDaughter(0), d1 = p->GetDaughter(1);
for(int d=d0; d>0 && d<=d1; ++d)
{
TParticle* dp = stack->Particle(d);
- Reve::PathMark* pm = new PathMark(PathMark::Daughter);
- pm->V.Set(dp->Vx(), dp->Vy(), dp->Vz());
- pm->P.Set(dp->Px(), dp->Py(), dp->Pz());
- pm->time = dp->T();
+ TEvePathMark* pm = new TEvePathMark(TEvePathMark::kDaughter);
+ pm->fV.Set(dp->Vx(), dp->Vy(), dp->Vz());
+ pm->fP.Set(dp->Px(), dp->Py(), dp->Pz());
+ pm->fTime = dp->T();
track->AddPathMark(pm);
}
if (recurse)
namespace {
struct cmp_pathmark
{
- bool operator()(PathMark* const & a, PathMark* const & b)
- { return a->time < b->time; }
+ bool operator()(TEvePathMark* const & a, TEvePathMark* const & b)
+ { return a->fTime < b->fTime; }
};
-void slurp_tracks(map<Int_t, Track*>& tracks, RenderElement* cont, Bool_t recurse)
+void slurp_tracks(map<Int_t, TEveTrack*>& tracks, TEveElement* cont, Bool_t recurse)
{
- RenderElement::List_i citer = cont->BeginChildren();
+ TEveElement::List_i citer = cont->BeginChildren();
while(citer != cont->EndChildren())
{
- Track* track = dynamic_cast<Track*>(*citer);
+ TEveTrack* track = dynamic_cast<TEveTrack*>(*citer);
tracks[track->GetLabel()] = track;
if (recurse)
slurp_tracks(tracks, track, recurse);
}
-void KineTools::SetTrackReferences(RenderElement* cont, TTree* treeTR, Bool_t recurse)
+void KineTools::SetTrackReferences(TEveElement* cont, TTree* treeTR, Bool_t recurse)
{
// set decay and reference points
- static const Exc_t eH("KineTools::ImportPathMarks");
+ static const TEveException eH("KineTools::ImportPathMarks");
// Fill map
- map<Int_t, Track*> tracks;
+ map<Int_t, TEveTrack*> tracks;
slurp_tracks(tracks, cont, recurse);
Int_t nPrimaries = (Int_t) treeTR->GetEntries();
el->GetEntry(iPrimPart);
Int_t last_label = -1;
- map<Int_t, Track*>::iterator iter = tracks.end();
+ map<Int_t, TEveTrack*>::iterator iter = tracks.end();
Int_t Nent = arr->GetEntriesFast();
for (Int_t iTrackRef = 0; iTrackRef < Nent; iTrackRef++)
{
}
if (iter != tracks.end()) {
- PathMark* pm = new PathMark(isRef ? PathMark::Reference : PathMark::Decay);
- pm->V.Set(atr->X(),atr->Y(), atr->Z());
- pm->P.Set(atr->Px(),atr->Py(), atr->Pz());
- pm->time = atr->GetTime();
- Track* track = iter->second;
+ TEvePathMark* pm = new TEvePathMark(isRef ? TEvePathMark::kReference : TEvePathMark::kDecay);
+ pm->fV.Set(atr->X(),atr->Y(), atr->Z());
+ pm->fP.Set(atr->Px(),atr->Py(), atr->Pz());
+ pm->fTime = atr->GetTime();
+ TEveTrack* track = iter->second;
track->AddPathMark(pm);
}
} // loop track refs
} // end loop through top branches
}
-void KineTools::SortPathMarks(RenderElement* cont, Bool_t recurse)
+void KineTools::SortPathMarks(TEveElement* cont, Bool_t recurse)
{
// Sort path-marks for all tracks by time.
// Fill map
- map<Int_t, Track*> tracks;
+ map<Int_t, TEveTrack*> tracks;
slurp_tracks(tracks, cont, recurse);
// sort
- for(map<Int_t, Track*>::iterator j=tracks.begin(); j!=tracks.end(); ++j)
+ for(map<Int_t, TEveTrack*>::iterator j=tracks.begin(); j!=tracks.end(); ++j)
{
j->second->SortPathMarksByTime();
}
#ifndef ALIEVE_KineTools_H
#define ALIEVE_KineTools_H
-#include <Reve/Reve.h>
+#include <TEveUtil.h>
#include <TObject.h>
class TTree;
class AliStack;
-namespace Reve {
- class TrackList;
-}
+class TEveTrackList;
namespace Alieve {
+
class KineTools
{
private:
virtual ~KineTools(){}
// data from TreeTR
- void SetDaughterPathMarks(Reve::RenderElement* cont, AliStack* stack, Bool_t recurse=kFALSE);
- void SetTrackReferences (Reve::RenderElement* cont, TTree* treeTR=0, Bool_t recurse=kFALSE);
- void SortPathMarks (Reve::RenderElement* cont, Bool_t recurse=kFALSE);
+ void SetDaughterPathMarks(TEveElement* cont, AliStack* stack, Bool_t recurse=kFALSE);
+ void SetTrackReferences (TEveElement* cont, TTree* treeTR=0, Bool_t recurse=kFALSE);
+ void SortPathMarks (TEveElement* cont, Bool_t recurse=kFALSE);
ClassDef(KineTools, 1);
}; // endclass KineTools
// compound classes
//================================
+// Removed. Messy code, tons of violations and incompatible with TEve
+// classes. Author Ludovic Gaudichet left ALICE.
+// Should be thoroughly revised.
+
// Cascade
-#pragma link C++ class Alieve::Cascade+;
-#pragma link C++ class Alieve::CascadeList+;
-#pragma link C++ class Alieve::CascadeListEditor+;
+//#pragma link C++ class Alieve::Cascade+;
+//#pragma link C++ class Alieve::CascadeList+;
+//#pragma link C++ class Alieve::CascadeListEditor+;
// V0
-#pragma link C++ class Alieve::V0+;
-#pragma link C++ class Alieve::V0List+;
-#pragma link C++ class Alieve::V0ListEditor+;
+//#pragma link C++ class Alieve::V0+;
+//#pragma link C++ class Alieve::V0List+;
+//#pragma link C++ class Alieve::V0ListEditor+;
// Fit
#pragma link C++ class Alieve::TrackFitter+;
#include <TColor.h>
#include <TMath.h>
-using namespace Reve;
using namespace Alieve;
//______________________________________________________________________
//______________________________________________________________________
MUONChamber::MUONChamber(Int_t id, const Text_t* n, const Text_t* t) :
-Reve::RenderElement(fFrameColor),
+TEveElement(fFrameColor),
TNamed(n,t),
fMUONData(0),
fFrameColor((Color_t)2),
Int_t nCol = gStyle->GetNumberOfColors();
Int_t cBin = (Int_t) TMath::Nint(nCol*(val - fThreshold)/div);
- ColorFromIdx(gStyle->GetColorPalette(TMath::Min(nCol - 1, cBin)), pixel);
+ TEveUtil::ColorFromIdx(gStyle->GetColorPalette(TMath::Min(nCol - 1, cBin)), pixel);
}
void MUONChamber::UpdateQuads()
{
- fQuadSet1.Quads().clear();
- fQuadSet2.Quads().clear();
+ fQuadSet1.Reset(TEveQuadSet::kQT_RectangleXY, kTRUE, 32);
+ fQuadSet2.Reset(TEveQuadSet::kQT_RectangleXY, kTRUE, 32);
fPointSet1.Reset();
fPointSet2.Reset();
MUONChamberData* data = GetChamberData();
Float_t *buffer;
- Float_t x0, y0, x1, y1, z, clsq;
+ Float_t x0, y0, z, w, h, clsq;
Int_t charge, cathode, nDigits, nClusters, nHits, oldSize, ic1, ic2;
Double_t clsX, clsY, clsZ;
Float_t hitX, hitY, hitZ;
x0 = buffer[0]-buffer[2];
y0 = buffer[1]-buffer[3];
- x1 = buffer[0]+buffer[2];
- y1 = buffer[1]+buffer[3];
+ w = 2*buffer[2];
+ h = 2*buffer[3];
z = buffer[4];
charge = (Int_t)buffer[5];
cathode = (Int_t)buffer[6];
if (cathode == 0) {
- fQuadSet1.Quads().push_back(Reve::Quad());
-
- fQuadSet1.Quads().back().ColorFromIdx(ColorIndex(charge));
- //ColorFromArray(charge,(UChar_t*)&fQuadSet1.fQuads.back().color);
-
- //UChar_t* c = (UChar_t*)&fQuadSet1.fQuads.back().color;
- //printf("%d %d %d %d \n",c[0],c[1],c[2],c[3]);
-
- Float_t* p = fQuadSet1.Quads().back().vertices;
-
- p[0] = x0; p[1] = y0; p[2] = z; p += 3;
- p[0] = x1; p[1] = y0; p[2] = z; p += 3;
- p[0] = x1; p[1] = y1; p[2] = z; p += 3;
- p[0] = x0; p[1] = y1; p[2] = z; p += 3;
+ fQuadSet1.AddQuad(x0, y0, z, w, h);
+ fQuadSet1.QuadColor(ColorIndex(charge));
}
if (cathode == 1) {
- fQuadSet2.Quads().push_back(Reve::Quad());
-
- fQuadSet2.Quads().back().ColorFromIdx(ColorIndex(charge));
- //ColorFromArray(charge,(UChar_t*)&fQuadSet2.fQuads.back().color);
-
- //UChar_t* c = (UChar_t*)&fQuadSet2.fQuads.back().color;
- //printf("%d %d %d %d \n",c[0],c[1],c[2],c[3]);
-
- Float_t* p = fQuadSet2.Quads().back().vertices;
-
- p[0] = x0; p[1] = y0; p[2] = z; p += 3;
- p[0] = x1; p[1] = y0; p[2] = z; p += 3;
- p[0] = x1; p[1] = y1; p[2] = z; p += 3;
- p[0] = x0; p[1] = y1; p[2] = z; p += 3;
+ fQuadSet2.AddQuad(x0, y0, z, w, h);
+ fQuadSet2.QuadColor(ColorIndex(charge));
}
#ifndef ALIEVE_MUONChamber_H
#define ALIEVE_MUONChamber_H
-#include <Reve/RenderElement.h>
-#include <Reve/QuadSet.h>
-#include <Reve/PointSet.h>
+#include <TEveElement.h>
+#include <TEveQuadSet.h>
+#include <TEvePointSet.h>
#include <TNamed.h>
#include <TAtt3D.h>
class MUONChamberEditor;
class MUONChamberGL;
-class MUONChamber : public Reve::RenderElement,
+class MUONChamber : public TEveElement,
public TNamed,
public TAtt3D,
public TAttBBox
Color_t fFrameColor; // main coloring
UInt_t fRTS; //! Rendering Time Stamp
Int_t fChamberID; // number of the chamber, 0 to 13
- Reve::OldQuadSet fQuadSet1; // 1st cathode plane digits
- Reve::OldQuadSet fQuadSet2; // 2nd cathode plane digits
- Reve::PointSet fPointSet1; // reconstructed points (1st cathode)
- Reve::PointSet fPointSet2; // simulation hits
+ TEveQuadSet fQuadSet1; // 1st cathode plane digits
+ TEveQuadSet fQuadSet2; // 2nd cathode plane digits
+ TEvePointSet fPointSet1; // reconstructed points (1st cathode)
+ TEvePointSet fPointSet2; // simulation hits
Short_t fThreshold; // digit amplitude threshold
Int_t fMaxVal; // digit amplitude maximum value
Int_t fClusterSize; // cluster point size
/// MUONChamberData: geometry and digits
///
///////////////////////////////////////////////////////////////////////////////
-
-using namespace Reve;
using namespace Alieve;
ClassImp(MUONChamberData)
#ifndef ALIEVE_MUONChamberData_H
#define ALIEVE_MUONChamberData_H
-#include <Reve/Reve.h>
+#include <TEveUtil.h>
#include <TObject.h>
#include <Alieve/MUONChamber.h>
-#include <Reve/RGValuators.h>
+#include <TEveGValuators.h>
#include <TVirtualPad.h>
#include <TColor.h>
#include <TGColorSelect.h>
#include <TGSlider.h>
#include <TGDoubleSlider.h>
-
-using namespace Reve;
using namespace Alieve;
//______________________________________________________________________
Int_t labelW = 60;
- fThreshold = new RGValuator(this, "ADC min", 200, 0);
+ fThreshold = new TEveGValuator(this, "ADC min", 200, 0);
fThreshold->SetNELength(4);
fThreshold->SetLabelWidth(labelW);
fThreshold->Build();
"Alieve::MUONChamberEditor", this, "DoThreshold()");
AddFrame(fThreshold, new TGLayoutHints(kLHintsTop, 1, 1, 2, 1));
- fMaxVal = new RGValuator(this,"ADC max", 200, 0);
+ fMaxVal = new TEveGValuator(this,"ADC max", 200, 0);
fMaxVal->SetNELength(4);
fMaxVal->SetLabelWidth(labelW);
fMaxVal->Build();
"Alieve::MUONChamberEditor", this, "DoMaxVal()");
AddFrame(fMaxVal, new TGLayoutHints(kLHintsTop, 1, 1, 2, 1));
- fClusterSize = new RGValuator(this,"Cls size", 200, 0);
+ fClusterSize = new TEveGValuator(this,"Cls size", 200, 0);
fClusterSize->SetLabelWidth(labelW);
fClusterSize->SetShowSlider(kFALSE);
fClusterSize->SetNELength(4);
"Alieve::MUONChamberEditor", this, "DoClusterSize()");
AddFrame(fClusterSize, new TGLayoutHints(kLHintsTop, 1, 1, 2, 1));
- fHitSize = new RGValuator(this,"Hit size", 200, 0);
+ fHitSize = new TEveGValuator(this,"TEveHit size", 200, 0);
fHitSize->SetLabelWidth(labelW);
fHitSize->SetShowSlider(kFALSE);
fHitSize->SetNELength(4);
class TGDoubleHSlider;
class TGHSlider;
-namespace Reve {
-
-class RGValuator;
-
-}
+class TEveGValuator;
namespace Alieve {
MUONChamber* fM; // fModel dynamic-casted to MUONChamberEditor
- Reve::RGValuator *fThreshold; // digit ADC min
- Reve::RGValuator *fMaxVal; // digit ADC max
- Reve::RGValuator *fClusterSize; // cluster point size
- Reve::RGValuator *fHitSize; // hit point size
+ TEveGValuator *fThreshold; // digit ADC min
+ TEveGValuator *fMaxVal; // digit ADC max
+ TEveGValuator *fClusterSize; // cluster point size
+ TEveGValuator *fHitSize; // hit point size
public:
#include <Alieve/MUONChamber.h>
#include <Alieve/MUONChamberData.h>
-#include <Reve/QuadSetGL.h>
+#include <TEveQuadSetGL.h>
#include <TGLRnrCtx.h>
#include <TGLIncludes.h>
-
-using namespace Reve;
using namespace Alieve;
//______________________________________________________________________
if(SetModelCheckClass(obj, Alieve::MUONChamber::Class())) {
fChamber = (MUONChamber*) fExternalObj;
-
+ fQS1.SetModel(&fChamber->fQuadSet1);
+ fQS2.SetModel(&fChamber->fQuadSet2);
return kTRUE;
}
}
//______________________________________________________________________
-void MUONChamberGL::DirectDraw(TGLRnrCtx& /*rnrCtx*/) const
+void MUONChamberGL::DirectDraw(TGLRnrCtx& rnrCtx) const
{
//
// Actual GL drawing.
if(hasData) {
- DrawQuads();
+ DrawQuads(rnrCtx);
DrawPoints();
}
}
//______________________________________________________________________
-void MUONChamberGL::DrawQuads() const
+void MUONChamberGL::DrawQuads(TGLRnrCtx& rnrCtx) const
{
//
// draw the digits as GL_QUADS
glPolygonMode(GL_FRONT, GL_FILL);
glPolygonMode(GL_BACK, GL_LINE);
- glBegin(GL_QUADS);
- for(std::vector<Quad>::iterator q=fChamber->fQuadSet1.Quads().begin(); q!=fChamber->fQuadSet1.Quads().end(); ++q) {
- UChar_t* c = (UChar_t*) &q->color;
- glColor4ubv(c);
- glVertex3fv(q->vertices);
- glVertex3fv(q->vertices + 3);
- glVertex3fv(q->vertices + 6);
- glVertex3fv(q->vertices + 9);
- }
- glEnd();
+ fQS1.DirectDraw(rnrCtx);
glPolygonMode(GL_FRONT, GL_LINE);
glPolygonMode(GL_BACK, GL_FILL);
- glBegin(GL_QUADS);
- for(std::vector<Quad>::iterator q=fChamber->fQuadSet2.Quads().begin(); q!=fChamber->fQuadSet2.Quads().end(); ++q) {
- UChar_t* c = (UChar_t*) &q->color;
- glColor4ubv(c);
- glVertex3fv(q->vertices);
- glVertex3fv(q->vertices + 3);
- glVertex3fv(q->vertices + 6);
- glVertex3fv(q->vertices + 9);
- }
- glEnd();
+ fQS2.DirectDraw(rnrCtx);
glPopAttrib();
#define ALIEVE_MUONChamberGL_H
#include <TGLObject.h>
+#include <TEveQuadSetGL.h>
-namespace Reve {
-class QuadSetGL;
-}
+class TEveQuadSetGL;
namespace Alieve {
virtual void DirectDraw(TGLRnrCtx & rnrCtx) const;
void DrawChamberFrame() const;
- void DrawQuads() const;
+ void DrawQuads(TGLRnrCtx& rnrCtx) const;
void DrawPoints() const;
MUONChamber* fChamber; // fModel dynamic-casted to MUONChamberGL
+ TEveQuadSetGL fQS1;
+ TEveQuadSetGL fQS2;
+
mutable UInt_t fRTS; // render time stamp
public:
#include "TString.h"
#include "TClonesArray.h"
#include "TList.h"
-
-using namespace Reve;
using namespace Alieve;
//______________________________________________________________________
//______________________________________________________________________
MUONData::MUONData(const MUONData &mdata) :
TObject(mdata),
- Reve::ReferenceCount(),
+ TEveRefCnt(),
fChambers(14),
fNTrackList(0)
{
#ifndef ALIEVE_MUONData_H
#define ALIEVE_MUONData_H
-#include <Reve/Reve.h>
+#include <TEveUtil.h>
#include <TObject.h>
class MUONChamberData;
-class MUONData : public TObject, public Reve::ReferenceCount
+class MUONData : public TObject, public TEveRefCnt
{
protected:
#include <TParticlePDG.h>
#include <Riostream.h>
-
-using namespace Reve;
using namespace Alieve;
//______________________________________________________________________
// MUONTrack
-// Produce Reve:Track from AliMUONTrack with dipole field model
+// Produce TEveUtil:TEveTrack from AliMUONTrack with dipole field model
ClassImp(MUONTrack)
AliMagF* MUONTrack::fFieldMap = 0;
//______________________________________________________________________
-MUONTrack::MUONTrack(Reve::RecTrack* t, TrackRnrStyle* rs) :
- Reve::Track(t,rs),
+MUONTrack::MUONTrack(TEveRecTrack* t, TEveTrackPropagator* rs) :
+ TEveTrack(t,rs),
fTrack(0),
fPart(0),
fCount(0),
if (fIsMUONTrack) {
cout << endl;
- cout << " Track number " << fLabel << endl;
+ cout << " TEveTrack number " << fLabel << endl;
cout << " ---------------------------------------------------------------------------------------------------------------------------------" << endl;
cout << endl;
cout << " Number of clusters " << fTrack->GetNClusters() << endl;
if (fIsRefTrack) {
cout << endl;
- cout << " Track reference number " << fLabel << endl;
+ cout << " TEveTrack reference number " << fLabel << endl;
cout << " ---------------------------------------------------------------------------------------------------------------------------------" << endl;
cout << endl;
cout << " Number of clusters " << fTrack->GetNClusters() << endl;
}
cout << endl;
- cout << " Track parameters at vertex" << endl;
+ cout << " TEveTrack parameters at vertex" << endl;
cout << " --------------------------------------------------------------------------------------------------------------------" << endl;
cout << " InvBendMom BendSlope NonBendSlope BendCoord NonBendCoord Z Px Py Pz P" << endl;
//
if (fIsMUONTrack) {
- Reve::LoadMacro("MUON_trigger_info.C");
+ TEveUtil::LoadMacro("MUON_trigger_info.C");
gROOT->ProcessLine(Form("MUON_trigger_info(%d);", fLabel));
}
if (fIsRefTrack) {
for (Int_t i = 0; i < nTrackHits; i++) {
if (TMath::Abs(zr[i]) > 1000.0) {
- //printf("Hit %d x %f y %f z %f \n",iHit,xr[i],yr[i],zr[i]);
+ //printf("TEveHit %d x %f y %f z %f \n",iHit,xr[i],yr[i],zr[i]);
xrc[nrc] = xr[i];
yrc[nrc] = yr[i];
zrc[nrc] = zr[i];
fPart = new TParticle(*part);
char form[1000];
- sprintf(form,"MCTrack %2d ", fLabel);
+ sprintf(form,"TEveMCTrack %2d ", fLabel);
SetName(form);
SetLineStyle(2);
SetLineColor(8);
#ifndef ALIEVE_MUONTrack_H
#define ALIEVE_MUONTrack_H
-#include <Reve/Track.h>
+#include <TEveTrack.h>
class AliMUONTrack;
class AliMUONTriggerTrack;
class TParticle;
-namespace Reve {
-
- class TrackRnrStyle;
- class RecTrack;
-
-}
+class TEveTrackPropagator;
+class TEveRecTrack;
namespace Alieve {
-class MUONTrack: public Reve::Track
+class MUONTrack: public TEveTrack
{
MUONTrack(const MUONTrack&); // Not implemented
public:
- MUONTrack(Reve::RecTrack* t, Reve::TrackRnrStyle* rs);
+ MUONTrack(TEveRecTrack* t, TEveTrackPropagator* rs);
virtual ~MUONTrack();
virtual void MakeTrack(Bool_t /*recurse*/=kFALSE) {}
static AliMagF *fFieldMap; // pointer to the magnetic field map
- ClassDef(MUONTrack, 1); // Produce Reve:Track from AliMUONTrack
+ ClassDef(MUONTrack, 1); // Produce TEveUtil:TEveTrack from AliMUONTrack
};
#include "AliPMDddldata.h"
#include <TClonesArray.h>
-
-using namespace Reve;
using namespace Alieve;
const Float_t PMDModule::fgkRad = 0.25;
GenerateBox(ism,xism,yism,dxism,dyism);
- Reve::FrameBox *pmdModBox = new FrameBox();
+ TEveFrameBox *pmdModBox = new TEveFrameBox();
pmdModBox->SetAAQuadXY(xism, yism, 0, dxism, dyism);
pmdModBox->SetFrameColor((Color_t) 31);
pmdModBox->SetFrameFill(kTRUE);
SetName(smodule.Data());
SetOwnIds(kTRUE);
- Reset(Reve::QuadSet::QT_HexagonXY, kFALSE, 32);
+ Reset(TEveQuadSet::kQT_HexagonXY, kFALSE, 32);
fH1 = new TH1F("fH1", smodule.Data(), 100, 0., 1000.);
fH1->SetDirectory(0);
#ifndef ALIEVE_PMDModule_H
#define ALIEVE_PMDModule_H
-#include <Reve/Reve.h>
-#include <Reve/QuadSet.h>
+#include <TEveUtil.h>
+#include <TEveQuadSet.h>
#include <TObject.h>
#include <TObjArray.h>
namespace Alieve {
-class PMDModule : public Reve::QuadSet
+class PMDModule : public TEveQuadSet
{
private:
PMDModule(const PMDModule&); // Not implemented
#include "PMDModuleEditor.h"
#include <Alieve/PMDModule.h>
-#include <Reve/RGEditor.h>
+#include <TEveGedEditor.h>
#include <TVirtualPad.h>
#include <TColor.h>
#include <TCanvas.h>
#include <TGLViewer.h>
-#include <Reve/ReveManager.h>
+#include <TEveManager.h>
#include <TH1F.h>
-
-using namespace Reve;
using namespace Alieve;
//______________________________________________________________________
#include <TStyle.h>
#include <TMath.h>
#include <TRandom.h>
-#include <Reve/ReveManager.h>
+#include <TEveManager.h>
#include <AliT0digit.h>
#include "TArrayI.h"
#include <AliRawReader.h>
#include "AliT0RawReader.h"
#include <AliCDBManager.h>
#include <AliCDBStorage.h>
-
-
-using namespace Reve;
using namespace Alieve;
/**************************************************************************/
T0Module::T0Module(const Text_t* n, Int_t sigType, AliT0digit *digits, AliT0RawReader *start)
- : QuadSet(n), fSigType(sigType), fDigits(digits), fStart(start)
+ : TEveQuadSet(n), fSigType(sigType), fDigits(digits), fStart(start)
{
//
// Default constructor
Int_t allData[110][5];
TRandom r(0);
// cout<<ievt<<endl;
- Reve::RGBAPalette* rawPalette = new RGBAPalette(0, 3000);
+ TEveRGBAPalette* rawPalette = new TEveRGBAPalette(0, 3000);
rawPalette->SetLimits(1, 3000); // Set proper raw time range.
- Reve::QuadSet* raw_a = new T0Module("T0_RAW_A", 2,digits, start); raw_a->SetPalette(rawPalette);
- raw_a->Reset(Reve::QuadSet::QT_HexagonXY, kFALSE, 32);
- Reve::QuadSet* raw_c = new T0Module("T0_RAW_C", 3,digits, start); raw_c->SetPalette(rawPalette);
- raw_c->Reset(Reve::QuadSet::QT_HexagonXY, kFALSE, 32);
+ TEveQuadSet* raw_a = new T0Module("T0_RAW_A", 2,digits, start); raw_a->SetPalette(rawPalette);
+ raw_a->Reset(TEveQuadSet::kQT_HexagonXY, kFALSE, 32);
+ TEveQuadSet* raw_c = new T0Module("T0_RAW_C", 3,digits, start); raw_c->SetPalette(rawPalette);
+ raw_c->Reset(TEveQuadSet::kQT_HexagonXY, kFALSE, 32);
Float_t angle = 2 * TMath::Pi() / 12;
start->Next();
for (Int_t i=0; i<110; i++)
raw_a->RefitPlex();
raw_c->RefitPlex();
- Reve::ZTrans& ta_a = raw_a->RefHMTrans();
+ TEveTrans& ta_a = raw_a->RefHMTrans();
ta_a.SetPos(0, 0, 373);
- Reve::ZTrans& tc_c = raw_c->RefHMTrans();
+ TEveTrans& tc_c = raw_c->RefHMTrans();
tc_c.SetPos(0, 0, -69.7);
- gReve->AddRenderElement(raw_a);
- gReve->AddRenderElement(raw_c);
- gReve->Redraw3D();
+ gEve->AddElement(raw_a);
+ gEve->AddElement(raw_c);
+ gEve->Redraw3D();
}
/**************************************************************************/
printf("%3d %3d\n ",ADC[i], TDC[i]);
}
- Reve::RGBAPalette* adcPalette = new RGBAPalette(5, 1024);
+ TEveRGBAPalette* adcPalette = new TEveRGBAPalette(5, 1024);
adcPalette->SetLimits(1, 1024); // Set proper ADC range.
- Reve::RGBAPalette* tdcPalette = new RGBAPalette(0, 9999);
+ TEveRGBAPalette* tdcPalette = new TEveRGBAPalette(0, 9999);
tdcPalette->SetLimits(1, 9999); // Set proper TDC range.
- Reve::QuadSet* qa = new T0Module("T0A_ADC", 0, digits); qa->SetPalette(adcPalette);
- Reve::QuadSet* qc = new T0Module("T0C_ADC", 0, digits); qc->SetPalette(adcPalette);
- Reve::QuadSet* qat = new T0Module("T0A_TDC", 1, digits); qat->SetPalette(tdcPalette);
- Reve::QuadSet* qct = new T0Module("T0C_TDC", 1, digits); qct->SetPalette(tdcPalette);
+ TEveQuadSet* qa = new T0Module("T0A_ADC", 0, digits); qa->SetPalette(adcPalette);
+ TEveQuadSet* qc = new T0Module("T0C_ADC", 0, digits); qc->SetPalette(adcPalette);
+ TEveQuadSet* qat = new T0Module("T0A_TDC", 1, digits); qat->SetPalette(tdcPalette);
+ TEveQuadSet* qct = new T0Module("T0C_TDC", 1, digits); qct->SetPalette(tdcPalette);
Float_t angle = 2 * TMath::Pi() / 12;
- qa->Reset(Reve::QuadSet::QT_HexagonXY, kFALSE, 32);
- qc->Reset(Reve::QuadSet::QT_HexagonXY, kFALSE, 32);
- qat->Reset(Reve::QuadSet::QT_HexagonXY, kFALSE, 32);
- qct->Reset(Reve::QuadSet::QT_HexagonXY, kFALSE, 32);
+ qa->Reset(TEveQuadSet::kQT_HexagonXY, kFALSE, 32);
+ qc->Reset(TEveQuadSet::kQT_HexagonXY, kFALSE, 32);
+ qat->Reset(TEveQuadSet::kQT_HexagonXY, kFALSE, 32);
+ qct->Reset(TEveQuadSet::kQT_HexagonXY, kFALSE, 32);
qat->RefitPlex();
qct->RefitPlex();
- Reve::ZTrans& ta = qa->RefHMTrans();
+ TEveTrans& ta = qa->RefHMTrans();
ta.SetPos(0, 0, 373);
- Reve::ZTrans& tc = qc->RefHMTrans();
+ TEveTrans& tc = qc->RefHMTrans();
tc.SetPos(0, 0, -69.7);
- Reve::ZTrans& tat = qat->RefHMTrans();
+ TEveTrans& tat = qat->RefHMTrans();
tat.SetPos(0, 0, 373);
- Reve::ZTrans& tct = qct->RefHMTrans();
+ TEveTrans& tct = qct->RefHMTrans();
tct.SetPos(0, 0, -69.7);
- gReve->AddRenderElement(qa);
- gReve->AddRenderElement(qc);
- gReve->AddRenderElement(qat);
- gReve->AddRenderElement(qct);
+ gEve->AddElement(qa);
+ gEve->AddElement(qc);
+ gEve->AddElement(qat);
+ gEve->AddElement(qct);
- gReve->Redraw3D();
+ gEve->Redraw3D();
}
/**************************************************************************/
void T0Module::DigitSelected(Int_t idx)
{
- // Override control-click from QuadSet
+ // Override control-click from TEveQuadSet
- DigitBase* qb = GetDigit(idx);
+ DigitBase_t* qb = GetDigit(idx);
if (fSigType == 0) { //ADC
printf("adc====================\n");
Int_t besttimeright = fDigits->BestTimeA();
//////////////////////////////////////////////////////////////////////////
-#include <Reve/QuadSet.h>
+#include <TEveQuadSet.h>
#include <AliT0digit.h>
#include <AliT0RawReader.h>
namespace Alieve {
-class T0Module : public Reve::QuadSet
+class T0Module : public TEveQuadSet
{
T0Module(const T0Module&);
// TOFDigitsInfo
//
-#include <Reve/TTreeTools.h>
+#include <TEveTreeTools.h>
#include "TOFDigitsInfo.h"
#include <AliTOFdigit.h>
#include <AliTOFGeometry.h>
//#include <AliTOFDigitMap.h>
-
-using namespace Reve;
using namespace Alieve;
using namespace std;
TOFDigitsInfo::TOFDigitsInfo():
TObject(),
- ReferenceCount(),
+ TEveRefCnt(),
fTree (0),
fNewTree (0),
fGeom (0),
void TOFDigitsInfo::SetTree(TTree* tree)
{
- static const Exc_t eH("TOFDigitsInfo::SetTree ");
+ static const TEveException eH("TOFDigitsInfo::SetTree ");
if(fGeom == 0) {
fGeom = new AliTOFGeometry();
vol[0] = digs->GetSector(); // Sector Number (0-17)
vol[1] = digs->GetPlate(); // Plate Number (0-4)
vol[2] = digs->GetStrip(); // Strip Number (0-14/18)
- vol[3] = digs->GetPadx(); // Pad Number in x direction (0-47)
- vol[4] = digs->GetPadz(); // Pad Number in z direction (0-1)
+ vol[3] = digs->GetPadx(); // TEvePad Number in x direction (0-47)
+ vol[4] = digs->GetPadz(); // TEvePad Number in z direction (0-1)
fTOFdigitMap->AddDigit(vol, digitNumber);
//if (digitNumber==digitsTOF->GetEntries()-1) printf(" I am inside LoadDigits %3i \n", digitNumber);
#ifndef ALIEVE_TOFDigitsInfo_H
#define ALIEVE_TOFDigitsInfo_H
-#include <Reve/VSD.h>
+#include <TEveVSD.h>
//#include <map>
namespace Alieve {
-class TOFDigitsInfo : public TObject, public Reve::ReferenceCount
+class TOFDigitsInfo : public TObject, public TEveRefCnt
{
TOFDigitsInfo(const TOFDigitsInfo&); // Not implemented
TOFDigitsInfo& operator=(const TOFDigitsInfo&); // Not implemented
#include <TGNumberEntry.h>
#include <TGColorSelect.h>
#include <TGDoubleSlider.h>
-
-using namespace Reve;
using namespace Alieve;
//______________________________________________________________________
#include "TOFSector.h"
-#include <Reve/ReveManager.h>
+#include <TEveManager.h>
#include <AliTOFdigit.h>
#include <AliTOFGeometry.h>
#include <TStyle.h>
-
-using namespace Reve;
using namespace Alieve;
using namespace std;
Bool_t TOFSector::fgStaticInitDone = kFALSE;
-FrameBox* TOFSector::fgTOFsectorFrameBox = 0;
-RGBAPalette* TOFSector::fgTOFsectorPalette = 0;
+TEveFrameBox* TOFSector::fgTOFsectorFrameBox = 0;
+TEveRGBAPalette* TOFSector::fgTOFsectorPalette = 0;
//_______________________________________________________
ClassImp(TOFSector)
/* ************************************************************************ */
TOFSector::TOFSector(const Text_t* n, const Text_t* t) :
- QuadSet(n, t),
+ TEveQuadSet(n, t),
fTOFgeometry(new AliTOFGeometry()),
fTOFarray(0x0),
fTOFtree(0x0),
for (Int_t ii=0; ii<5; ii++) fPlateFlag[ii]=kTRUE;
- fGeoManager = (TGeoManager*)gReve->GetGeometry("$REVESYS/alice-data/alice_fullgeo.root");
+ fGeoManager = (TGeoManager*)gEve->GetGeometry("$REVESYS/alice-data/alice_fullgeo.root");
if (!fGeoManager) {
printf("ERROR: no TGeo\n");
}
TOFSector::TOFSector(TGeoManager *localGeoManager,
Int_t nSector)
:
- QuadSet(Form("Sector%i",nSector)),
+ TEveQuadSet(Form("Sector%i",nSector)),
fTOFgeometry(new AliTOFGeometry()),
fTOFarray(0x0),
fTOFtree(0x0),
Int_t nSector,
TClonesArray *tofArray)
:
- QuadSet(Form("Sector%i",nSector)),
+ TEveQuadSet(Form("Sector%i",nSector)),
fTOFgeometry(new AliTOFGeometry()),
fTOFarray(tofArray),
fTOFtree(0x0),
Int_t nSector,
TTree *tofTree)
:
- QuadSet(Form("Sector%i",nSector)),
+ TEveQuadSet(Form("Sector%i",nSector)),
fTOFgeometry(new AliTOFGeometry()),
fTOFarray(0x0),
fTOFtree(tofTree),
Float_t dx = 124.5;
Float_t dz = 29.;
Float_t dy = 370.6*2.;
- fgTOFsectorFrameBox = new FrameBox();
+ fgTOFsectorFrameBox = new TEveFrameBox();
fgTOFsectorFrameBox->SetAABox(-dx*0.5, -dy*0.5, -dz*0.5, dx, dy, dz);
fgTOFsectorFrameBox->SetFrameColor((Color_t) 32);//31);
- //fgTOFsectorPalette = new RGBAPalette(0, 2048); // TOT
- fgTOFsectorPalette = new RGBAPalette(0, 8192/*1024*/); // TDC
+ //fgTOFsectorPalette = new TEveRGBAPalette(0, 2048); // TOT
+ fgTOFsectorPalette = new TEveRGBAPalette(0, 8192/*1024*/); // TDC
fgTOFsectorPalette->SetLimits(0, 8192);
fgStaticInitDone = kTRUE;
void TOFSector::LoadQuads()
{
- Reset(QT_FreeQuad, kFALSE, 32);
+ Reset(kQT_FreeQuad, kFALSE, 32);
//Int_t n_col = gStyle->GetNumberOfColors();
vol[1] = digs->GetPlate(); // Plate Number (0-4)
vol[2] = digs->GetStrip(); // Strip Number (0-14/18)
- vol[3] = digs->GetPadx(); // Pad Number in x direction (0-47)
- vol[4] = digs->GetPadz(); // Pad Number in z direction (0-1)
+ vol[3] = digs->GetPadx(); // TEvePad Number in x direction (0-47)
+ vol[4] = digs->GetPadz(); // TEvePad Number in z direction (0-1)
informations[0] = digs->GetTdc();
informations[1] = digs->GetAdc();
void TOFSector::DigitSelected(Int_t idx)
{
- // Override control-click from QuadSet
+ // Override control-click from TEveQuadSet
- DigitBase* qb = GetDigit(idx);
+ DigitBase_t* qb = GetDigit(idx);
TObject* obj = qb->fId.GetObject();
AliTOFdigit* digs = dynamic_cast<AliTOFdigit*>(obj);
// printf("TOFSector::QuadSelected "); Print();
#ifndef ALIEVE_TOFSector_H
#define ALIEVE_TOFSector_H
-#include <Reve/QuadSet.h>
-#include <Reve/RenderElement.h>
+#include <TEveQuadSet.h>
+#include <TEveElement.h>
-#include <Reve/RGBAPalette.h>
-#include <Reve/FrameBox.h>
+#include <TEveRGBAPalette.h>
+#include <TEveFrameBox.h>
#include <TGeoManager.h>
#include <TClonesArray.h>
namespace Alieve {
- class TOFSector : public Reve::QuadSet
+ class TOFSector : public TEveQuadSet
{
TOFSector(const TOFSector&); // Not implemented
void SetPlate(Int_t nPlate, Bool_t r);
- static Reve::FrameBox *fgTOFsectorFrameBox;
- static Reve::RGBAPalette *fgTOFsectorPalette;
+ static TEveFrameBox *fgTOFsectorFrameBox;
+ static TEveRGBAPalette *fgTOFsectorPalette;
ClassDef(TOFSector, 1);
};
#include <TVirtualPad.h>
#include <TColor.h>
-#include <Reve/RGValuators.h>
+#include <TEveGValuators.h>
#include <TGLabel.h>
#include <TGButton.h>
#include <TGColorSelect.h>
#include <TGSlider.h>
#include <TGDoubleSlider.h>
-
-using namespace Reve;
using namespace Alieve;
//______________________________________________________________________
//{
/*
- fHMTrans = new ZTransSubEditor(this);
+ fHMTrans = new TEveTransSubEditor(this);
fHMTrans->Connect("UseTrans()", "Alieve::TPCSectorVizEditor", this, "Update()");
fHMTrans->Connect("TransChanged()", "Alieve::TPCSectorVizEditor", this, "Update()");
AddFrame(fHMTrans, new TGLayoutHints(kLHintsTop | kLHintsExpandX, 2, 0, 0, 0));
//fPriority = 40;
MakeTitle("TOFSector");
- fSectorID = new RGValuator(this, "SectorID", 110, 0);
+ fSectorID = new TEveGValuator(this, "SectorID", 110, 0);
fSectorID->SetLabelWidth(60);
fSectorID->SetShowSlider(kFALSE);
fSectorID->SetNELength(4);
AddFrame(f, new TGLayoutHints(kLHintsTop, 1, 1, 1, 1));
- fThreshold = new RGValuator(this, "Threshold", 200, 0);
+ fThreshold = new TEveGValuator(this, "Threshold", 200, 0);
fThreshold->SetNELength(4);
fThreshold->SetLabelWidth(60);
fThreshold->Build();
"Alieve::TOFSectorEditor", this, "DoThreshold()");
AddFrame(fThreshold, new TGLayoutHints(kLHintsTop, 1, 1, 2, 1));
- fMaxVal = new RGValuator(this,"MaxVal", 200, 0);
+ fMaxVal = new TEveGValuator(this,"MaxVal", 200, 0);
fMaxVal->SetNELength(4);
fMaxVal->SetLabelWidth(60);
fMaxVal->Build();
class TGHSlider;
-namespace Reve {
- class RGValuator;
- class RGDoubleValuator;
- class ZTransSubEditor;
-}
+class TEveGValuator;
+class TEveGDoubleValuator;
+class TEveTransSubEditor;
namespace Alieve {
protected:
TOFSector* fM; // fModel dynamic-casted to TOFSectorEditor
- Reve::RGValuator* fSectorID;
+ TEveGValuator* fSectorID;
TGCheckButton* fAutoTrans;
TGCheckButton* fPlate3;
TGCheckButton* fPlate4;
- Reve::RGValuator* fThreshold;
- Reve::RGValuator* fMaxVal;
+ TEveGValuator* fThreshold;
+ TEveGValuator* fMaxVal;
// Declare widgets
#include "TOFStrip.h"
-#include <Reve/ReveManager.h>
+#include <TEveManager.h>
#include <AliTOFdigit.h>
#include <AliTOFGeometry.h>
#include <TStyle.h>
-
-using namespace Reve;
using namespace Alieve;
using namespace std;
Bool_t TOFStrip::fgStaticInitDone = kFALSE;
-FrameBox* TOFStrip::fgTOFstripFrameBox = 0;
-RGBAPalette* TOFStrip::fgTOFstripPalette = 0;
+TEveFrameBox* TOFStrip::fgTOFstripFrameBox = 0;
+TEveRGBAPalette* TOFStrip::fgTOFstripPalette = 0;
//_______________________________________________________
ClassImp(TOFStrip)
/* ************************************************************************ */
TOFStrip::TOFStrip(const Text_t* n, const Text_t* t) :
- QuadSet(n, t),
+ TEveQuadSet(n, t),
fTOFgeometry(new AliTOFGeometry()),
fTOFarray(0),
fSector(-1), fPlate(-1), fStrip(-1),
fDx(0), fDz(0)
{
- fGeoManager = (TGeoManager*)gReve->GetGeometry("$REVESYS/alice-data/alice_fullgeo.root");
+ fGeoManager = (TGeoManager*)gEve->GetGeometry("$REVESYS/alice-data/alice_fullgeo.root");
if (!fGeoManager) printf("ERROR: no TGeo\n");
}
TOFStrip::TOFStrip(TGeoManager *localGeoManager,
Int_t nSector, Int_t nPlate, Int_t nStrip)
:
- QuadSet(Form("Strip%i",nStrip)),
+ TEveQuadSet(Form("Strip%i",nStrip)),
fTOFgeometry(new AliTOFGeometry()),
fTOFarray(0),
fSector(nSector), fPlate(nPlate), fStrip(nStrip),
Int_t nSector, Int_t nPlate, Int_t nStrip,
TClonesArray *tofArray)
:
- QuadSet(Form("Strip%i",nStrip)),
+ TEveQuadSet(Form("Strip%i",nStrip)),
fTOFgeometry(new AliTOFGeometry()),
fTOFarray(tofArray),
fSector(nSector), fPlate(nPlate), fStrip(nStrip),
Float_t dx = 2.5*48;
Float_t dz = 3.5*2;
- fgTOFstripFrameBox = new FrameBox();
+ fgTOFstripFrameBox = new TEveFrameBox();
fgTOFstripFrameBox->SetAAQuadXZ(-dx*0.5, 0, -dz*0.5, dx, dz);
fgTOFstripFrameBox->SetFrameColor((Color_t) 32);//31);
- //fgTOFstripPalette = new RGBAPalette(0, 2048); // TOT
- fgTOFstripPalette = new RGBAPalette(0, 8192); // TDC
+ //fgTOFstripPalette = new TEveRGBAPalette(0, 2048); // TOT
+ fgTOFstripPalette = new TEveRGBAPalette(0, 8192); // TDC
fgStaticInitDone = kTRUE;
}
Float_t x = -1;
Float_t z = -1;
- Reset(QT_RectangleXZFixedY, kFALSE, 32);
+ Reset(kQT_RectangleXZFixedY, kFALSE, 32);
AliTOFdigit *tofDigit;
#ifndef ALIEVE_TOFStrip_H
#define ALIEVE_TOFStrip_H
-#include <Reve/QuadSet.h>
-#include <Reve/RenderElement.h>
+#include <TEveQuadSet.h>
+#include <TEveElement.h>
-#include <Reve/RGBAPalette.h>
-#include <Reve/FrameBox.h>
+#include <TEveRGBAPalette.h>
+#include <TEveFrameBox.h>
#include <TGeoManager.h>
#include <TClonesArray.h>
namespace Alieve {
-class TOFStrip : public Reve::QuadSet
+class TOFStrip : public TEveQuadSet
{
TOFStrip(const TOFStrip&); // Not implemented
TOFStrip& operator=(const TOFStrip&); // Not implemented
static Bool_t fgStaticInitDone;
static void InitStatics();
- static Reve::FrameBox* fgTOFstripFrameBox;
+ static TEveFrameBox* fgTOFstripFrameBox;
- static Reve::RGBAPalette* fgTOFstripPalette;
+ static TEveRGBAPalette* fgTOFstripPalette;
ClassDef(TOFStrip, 1);
};
#include <TGNumberEntry.h>
#include <TGColorSelect.h>
#include <TGDoubleSlider.h>
-
-using namespace Reve;
using namespace Alieve;
//______________________________________________________________________
#include <AliTPCParam.h>
#include <AliTPCRawStream.h>
#include <TTree.h>
-
-using namespace Reve;
using namespace Alieve;
//______________________________________________________________________
// via CreateSector() are loaded.
// If spawnSectors is true sectors are created if data for them is encountered.
- static const Exc_t eH("TPCData::LoadRaw ");
+ static const TEveException eH("TPCData::LoadRaw ");
Int_t sector = -1, row = -1, pad = -1, rowOffset = 0;
Short_t time, signal;
#ifndef ALIEVE_TPCData_H
#define ALIEVE_TPCData_H
-#include <Reve/Reve.h>
+#include <TEveUtil.h>
#include <TObject.h>
class TPCSectorData;
-class TPCData : public TObject, public Reve::ReferenceCount
+class TPCData : public TObject, public TEveRefCnt
{
protected:
std::vector<TPCSectorData*> fSectors;
#include "TPCData.h"
#include <Alieve/TPCSector2D.h>
#include <Alieve/TPCSector3D.h>
-#include <Reve/ReveManager.h>
-#include <Reve/RGEditor.h>
+#include <TEveManager.h>
+#include <TEveGedEditor.h>
#include <AliRawReaderRoot.h>
#include <AliTPCRawStream.h>
#include <TSystem.h>
-
-using namespace Reve;
using namespace Alieve;
//______________________________________________________________________
ClassImp(TPCLoader)
TPCLoader::TPCLoader(const Text_t* n, const Text_t* t) :
- RenderElementList(n, t),
+ TEveElementList(n, t),
fFile(),
fEvent(-1),
/**************************************************************************/
-void TPCLoader::RemoveElementLocal(RenderElement* el)
+void TPCLoader::RemoveElementLocal(TEveElement* el)
{
for(Int_t i=0; i<36; ++i) {
if(fSec2Ds[i] == el) fSec2Ds[i] = 0;
void TPCLoader::OpenFile()
{
- static const Exc_t eH("TPCLoader::OpenFile ");
+ static const TEveException eH("TPCLoader::OpenFile ");
if(gSystem->AccessPathName(fFile, kReadPermission))
throw(eH + "can not read '" + fFile + "'.");
void TPCLoader::LoadEvent()
{
- static const Exc_t eH("TPCLoader::LoadEvent ");
+ static const TEveException eH("TPCLoader::LoadEvent ");
if(fReader == 0)
throw(eH + "data file not opened.");
void TPCLoader::NextEvent(Bool_t rewindOnEnd)
{
- static const Exc_t eH("TPCLoader::NextEvent ");
+ static const TEveException eH("TPCLoader::NextEvent ");
if(fReader == 0)
throw(eH + "data file not opened.");
void TPCLoader::GotoEvent(Int_t event)
{
- static const Exc_t eH("TPCLoader::GotoEvent ");
+ static const TEveException eH("TPCLoader::GotoEvent ");
if(fReader == 0)
throw(eH + "data file not opened.");
loader->NextEvent();
loader->LoadEvent();
loader->UpdateSectors();
- if (gReve->GetEditor()->GetModel() == loader)
- gReve->EditRenderElement(loader);
+ if (gEve->GetEditor()->GetModel() == loader)
+ gEve->EditElement(loader);
return 0;
}
void TPCLoader::UpdateSectors(Bool_t dropNonPresent)
{
- gReve->DisableRedraw();
+ gEve->DisableRedraw();
for(Int_t i=0; i<=35; ++i)
{
TPCSectorData* sd = fData->GetSectorData(i);
if(fSec2Ds[i] != 0)
{
if (dropNonPresent && sd == 0) {
- gReve->RemoveRenderElement(fSec2Ds[i], this);
+ gEve->RemoveElement(fSec2Ds[i], this);
fSec2Ds[i] = 0;
} else {
fSec2Ds[i]->IncRTS();
s->SetAutoTrans(kTRUE);
s->SetFrameColor(36);
- gReve->AddRenderElement(s, this);
+ gEve->AddElement(s, this);
}
}
if(fSec3Ds[i] != 0)
{
if (dropNonPresent && sd == 0) {
- gReve->RemoveRenderElement(fSec3Ds[i], this);
+ gEve->RemoveElement(fSec3Ds[i], this);
fSec3Ds[i] = 0;
} else {
fSec3Ds[i]->IncRTS();
}
}
}
- gReve->Redraw3D(kTRUE, kFALSE);
- gReve->EnableRedraw();
+ gEve->Redraw3D(kTRUE, kFALSE);
+ gEve->EnableRedraw();
}
void TPCLoader::ReloadSectors()
void TPCLoader::CreateSectors3D()
{
- gReve->DisableRedraw();
+ gEve->DisableRedraw();
for(Int_t i=0; i<=35; ++i) {
TPCSectorData* sd = fData->GetSectorData(i);
if(sd != 0 && fSec3Ds[i] == 0) {
s->SetAutoTrans(kTRUE);
s->SetFrameColor(36);
- gReve->AddRenderElement(s, this);
+ gEve->AddElement(s, this);
}
}
- gReve->EnableRedraw();
+ gEve->EnableRedraw();
}
void TPCLoader::DeleteSectors3D()
{
- gReve->DisableRedraw();
+ gEve->DisableRedraw();
for(Int_t i=0; i<=35; ++i) {
- RenderElement* re = fSec3Ds[i];
+ TEveElement* re = fSec3Ds[i];
if(re != 0) {
- gReve->RemoveRenderElement(re, this);
+ gEve->RemoveElement(re, this);
// delete re; // Done automatically.
fSec3Ds[i] = 0;
}
}
- gReve->EnableRedraw();
+ gEve->EnableRedraw();
}
/**************************************************************************/
#ifndef ALIEVE_TPCLoader_H
#define ALIEVE_TPCLoader_H
-#include <Reve/RenderElement.h>
+#include <TEveElement.h>
#include <vector>
class AliRawReaderRoot;
class TPCSector2D;
class TPCSector3D;
-class TPCLoader : public Reve::RenderElementList
+class TPCLoader : public TEveElementList
{
friend class TPCLoaderEditor;
TPCLoader(const Text_t* n="TPCLoader", const Text_t* t=0);
virtual ~TPCLoader();
- virtual void RemoveElementLocal(Reve::RenderElement* el);
+ virtual void RemoveElementLocal(TEveElement* el);
virtual void RemoveElementsLocal();
void SetFile(const Text_t* f) { fFile = f; }
#include "TPCLoaderEditor.h"
#include <Alieve/TPCLoader.h>
#include <Alieve/TPCData.h>
-#include <Reve/ReveManager.h>
-#include <Reve/RGValuators.h>
+#include <TEveManager.h>
+#include <TEveGValuators.h>
#include <TSystem.h>
#include <TVirtualPad.h>
#include <TGNumberEntry.h>
#include <TGFileDialog.h>
#include <TGToolTip.h>
-
-using namespace Reve;
using namespace Alieve;
//______________________________________________________________________
AddFrame(f);
}
- fEvent = new RGValuator(this, "Event:", 110, 0);
+ fEvent = new TEveGValuator(this, "Event:", 110, 0);
fEvent->SetShowSlider(kFALSE);
fEvent->SetLabelWidth(labelW);
fEvent->SetNELength(6);
labelW = 90;
- fDataLoadThreshold = new RGValuator(this, "Load threshold:", 110, 0);
+ fDataLoadThreshold = new TEveGValuator(this, "Load threshold:", 110, 0);
fDataLoadThreshold->SetShowSlider(kFALSE);
fDataLoadThreshold->SetLabelWidth(labelW);
fDataLoadThreshold->SetNELength(6);
"Alieve::TPCLoaderEditor", this, "DoDataLoadThreshold()");
AddFrame(fDataLoadThreshold, new TGLayoutHints(kLHintsLeft, 0, 0, 6, 0));
- fDataLoadPedestal = new RGValuator(this, "Load pedestal:", 110, 0);
+ fDataLoadPedestal = new TEveGValuator(this, "Load pedestal:", 110, 0);
fDataLoadPedestal->SetShowSlider(kFALSE);
fDataLoadPedestal->SetLabelWidth(labelW);
fDataLoadPedestal->SetNELength(6);
fi.fFilename = StrDup(gSystem->BaseName(fM->fFile));
fi.fFileTypes = tpcfiletypes;
- new TGFileDialog(fClient->GetRoot(), gReve->GetMainWindow(), kFDOpen, &fi);
+ new TGFileDialog(fClient->GetRoot(), gEve->GetMainWindow(), kFDOpen, &fi);
if (!fi.fFilename)
return;
class TGColorSelect;
class TGTextEntry;
-namespace Reve {
-class RGValuator;
-}
+class TEveGValuator;
namespace Alieve {
TGTextEntry* fFile;
TGTextButton* fOpenFile;
- Reve::RGValuator* fEvent;
+ TEveGValuator* fEvent;
TGCheckButton* fDoubleSR;
// TPCData loading settings
- Reve::RGValuator* fDataLoadThreshold;
- Reve::RGValuator* fDataLoadPedestal;
+ TEveGValuator* fDataLoadThreshold;
+ TEveGValuator* fDataLoadPedestal;
TGCheckButton* fDataAutoPedestal;
TGTextButton* fUpdateSectors;
#include <Alieve/TPCData.h>
#include <Alieve/TPCSectorData.h>
-#include <Reve/ReveManager.h>
+#include <TEveManager.h>
#include <AliTPCParam.h>
#include <TH1S.h>
#include <TH2S.h>
#include <TVirtualPad.h>
-
-using namespace Reve;
using namespace Alieve;
using namespace std;
s->SetDataSource(fTPCData);
s->SetSectorID(fSectorID);
s->SetAutoTrans(fAutoTrans);
- gReve->AddRenderElement(s, this);
- gReve->Redraw3D();
+ gEve->AddElement(s, this);
+ gEve->Redraw3D();
}
/**************************************************************************/
if (sectorData == 0) return;
Int_t mint = fMinTime;
Int_t maxt = fMaxTime;
- TH1S* h = new TH1S(Form("Seg%d_Row%d_Pad%d", sseg, srow, pad),
- Form("Segment %d, Row %d, Pad %d", sseg, srow, pad),
+ TH1S* h = new TH1S(Form("Seg%d_Row%d_TEvePad%d", sseg, srow, pad),
+ Form("Segment %d, Row %d, TEvePad %d", sseg, srow, pad),
maxt - mint +1 , mint, maxt);
h->SetXTitle("Time");
h->SetYTitle("ADC");
maxt - mint +1 , mint, maxt,
npad, 0, npad - 1);
h->SetXTitle("Time");
- h->SetYTitle("Pad");
+ h->SetYTitle("TEvePad");
h->SetZTitle("ADC");
TPCSectorData::RowIterator i = sectorData->MakeRowIterator(row);
while (i.NextPad())
while (i.Next())
- h->Fill(i.Time(), i.Pad(), i.Signal());
+ h->Fill(i.Time(), i.TEvePad(), i.Signal());
h->Draw();
gPad->Modified();
gPad->Update();
#include <TGButton.h>
#include <TGComboBox.h>
#include <TGLabel.h>
-
-using namespace Reve;
using namespace Alieve;
//______________________________________________________________________
#include <TGLRnrCtx.h>
#include <TGLSelectRecord.h>
#include <TGLIncludes.h>
-
-using namespace Reve;
using namespace Alieve;
using namespace std;
void TPCSector2DGL::DisplayFrame() const
{
UChar_t col[4];
- ColorFromIdx(fSector->fFrameColor, col);
+ TEveUtil::ColorFromIdx(fSector->fFrameColor, col);
glColor4ubv(col);
if(fSector->fRnrInn) {
#include <TStyle.h>
#include <TColor.h>
-
-using namespace Reve;
using namespace Alieve;
//______________________________________________________________________
while (iter.NextPad())
{
- pad = iter.Pad();
+ pad = iter.TEvePad();
while (iter.Next())
{
time = iter.Time();
void TPCSector3D::UpdateBoxes()
{
- // Populate parent class Reve::BoxSet with digit information.
+ // Populate parent class TEveBoxSet with digit information.
// printf("TPCSector3D update boxes\n");
- fBoxSet.Reset(BoxSet::BT_AABox, kTRUE, 16384);
+ fBoxSet.Reset(TEveBoxSet::kBT_AABox, kTRUE, 16384);
fPointSetArray.RemoveElements();
TPCSectorData* data = GetSectorData();
#include <Alieve/TPCSectorViz.h>
#include <Alieve/TPCSectorData.h>
-#include <Reve/BoxSet.h>
-#include <Reve/PointSet.h>
+#include <TEveBoxSet.h>
+#include <TEvePointSet.h>
namespace Alieve {
void UpdateBoxes();
void SetupPointSetArray();
- Reve::BoxSet fBoxSet;
- Reve::PointSetArray fPointSetArray;
+ TEveBoxSet fBoxSet;
+ TEvePointSetArray fPointSetArray;
Float_t fPointFrac;
Float_t fPointSize;
Bool_t fPointSetOn;
#include "TPCSector3DEditor.h"
#include <Alieve/TPCSector3D.h>
-#include <Reve/RGValuators.h>
+#include <TEveGValuators.h>
#include <TVirtualPad.h>
#include <TColor.h>
#include <TGColorSelect.h>
#include <TGSlider.h>
#include <TGDoubleSlider.h>
-
-using namespace Reve;
using namespace Alieve;
//______________________________________________________________________
fRnrFrame->Connect
("Toggled(Bool_t)","Alieve::TPCSector3DEditor", this, "DoRnrFrame()");
- fDriftVel = new RGValuator(this, "Vdrift fac", 110, 0);
+ fDriftVel = new TEveGValuator(this, "Vdrift fac", 110, 0);
fDriftVel->SetLabelWidth(labelW);
fDriftVel->SetShowSlider(kFALSE);
fDriftVel->SetNELength(6);
"Alieve::TPCSector3DEditor", this, "DoDriftVel()");
AddFrame(fDriftVel, new TGLayoutHints(kLHintsTop, 1, 1, 2, 1));
- fPointFrac = new RGValuator(this,"Point frac", 200, 0);
+ fPointFrac = new TEveGValuator(this,"Point frac", 200, 0);
fPointFrac->SetLabelWidth(labelW);
fPointFrac->SetNELength(4);
fPointFrac->Build();
"Alieve::TPCSector3DEditor", this, "DoPointFrac()");
AddFrame(fPointFrac, new TGLayoutHints(kLHintsTop, 1, 1, 2, 1));
- fPointSize = new RGValuator(this,"Point size", 200, 0);
+ fPointSize = new TEveGValuator(this,"Point size", 200, 0);
fPointSize->SetLabelWidth(labelW);
fPointSize->SetShowSlider(kFALSE);
fPointSize->SetNELength(4);
class TGNumberEntry;
class TGColorSelect;
-namespace Reve {
-class RGValuator;
-class RGDoubleValuator;
-}
+class TEveGValuator;
+class TEveGDoubleValuator;
namespace Alieve {
TPCSector3D* fM; // fModel dynamic-casted to TPCSector3DEditor
TGCheckButton* fRnrFrame;
- Reve::RGValuator* fDriftVel;
+ TEveGValuator* fDriftVel;
- Reve::RGValuator* fPointFrac;
- Reve::RGValuator* fPointSize;
+ TEveGValuator* fPointFrac;
+ TEveGValuator* fPointSize;
public:
TPCSector3DEditor(const TGWindow* p=0, Int_t width=170, Int_t height=30,
#include "TPCSector3DGL.h"
#include <Alieve/TPCSector3D.h>
-#include <Reve/BoxSetGL.h>
+#include <TEveBoxSetGL.h>
#include <TGLIncludes.h>
#include <TGLRnrCtx.h>
#include <TGLSelectRecord.h>
-
-using namespace Reve;
using namespace Alieve;
//______________________________________________________________________
if(SetModelCheckClass(obj, Alieve::TPCSector3D::Class())) {
fSector = (TPCSector3D*) fExternalObj;
if(fBoxRnr == 0) {
- fBoxRnr = new BoxSetGL;
+ fBoxRnr = new TEveBoxSetGL;
fBoxRnr->SetModel(&fSector->fBoxSet);
}
return kTRUE;
glPushClientAttrib(GL_CLIENT_VERTEX_ARRAY_BIT);
glEnableClientState(GL_VERTEX_ARRAY);
- const Reve::PointSetArray& psa = fSector->fPointSetArray;
+ const TEvePointSetArray& psa = fSector->fPointSetArray;
for(Int_t b=0; b<psa.GetNBins(); ++b)
{
- Reve::PointSet* ps = psa.GetBin(b);
+ TEvePointSet* ps = psa.GetBin(b);
if(ps->Size() > 0)
{
- ColorFromIdx(ps->GetMarkerColor(), col);
+ TEveUtil::ColorFromIdx(ps->GetMarkerColor(), col);
glColor4ubv(col);
if (rnrCtx.SecSelection()) glLoadName(b + 1);
if(fSector->fRnrFrame && ! rnrCtx.SecSelection())
{
- ColorFromIdx(fSector->fFrameColor, col);
+ TEveUtil::ColorFromIdx(fSector->fFrameColor, col);
glColor4ubv(col);
if(fSector->fRnrInn)
return;
}
- const Reve::PointSetArray& psa = fSector->fPointSetArray;
+ const TEvePointSetArray& psa = fSector->fPointSetArray;
if (rec.GetItem(1) > 0 && rec.GetItem(1) <= (UInt_t) psa.GetNBins())
{
- // Reve::PointSet& ps = * psa.GetBin(rec.GetItem(1) - 1);
+ // TEvePointSet& ps = * psa.GetBin(rec.GetItem(1) - 1);
printf("TPC3D Point selected, bin=%u, idx=%u\n", rec.GetItem(1) - 1, rec.GetItem(2));
return;
}
#include <Alieve/TPCSectorData.h>
-namespace Reve {
-class BoxSetGL;
-}
+class TEveBoxSetGL;
namespace Alieve {
protected:
TPCSector3D* fSector; // fModel dynamic-casted to TPCSector3DGL
- Reve::BoxSetGL* fBoxRnr;
+ TEveBoxSetGL* fBoxRnr;
mutable UInt_t fRTS;
// For accessing data, see for example TPCSector2DGL::CreateTexture()
// and LoadPadrow().
//
-
-using namespace Reve;
using namespace Alieve;
ClassImp(TPCSectorData)
void TPCSectorData::RowIterator::Test()
{
while(NextPad()) {
- printf("Pad %d\n", fPad);
+ printf("TEvePad %d\n", fPad);
PadIterator::Test();
}
}
#ifndef ALIEVE_TPCSectorData_H
#define ALIEVE_TPCSectorData_H
-#include <Reve/Reve.h>
+#include <TEveUtil.h>
#include <TObject.h>
void ResetRow();
void ResetRow(const PadData* first, Short_t npads);
- Short_t Pad() const { return fPad; }
+ Short_t TEvePad() const { return fPad; }
void Test();
};
#include <TStyle.h>
#include <TColor.h>
-
-using namespace Reve;
using namespace Alieve;
//______________________________________________________________________
/**************************************************************************/
TPCSectorViz::TPCSectorViz(const Text_t* n, const Text_t* t) :
- Reve::RenderElement(fFrameColor),
+ TEveElement(fFrameColor),
TNamed(n, t),
fTPCData (0),
Int_t nCol = gStyle->GetNumberOfColors();
Int_t cBin = (Int_t) Nint(nCol*(val - fThreshold)/div);
- ColorFromIdx(gStyle->GetColorPalette(Min(nCol - 1, cBin)), pixel);
+ TEveUtil::ColorFromIdx(gStyle->GetColorPalette(Min(nCol - 1, cBin)), pixel);
}
void TPCSectorViz::ClearColorArray()
#ifndef ALIEVE_TPCSectorViz_H
#define ALIEVE_TPCSectorViz_H
-#include <Reve/RenderElement.h>
-#include <Reve/ZTrans.h>
+#include <TEveElement.h>
+#include <TEveTrans.h>
#include <TNamed.h>
#include <TAtt3D.h>
class TPCSector2D; class TPCSector2DEditor; class TPCSector2DGL;
class TPCSector3D; class TPCSector3DEditor; class TPCSector3DGL;
-class TPCSectorViz : public Reve::RenderElement,
+class TPCSectorViz : public TEveElement,
public TNamed,
public TAtt3D,
public TAttBBox
Color_t fFrameColor;
Bool_t fRnrFrame;
- Reve::ZTrans fHMTrans;
+ TEveTrans fHMTrans;
Bool_t fAutoTrans;
UInt_t fRTS; //! Rendering TimeStamp
virtual void SetRnrFrame(Bool_t rf) { fRnrFrame = rf; IncRTS(); }
void SetAutoTrans(Bool_t t);
- Reve::ZTrans& RefHMTrans() { return fHMTrans; }
+ TEveTrans& RefHMTrans() { return fHMTrans; }
void SetUseTrans(Bool_t t) { fHMTrans.SetUseTrans(t); }
ClassDef(TPCSectorViz, 1); // Base-class for TPC raw-data visualization
#include "TPCSectorVizEditor.h"
#include <Alieve/TPCSectorViz.h>
-#include <Reve/RGValuators.h>
-#include <Reve/ZTransEditor.h>
+#include <TEveGValuators.h>
+#include <TEveTransEditor.h>
#include <TVirtualPad.h>
#include <TColor.h>
#include <TGColorSelect.h>
#include <TGSlider.h>
#include <TGDoubleSlider.h>
-
-using namespace Reve;
using namespace Alieve;
//______________________________________________________________________
MakeTitle("Transformation matrix");
- fHMTrans = new ZTransSubEditor(this);
+ fHMTrans = new TEveTransSubEditor(this);
fHMTrans->Connect("UseTrans()", "Alieve::TPCSectorVizEditor", this, "Update()");
fHMTrans->Connect("TransChanged()", "Alieve::TPCSectorVizEditor", this, "Update()");
AddFrame(fHMTrans, new TGLayoutHints(kLHintsTop | kLHintsExpandX, 2, 0, 0, 0));
MakeTitle("TPCSectorViz");
- fSectorID = new RGValuator(this, "SectorID", 110, 0);
+ fSectorID = new TEveGValuator(this, "SectorID", 110, 0);
fSectorID->SetLabelWidth(labelW);
fSectorID->SetShowSlider(kFALSE);
fSectorID->SetNELength(4);
AddFrame(f, new TGLayoutHints(kLHintsTop, 1, 1, 1, 1));
}
- fThreshold = new RGValuator(this, "Threshold", 200, 0);
+ fThreshold = new TEveGValuator(this, "Threshold", 200, 0);
fThreshold->SetNELength(4);
fThreshold->SetLabelWidth(labelW);
fThreshold->Build();
"Alieve::TPCSectorVizEditor", this, "DoThreshold()");
AddFrame(fThreshold, new TGLayoutHints(kLHintsTop, 1, 1, 2, 1));
- fMaxVal = new RGValuator(this,"MaxVal", 200, 0);
+ fMaxVal = new TEveGValuator(this,"MaxVal", 200, 0);
fMaxVal->SetNELength(4);
fMaxVal->SetLabelWidth(labelW);
fMaxVal->Build();
"Alieve::TPCSectorVizEditor", this, "DoMaxVal()");
AddFrame(fMaxVal, new TGLayoutHints(kLHintsTop, 1, 1, 2, 1));
- fTime = new RGDoubleValuator(this,"Time", 200, 0);
+ fTime = new TEveGDoubleValuator(this,"Time", 200, 0);
fTime->SetNELength(4);
fTime->SetLabelWidth(labelW);
fTime->Build();
{
fM = dynamic_cast<TPCSectorViz*>(obj);
- fHMTrans->SetDataFromTrans(&fM->fHMTrans);
+ fHMTrans->SetModel(&fM->fHMTrans);
fSectorID->SetValue(fM->fSectorID);
fAutoTrans->SetState(fM->fAutoTrans ? kButtonDown : kButtonUp);
class TGDoubleHSlider;
class TGHSlider;
-namespace Reve {
-class RGValuator;
-class RGDoubleValuator;
-class ZTransSubEditor;
-}
+class TEveGValuator;
+class TEveGDoubleValuator;
+class TEveTransSubEditor;
namespace Alieve {
protected:
TPCSectorViz* fM; // fModel dynamic-casted to TPCSectorVizEditor
- Reve::ZTransSubEditor* fHMTrans;
+ TEveTransSubEditor* fHMTrans;
- Reve::RGValuator* fSectorID;
+ TEveGValuator* fSectorID;
TGCheckButton* fAutoTrans;
TGCheckButton* fRnrInn;
TGCheckButton* fRnrOut1;
TGCheckButton* fRnrOut2;
- Reve::RGValuator* fThreshold;
- Reve::RGValuator* fMaxVal;
+ TEveGValuator* fThreshold;
+ TEveGValuator* fMaxVal;
- Reve::RGDoubleValuator* fTime;
+ TEveGDoubleValuator* fTime;
public:
TPCSectorVizEditor(const TGWindow* p=0, Int_t width=170, Int_t height=30,
#include "AliTRDgeometry.h"
#include "AliTRDdigitsManager.h"
-using namespace Reve;
using namespace Alieve;
using namespace std;
-
ClassImp(TRDHits)
ClassImp(TRDDigits)
ClassImp(TRDClusters)
///////////////////////////////////////////////////////////
//________________________________________________________
-TRDDigits::TRDDigits(TRDChamber *p): OldQuadSet("digits", ""), RenderElement(), fParent(p)
+TRDDigits::TRDDigits(TRDChamber *p): TEveQuadSet("digits", ""), fParent(p)
{}
//________________________________________________________
}
//________________________________________________________
-void TRDDigits::ComputeRepresentation()
+void TRDDigits::ComputeRepresentation()
{
-// Calculate digits representation according to user settings. The
-// user can set the following parameters:
-// - digits scale (log/lin)
-// - digits threshold
-// - digits apparence (quads/boxes)
-
- fQuads.clear();
- // MT fBoxes.fBoxes.clear();
+ // Calculate digits representation according to user settings. The
+ // user can set the following parameters:
+ // - digits scale (log/lin)
+ // - digits threshold
+ // - digits apparence (quads/boxes)
+
+ TEveQuadSet::Reset(TEveQuadSet::kQT_FreeQuad, kTRUE, 64);
+ // MT fBoxes.fBoxes.clear();
- Double_t colSize, rowSize, scale;
- Double_t x, y, z;
+ Double_t colSize, rowSize, scale;
+ Double_t x, y, z;
- Int_t charge;
- Float_t t0;
- Float_t timeBinSize;
+ Int_t charge;
+ Float_t t0;
+ Float_t timeBinSize;
- AliTRDcalibDB* calibration = AliTRDcalibDB::Instance();
+ AliTRDcalibDB* calibration = AliTRDcalibDB::Instance();
Double_t cloc[4][3], cglo[3];
- Int_t color, dimension;
- fData.Expand();
- for (Int_t row = 0; row < fParent->rowMax; row++) {
- rowSize = .5 * fParent->fPadPlane->GetRowSize(row);
- z = fParent->fPadPlane->GetRowPos(row) - rowSize;
+ Int_t color, dimension;
+ fData.Expand();
+ for (Int_t row = 0; row < fParent->rowMax; row++) {
+ rowSize = .5 * fParent->fPadPlane->GetRowSize(row);
+ z = fParent->fPadPlane->GetRowPos(row) - rowSize;
- for (Int_t col = 0; col < fParent->colMax; col++) {
- colSize = .5 * fParent->fPadPlane->GetColSize(col);
- y = fParent->fPadPlane->GetColPos(col) - colSize;
- t0 = calibration->GetT0(fParent->fDet, col, row);
- timeBinSize = calibration->GetVdrift(fParent->fDet, col, row)/fParent->samplingFrequency;
+ for (Int_t col = 0; col < fParent->colMax; col++) {
+ colSize = .5 * fParent->fPadPlane->GetColSize(col);
+ y = fParent->fPadPlane->GetColPos(col) - colSize;
+ t0 = calibration->GetT0(fParent->fDet, col, row);
+ timeBinSize = calibration->GetVdrift(fParent->fDet, col, row)/fParent->samplingFrequency;
- for (Int_t time = 0; time < fParent->timeMax; time++) {
- charge = fData.GetDataUnchecked(row, col, time);
- if (charge < fParent->GetDigitsThreshold()) continue;
+ for (Int_t time = 0; time < fParent->timeMax; time++) {
+ charge = fData.GetDataUnchecked(row, col, time);
+ if (charge < fParent->GetDigitsThreshold()) continue;
- x = fParent->fX0 - (time+0.5-t0)*timeBinSize;
- scale = fParent->GetDigitsLog() ? TMath::Log(float(charge))/TMath::Log(1024.) : charge/1024.;
- color = 50+int(scale*50.);
+ x = fParent->fX0 - (time+0.5-t0)*timeBinSize;
+ scale = fParent->GetDigitsLog() ? TMath::Log(float(charge))/TMath::Log(1024.) : charge/1024.;
+ color = 50+int(scale*50.);
- cloc[0][2] = z - rowSize * scale;
- cloc[0][1] = y - colSize * scale;
- cloc[0][0] = x;
+ cloc[0][2] = z - rowSize * scale;
+ cloc[0][1] = y - colSize * scale;
+ cloc[0][0] = x;
- cloc[1][2] = z - rowSize * scale;
- cloc[1][1] = y + colSize * scale;
- cloc[1][0] = x;
+ cloc[1][2] = z - rowSize * scale;
+ cloc[1][1] = y + colSize * scale;
+ cloc[1][0] = x;
- cloc[2][2] = z + rowSize * scale;
- cloc[2][1] = y + colSize * scale;
- cloc[2][0] = x;
+ cloc[2][2] = z + rowSize * scale;
+ cloc[2][1] = y + colSize * scale;
+ cloc[2][0] = x;
- cloc[3][2] = z + rowSize * scale;
- cloc[3][1] = y - colSize * scale;
- cloc[3][0] = x;
+ cloc[3][2] = z + rowSize * scale;
+ cloc[3][1] = y - colSize * scale;
+ cloc[3][0] = x;
- Float_t* p = 0;
- if( fParent->GetDigitsBox()){
- // MT fBoxes.fBoxes.push_back(Reve::Box());
- // MT fBoxes.fBoxes.back().color[0] = (UChar_t)color;
- // MT fBoxes.fBoxes.back().color[1] = (UChar_t)color;
- // MT fBoxes.fBoxes.back().color[2] = (UChar_t)color;
- // MT fBoxes.fBoxes.back().color[3] = (UChar_t)color;
- // MT p = fBoxes.fBoxes.back().vertices;
- dimension = 2;
- } else {
- fQuads.push_back(Reve::Quad());
- fQuads.back().ColorFromIdx(color);
- p = fQuads.back().vertices;
- dimension = 1;
- }
-
- for(int id=0; id<dimension; id++)
- for (Int_t ic = 0; ic < 4; ic++) {
- cloc[ic][0] -= .5 * id * timeBinSize;
- fParent->fGeo->RotateBack(fParent->fDet,cloc[ic],cglo);
- p[0] = cglo[0]; p[1] = cglo[1]; p[2] = cglo[2];
- p+=3;
- }
- } // end time loop
- } // end col loop
- } // end row loop
- fData.Compress(1);
+ Float_t* p = 0;
+ if( fParent->GetDigitsBox()){
+ // MT fBoxes.fBoxes.push_back(Box());
+ // MT fBoxes.fBoxes.back().color[0] = (UChar_t)color;
+ // MT fBoxes.fBoxes.back().color[1] = (UChar_t)color;
+ // MT fBoxes.fBoxes.back().color[2] = (UChar_t)color;
+ // MT fBoxes.fBoxes.back().color[3] = (UChar_t)color;
+ // MT p = fBoxes.fBoxes.back().vertices;
+ dimension = 2;
+ } else {
+ AddQuad((Float_t*)0);
+ QuadColor(color);
+ p = ((QFreeQuad_t*) fLastDigit)->fVertices;
+ dimension = 1;
+ }
+
+ for(int id=0; id<dimension; id++)
+ for (Int_t ic = 0; ic < 4; ic++) {
+ cloc[ic][0] -= .5 * id * timeBinSize;
+ fParent->fGeo->RotateBack(fParent->fDet,cloc[ic],cglo);
+ p[0] = cglo[0]; p[1] = cglo[1]; p[2] = cglo[2];
+ p+=3;
+ }
+ } // end time loop
+ } // end col loop
+ } // end row loop
+ fData.Compress(1);
}
//________________________________________________________
void TRDDigits::Paint(Option_t *option)
{
if(fParent->GetDigitsBox()) fBoxes.Paint(option);
- else OldQuadSet::Paint(option);
+ else TEveQuadSet::Paint(option);
}
//________________________________________________________
void TRDDigits::Reset()
{
- fQuads.clear();
+ TEveQuadSet::Reset(TEveQuadSet::kQT_FreeQuad, kTRUE, 64);
// MT fBoxes.fBoxes.clear();
fData.Reset();
}
///////////////////////////////////////////////////////////
//________________________________________________________
-TRDHits::TRDHits(TRDChamber *p):PointSet("hits", 20), fParent(p)
+TRDHits::TRDHits(TRDChamber *p):TEvePointSet("hits", 20), fParent(p)
{}
//________________________________________________________
#define ALIEVE_TRDData_H
#ifndef REVE_QuadSet_H
-#include <Reve/QuadSet.h>
+#include <TEveQuadSet.h>
#endif
#ifndef REVE_BoxSet_H
-#include <Reve/BoxSet.h>
+#include <TEveBoxSet.h>
#endif
#ifndef REVE_PointSet_H
-#include <Reve/PointSet.h>
+#include <TEvePointSet.h>
#endif
#ifndef ROOT_TGedFrame
class AliTRDdigitsManager;
namespace Alieve {
class TRDChamber;
- class TRDHits : public Reve::PointSet
+ class TRDHits : public TEvePointSet
{
public:
TRDHits(TRDChamber *p);
};
- class TRDDigits : public Reve::OldQuadSet, public Reve::RenderElement
+ class TRDDigits : public TEveQuadSet
{
friend class TRDDigitsEditor;
public:
TRDChamber *fParent;
private:
- Reve::BoxSet fBoxes;
+ TEveBoxSet fBoxes;
AliTRDdataArrayI fData;
ClassDef(TRDDigits,1) // Digits visualisation for TRD
#include "TRDLoader.h"
#include "TRDModuleImp.h"
-#include <Reve/ReveManager.h>
-#include <Reve/RGValuators.h>
+#include <TEveManager.h>
+#include <TEveGValuators.h>
#include "TSystem.h"
#include "TFile.h"
#include <algorithm>
-
-using namespace Reve;
using namespace Alieve;
using namespace std;
class AliTRDdataArrayI;
//________________________________________________________
-TRDLoader::TRDLoader(const Text_t* n, const Text_t* t) : Reve::RenderElementList(n, t), fSM(-1), fStack(-1), fLy(-1), fEvent(0)
+TRDLoader::TRDLoader(const Text_t* n, const Text_t* t) : TEveElementList(n, t), fSM(-1), fStack(-1), fLy(-1), fEvent(0)
{
kLoadHits = kFALSE;
kLoadDigits = kFALSE;
TRDChamber *CHMB = 0x0;
int det;
for(int ism=ism_start; ism<ism_stop; ism++){
- ichmb = find_if(fChildren.begin(), fChildren.end(), ID<RenderElement*>(ism));
+ ichmb = find_if(fChildren.begin(), fChildren.end(), ID<TEveElement*>(ism));
if(ichmb != fChildren.end()){
SM = (TRDNode*)(*ichmb);
SM->SetRnrSelf(kTRUE);
}else{
- gReve->AddRenderElement(SM = new TRDNode("SM", ism), this);
- SM->FindListTreeItem(gReve->GetListTree())->SetTipText(Form("Supermodule %2d", ism));
+ gEve->AddElement(SM = new TRDNode("SM", ism), this);
+ SM->FindListTreeItem(gEve->GetListTree())->SetTipText(Form("Supermodule %2d", ism));
}
for(int istk=istk_start; istk<istk_stop; istk++){
- ichmb = find_if(SM->begin(), SM->end(), ID<RenderElement*>(istk));
+ ichmb = find_if(SM->begin(), SM->end(), ID<TEveElement*>(istk));
if(ichmb != SM->end()){
STK = (TRDNode*)(*ichmb);
STK->SetRnrSelf(kTRUE);
}else{
- gReve->AddRenderElement(STK = new TRDNode("Stack", istk), SM);
- STK->FindListTreeItem(gReve->GetListTree())->SetTipText(Form("SM %2d Stack %1d", ism, istk));
+ gEve->AddElement(STK = new TRDNode("Stack", istk), SM);
+ STK->FindListTreeItem(gEve->GetListTree())->SetTipText(Form("SM %2d Stack %1d", ism, istk));
}
for(int ily=ily_start; ily<ily_stop; ily++){
det = fGeo->GetDetector(ily, istk, ism);
- ichmb = find_if(STK->begin(), STK->end(), ID<RenderElement*>(det));
+ ichmb = find_if(STK->begin(), STK->end(), ID<TEveElement*>(det));
if(ichmb != STK->end()) (*ichmb)->SetRnrSelf(kTRUE);
else{
- gReve->AddRenderElement(CHMB = new TRDChamber(det), STK);
+ gEve->AddElement(CHMB = new TRDChamber(det), STK);
CHMB->SetGeometry(fGeo);
- CHMB->FindListTreeItem(gReve->GetListTree())->SetTipText(Form("SM %2d Stack %1d Layer %1d", ism, istk, ily));
+ CHMB->FindListTreeItem(gEve->GetListTree())->SetTipText(Form("SM %2d Stack %1d Layer %1d", ism, istk, ily));
}
}
}
}
- gReve->Redraw3D();
+ gEve->Redraw3D();
}
//________________________________________________________
{
List_i ism, istack, ichmb;
- ism = find_if(fChildren.begin(), fChildren.end(), ID<RenderElement*>(fGeo->GetSector(d)));
+ ism = find_if(fChildren.begin(), fChildren.end(), ID<TEveElement*>(fGeo->GetSector(d)));
if(ism == fChildren.end()) return 0x0;
- istack = find_if(((TRDNode*)(*ism))->begin(), ((TRDNode*)(*ism))->end(), ID<RenderElement*>(fGeo->GetChamber(d)));
+ istack = find_if(((TRDNode*)(*ism))->begin(), ((TRDNode*)(*ism))->end(), ID<TEveElement*>(fGeo->GetChamber(d)));
if(istack == ((TRDNode*)(*ism))->end()) return 0x0;
- ichmb = find_if(((TRDNode*)(*istack))->begin(), ((TRDNode*)(*istack))->end(), ID<RenderElement*>(d));
+ ichmb = find_if(((TRDNode*)(*istack))->begin(), ((TRDNode*)(*istack))->end(), ID<TEveElement*>(d));
if(ichmb == ((TRDNode*)(*istack))->end()) return 0x0;
return dynamic_cast<TRDChamber*>(*ichmb);
}
f->Close(); delete f;
- gReve->Redraw3D();
+ gEve->Redraw3D();
return kTRUE;
}
AddFrame(f);
- fEvent = new RGValuator(this, "Event:", 110, 0);
+ fEvent = new TEveGValuator(this, "Event:", 110, 0);
fEvent->SetShowSlider(kFALSE);
fEvent->SetLabelWidth(labelW);
fEvent->SetNELength(6);
TGGroupFrame *fGroupFrame1974 = new TGGroupFrame(this,"Chamber(s) selector");
TGVerticalFrame *fVerticalFrame1974 = new TGVerticalFrame(fGroupFrame1974, 150, 50,kVerticalFrame);
- fSMNumber = new RGValuator(fVerticalFrame1974, "SM:", 0, 0);
+ fSMNumber = new TEveGValuator(fVerticalFrame1974, "SM:", 0, 0);
fSMNumber->SetShowSlider(kFALSE);
fSMNumber->SetLabelWidth(labelW);
fSMNumber->SetNELength(6);
fSMNumber->SetToolTip("Supermodule id [-1 for all]");
fVerticalFrame1974->AddFrame(fSMNumber, new TGLayoutHints(kLHintsLeft | kLHintsTop | kLHintsCenterX | kLHintsExpandY,2,2,2,2));
- fStackNumber = new RGValuator(fVerticalFrame1974, "Stack:", 0, 0);
+ fStackNumber = new TEveGValuator(fVerticalFrame1974, "Stack:", 0, 0);
fStackNumber->SetShowSlider(kFALSE);
fStackNumber->SetLabelWidth(labelW);
fStackNumber->SetNELength(6);
fStackNumber->SetToolTip("Stack id [-1 for all in this SM]");
fVerticalFrame1974->AddFrame(fStackNumber, new TGLayoutHints(kLHintsLeft | kLHintsTop | kLHintsCenterX | kLHintsExpandY,2,2,2,2));
- fPlaneNumber = new RGValuator(fVerticalFrame1974, "Plane:", 0, 0);
+ fPlaneNumber = new TEveGValuator(fVerticalFrame1974, "Plane:", 0, 0);
fPlaneNumber->SetShowSlider(kFALSE);
fPlaneNumber->SetLabelWidth(labelW);
fPlaneNumber->SetNELength(6);
fi.fFilename = StrDup(gSystem->BaseName(fM->fFilename.Data()));
// fi.fFileTypes = tpcfiletypes;
- new TGFileDialog(fClient->GetRoot(), gReve->GetMainWindow(), kFDOpen, &fi);
+ new TGFileDialog(fClient->GetRoot(), gEve->GetMainWindow(), kFDOpen, &fi);
if (!fi.fFilename) return;
fFile->SetToolTipText(gSystem->DirName (fi.fFilename));
// by A.Bercuci (A.Bercuci@gsi.de) Fri Oct 27 2006
////////////////////////////////////////////////////////////////////////
-#ifndef REVE_RenderElement_H
-#include <Reve/RenderElement.h>
-#endif
-
-#ifndef ROOT_TString
-#include <TString.h>
-#endif
-
-#ifndef ROOT_TGedFrame
+#include <TEveElement.h>
#include <TGedFrame.h>
-#endif
+#include <TString.h>
class AliTRDv1;
class AliTRDgeometry;
class TGColorSelect;
class TGTextEntry;
class TTree;
-namespace Reve {
- class RGValuator;
-}
+
+class TEveGValuator;
+
namespace Alieve {
class TRDChamber;
class TRDLoaderManager;
kRawRoot = 4,
kRawData = 5
};
- class TRDLoader : public Reve::RenderElementList
+ class TRDLoader : public TEveElementList
{
friend class TRDLoaderEditor;
public:
virtual void SetModel(TObject* obj);
protected:
- TRDLoader *fM;
- TGTextEntry *fFile;
- Reve::RGValuator *fEvent;
- Reve::RGValuator *fSMNumber, *fStackNumber, *fPlaneNumber;
+ TRDLoader *fM;
+ TGTextEntry *fFile;
+ TEveGValuator *fEvent;
+ TEveGValuator *fSMNumber, *fStackNumber, *fPlaneNumber;
ClassDef(TRDLoaderEditor,1) // Editor for TRDLoader
};
//#include "AliTRDv1.h"
-#include <Reve/ReveManager.h>
+#include <TEveManager.h>
#include "TFile.h"
#include "TTree.h"
#include "AliTRDv1.h"
#include "AliTRDhit.h"
#include "AliTRDdigitsManager.h"
-
-using namespace Reve;
using namespace Alieve;
using namespace std;
if(!LoadTracklets(t)) return kFALSE;
}
- gReve->Redraw3D();
+ gEve->Redraw3D();
return kTRUE;
}
return kFALSE;
}
- static const Exc_t eH("TRDLoader::GotoEvent ");
+ static const TEveException eH("TRDLoader::GotoEvent ");
if(fRawRootReader == 0x0) throw(eH + "data file not opened.");
do NextEvent(); while(fEventOld != ev && !(checkEnd == kTRUE && fEventOld == 0));
LoadEvent();
- gReve->Redraw3D();
- //gReve->EnableRedraw();
+ gEve->Redraw3D();
+ //gEve->EnableRedraw();
return kTRUE;
}
{
Info("LoadEvent()", "Loading ...");
- static const Exc_t eH("TRDLoader::LoadEvent ");
+ static const TEveException eH("TRDLoader::LoadEvent ");
if(fRawRootReader == 0x0) throw(eH + "data file not opened.");
//________________________________________________________
void TRDLoaderRaw::NextEvent(Bool_t rewindOnEnd)
{
- static const Exc_t eH("TRDLoader::NextEvent ");
+ static const TEveException eH("TRDLoader::NextEvent ");
if(fRawRootReader == 0x0) throw(eH + "data file not opened.");
#include "TRDLoader.h"
#include "TRDLoaderImp.h"
-#include <Reve/ReveManager.h>
+#include <TEveManager.h>
#include <TGLabel.h>
#include <TGButton.h>
#include <TClonesArray.h>
#include "AliLog.h"
-
-using namespace Reve;
using namespace Alieve;
using namespace std;
//________________________________________________________
-TRDLoaderManager::TRDLoaderManager(const Text_t* n, const Text_t* t) : Reve::RenderElementList(n, t)
+TRDLoaderManager::TRDLoaderManager(const Text_t* n, const Text_t* t) : TEveElementList(n, t)
{
}
switch(type){
case 0:
//fChildren.push_back(new TRDLoaderSim(name, title));
- gReve->AddRenderElement(trdl = new TRDLoaderSim(name, title), this);
- ((TRDLoaderSim*)trdl)->FindListTreeItem(gReve->GetListTree())->SetTipText(title);
+ gEve->AddElement(trdl = new TRDLoaderSim(name, title), this);
+ ((TRDLoaderSim*)trdl)->FindListTreeItem(gEve->GetListTree())->SetTipText(title);
break;
case 1:
case 2:
case 3:
//fChildren.push_back(new TRDLoader(name, title));
- gReve->AddRenderElement(trdl = new TRDLoader(name, title), this);
- trdl->FindListTreeItem(gReve->GetListTree())->SetTipText(title);
+ gEve->AddElement(trdl = new TRDLoader(name, title), this);
+ trdl->FindListTreeItem(gEve->GetListTree())->SetTipText(title);
trdl->SetDataType((Alieve::TRDDataTypes)type);
break;
case 4:
case 5:
//fChildren.push_back(new TRDLoaderRaw(name, title));
- gReve->AddRenderElement(trdl = new TRDLoaderRaw(name, title), this);
- ((TRDLoaderRaw*)trdl)->FindListTreeItem(gReve->GetListTree())->SetTipText(title);
+ gEve->AddElement(trdl = new TRDLoaderRaw(name, title), this);
+ ((TRDLoaderRaw*)trdl)->FindListTreeItem(gEve->GetListTree())->SetTipText(title);
trdl->SetDataType((Alieve::TRDDataTypes)type);
break;
}
- gReve->Redraw3D();
+ gEve->Redraw3D();
}
//printf("TRDLoaderManager::Remove(%d)\n", entry);
List_i it = fChildren.begin();
for(int i=0; i<entry; i++) it++;
- gReve->RemoveRenderElement((*it), this);
+ gEve->RemoveElement((*it), this);
fChildren.erase(it);
}
// by A.Bercuci (A.Bercuci@gsi.de) Mon Feb 26 2007
////////////////////////////////////////////////////////////////////////
-#ifndef REVE_RenderElement_H
-#include <Reve/RenderElement.h>
-#endif
+#include <TEveElement.h>
#ifndef ROOT_TNamed
#include <TNamed.h>
class TGComboBox;
class TGTextButton;
class TClonesArray;
+
namespace Alieve {
- class TRDLoaderManager : public Reve::RenderElementList
+
+ class TRDLoaderManager : public TEveElementList
{
friend class TRDLoaderManagerEditor;
public:
//#include "TColor.h"
//#include "TMath.h"
-#include "Reve/ReveManager.h"
-#include "Reve/Track.h"
+#include "TEveManager.h"
+#include "TEveTrack.h"
-
-using namespace Reve;
using namespace Alieve;
-//using namespace std;
ClassImp(TRDModule)
ClassImp(TRDModuleEditor)
if(dynamic_cast<TRDNode*>(fM)) (dynamic_cast<TRDNode*>(fM))->UpdateLeaves();
- gReve->Redraw3D();
+ gEve->Redraw3D();
}
//_________________________________________________________
/*
if(fM->fRecPoints){
fM->fRecPoints->SetMarkerColor(col ? fHitsColor->GetColor() : col);
- gReve->Redraw3D();
+ gEve->Redraw3D();
}
*/
}
/*
if(fM->fHits){
fM->fHits->SetMarkerColor(col ? fClustersColor->GetColor() : col);
- gReve->Redraw3D();
+ gEve->Redraw3D();
}
*/
}
#include "TMath.h"
#include <TGListTree.h>
-#include "Reve/ReveManager.h"
-#include "Reve/Track.h"
+#include "TEveManager.h"
+#include "TEveTrack.h"
#include "AliLog.h"
#include "AliRun.h"
#include "AliTRDdataArrayI.h"
#include "AliTRDmcmTracklet.h"
-
-
-using namespace Reve;
using namespace Alieve;
using namespace std;
//________________________________________________________
TRDNode::TRDNode(const char *typ, Int_t det) :
- Reve::RenderElement(), TRDModule(typ, det)
+ TEveElement(), TRDModule(typ, det)
{
}
//________________________________________________________
void TRDNode::Collapse()
{
- TGListTree *list = gReve->GetListTree();
+ TGListTree *list = gEve->GetListTree();
TRDNode *node = 0x0;
List_i iter = fChildren.begin();
while(iter != fChildren.end()){
//________________________________________________________
void TRDNode::Expand()
{
- TGListTree *list = gReve->GetListTree();
+ TGListTree *list = gEve->GetListTree();
TRDNode *node = 0x0;
List_i iter = fChildren.begin();
while(iter != fChildren.end()){
if((chmb = dynamic_cast<TRDChamber*>(*iter))) chmb->SetRnrSelf(kTRUE);
iter++;
}
- gReve->Redraw3D();
+ gEve->Redraw3D();
}
//________________________________________________________
if((chmb = dynamic_cast<TRDChamber*>(*iter))) chmb->SetRnrSelf(kFALSE);
iter++;
}
- gReve->Redraw3D();
+ gEve->Redraw3D();
}
//________________________________________________________
//________________________________________________________
TRDChamber::TRDChamber(Int_t det) :
- Reve::RenderElement(), TRDModule("Chmb", det), rowMax(-1), colMax(-1), timeMax(22), fX0(0.), fPla(-1)
+ TEveElement(), TRDModule("Chmb", det), rowMax(-1), colMax(-1), timeMax(22), fX0(0.), fPla(-1)
{
//
// Constructor
//________________________________________________________
TRDChamber::TRDChamber(const TRDChamber &mod):
- Reve::RenderElement(), TRDModule("Chmb", mod.fDet)
+ TEveElement(), TRDModule("Chmb", mod.fDet)
{
//
// Copy constructor
// Info("LoadTracklets()", Form("tracks = 0x%x", tracks));
if(!fTracklets){
- fTracklets = new std::vector<Reve::Track*>;
+ fTracklets = new std::vector<TEveTrack*>;
} else fTracklets->clear();
for(int itrk=0; itrk<tracks->GetEntries();itrk++){
trk = (AliTRDmcmTracklet*)tracks->At(itrk);
trk->MakeTrackletGraph(fGeo,.5);
- fTracklets->push_back(new Reve::Track());
+ fTracklets->push_back(new TEveTrack());
fTracklets->back()->SetLineColor(4);
cloc[0] = trk->GetTime0(); // x0
if(fRecPoints && fRnrRecPoints) fRecPoints->GetObject()->Paint(option);
if(fHits && fRnrHits) fHits->GetObject()->Paint(option);
if(fTracklets && fRnrTracklets){
- for(vector<Reve::Track*>::iterator i=fTracklets->begin(); i != fTracklets->end(); ++i) (*i)->Paint(option);
+ for(vector<TEveTrack*>::iterator i=fTracklets->begin(); i != fTracklets->end(); ++i) (*i)->Paint(option);
}
}
#include <vector>
-#ifndef REVE_RenderElement_H
-#include <Reve/RenderElement.h>
-#endif
+#include <TEveElement.h>
#ifndef ALIEVE_TRDModule_H
#include "TRDModule.h"
class AliTRDdigitsManager;
class TObjArray;
-namespace Reve {
- class Track;
-}
+class TEveTrack;
+
namespace Alieve {
class TRDHits;
class TRDDigits;
- class TRDChamber : public Reve::RenderElement, public TRDModule
+ class TRDChamber : public TEveElement, public TRDModule
{
friend class TRDDigits;
public:
TRDDigits *fDigits; // digits representation
TRDHits *fHits; // hits representation
TRDHits *fRecPoints;// cluster representation
- std::vector<Reve::Track*> *fTracklets; // mcm tracklets
+ std::vector<TEveTrack*> *fTracklets; // mcm tracklets
// data representation section
Int_t rowMax; // number of rows for this pad plane
};
- class TRDNode : public Reve::RenderElement, public TRDModule
+ class TRDNode : public TEveElement, public TRDModule
{
public:
TRDNode(const char *typ, Int_t det=0);
#include "TrackFitter.h"
-//#include "TClass.h"
#include "TCanvas.h"
#include "TGraph.h"
#include "TGraphErrors.h"
#include "AliRieman.h"
#include "AliExternalTrackParam.h"
-#include <Reve/Track.h>
-#include <Reve/PODs.h>
-#include <Reve/ReveManager.h>
+#include <TEveTrack.h>
+#include <TEveTrackPropagator.h>
+#include <TEveVSDStructs.h>
+#include <TEveManager.h>
-using namespace Reve;
using namespace Alieve;
//______________________________________________________________________
// TrackFitter
//
-// TrackFitter is an interface to helix fit. It creates a set of points, listening to signal
-// PointCtrlClicked() of any Reve::PointSet. Via editor it fits selected points and creates a
-// reconstructed track.
+// TrackFitter is an interface to helix fit. It creates a set of
+// points, listening to signal PointCtrlClicked() of any
+// TEvePointSet. Via editor it fits selected points and creates a
+// reconstructed track.
//
ClassImp(TrackFitter)
-TrackFitter::TrackFitter(const Text_t* name, Int_t n_points, TreeVarType_e tv_type) :
- Reve::PointSet(name, n_points, tv_type),
+TrackFitter::TrackFitter(const Text_t* name, Int_t n_points, ETreeVarType_e tv_type) :
+ TEvePointSet(name, n_points, tv_type),
fGraphSelected(0),
fGraphFitted(0),
fGraphFitted->SetName("Fitted points");
fGraphFitted->SetMarkerColor(2);
- fTrackList = new TrackList("Tracks");
+ fTrackList = new TEveTrackList("Tracks");
fTrackList->SetLineWidth(2);
fTrackList->SetLineColor(8);
fTrackList->IncDenyDestroy();
- fTrackList->GetRnrStyle()->SetEditPathMarks(kTRUE);
- gReve->AddRenderElement(fTrackList, this);
+ fTrackList->GetPropagator()->SetEditPathMarks(kTRUE);
+ gEve->AddElement(fTrackList, this);
UpdateItems();
}
/**************************************************************************/
void TrackFitter::DestroyElements()
{
- // Virtual method of base class Reve::RenderElement.
+ // Virtual method of base class TEveElement.
// It preserves track list to have coomon track propagator attributes.
- RenderElement::DestroyElements();
- gReve->AddRenderElement(fTrackList, this);
+ TEveElement::DestroyElements();
+ gEve->AddElement(fTrackList, this);
fTrackList->DestroyElements();
UpdateItems();
}
Reset();
if(fConnected == kFALSE)
{
- TQObject::Connect("Reve::PointSet", "PointCtrlClicked(Reve::PointSet*,Int_t)",
- "Alieve::TrackFitter", this, "AddFitPoint(Reve::PointSet*,Int_t)");
+ TQObject::Connect("TEvePointSet", "PointCtrlClicked(TEvePointSet*,Int_t)",
+ "Alieve::TrackFitter", this, "AddFitPoint(TEvePointSet*,Int_t)");
fConnected = kTRUE;
}
if(fConnected)
{
- TQObject::Disconnect("Reve::PointSet", "AddFitPoint(Reve::PointSet*,Int_t)");
+ TQObject::Disconnect("TEvePointSet", "AddFitPoint(TEvePointSet*,Int_t)");
fConnected = kFALSE;
}
}
/**************************************************************************/
-void TrackFitter::AddFitPoint(Reve::PointSet* ps, Int_t n)
+void TrackFitter::AddFitPoint(TEvePointSet* ps, Int_t n)
{
// Add/remove given point depending if exists in the fMapPS.
Double_t cov[15];
fRieman->GetExternalParameters(r, param, cov);
// curvature to pt
- param[4] /= TrackRnrStyle::fgDefMagField*TrackRnrStyle::fgkB2C;
+ param[4] /= TEveTrackPropagator::fgDefMagField*TEveTrackPropagator::fgkB2C;
// sign in tang
if(param[4] < 0) param[3] *= -1;
AliExternalTrackParam trackParam(r, fAlpha, param, cov);
// make track
Double_t V0[3];
- trackParam.GetXYZAt(r, TrackRnrStyle::fgDefMagField, V0);
+ trackParam.GetXYZAt(r, TEveTrackPropagator::fgDefMagField, V0);
Double_t P0[3];
- trackParam.GetPxPyPzAt(r, TrackRnrStyle::fgDefMagField, P0);
- RecTrack rc;
- rc.V.Set(V0);
- rc.P.Set(P0);
- rc.sign = trackParam.Charge();
+ trackParam.GetPxPyPzAt(r, TEveTrackPropagator::fgDefMagField, P0);
+ TEveRecTrack rc;
+ rc.fV.Set(V0);
+ rc.fP.Set(P0);
+ rc.fSign = trackParam.Charge();
- Track* track = new Track(&rc, fTrackList->GetRnrStyle());
+ TEveTrack* track = new TEveTrack(&rc, fTrackList->GetPropagator());
track->SetName(Form("track %f", fAlpha));
- PathMark* pm = new PathMark(PathMark::Daughter);
+ TEvePathMark* pm = new TEvePathMark(TEvePathMark::kDaughter);
for(Int_t i=0; i==fLastPoint; i++)
{
GetPoint(i, x, y, z);
- pm->V.Set(x, y, z);
- pm->P.Set(P0);
+ pm->fV.Set(x, y, z);
+ pm->fP.Set(P0);
track->AddPathMark(pm);
}
track->MakeTrack();
track->SetAttLineAttMarker(fTrackList);
- gReve->AddRenderElement(track, fTrackList);
+ gEve->AddElement(track, fTrackList);
}
// Reset selection.
if(fRieman) fRieman->Reset();
- PointSet::Reset(n, ids);
+ TEvePointSet::Reset(n, ids);
fMapPS.clear();
}
{
// Draw graph of rieman fit.
- static const Exc_t eH("TrackFitter::DrawRiemanGraph ");
+ static const TEveException eH("TrackFitter::DrawRiemanGraph ");
if(fRieman == 0)
throw(eH + "fitter not set.");
#ifndef ALIEVE_TrackFitter_H
#define ALIEVE_TrackFitter_H
-#include <Reve/PointSet.h>
+#include <TEvePointSet.h>
#include <TQObject.h>
#include <map>
class TGraph;
class AliRieman;
-namespace Reve
-{
-class TrackList;
-}
+class TEveTrackList;
namespace Alieve {
-class TrackFitter : public Reve::PointSet
+class TrackFitter : public TEvePointSet
{
private:
TrackFitter(const TrackFitter&); // Not implemented
struct Point_t
{
// inner structure to check duplicates
- Reve::PointSet* fPS; // selected pointset
+ TEvePointSet* fPS; // selected pointset
Int_t fIdx; // location in the point set array
- Point_t(Reve::PointSet* ps, Int_t i): fPS(ps), fIdx(i){}
+ Point_t(TEvePointSet* ps, Int_t i): fPS(ps), fIdx(i){}
bool operator<(const Point_t& o) const
{ if (fPS != o.fPS) return fPS < o.fPS; return fIdx < o.fIdx; }
};
Bool_t fConnected; // object connected to pointset Ctrl-shift signal
- Reve::TrackList* fTrackList; // track list created with rieman fit
+ TEveTrackList* fTrackList; // track list created with rieman fit
- std::map<Point_t, Int_t> fMapPS; // map of selected points from different PointSet
+ std::map<Point_t, Int_t> fMapPS; // map of selected points from different TEvePointSet
public:
- TrackFitter(const Text_t* name, Int_t n_points=0, TreeVarType_e tv_type=TVT_XYZ);
+ TrackFitter(const Text_t* name, Int_t n_points=0, ETreeVarType_e tv_type=kTVT_XYZ);
virtual ~TrackFitter();
- void AddFitPoint(Reve::PointSet*,Int_t); // slot for PointCtrlClicked() signal
+ void AddFitPoint(TEvePointSet*,Int_t); // slot for PointCtrlClicked() signal
virtual void DestroyElements(); // *MENU*
#include <Alieve/TrackFitter.h>
#include <TGButton.h>
-
-using namespace Reve;
using namespace Alieve;
//______________________________________________________________________
#include "VSDCreator.h"
-#include <Reve/TTreeTools.h>
+#include <TEveTreeTools.h>
#include <AliStack.h>
#include <AliITSLoader.h>
#include <TSystem.h>
#include <TFile.h>
+#include <TError.h>
-using namespace Reve;
using namespace Alieve;
using namespace std;
ClassImp(VSDCreator)
VSDCreator::VSDCreator(const Text_t* name, const Text_t* title) :
- VSD(name, title),
+ TEveVSD(name, title),
mKineType (KT_Standard),
mDataDir ("."),
void VSDCreator::CreateVSD(const Text_t* data_dir, Int_t event,
const Text_t* vsd_file)
{
- static const Exc_t eH("VSDCreator::CreateVSD ");
+ static const TEveException eH("VSDCreator::CreateVSD ");
mDataDir = data_dir;
mEvent = event;
// GledNS::PushFD();
if(mDebugLevel > 0)
- printf("%s opening output VSD.\n", eH.Data());
+ printf("%s opening output TEveVSD.\n", eH.Data());
TFile* file = TFile::Open(vsd_file, "RECREATE", "ALICE VisualizationDataSummary");
- mDirectory = new TDirectoryFile("Event0", "");
+ fDirectory = new TDirectoryFile("Event0", "");
if(mDebugLevel > 0)
printf("%s creating trees now ...\n", eH.Data());
file->Write();
file->Close();
delete file;
- mDirectory =0;
+ fDirectory =0;
//GledNS::PopFD();
- // clean after the VSD data was sucessfuly written
- mTreeK = 0;
- mTreeH = 0;
- //mTreeTR = 0;
- mTreeC = 0;
- mTreeV0 = 0;
- mTreeKK = 0;
- mTreeR = 0;
- mTreeGI = 0;
+ // clean after the TEveVSD data was sucessfuly written
+ fTreeK = 0;
+ fTreeH = 0;
+ //fTreeTR = 0;
+ fTreeC = 0;
+ fTreeV0 = 0;
+ fTreeKK = 0;
+ fTreeR = 0;
+ fTreeGI = 0;
pRunLoader->UnloadAll();
delete pRunLoader;
void VSDCreator::CreateTrees()
{
- static const Exc_t eH("VSDCreator::CreateTrees ");
+ static const TEveException eH("VSDCreator::CreateTrees ");
- if(mDirectory == 0)
+ if(fDirectory == 0)
throw(eH + "output directory not set.");
try {
if(mDebugLevel > 1)
printf("%sConvertKinematics.\n", eH.Data());
ConvertKinematics();
- } catch(Exc_t& exc) { WarnCaller(exc); }
+ } catch(TEveException& exc) { Warning(eH, exc); }
try {
if(mDebugLevel > 1)
printf("%sConvertHits.\n", eH.Data());
ConvertHits();
- } catch(Exc_t& exc) { WarnCaller(exc); }
+ } catch(TEveException& exc) { Warning(eH, exc); }
try {
if(mDebugLevel > 1)
printf("%sConvertClusters.\n", eH.Data());
ConvertClusters();
- } catch(Exc_t& exc) { WarnCaller(exc); }
+ } catch(TEveException& exc) { Warning(eH, exc); }
try {
if(mDebugLevel > 1)
printf("%sConvertRecTracks.\n", eH.Data());
ConvertRecTracks();
- } catch(Exc_t& exc) {
- WarnCaller(exc + " Skipping V0 extraction.");
+ } catch(TEveException& exc) {
+ Warning(exc, "skipping V0 extraction.");
goto end_esd_processing;
}
if(mDebugLevel > 1)
printf("%sConvertV0.\n", eH.Data());
ConvertV0();
- } catch(Exc_t& exc) { WarnCaller(exc); }
+ } catch(TEveException& exc) { Warning(eH, exc); }
try {
if(mDebugLevel > 1)
printf("%sConvertKinks.\n", eH.Data());
ConvertKinks();
- } catch(Exc_t& exc) { WarnCaller(exc); }
+ } catch(TEveException& exc) { Warning(eH, exc); }
end_esd_processing:
if(mDebugLevel > 1)
printf("%sConvertGenInfo.\n", eH.Data());
ConvertGenInfo();
- } catch(Exc_t& exc) { WarnCaller(exc); }
+ } catch(TEveException& exc) { Warning(eH, exc); }
return;
}
void VSDCreator::ConvertKinematics()
{
- static const Exc_t eH("VSDCreator::ConvertKinematics ");
+ static const TEveException eH("VSDCreator::ConvertKinematics ");
- if(mTreeK != 0)
+ if(fTreeK != 0)
throw (eH + "kinematics already converted");
AliStack* stack = pRunLoader->Stack();
if(stack == 0)
throw(eH + "stack is null.");
- mDirectory->cd();
- mTreeK = new TTree("Kinematics", "TParticles sorted by Label");
+ fDirectory->cd();
+ fTreeK = new TTree("Kinematics", "TParticles sorted by Label");
Int_t nentries = stack->GetNtrack();
- vector<MCTrack> vmc(nentries);
+ vector<TEveMCTrack> vmc(nentries);
for (Int_t idx=0; idx<nentries; idx++) {
TParticle* tp = stack->Particle(idx);
- vmc[idx] = *tp;
- vmc[idx].label = idx;
+ vmc[idx] = *tp;
+ vmc[idx].fLabel = idx;
}
- // read track refrences
- TTree* mTreeTR = pRunLoader->TreeTR();
+ // read track refrences
+ // functionality now in KineTools.
+ /*
+ TTree* fTreeTR = pRunLoader->TreeTR();
- if(mTreeTR == 0) {
- WarnCaller(eH + "no TrackRefs; some data will not be available.");
+ if(fTreeTR == 0) {
+ Warning(eH, "no TrackRefs; some data will not be available.");
} else {
TClonesArray* RunArrayTR = 0;
- mTreeTR->SetBranchAddress("AliRun", &RunArrayTR);
+ fTreeTR->SetBranchAddress("AliRun", &RunArrayTR);
- Int_t nPrimaries = (Int_t) mTreeTR->GetEntries();
+ Int_t nPrimaries = (Int_t) fTreeTR->GetEntries();
for (Int_t iPrimPart = 0; iPrimPart<nPrimaries; iPrimPart++) {
- // printf("T0 mTreeTR->GetEntry(%d) \n",iPrimPart);
- mTreeTR->GetEntry(iPrimPart);
- // printf("END mTreeTR->GetEntry(%d) \n",iPrimPart);
+ // printf("T0 fTreeTR->GetEntry(%d) \n",iPrimPart);
+ fTreeTR->GetEntry(iPrimPart);
+ // printf("END fTreeTR->GetEntry(%d) \n",iPrimPart);
for (Int_t iTrackRef = 0; iTrackRef < RunArrayTR->GetEntriesFast(); iTrackRef++) {
AliTrackReference *trackRef = (AliTrackReference*)RunArrayTR->At(iTrackRef);
Int_t track = trackRef->GetTrack();
if(track < nentries && track > 0){
- MCTrack& mct = vmc[track];
+ TEveMCTrack& mct = vmc[track];
if(trackRef->TestBit(kNotDeleted)) {
mct.decayed = true;
mct.t_decay = trackRef->GetTime();
}
}
}
+ */
- mTreeK->Branch("K", "Reve::MCTrack", &mpK, fBuffSize);
+ fTreeK->Branch("K", "TEveMCTrack", &fpK, fBuffSize);
printf("sizeofvmc = %d\n", vmc.size());
- for(vector<MCTrack>::iterator k=vmc.begin(); k!=vmc.end(); ++k) {
- MCTrack& mct = *k;
- mK = mct;
+ for(vector<TEveMCTrack>::iterator k=vmc.begin(); k!=vmc.end(); ++k) {
+ TEveMCTrack& mct = *k;
+ fK = mct;
TParticle* m = &mct;
- Int_t mi = mct.label;
+ Int_t mi = mct.fLabel;
int cnt = 0;
while(m->GetMother(0) != -1) {
if(cnt > 100) {
m = &vmc[mi];
++cnt;
}
- mK.eva_label = mi;
+ fK.fEvaLabel = mi;
- mTreeK->Fill();
+ fTreeK->Fill();
}
- mTreeK->BuildIndex("label");
+ fTreeK->BuildIndex("label");
}
/**************************************************************************/
void VSDCreator::ConvertHits()
{
- static const Exc_t eH("VSDCreator::ConvertHits ");
+ static const TEveException eH("VSDCreator::ConvertHits ");
- if(mTreeH != 0)
+ if(fTreeH != 0)
throw(eH + "hits already converted.");
- mDirectory->cd();
- mTreeH = new TTree("Hits", "Combined detector hits.");
- mTreeH->Branch("H", "Reve::Hit", &mpH, fBuffSize);
+ fDirectory->cd();
+ fTreeH = new TTree("Hits", "Combined detector hits.");
+ fTreeH->Branch("H", "TEveHit", &fpH, fBuffSize);
map<Int_t, Int_t> hmap;
// parameters for ITS, TPC hits filtering
Int_t count = 0;
TTree* treeh = pRunLoader->GetTreeH(det.name, false);
if(treeh == 0) {
- WarnCaller(eH + "no hits for "+ det.name +".");
+ Warning(eH, Form("no hits for %s.", det.name));
continue;
}
AliTPCTrackHitsV2 hv2, *_hv2=&hv2;
x = y = z = 0;
do {
AliHit* ah = hv2.GetHit();
- x1=ah->X();y1=ah->Y();z1=ah->Z();
- if((x-x1)*(x-x1)+(y-y1)*(y-y1)+(z-z1)*(z-z1) > tpc_sqr_res) {
- mH.det_id = det.detidx;
- mH.subdet_id = 0;
- mH.label = ah->Track();
- mH.eva_label = eva_idx;
- mH.V.x = x1; mH.V.y = y1; mH.V.z = z1;
- mTreeH->Fill();
- hmap[mH.label]++;
+ x1 = ah->X(); y1 = ah->Y(); z1 = ah->Z();
+ if ((x-x1)*(x-x1) + (y-y1)*(y-y1) + (z-z1)*(z-z1) > tpc_sqr_res)
+ {
+ fH.fDetId = det.detidx;
+ fH.fSubdetId = 0;
+ fH.fLabel = ah->Track();
+ fH.fEvaLabel = eva_idx;
+ fH.fV.fX = x1; fH.fV.fY = y1; fH.fV.fZ = z1;
+ fTreeH->Fill();
+ hmap[fH.fLabel]++;
x = x1; y = y1; z = z1;
count++;
}
default: {
TTree* treeh = pRunLoader->GetTreeH(det.name, false);
if(treeh == 0) {
- WarnCaller(eH + "no hits for "+ det.name +".");
+ Warning(eH, Form("no hits for %s.", det.name));
continue;
}
TClonesArray *arr = new TClonesArray(det.hitbranch);
// printf("%d entry %d hits for primary %d \n", i, nh, eva_idx);
for (Int_t j=0; j<nh; j++) {
AliHit* ali_hit = (AliHit*)arr->UncheckedAt(j);
- mH.det_id = det.detidx;
- mH.subdet_id = 0;
- mH.label = ali_hit->GetTrack();
- mH.eva_label = eva_idx;
- mH.V.Set(ali_hit->X(), ali_hit->Y(), ali_hit->Z());
+ fH.fDetId = det.detidx;
+ fH.fSubdetId = 0;
+ fH.fLabel = ali_hit->GetTrack();
+ fH.fEvaLabel = eva_idx;
+ fH.fV.Set(ali_hit->X(), ali_hit->Y(), ali_hit->Z());
if(det.detidx == 2) {
x1=ali_hit->X();y1=ali_hit->Y();z1=ali_hit->Z();
if((x-x1)*(x-x1)+(y-y1)*(y-y1)+(z-z1)*(z-z1) < trd_sqr_res) continue;
x=x1; y=y1; z=z1;
}
- hmap[mH.label]++;
- mTreeH->Fill();
+ hmap[fH.fLabel]++;
+ fTreeH->Fill();
}
}
delete arr;
//set geninfo
for(map<Int_t, Int_t>::iterator j=hmap.begin(); j!=hmap.end(); ++j) {
- GetGeninfo(j->first)->n_hits += j->second;
+ GetGeninfo(j->first)->fNHits += j->second;
}
}
void VSDCreator::ConvertClusters()
{
- static const Exc_t eH("VSDCreator::ConvertClusters ");
+ static const TEveException eH("VSDCreator::ConvertClusters ");
- if(mTreeC != 0)
+ if(fTreeC != 0)
throw(eH + "clusters already converted.");
- mDirectory->cd();
- mTreeC = new TTree("Clusters", "rec clusters");
- mTreeC->Branch("C", "Reve::Cluster", &mpC, fBuffSize);
+ fDirectory->cd();
+ fTreeC = new TTree("Clusters", "rec clusters");
+ fTreeC->Branch("C", "TEveCluster", &fpC, fBuffSize);
try {
ConvertITSClusters();
- } catch(Exc_t& exc) { WarnCaller(exc); }
+ } catch(TEveException& exc) { Warning(eH, exc); }
try {
ConvertTPCClusters();
- } catch(Exc_t& exc) { WarnCaller(exc); }
+ } catch(TEveException& exc) { Warning(eH, exc); }
}
/**************************************************************************/
void VSDCreator::ConvertTPCClusters()
{
- static const Exc_t eH("VSDCreator::ConvertTPCClusters ");
+ static const TEveException eH("VSDCreator::ConvertTPCClusters ");
auto_ptr<TFile> f
( TFile::Open(Form("%s/TPC.RecPoints.root", mDataDir.Data())) );
if(_clrow->GetArray()) {
// cl = new AliTPCclusterMI(*(AliTPCclusterMI*)_clrow->GetArray()->UncheckedAt(ncl));
cl = (AliTPCclusterMI*)_clrow->GetArray()->UncheckedAt(ncl);
- if(cl->GetLabel(0) >= 0){
+ if(cl->GetLabel(0) >= 0)
+ {
x = par->GetPadRowRadii(sec,row); y = cl->GetY(); z = cl->GetZ();
par->AdjustCosSin(sec,cs,sn);
tmp = x*cs-y*sn; y= x*sn+y*cs; x=tmp;
- mC.det_id = 1;
- mC.subdet_id = 0;
- mC.label[0] = cl->GetLabel(0);
- mC.label[1] = cl->GetLabel(1);
- mC.label[2] = cl->GetLabel(2);
- mC.V.Set(x, y, z);
-
- mTreeC->Fill();
- { int i = 0;
- while(i < 3 && mC.label[i])
- cmap[mC.label[i++]]++;
+ fC.fDetId = 1;
+ fC.fSubdetId = 0;
+ fC.fLabel[0] = cl->GetLabel(0);
+ fC.fLabel[1] = cl->GetLabel(1);
+ fC.fLabel[2] = cl->GetLabel(2);
+ fC.fV.Set(x, y, z);
+
+ fTreeC->Fill();
+ {
+ int i = 0;
+ while(i < 3 && fC.fLabel[i])
+ cmap[fC.fLabel[i++]]++;
}
}
}
}
//set geninfo
for(map<Int_t, Int_t>::iterator j=cmap.begin(); j!=cmap.end(); ++j) {
- GetGeninfo(j->first)->n_clus += j->second;
+ GetGeninfo(j->first)->fNClus += j->second;
}
}
void VSDCreator::ConvertITSClusters()
{
- static const Exc_t eH("VSDCreator::ConvertITSClusters ");
+ static const TEveException eH("VSDCreator::ConvertITSClusters ");
auto_ptr<TFile> f
( TFile::Open(Form("%s/ITS.RecPoints.root", mDataDir.Data())) );
Float_t cp=TMath::Cos(phi1), sp=TMath::Sin(phi1);
Float_t r=tx*cp+ty*sp;
- gc[0]= r*cp - recp->GetY()*sp;
- gc[1]= r*sp + recp->GetY()*cp;
- gc[2]= recp->GetZ();
-
- mC.det_id = 0;
- mC.subdet_id = 0;
- mC.label[0] = recp->GetLabel(0);
- mC.label[1] = recp->GetLabel(1);
- mC.label[2] = recp->GetLabel(2);
- mC.V.x = r*cp - recp->GetY()*sp;
- mC.V.y = r*sp + recp->GetY()*cp;
- mC.V.z = recp->GetZ();
- mTreeC->Fill();
+ gc[0] = r*cp - recp->GetY()*sp;
+ gc[1] = r*sp + recp->GetY()*cp;
+ gc[2] = recp->GetZ();
+
+ fC.fDetId = 0;
+ fC.fSubdetId = 0;
+ fC.fLabel[0] = recp->GetLabel(0);
+ fC.fLabel[1] = recp->GetLabel(1);
+ fC.fLabel[2] = recp->GetLabel(2);
+ fC.fV.fX = r*cp - recp->GetY()*sp;
+ fC.fV.fY = r*sp + recp->GetY()*cp;
+ fC.fV.fZ = recp->GetZ();
+ fTreeC->Fill();
{ int i = 0;
- while(i < 3 && mC.label[i])
- cmap[mC.label[i++]]++;
+ while(i < 3 && fC.fLabel[i])
+ cmap[fC.fLabel[i++]]++;
}
}
for(map<Int_t, Int_t>::iterator j=cmap.begin(); j!=cmap.end(); ++j) {
- GetGeninfo(j->first)->n_clus += j->second;
+ GetGeninfo(j->first)->fNClus += j->second;
}
}
delete arr;
void VSDCreator::ConvertRecTracks()
{
- static const Exc_t eH("VSDCreator::ConvertRecTracks ");
+ static const TEveException eH("VSDCreator::ConvertRecTracks ");
- if(mTreeR != 0)
+ if(fTreeR != 0)
throw(eH + "tracks already converted.");
- mDirectory->cd();
- mTreeR = new TTree("RecTracks", "rec tracks");
+ fDirectory->cd();
+ fTreeR = new TTree("RecTracks", "rec tracks");
- mTreeR->Branch("R", "Reve::RecTrack", &mpR, 512*1024,1);
+ fTreeR->Branch("R", "TEveRecTrack", &fpR, 512*1024,1);
TFile f(Form("%s/AliESDs.root", mDataDir.Data()));
if(!f.IsOpen())
for (Int_t n=0; n<fEvent->GetNumberOfTracks(); n++) {
esd_t = fEvent->GetTrack(n);
- mR.label = esd_t->GetLabel();
- mR.status = (Int_t) esd_t->GetStatus();
- mR.sign = (Int_t) esd_t->GetSign();
- esd_t->GetXYZ(dbuf); mR.V.Set(dbuf);
- esd_t->GetPxPyPz(dbuf); mR.P.Set(dbuf);
+ fR.fLabel = esd_t->GetLabel();
+ fR.fStatus = (Int_t) esd_t->GetStatus();
+ fR.fSign = (Int_t) esd_t->GetSign();
+ esd_t->GetXYZ(dbuf); fR.fV.Set(dbuf);
+ esd_t->GetPxPyPz(dbuf); fR.fP.Set(dbuf);
Double_t ep = esd_t->GetP();
- mR.beta = ep/TMath::Sqrt(ep*ep + TMath::C()*TMath::C()*esd_t->GetMass()*esd_t->GetMass());
- mTreeR->Fill();
+ fR.fBeta = ep/TMath::Sqrt(ep*ep + TMath::C()*TMath::C()*esd_t->GetMass()*esd_t->GetMass());
+ fTreeR->Fill();
}
- mTreeR->BuildIndex("label");
+ fTreeR->BuildIndex("label");
delete fEvent;
}
void VSDCreator::ConvertV0()
{
- static const Exc_t eH("VSDCreator::ConvertV0 ");
+ static const TEveException eH("VSDCreator::ConvertV0 ");
- if(mTreeV0 != 0)
+ if(fTreeV0 != 0)
throw(eH + "V0 already converted.");
- mDirectory->cd();
- m