From 5987168b5c5e014736e099eac1785d229ec58b60 Mon Sep 17 00:00:00 2001 From: mtadel Date: Wed, 31 May 2006 18:58:33 +0000 Subject: [PATCH] Merge from EVE-dev. --- EVE/Alieve/ChangeLog | 21 ++ EVE/Alieve/TPCData.cxx | 65 +---- EVE/Alieve/TPCData.h | 3 +- EVE/Alieve/TPCSector2DGL.h | 2 - EVE/Alieve/TPCSector3D.cxx | 5 +- EVE/Alieve/TPCSectorVizEditor.cxx | 173 +++++--------- EVE/Alieve/TPCSectorVizEditor.h | 24 +- EVE/Alieve/alieve_main/alieve_main.cxx | 13 + EVE/ChangeLog | 23 ++ EVE/README | 8 +- EVE/Reve/BoxSet.h | 1 + EVE/Reve/ChangeLog | 23 ++ EVE/Reve/LinkDef.h | 5 + EVE/Reve/RGValuators.cxx | 318 +++++++++++++++++++++++++ EVE/Reve/RGValuators.h | 121 ++++++++++ EVE/Reve/Reve.cxx | 14 +- EVE/Reve/reve_main/reve_main.cxx | 4 - EVE/binalieve.pkg | 43 ++++ EVE/macros/alieve_init.C | 11 +- EVE/macros/alieve_loadlibs.C | 2 + EVE/test-macros/tpc_sector_raw_test.C | 63 ++--- 21 files changed, 698 insertions(+), 244 deletions(-) create mode 100644 EVE/Alieve/alieve_main/alieve_main.cxx create mode 100644 EVE/Reve/RGValuators.cxx create mode 100644 EVE/Reve/RGValuators.h create mode 100644 EVE/binalieve.pkg diff --git a/EVE/Alieve/ChangeLog b/EVE/Alieve/ChangeLog index 39808243320..2c0bb176a42 100644 --- a/EVE/Alieve/ChangeLog +++ b/EVE/Alieve/ChangeLog @@ -1,3 +1,24 @@ +2006-05-31 Matevz Tadel + + * TPCSectorVizEditor.cxx: + * TPCSectorVizEditor.h: + Replaced hand-woven widget-groups with RGValuators. + +2006-05-31 Matevz Tadel + + * TPCData.cxx: + * TPCData.h: + Removed function LoadRaw(AliTPCRawStreamOld&). + + * TPCSector2DGL.h: + Removed forgotten declaration of SetCol(). + + * TPCSector3D.cxx: + In Paint(): properly setup 3D transformation of fBoxSet. + + * alieve_main/alieve_main.cxx: + New file; executable linked against all ALICE libraries. + 2006-05-23 Matevz Tadel EVE-dev diff --git a/EVE/Alieve/TPCData.cxx b/EVE/Alieve/TPCData.cxx index 38b81f1a400..598265e4191 100644 --- a/EVE/Alieve/TPCData.cxx +++ b/EVE/Alieve/TPCData.cxx @@ -140,65 +140,7 @@ void TPCData::LoadDigits(TTree* tree, Bool_t spawnSectors) } } -void TPCData::LoadRaw(AliTPCRawStream& input, Bool_t spawnSectors) -{ - // Load data from AliTPCRawStream. - // If spawnSectors is false only sectors that have been created previously - // via CreateSector() are loaded. - // If spawnSectors is true sectors are created if data for them is encountered. - - Int_t sector = -1, row = -1, pad = -1, rowOffset = 0; - Short_t time, signal; - Bool_t inFill = kFALSE; - TPCSectorData* secData = 0; - - while (input.Next()) { - if (input.IsNewSector()) { - if(inFill) { - secData->EndPad(fAutoPedestal, fLoadThreshold); - inFill = kFALSE; - } - sector = input.GetSector(); - if(sector >= 36) { - sector -= 36; - rowOffset = TPCSectorData::GetInnSeg().GetNRows(); - } else { - rowOffset = 0; - } - secData = GetSectorData(sector, spawnSectors); - } - if (secData == 0) - continue; - - if (input.IsNewPad()) { - if(inFill) { - secData->EndPad(fAutoPedestal, fLoadThreshold); - inFill = kFALSE; - } - row = input.GetRow() + rowOffset; - pad = input.GetPad(); - - secData->BeginPad(row, pad, kTRUE); - inFill = kTRUE; - } - - time = input.GetTime(); - signal = input.GetSignal(); - if(fAutoPedestal) { - secData->RegisterData(time, signal); - } else { - if(signal > fLoadThreshold) - secData->RegisterData(time, signal - fLoadPedestal); - } - } - - if(inFill) { - secData->EndPad(fAutoPedestal, fLoadThreshold); - inFill = kFALSE; - } -} - -void TPCData::LoadRaw(AliTPCRawStreamOld& input, Bool_t spawnSectors, Bool_t warn) +void TPCData::LoadRaw(AliTPCRawStream& input, Bool_t spawnSectors, Bool_t warn) { // Load data from AliTPCRawStream. // If spawnSectors is false only sectors that have been created previously @@ -257,8 +199,9 @@ void TPCData::LoadRaw(AliTPCRawStreamOld& input, Bool_t spawnSectors, Bool_t war signal = input.GetSignal(); if(time >= lastTime) { if(lastTimeWarn == kFALSE) { - Warning(eH.Data(), "time out of order (row=%d, pad=%d, time=%d, lastTime=%d).", - row, pad, time, lastTime); + if(warn) + Warning(eH.Data(), "time out of order (row=%d, pad=%d, time=%d, lastTime=%d).", + row, pad, time, lastTime); lastTimeWarn = kTRUE; } continue; diff --git a/EVE/Alieve/TPCData.h b/EVE/Alieve/TPCData.h index d187f60ea30..719ad306f1a 100644 --- a/EVE/Alieve/TPCData.h +++ b/EVE/Alieve/TPCData.h @@ -50,8 +50,7 @@ public: void SetAutoPedestal(Bool_t ap) { fAutoPedestal = ap; } void LoadDigits(TTree* tree, Bool_t spawnSectors=kTRUE); - void LoadRaw(AliTPCRawStream& input, Bool_t spawnSectors=kTRUE); - void LoadRaw(AliTPCRawStreamOld& input, Bool_t spawnSectors=kTRUE, Bool_t warn=kFALSE); + void LoadRaw(AliTPCRawStream& input, Bool_t spawnSectors=kTRUE, Bool_t warn=kFALSE); ClassDef(TPCData, 1); // Manages TPC data for an event. }; // endclass TPCData diff --git a/EVE/Alieve/TPCSector2DGL.h b/EVE/Alieve/TPCSector2DGL.h index 8f75a9d819e..14b0eea1c80 100644 --- a/EVE/Alieve/TPCSector2DGL.h +++ b/EVE/Alieve/TPCSector2DGL.h @@ -43,8 +43,6 @@ public: virtual Bool_t SetModel(TObject* obj); virtual void SetBBox(); - void SetCol(Float_t z, UChar_t* pixel) const; - static void TraceStepsUp (const TPCSectorData::SegmentInfo& s); static void TraceStepsDown(const TPCSectorData::SegmentInfo& s); diff --git a/EVE/Alieve/TPCSector3D.cxx b/EVE/Alieve/TPCSector3D.cxx index ac63114698f..69accd5b462 100644 --- a/EVE/Alieve/TPCSector3D.cxx +++ b/EVE/Alieve/TPCSector3D.cxx @@ -63,8 +63,11 @@ void TPCSector3D::ComputeBBox() void TPCSector3D::Paint(Option_t* option) { - if(fRnrElement) + if(fRnrElement) { + fBoxSet.SetTrans(fTrans); + memcpy(fBoxSet.ArrTrans(), fMatrix, 16*sizeof(Double_t)); fBoxSet.Paint(option); + } } /**************************************************************************/ diff --git a/EVE/Alieve/TPCSectorVizEditor.cxx b/EVE/Alieve/TPCSectorVizEditor.cxx index 4813b910a86..417865e778b 100644 --- a/EVE/Alieve/TPCSectorVizEditor.cxx +++ b/EVE/Alieve/TPCSectorVizEditor.cxx @@ -3,6 +3,8 @@ #include "TPCSectorVizEditor.h" #include +#include + #include #include @@ -29,23 +31,19 @@ TPCSectorVizEditor::TPCSectorVizEditor(const TGWindow *p, Int_t id, Int_t width, fM = 0; MakeTitle("TPCSectorViz"); - { - TGHorizontalFrame* f = new TGHorizontalFrame(this); - TGLabel *l = new TGLabel(f, "SectorID:"); - f->AddFrame(l, new TGLayoutHints(kLHintsLeft | kLHintsCenterY, 3, 2, 1, 1)); - - fSectorID = new TGNumberEntry(f, 0., 6, -1, - TGNumberFormat::kNESInteger, TGNumberFormat::kNEANonNegative, - TGNumberFormat::kNELLimitMinMax, 0, 35); + Int_t labelW = 60; - fSectorID->GetNumberEntry()->SetToolTipText("0-17 +z plate 18-35 -z plate"); - f->AddFrame(fSectorID, new TGLayoutHints(kLHintsLeft, 1, 1, 1, 1)); - fSectorID->Associate(this); - fSectorID->Connect("ValueSet(Long_t)", - "Alieve::TPCSectorVizEditor", this, "DoSectorID()"); + fSectorID = new RGValuator(this, "SectorID", 110, 0); + fSectorID->SetLabelWidth(labelW); + fSectorID->SetShowSlider(kFALSE); + fSectorID->SetNELength(4); + fSectorID->Build(); + fSectorID->SetLimits(0, 35); + fSectorID->SetToolTip("0-17 +z plate; 18-35 -z plate"); + fSectorID->Connect("ValueSet(Double_t)", + "Alieve::TPCSectorVizEditor", this, "DoSectorID()"); + AddFrame(fSectorID, new TGLayoutHints(kLHintsTop, 1, 1, 1, 1)); - AddFrame(f, new TGLayoutHints(kLHintsTop, 1, 1, 1, 1)); - } { TGHorizontalFrame* f = new TGHorizontalFrame(this); @@ -63,64 +61,37 @@ TPCSectorVizEditor::TPCSectorVizEditor(const TGWindow *p, Int_t id, Int_t width, AddFrame(f, new TGLayoutHints(kLHintsTop, 1, 1, 1, 1)); } - { - TGHorizontalFrame* f = new TGHorizontalFrame(this); - fThresholdLabel = new TGLabel(f, "Threshold [XXX]:"); - f->AddFrame(fThresholdLabel, new TGLayoutHints(kLHintsLeft | kLHintsCenterY, 3, 2, 1, 1)); - - fThreshold = new TGHSlider(f, 150); - fThreshold->SetRange(0,149); - fThreshold->Associate(this); - f->AddFrame(fThreshold, new TGLayoutHints(kLHintsLeft, 0, 5)); - fThreshold->Connect("PositionChanged(Int_t)", - "Alieve::TPCSectorVizEditor", this, "DoThreshold()"); - AddFrame(f, new TGLayoutHints(kLHintsTop, 1, 1, 1, 1)); - } - { - TGHorizontalFrame* f = new TGHorizontalFrame(this); - fMaxValLabel = new TGLabel(f, "MaxValue [XXX]:"); - f->AddFrame(fMaxValLabel, new TGLayoutHints(kLHintsLeft | kLHintsCenterY, 3, 2, 1, 1)); - fMaxVal = new TGHSlider(f, 150); - fMaxVal->SetRange(0,299); - fMaxVal->Associate(this); - f->AddFrame(fMaxVal, new TGLayoutHints(kLHintsLeft, 0, 5)); - fMaxVal->Connect("PositionChanged(Int_t)", - "Alieve::TPCSectorVizEditor", this, "DoMaxVal()"); - AddFrame(f, new TGLayoutHints(kLHintsTop, 1, 1, 1, 1)); - } - { - TGVerticalFrame* vf = new TGVerticalFrame(this); - - TGHorizontalFrame* f = new TGHorizontalFrame(vf); - - TGLabel *l = new TGLabel(f, "Time Range:"); - f->AddFrame(l, new TGLayoutHints(kLHintsLeft | kLHintsCenterY, 1, 2, 1, 1)); - - fMinTime = new TGNumberEntry(f, 0., 6, -1, TGNumberFormat::kNESInteger, TGNumberFormat::kNEANonNegative, - TGNumberFormat::kNELLimitMinMax, 0, 1023); - fMinTime->GetNumberEntry()->SetToolTipText("MinTime"); - f->AddFrame(fMinTime, new TGLayoutHints(kLHintsLeft, 1, 1, 1, 1)); - fMinTime->Associate(this); - fMinTime->Connect("ValueSet(Long_t)", "Alieve::TPCSectorVizEditor", this, "DoMinTime()"); - - fMaxTime = new TGNumberEntry(f, 0., 6, -1, TGNumberFormat::kNESInteger, TGNumberFormat::kNEANonNegative, - TGNumberFormat::kNELLimitMinMax, 0, 1023); - fMaxTime->GetNumberEntry()->SetToolTipText("MaxTime"); - f->AddFrame(fMaxTime, new TGLayoutHints(kLHintsLeft, 1, 1, 1, 1)); - fMaxTime->Associate(this); - fMaxTime->Connect("ValueSet(Long_t)", "Alieve::TPCSectorVizEditor", this, "DoMaxTime()"); - - vf->AddFrame(f, new TGLayoutHints(kLHintsTop, 1, 1, 1, 1)); - - fTime = new TGDoubleHSlider(vf); - fTime->SetRange(0, 1023); - fTime->Resize(250, 20); - vf->AddFrame(fTime);//, new TGLayoutHints(kLHintsLeft, 0, 5)); - fTime->Connect("PositionChanged()", "Alieve::TPCSectorVizEditor", - this, "DoTime()"); - - AddFrame(vf, new TGLayoutHints(kLHintsTop, 1, 1, 1, 1)); - } + + fThreshold = new RGValuator(this, "Threshold", 200, 0); + fThreshold->SetNELength(4); + fThreshold->SetLabelWidth(labelW); + fThreshold->Build(); + fThreshold->GetSlider()->SetWidth(120); + fThreshold->SetLimits(0,149); + fThreshold->Connect("ValueSet(Double_t)", + "Alieve::TPCSectorVizEditor", this, "DoThreshold()"); + AddFrame(fThreshold, new TGLayoutHints(kLHintsTop, 1, 1, 2, 1)); + + fMaxVal = new RGValuator(this,"MaxVal", 200, 0); + fMaxVal->SetNELength(4); + fMaxVal->SetLabelWidth(labelW); + fMaxVal->Build(); + fMaxVal->GetSlider()->SetWidth(120); + fMaxVal->SetLimits(0, 299); + fMaxVal->Connect("ValueSet(Double_t)", + "Alieve::TPCSectorVizEditor", this, "DoMaxVal()"); + AddFrame(fMaxVal, new TGLayoutHints(kLHintsTop, 1, 1, 2, 1)); + + fTime = new RGDoubleValuator(this,"Time", 200, 0); + fTime->SetNELength(4); + fTime->SetLabelWidth(labelW); + fTime->Build(); + fTime->GetSlider()->SetWidth(224); + fTime->SetLimits(0, 1023, TGNumberFormat::kNESInteger); + fTime->Connect("ValueSet()", + "Alieve::TPCSectorVizEditor", this, "DoTime()"); + AddFrame(fTime, new TGLayoutHints(kLHintsTop, 1, 1, 2, 1)); + // Register the editor. TClass *cl = TPCSectorViz::Class(); @@ -150,18 +121,16 @@ void TPCSectorVizEditor::SetModel(TVirtualPad* pad, TObject* obj, Int_t /*event* fM = dynamic_cast(fModel); - fSectorID->SetNumber(fM->fSectorID); - fRnrInn->SetState(fM->fRnrInn ? kButtonDown : kButtonUp); + fSectorID->SetValue(fM->fSectorID); + + fRnrInn ->SetState(fM->fRnrInn ? kButtonDown : kButtonUp); fRnrOut1->SetState(fM->fRnrOut1 ? kButtonDown : kButtonUp); fRnrOut2->SetState(fM->fRnrOut2 ? kButtonDown : kButtonUp); - fThresholdLabel->SetText(Form("Threshold [%3d]:", fM->fThreshold)); - fThreshold->SetPosition(fM->fThreshold); - fMaxValLabel->SetText(Form("MaxValue [%3d]:", fM->fMaxVal)); - fMaxVal->SetPosition(fM->fMaxVal); - fMinTime->SetNumber(fM->fMinTime); - fMaxTime->SetNumber(fM->fMaxTime); - fTime->SetPosition(fM->fMinTime, fM->fMaxTime); + fThreshold->SetValue(fM->fThreshold); + fMaxVal->SetValue(fM->fMaxVal); + + fTime->SetValues(fM->fMinTime, fM->fMaxTime); SetActive(); } @@ -170,7 +139,7 @@ void TPCSectorVizEditor::SetModel(TVirtualPad* pad, TObject* obj, Int_t /*event* void TPCSectorVizEditor::DoSectorID() { - fM->SetSectorID((Int_t) fSectorID->GetNumber()); + fM->SetSectorID((Int_t) fSectorID->GetValue()); Update(); } @@ -198,51 +167,21 @@ void TPCSectorVizEditor::DoRnrOut2() void TPCSectorVizEditor::DoThreshold() { - fM->SetThreshold((Short_t) fThreshold->GetPosition()); - fThresholdLabel->SetText(Form("Threshold [%3d]:", fM->fThreshold)); + fM->SetThreshold((Short_t) fThreshold->GetValue()); Update(); } void TPCSectorVizEditor::DoMaxVal() { - fM->SetMaxVal((Int_t) fMaxVal->GetPosition()); - fMaxValLabel->SetText(Form("MaxValue [%3d]:", fM->fMaxVal)); + fM->SetMaxVal((Int_t) fMaxVal->GetValue()); Update(); } /**************************************************************************/ -void TPCSectorVizEditor::DoMinTime() -{ - Int_t minTime = (Int_t) fMinTime->GetNumber(); - if(minTime > fM->fMaxTime) { - minTime = fM->fMaxTime; - fMinTime->SetNumber(minTime); - } - fM->SetMinTime(minTime); - fTime->SetPosition(minTime, fM->fMaxTime); - Update(); -} - -void TPCSectorVizEditor::DoMaxTime() -{ - Int_t maxTime = (Int_t) fMaxTime->GetNumber(); - if(maxTime < fM->fMinTime) { - maxTime = fM->fMinTime; - fMaxTime->SetNumber(maxTime); - } - fM->SetMaxTime(maxTime); - fTime->SetPosition(fM->fMinTime, maxTime); - Update(); -} - void TPCSectorVizEditor::DoTime() { - Int_t min = (Int_t) TMath::Nint(fTime->GetMinPosition()); - Int_t max = (Int_t) TMath::Nint(fTime->GetMaxPosition()); - fM->SetMinTime(min); - fM->SetMaxTime(max); - fMinTime->SetNumber(min); - fMaxTime->SetNumber(max); + fM->SetMinTime((Int_t) fTime->GetMin()); + fM->SetMaxTime((Int_t) fTime->GetMax()); Update(); } diff --git a/EVE/Alieve/TPCSectorVizEditor.h b/EVE/Alieve/TPCSectorVizEditor.h index 87fd1b241f5..d426ffcfd66 100644 --- a/EVE/Alieve/TPCSectorVizEditor.h +++ b/EVE/Alieve/TPCSectorVizEditor.h @@ -11,6 +11,10 @@ class TGColorSelect; class TGDoubleHSlider; class TGHSlider; +namespace Reve { +class RGValuator; +class RGDoubleValuator; +} namespace Alieve { @@ -21,20 +25,16 @@ class TPCSectorVizEditor : public TGedFrame protected: TPCSectorViz* fM; // fModel dynamic-casted to TPCSectorVizEditor - TGNumberEntry* fSectorID; + Reve::RGValuator* fSectorID; - TGCheckButton* fRnrInn; - TGCheckButton* fRnrOut1; - TGCheckButton* fRnrOut2; + TGCheckButton* fRnrInn; + TGCheckButton* fRnrOut1; + TGCheckButton* fRnrOut2; - TGLabel* fThresholdLabel; - TGLabel* fMaxValLabel; - TGHSlider* fThreshold; - TGHSlider* fMaxVal; + Reve::RGValuator* fThreshold; + Reve::RGValuator* fMaxVal; - TGNumberEntry* fMinTime; - TGNumberEntry* fMaxTime; - TGDoubleHSlider* fTime; + Reve::RGDoubleValuator* fTime; public: TPCSectorVizEditor(const TGWindow* p, Int_t id, Int_t width = 170, Int_t height = 30, UInt_t options = kChildFrame, Pixel_t back = GetDefaultFrameBackground()); @@ -51,8 +51,6 @@ public: void DoThreshold(); void DoMaxVal(); - void DoMinTime(); - void DoMaxTime(); void DoTime(); ClassDef(TPCSectorVizEditor, 0); // Editor for TPCSectorViz diff --git a/EVE/Alieve/alieve_main/alieve_main.cxx b/EVE/Alieve/alieve_main/alieve_main.cxx new file mode 100644 index 00000000000..f6846d3a2dc --- /dev/null +++ b/EVE/Alieve/alieve_main/alieve_main.cxx @@ -0,0 +1,13 @@ +#include +#include + +#include + +int main(int argc, char **argv) +{ + Reve::SetupEnvironment(); + + int r = Reve::RGTopFrame::SpawnGuiAndRun(argc, argv); + Getlinem(kCleanUp, 0); + return r; +} diff --git a/EVE/ChangeLog b/EVE/ChangeLog index 89efd64d8b3..beaeaf83c3c 100644 --- a/EVE/ChangeLog +++ b/EVE/ChangeLog @@ -1,3 +1,26 @@ +2006-05-31 Matevz Tadel + + Merged EVE-dev to HEAD. Re-tagged EVE-dev (EVE-dev-after-merge) and + EVE's HEAD (EVE-head-after-merge). + + * README: + Replaced all mentions of the reve executable with alieve. + +2006-05-31 Matevz Tadel + + * binalieve.pkg: + New file; new executable linked against all ALICE libraries. + + * macros/alieve_init.C: + Removed macro/include path initialization and loading of + libraries. + + * macros/alieve_loadlibs.C: + Added loading of libAlieve. + + * test-macros/tpc_sector_raw_test.C: + Changes for new interface to raw-data reading. + 2006-05-23 Matevz Tadel Merged EVE-dev to HEAD. Re-tagged EVE-dev (EVE-dev-after-merge) and diff --git a/EVE/README b/EVE/README index 0fa8ecc2191..9b88fb07d01 100644 --- a/EVE/README +++ b/EVE/README @@ -16,14 +16,14 @@ Usage 1. Initialize ALICE environment. -2. Spawn 'reve' executable and invoke the alieve_init.C macro, for example: +2. Spawn 'alieve' executable and invoke the alieve_init.C macro, for example: To load first event from current directory: - # reve alieve_init.C + # alieve alieve_init.C To load 5th event from directory /data/my-pp-run: - # reve 'alieve_init.C("/data/my-pp-run", 5)' + # alieve 'alieve_init.C("/data/my-pp-run", 5)' Interactively: - # reve + # alieve root[0] .L alieve_init.C root[1] alieve_init("/somedir") diff --git a/EVE/Reve/BoxSet.h b/EVE/Reve/BoxSet.h index 7ac2118c67c..49d22a81e7b 100644 --- a/EVE/Reve/BoxSet.h +++ b/EVE/Reve/BoxSet.h @@ -51,6 +51,7 @@ public: Bool_t GetTrans() const { return fTrans; } void SetTrans(Bool_t t) { fTrans = t; } + Double_t* ArrTrans() { return fMatrix; } virtual void ComputeBBox(); virtual void Paint(Option_t* option = ""); diff --git a/EVE/Reve/ChangeLog b/EVE/Reve/ChangeLog index 06dd5276e08..67bbd85c6e6 100644 --- a/EVE/Reve/ChangeLog +++ b/EVE/Reve/ChangeLog @@ -1,3 +1,26 @@ +2006-05-31 Matevz Tadel + + EVE-dev branch + + * LinkDef.h: + * RGValuators.cxx: + * RGValuators.h: + New valuator widget classes RGValuator and RGDoubleValuator. + +2006-05-31 Matevz Tadel + + EVE-dev branch + + * BoxSet.h: + Added method ArrTrans(). + + * Reve.cxx: + Added setup of macro/include paths into function + SetupEnvironment(). + + * reve_main/reve_main.cxx: + Removed macro/include path setup. + 2006-05-23 Matevz Tadel EVE-dev branch diff --git a/EVE/Reve/LinkDef.h b/EVE/Reve/LinkDef.h index 0b1df5d7cff..2b934b4dbee 100644 --- a/EVE/Reve/LinkDef.h +++ b/EVE/Reve/LinkDef.h @@ -68,6 +68,11 @@ // RGTopFrame #pragma link C++ class Reve::RGTopFrame+; +// RGValuators +#pragma link C++ class Reve::RGValuatorBase+; +#pragma link C++ class Reve::RGValuator+; +#pragma link C++ class Reve::RGDoubleValuator+; + //================================ // g3d/ //================================ diff --git a/EVE/Reve/RGValuators.cxx b/EVE/Reve/RGValuators.cxx new file mode 100644 index 00000000000..56e3e66b155 --- /dev/null +++ b/EVE/Reve/RGValuators.cxx @@ -0,0 +1,318 @@ +// $Header$ + +#include "RGValuators.h" + +#include +#include +#include + +using namespace Reve; + +/**************************************************************************/ +// RGValuatorBase +/**************************************************************************/ + +ClassImp(RGValuatorBase) + +RGValuatorBase::RGValuatorBase(const TGWindow *p, const char* name, + UInt_t w, UInt_t h) : + TGCompositeFrame(p, w, h), + + fLabelWidth (0), + fAlignRight (kFALSE), + fShowSlider (kTRUE), + + fNELength (5), + fNEHeight (20), + + fLabel (0) +{ + SetName(name); +} + +/**************************************************************************/ +// RGValuator +/**************************************************************************/ + +ClassImp(RGValuator) + +RGValuator::RGValuator(const TGWindow *p, const char* title, + UInt_t w, UInt_t h) : + RGValuatorBase(p, title, w, h), + + fValue (0), + fMin (0), + fMax (0), + + fSliderNewLine (kFALSE), + fSliderSteps (-1), + fEntry (0), + fSlider (0) +{} + +void RGValuator::Build() +{ + TGCompositeFrame *hf1, *hfs; + if(fShowSlider && fSliderNewLine) { + SetLayoutManager(new TGVerticalLayout(this)); + hf1 = new TGHorizontalFrame(this); + hf1->SetLayoutManager(new TGHorizontalLayout(hf1)); + AddFrame(hf1, new TGLayoutHints(kLHintsTop, 0,0,0,0)); + hfs = new TGHorizontalFrame(this); + hfs->SetLayoutManager(new TGHorizontalLayout(hfs)); + AddFrame(hfs, new TGLayoutHints(kLHintsTop, 0,0,0,0)); + } else { + hf1 = this; + hfs = this; + SetLayoutManager(new TGHorizontalLayout(this)); + } + + // label + TGLayoutHints* lh; + if(fAlignRight) + lh = new TGLayoutHints(kLHintsRight | kLHintsBottom, 0,0,0,0); + else + lh = new TGLayoutHints(kLHintsLeft | kLHintsBottom, 0,0,0,0); + + if (fLabelWidth > 0) { + // printf("fLabelWidth > 0 \n"); + TGCompositeFrame *lf = new TGHorizontalFrame(hf1, fLabelWidth, fNEHeight, kFixedSize); + fLabel = new TGLabel(lf, GetName()); + lf->AddFrame(fLabel, lh); + // add label frame to top horizontal frame + TGLayoutHints* lfh = new TGLayoutHints(kLHintsLeft, 0,0,0,0); + hf1->AddFrame(lf, lfh); + } else { + fLabel = new TGLabel(hf1, GetName()); + hf1->AddFrame(fLabel, lh); + } + + // entry + TGLayoutHints* elh = new TGLayoutHints(kLHintsLeft, 1,0,0,0); + fEntry = new TGNumberEntry(hf1, 0, fNELength); + fEntry->SetHeight(fNEHeight); + fEntry->GetNumberEntry()->SetToolTipText("Enter Slider Value"); + hf1->AddFrame(fEntry, elh); + + fEntry->Associate(this); + fEntry->Connect("ValueSet(Long_t)", + "Reve::RGValuator", this, "EntryCallback()"); + + + // slider + if(fShowSlider) { + fSlider = new TGHSlider(hfs, GetWidth(), kSlider1 | kScaleBoth); + hfs->AddFrame(fSlider, new TGLayoutHints(kLHintsLeft, 1,1,0,0)); + + fSlider->Associate(this); + fSlider->Connect("PositionChanged(Int_t)", + "Reve::RGValuator", this, "SliderCallback()"); + } +} + +void RGValuator::SetLimits(Float_t min, Float_t max, Int_t ndiv, + TGNumberFormat::EStyle nef) +{ + fMin = Float_t(min); + fMax = Float_t(max); + fSliderSteps = ndiv; + fEntry->SetFormat(nef); + fEntry->SetLimits(TGNumberFormat::kNELLimitMinMax, min, max); +} + +void RGValuator::SetLimits(Int_t min, Int_t max) +{ + fMin = Float_t(min); + fMax = Float_t(max); + fEntry->SetFormat(TGNumberFormat::kNESInteger); + fEntry->SetLimits(TGNumberFormat::kNELLimitMinMax, min, max); + + if(fSlider){ + fSlider->SetRange(min, max); + fSliderSteps = max - min; + } +} + +void RGValuator::EntryCallback() +{ + fValue = fEntry->GetNumber(); + if(fSlider) { + Int_t pos; + if (fSliderSteps != -1) { + pos = Int_t( fSliderSteps*(fValue - fMin)/(fMax - fMin)); + } else { + pos = Int_t(fValue - fMin); + } + pos += Int_t(fMin); + fSlider->SetPosition(pos); + // printf( "RGValuator::EntryCallback() slider pos %d n", pos); + } + ValueSet(fValue); +} + +void RGValuator::SliderCallback() +{ + Double_t val; + if(fSliderSteps != -1) + val = fMin + fSlider->GetPosition()*Double_t((fMax-fMin))/fSliderSteps; + else + val = Double_t(fSlider->GetPosition()); + + fValue = val; + fEntry->SetNumber(fValue); + ValueSet(fValue); +} + + +void RGValuator::ValueSet(Double_t val) +{ + Emit("ValueSet(Double_t)", val); +} + +void RGValuator::SetValue(Float_t val, Bool_t emit) +{ + fValue = val; + fEntry->SetNumber(fValue); + + if(fSlider){ + fSlider->SetPosition(Int_t((val-fMin)*fSliderSteps/(fMax-fMin))); + // printf("RGValuator::ValueSet slider pos %d\n",fSlider->GetPosition() ); + } + if(emit) + ValueSet(val); +} + +void RGValuator::SetToolTip(const Text_t* tip) +{ + fEntry->GetNumberEntry()->SetToolTipText(tip); +} + +/**************************************************************************/ +// RGDoubleValuator +/**************************************************************************/ + +ClassImp(RGDoubleValuator) + +RGDoubleValuator::RGDoubleValuator(const TGWindow *p, const char* title, + UInt_t w, UInt_t h) : + RGValuatorBase(p, title, w, h), + + fMinEntry(0), + fMaxEntry(0), + fSlider(0) +{} + +void RGDoubleValuator::Build() +{ + TGCompositeFrame *hf1, *hfs; + if(fShowSlider) { + SetLayoutManager(new TGVerticalLayout(this)); + hf1 = new TGHorizontalFrame(this); + hf1->SetLayoutManager(new TGHorizontalLayout(hf1)); + AddFrame(hf1, new TGLayoutHints(kLHintsTop, 0,0,0,0)); + hfs = new TGHorizontalFrame(this); + hfs->SetLayoutManager(new TGHorizontalLayout(hfs)); + AddFrame(hfs, new TGLayoutHints(kLHintsTop, 0,0,0,0)); + } else { + hf1 = this; + hfs = this; + SetLayoutManager(new TGHorizontalLayout(this)); + } + + // label + TGLayoutHints* lh; + if(fAlignRight) + lh = new TGLayoutHints(kLHintsRight | kLHintsBottom, 0,2,0,0); + else + lh = new TGLayoutHints(kLHintsLeft | kLHintsBottom, 0,2,0,0); + + if(fLabelWidth > 0) { + TGCompositeFrame *lf = new TGHorizontalFrame(hf1, fLabelWidth, fNEHeight, kFixedSize); + fLabel = new TGLabel(lf, GetName()); + lf->AddFrame(fLabel, lh); + // add label frame to top horizontal frame + TGLayoutHints* lfh = new TGLayoutHints(kLHintsLeft, 0,0,0,0); + hf1->AddFrame(lf, lfh); + } else { + fLabel = new TGLabel(hf1, GetName()); + hf1->AddFrame(fLabel); + } + + // entries + fMinEntry = new TGNumberEntry(this, 0, fNELength); + fMinEntry->SetHeight(fNEHeight); + fMinEntry->GetNumberEntry()->SetToolTipText("Enter Slider Min Value"); + hf1->AddFrame(fMinEntry, new TGLayoutHints(kLHintsLeft, 1,0,0,0)); + fMinEntry->Connect("ValueSet(Long_t)", + "Reve::RGDoubleValuator", this, "MinEntryCallback()"); + fMinEntry->Associate(this); + + fMaxEntry = new TGNumberEntry(this, 0, fNELength); + fMaxEntry->SetHeight(fNEHeight); + fMaxEntry->GetNumberEntry()->SetToolTipText("Enter Slider Max Value"); + hf1->AddFrame(fMaxEntry, new TGLayoutHints(kLHintsLeft, 2,0,0,0)); + fMaxEntry->Connect("ValueSet(Long_t)", + "Reve::RGDoubleValuator", this, "MaxEntryCallback()"); + fMaxEntry->Associate(this); + + // slider + if(fShowSlider) { + fSlider = new TGDoubleHSlider(hfs, GetWidth(), kDoubleScaleBoth); + hfs->AddFrame(fSlider, new TGLayoutHints(kLHintsTop|kLHintsLeft, 0,0,1,0)); + fSlider->Associate(this); + fSlider->Connect("PositionChanged()", + "Reve::RGDoubleValuator", this, "SliderCallback()"); + } +} + +void RGDoubleValuator::SetLimits(Float_t min, Float_t max, + TGNumberFormat::EStyle nef) +{ + // printf("RGDoubleValuator::SetLimits(Float_t min, Float_t max, Int_ \n"); + fMinEntry->SetLimits(TGNumberFormat::kNELLimitMinMax, min, max); + fMinEntry->SetFormat(nef); + fMaxEntry->SetLimits(TGNumberFormat::kNELLimitMinMax, min, max); + fMaxEntry->SetFormat(nef); + + if(fSlider) fSlider->SetRange(min, max); +} + +void RGDoubleValuator::MinEntryCallback() +{ + if(GetMin() > GetMax()) + fMaxEntry->SetNumber(GetMin()); + if(fSlider) fSlider->SetPosition(GetMin(), GetMax()); + ValueSet(); +} + +void RGDoubleValuator::MaxEntryCallback() +{ + if(GetMax() < GetMin()) + fMinEntry->SetNumber(GetMax()); + if(fSlider) fSlider->SetPosition(GetMin(), GetMax()); + ValueSet(); +} + +void RGDoubleValuator::SliderCallback() +{ + Float_t minp, maxp; + fSlider->GetPosition(minp, maxp); + //printf("RGDoubleValuator::SliderCallback %f %f\n", minp, maxp); + fMinEntry->SetNumber(minp); + fMaxEntry->SetNumber(maxp); + ValueSet(); +} + +void RGDoubleValuator::SetValues(Float_t min, Float_t max, Bool_t emit) +{ + fMinEntry->SetNumber(min); + fMaxEntry->SetNumber(max); + + if(fSlider) fSlider->SetPosition(min, max); + if(emit) ValueSet(); +} + +void RGDoubleValuator::ValueSet() +{ + Emit("ValueSet()"); +} diff --git a/EVE/Reve/RGValuators.h b/EVE/Reve/RGValuators.h new file mode 100644 index 00000000000..5216aaebc6f --- /dev/null +++ b/EVE/Reve/RGValuators.h @@ -0,0 +1,121 @@ +// $Header$ + +#ifndef REVE_RGValuators_H +#define REVE_RGValuators_H + +#include + +class TGLabel; +class TGHSlider; +class TGDoubleHSlider; + + +namespace Reve { + +class RGValuatorBase: public TGCompositeFrame +{ +protected: + UInt_t fLabelWidth; + Bool_t fAlignRight; + Bool_t fShowSlider; + + Int_t fNELength; + Int_t fNEHeight; + + TGLabel* fLabel; + +public: + RGValuatorBase(const TGWindow *p, const char* title, UInt_t w, UInt_t h); + virtual ~RGValuatorBase() {} + + virtual void Build() = 0; + + void SetLabelWidth(Int_t w) { fLabelWidth = w; } + void SetAlignRight(Bool_t a) { fAlignRight = a; } + void SetShowSlider(Bool_t s=kTRUE) { fShowSlider = s; } + + void SetNELength(Int_t l) { fNELength = l; } + void SetNEGeight(Int_t h) { fNEHeight = h; } + + ClassDef(RGValuatorBase, 0); +}; // endclass RGValuatorBase + +/**************************************************************************/ + +class RGValuator: public RGValuatorBase +{ +protected: + Float_t fValue; + Float_t fMin; + Float_t fMax; + + Bool_t fSliderNewLine; + Int_t fSliderSteps; + TGNumberEntry* fEntry; + TGHSlider* fSlider; + +public: + RGValuator(const TGWindow *p, const char* title, UInt_t w, UInt_t h); + virtual ~RGValuator() {} + + virtual void Build(); + + Float_t GetValue() const { return fValue; } + virtual void SetValue(Float_t v, Bool_t emit=kFALSE); + + void SliderCallback(); + void EntryCallback(); + void ValueSet(Double_t); //*SIGNAL* + + TGHSlider* GetSlider() { return fSlider; } + TGNumberEntry* GetEntry() { return fEntry; } + + void SetSliderNewLine(Bool_t nl) { fSliderNewLine = nl; } + + void SetLimits(Int_t min, Int_t max); + void SetLimits(Float_t min, Float_t max, Int_t nsteps, + TGNumberFormat::EStyle nef=TGNumberFormat::kNESRealTwo); + + void SetToolTip(const Text_t* tip); + + ClassDef(RGValuator, 0); +}; // endclass RGValuator + +/**************************************************************************/ + +class RGDoubleValuator: public RGValuatorBase +{ +protected: + TGNumberEntry* fMinEntry; + TGNumberEntry* fMaxEntry; + TGDoubleHSlider* fSlider; + +public: + RGDoubleValuator(const TGWindow *p, const char* title, UInt_t w, UInt_t h); + virtual ~RGDoubleValuator() {} + + virtual void Build(); + + void MinEntryCallback(); + void MaxEntryCallback(); + void SliderCallback(); + void ValueSet(); //*SIGNAL* + + TGDoubleHSlider* GetSlider() { return fSlider; } + TGNumberEntry* GetMinEntry() { return fMinEntry; } + TGNumberEntry* GetMaxEntry() { return fMaxEntry; } + + void SetLimits(Float_t min, Float_t max, TGNumberFormat::EStyle nef=TGNumberFormat::kNESRealTwo); + void SetValues(Float_t min, Float_t max, Bool_t emit=kFALSE); + + void GetValues(Float_t& min, Float_t& max) const + { min = fMinEntry->GetNumber(); max = fMaxEntry->GetNumber(); } + Float_t GetMin() const { return fMinEntry->GetNumber(); } + Float_t GetMax() const { return fMaxEntry->GetNumber(); } + + ClassDef(RGDoubleValuator, 0); +}; // endclass RGDoubleValuator + +} + +#endif diff --git a/EVE/Reve/Reve.cxx b/EVE/Reve/Reve.cxx index 324d62f9353..18913367642 100644 --- a/EVE/Reve/Reve.cxx +++ b/EVE/Reve/Reve.cxx @@ -8,6 +8,7 @@ #include #include +#include #include @@ -60,7 +61,8 @@ Color_t* FindColorVar(TObject* obj, const Text_t* varname) void SetupEnvironment() { - // Check REVESYS exists, try fallback to $ALICE_ROOT/EVE. + // Check if REVESYS exists, try fallback to $ALICE_ROOT/EVE. + // Setup Include and Macro paths. static const Exc_t eH("Reve::SetupEnvironment"); @@ -77,6 +79,16 @@ void SetupEnvironment() Error(eH.Data(), "REVESYS '%s' does not exist.", gSystem->Getenv("REVESYS")); gSystem->Exit(1); } + + TString macPath(gROOT->GetMacroPath()); + macPath += Form(":%s/macros", gSystem->Getenv("REVESYS")); + gInterpreter->AddIncludePath(gSystem->Getenv("REVESYS")); + if(gSystem->Getenv("ALICE_ROOT") != 0) { + macPath += Form(":%s/alice-macros", gSystem->Getenv("REVESYS")); + gInterpreter->AddIncludePath(Form("%s/include", gSystem->Getenv("ALICE_ROOT"))); + gInterpreter->AddIncludePath(gSystem->Getenv("ALICE_ROOT")); + } + gROOT->SetMacroPath(macPath); } /**************************************************************************/ diff --git a/EVE/Reve/reve_main/reve_main.cxx b/EVE/Reve/reve_main/reve_main.cxx index ade40803c52..f6846d3a2dc 100644 --- a/EVE/Reve/reve_main/reve_main.cxx +++ b/EVE/Reve/reve_main/reve_main.cxx @@ -1,16 +1,12 @@ #include #include -#include #include int main(int argc, char **argv) { Reve::SetupEnvironment(); - gROOT->SetMacroPath(Form(".:%s/macros", gSystem->Getenv("REVESYS"))); - gInterpreter->AddIncludePath(Form("%s/macros", gSystem->Getenv("REVESYS"))); - int r = Reve::RGTopFrame::SpawnGuiAndRun(argc, argv); Getlinem(kCleanUp, 0); return r; diff --git a/EVE/binalieve.pkg b/EVE/binalieve.pkg new file mode 100644 index 00000000000..d64ea8c52a5 --- /dev/null +++ b/EVE/binalieve.pkg @@ -0,0 +1,43 @@ +SRCS := Alieve/alieve_main/alieve_main.cxx +CSRCS := + +EINCLUDE := +ELIBSDIR := +ELIBS := Reve Alieve \ + MUONgeometry MUONrec MUONsim MUONbase MUONraw MUONmapping \ + TPCbase TPCsim TPCrec TPCfast \ + ITSbase ITSsim ITSrec PMDbase PMDsim PMDrec TRDbase \ + TRDsim TRDrec TRDfast \ + FMDbase FMDsim FMDrec TOFbase TOFrec TOFsim PHOSbase PHOSsim PHOSrec CRT \ + RICHbase RICHrec RICHsim \ + ZDCbase ZDCsim ZDCrec VZERObase VZEROsim VZEROrec \ + EMCALbase EMCALsim EMCALrec EMCALjet \ + STRUCT STARTbase STARTsim STARTrec EVGEN ESD STEER \ + pythia6 AliPythia6 pdf THijing \ + hijing TMEVSIM mevsim THbtp HBTP TEPEMGEN EPEMGEN \ + FASTSIM microcern RAWData AliL3Src AliL3Comp AliL3Misc AliL3MUON \ + AliL3Hough AliL3ITS \ +# THerwig herwig TPHIC + +PACKBLIBS := $(ROOTCLIBS) $(ROOTPLIBS) -lTreePlayer -lGeomPainter -lGed -lRGL $(SYSLIBS) + + +ifeq (macosx,$(ALICE_TARGET)) + +# On Mac OS X gcc we need GL +ELIBS+=GL +ELIBSDIR+=/usr/X11R6/lib/ +# On Mac OS X gcc we need f2c +ELIBS+=f2c +ELIBSDIR+=$(dir $(shell find $(FINK_ROOT) -name 'libf2c.*')) + +ELIBSCPP:=$(filter-out microcern,$(ELIBS)) +ELIBSCPP:=$(filter-out pdf,$(ELIBSCPP)) +ELIBSCPP:=$(filter-out mevsim,$(ELIBSCPP)) +ELIBSCPP:=$(filter-out HBTP,$(ELIBSCPP)) +ELIBSCPP:=$(filter-out herwig,$(ELIBSCPP)) +ELIBSCPP:=$(filter-out EPEMGEN,$(ELIBSCPP)) + +PACKLDFLAGS:=$(LDFLAGS) $(ELIBSCPP:%=-Wl,-u,_G__cpp_setupG__%) + +endif diff --git a/EVE/macros/alieve_init.C b/EVE/macros/alieve_init.C index 62f52b14ae7..0b67adc1437 100644 --- a/EVE/macros/alieve_init.C +++ b/EVE/macros/alieve_init.C @@ -7,15 +7,8 @@ void alieve_init(const Text_t* path=".", Int_t event=0, // Set-up environment, load libraries. Reve::SetupEnvironment(); - - gROOT->SetMacroPath(Form("%s:%s/alice-macros:%s/macros", - gROOT->GetMacroPath(), - gSystem->Getenv("REVESYS"), - gSystem->Getenv("ALICE_ROOT"))); - gInterpreter->AddIncludePath(Form("%s/macros", gSystem->Getenv("ALICE_ROOT"))); - - Reve::AssertMacro("alieve_loadlibs.C"); - gSystem->Load("libAlieve.so"); + // alieve executable linked against ALICE nad EVE shared libraries. + // Reve::AssertMacro("alieve_loadlibs.C"); // Put macros in the list of browsables, spawn a browser. diff --git a/EVE/macros/alieve_loadlibs.C b/EVE/macros/alieve_loadlibs.C index 94caacd217d..5fb37c3fc64 100644 --- a/EVE/macros/alieve_loadlibs.C +++ b/EVE/macros/alieve_loadlibs.C @@ -99,5 +99,7 @@ void alieve_loadlibs () gSystem->Load("libAliL3Hough"); gSystem->Load("libANALYSIS"); + gSystem->Load("libAlieve.so"); + printf(" done.\n"); } diff --git a/EVE/test-macros/tpc_sector_raw_test.C b/EVE/test-macros/tpc_sector_raw_test.C index 161633752dd..85fe006b5f7 100644 --- a/EVE/test-macros/tpc_sector_raw_test.C +++ b/EVE/test-macros/tpc_sector_raw_test.C @@ -20,46 +20,41 @@ TPCData* x = 0; TPCSector2D* s = 0; TPCSector3D* t = 0; -AliRawReaderRoot* reader = 0; +AliRawReaderRoot* reader = 0; Int_t event = -1; +Int_t default_sector = 13; void tpc_sector_raw_test(const char *file = "", Int_t ievent = 0) { - // gROOT->Macro("alieve_loadlibs.C"); - // Only sub-set of ALICE libraries is needed: - gSystem->Load("libESD"); - gSystem->Load("libSTEER"); - gSystem->Load("libRAWData"); - gSystem->Load("libTPCbase"); - gSystem->Load("libTPCrec"); - gSystem->Load("libTPCsim"); - // ALICE visualization - gSystem->Load("libAlieve"); - gStyle->SetPalette(1, 0); reader = new AliRawReaderRoot(file); - reader->RequireHeader(kFALSE); + reader->LoadEquipmentIdsMap + (gSystem->ExpandPathName("$(ALICE_ROOT)/TPC/mapping/EquipmentIdMap.data")); reader->Reset(); - for(Int_t i=0; iNextEvennt(); + for(Int_t i=0; iNextEvent() == kFALSE) { + printf("End of raw stream at event %d (reqired event %d).\n", i, ievent); + return; + } + } x = new TPCData; - //x->SetLoadPedestal(5); + // x->SetLoadPedestal(5); x->SetLoadThreshold(5); x->SetAutoPedestal(kTRUE); s = new TPCSector2D(); - // s->SetSectorID(0); // 0 is default - // s->SetTrans(kTRUE); // place on proper 3D coordinates + s->SetSectorID(default_sector); + s->SetTrans(kTRUE); // place on proper 3D coordinates s->SetDataSource(x); s->SetFrameColor(36); gReve->AddRenderElement(s); gReve->DrawRenderElement(s); t = new TPCSector3D(); - // t->SetSectorID(0); - // t->SetTrans(kTRUE); + t->SetSectorID(default_sector); + t->SetTrans(kTRUE); t->SetDataSource(x); t->SetMaxTime(1023); t->SetDriftVel(2.273); @@ -71,12 +66,22 @@ void tpc_sector_raw_test(const char *file = "", Int_t ievent = 0) void next_event() { - reader->NextEvent(); - ++event; + if(reader->NextEvent() == kTRUE) { + ++event; + } else { + printf("Reached end of stream, rewinding to first event.\n"); + event = 0; + reader->RewindEvents(); + reader->NextEvent(); + } printf("Now loading event %d\n", event); - AliTPCRawStreamOld input(reader); - reader->SelectEquipment(-1); + reader->Reset(); + AliTPCRawStream input(reader); + input.SetOldRCUFormat(kTRUE); + // reader->Select(0, firstRCU, lastRCU); + + x->DropAllSectors(); x->LoadRaw(input, kTRUE, kTRUE); printf("Updating scene\n"); @@ -87,17 +92,15 @@ void next_event() void tpc_raw_pad_dump(Int_t s, Int_t r, Int_t p) { - reader->Reset(); - reader->NextEvent(); - if(r >= TPCSectorData::GetInnSeg().GetNRows()) { r -= TPCSectorData::GetInnSeg().GetNRows(); s += 36; } - // AliTPCRawStream input(reader); - AliTPCRawStreamOld input(reader); - reader->SelectEquipment(-1); + reader->Reset(); + AliTPCRawStream input(reader); + input.SetOldRCUFormat(kTRUE); + // reader->Select(0, firstRCU, lastRCU); Int_t sector = input.GetSector(); Int_t row = input.GetRow(); -- 2.39.3