-// $Header$
+// $Id$
+// Main authors: Matevz Tadel & Alja Mrak-Tadel: 2006, 2007
-#include "TPCSector2D.h"
-#include "TPCSector3D.h"
+/**************************************************************************
+ * Copyright(c) 1998-2008, ALICE Experiment at CERN, all rights reserved. *
+ * See http://aliceinfo.cern.ch/Offline/AliRoot/License.html for *
+ * full copyright notice. *
+ **************************************************************************/
-#include <Alieve/TPCData.h>
-#include <Alieve/TPCSectorData.h>
+#include "AliEveTPCSector2D.h"
+#include "AliEveTPCSector3D.h"
+
+#include <Alieve/AliEveTPCData.h>
+#include <Alieve/AliEveTPCSectorData.h>
#include <TEveManager.h>
#include <TH1S.h>
#include <TH2S.h>
#include <TVirtualPad.h>
-using namespace Alieve;
+
using namespace std;
//______________________________________________________________________
-// TPCSector2D
+// AliEveTPCSector2D
//
// Displays TPC raw-data in 2D.
//
// updates take the same time)
//
-ClassImp(TPCSector2D)
+ClassImp(AliEveTPCSector2D)
/**************************************************************************/
-TPCSector2D::TPCSector2D(const Text_t* n, const Text_t* t) :
- TPCSectorViz(n,t),
+AliEveTPCSector2D::AliEveTPCSector2D(const Text_t* n, const Text_t* t) :
+ AliEveTPCSectorViz(n,t),
fShowMax (kTRUE),
fAverage (kFALSE),
fPickMode (1)
{}
-TPCSector2D::~TPCSector2D()
+AliEveTPCSector2D::~AliEveTPCSector2D()
{}
/**************************************************************************/
-void TPCSector2D::MakeSector3D()
+void AliEveTPCSector2D::MakeSector3D()
{
- TPCSector3D* s = new TPCSector3D;
+ AliEveTPCSector3D* s = new AliEveTPCSector3D;
s->SetDataSource(fTPCData);
s->SetSectorID(fSectorID);
s->SetAutoTrans(fAutoTrans);
/**************************************************************************/
-void TPCSector2D::ComputeBBox()
+void AliEveTPCSector2D::ComputeBBox()
{
- const TPCSectorData::SegmentInfo& iSeg = TPCSectorData::GetInnSeg();
- const TPCSectorData::SegmentInfo& o2Seg = TPCSectorData::GetOut2Seg();
+ const AliEveTPCSectorData::SegmentInfo& iSeg = AliEveTPCSectorData::GetInnSeg();
+ const AliEveTPCSectorData::SegmentInfo& o2Seg = AliEveTPCSectorData::GetOut2Seg();
BBoxInit();
Float_t w = o2Seg.GetNMaxPads()*o2Seg.GetPadWidth()/2;
/**************************************************************************/
-void TPCSector2D::PadSelected(Int_t row, Int_t pad)
+void AliEveTPCSector2D::PadSelected(Int_t row, Int_t pad)
{
// Called when ctrl-mouse-left-click registered over a pad.
// EVE -> Std convention
Int_t sseg = fSectorID, srow = row;
- if (row >= TPCSectorData::GetInnSeg().GetNRows()) {
+ if (row >= AliEveTPCSectorData::GetInnSeg().GetNRows()) {
sseg += 36;
- srow -= TPCSectorData::GetInnSeg().GetNRows();
+ srow -= AliEveTPCSectorData::GetInnSeg().GetNRows();
}
switch (fPickMode)
{
case 0: {
- printf("TPCSector2DGL::ProcessSelection segment=%d, row=%d, pad=%d\n",
+ printf("AliEveTPCSector2DGL::ProcessSelection segment=%d, row=%d, pad=%d\n",
sseg, srow, pad);
break;
}
case 1: {
- TPCSectorData* sectorData = GetSectorData();
+ AliEveTPCSectorData* sectorData = GetSectorData();
if (sectorData == 0) return;
Int_t mint = fMinTime;
Int_t maxt = fMaxTime;
maxt - mint +1 , mint, maxt);
h->SetXTitle("Time");
h->SetYTitle("ADC");
- TPCSectorData::PadIterator i = sectorData->MakePadIterator(row, pad);
+ AliEveTPCSectorData::PadIterator i = sectorData->MakePadIterator(row, pad);
while (i.Next())
h->Fill(i.Time(), i.Signal());
h->Draw();
break;
}
case 2: {
- TPCSectorData* sectorData = GetSectorData();
+ AliEveTPCSectorData* sectorData = GetSectorData();
if (sectorData == 0) return;
Int_t mint = fMinTime;
Int_t maxt = fMaxTime;
- Int_t npad = TPCSectorData::GetNPadsInRow(row);
+ Int_t npad = AliEveTPCSectorData::GetNPadsInRow(row);
TH2S* h = new TH2S(Form("Seg%d_Row%d", sseg, srow),
Form("Segment %d, Row %d", sseg, srow),
maxt - mint +1 , mint, maxt,
h->SetXTitle("Time");
h->SetYTitle("TEvePad");
h->SetZTitle("ADC");
- TPCSectorData::RowIterator i = sectorData->MakeRowIterator(row);
+ AliEveTPCSectorData::RowIterator i = sectorData->MakeRowIterator(row);
while (i.NextPad())
while (i.Next())
h->Fill(i.Time(), i.TEvePad(), i.Signal());
/**************************************************************************/
-void TPCSector2D::Paint(Option_t* )
+void AliEveTPCSector2D::Paint(Option_t* )
{
if(fRnrSelf == kFALSE)
return;
return;
}
- Error("TPCSector2D::Paint", "only direct OpenGL rendering supported.");
+ Error("AliEveTPCSector2D::Paint", "only direct OpenGL rendering supported.");
}