From 9016a84e6d7d558ebbbd3ad2ce2fa817c5e86940 Mon Sep 17 00:00:00 2001 From: ivana Date: Fri, 18 Jan 2008 14:56:27 +0000 Subject: [PATCH] Update of classes in libMUONgraphics and mchview program: - Small fixes wrt to sizes so interface buttons appear even on a really small screen - Adding comments, fixed coding conventions (Laurent) --- MUON/AliMUONAttPainter.h | 1 + MUON/AliMUONBusPatchPainter.h | 2 +- MUON/AliMUONPCBPainter.cxx | 2 +- MUON/AliMUONPainterColorSlider.cxx | 2 +- MUON/AliMUONPainterContourMaker.h | 28 +++++++++++++++++++---- MUON/AliMUONPainterHelper.h | 3 +++ MUON/AliMUONPainterInterfaceHelper.h | 1 + MUON/AliMUONPainterMasterFrame.cxx | 7 +++--- MUON/AliMUONPainterMasterFrame.h | 1 - MUON/AliMUONPainterMatrix.cxx | 3 +++ MUON/AliMUONPainterMatrix.h | 2 -- MUON/AliMUONPainterMatrixFrame.cxx | 4 ++-- MUON/AliMUONTrackerData.cxx | 3 +++ MUON/AliMUONTrackerData.h | 3 +++ MUON/AliMUONTrackerOCDBDataMaker.h | 9 ++++++++ MUON/AliMUONTrackerRawDataMaker.h | 9 ++++++++ MUON/AliMUONVPainter.cxx | 8 +++---- MUON/AliMUONVPainter.h | 17 ++++++++++++++ MUON/AliMUONVTrackerData.h | 20 ++++++++++++++++ MUON/AliMUONVTrackerDataMaker.h | 9 ++++++++ MUON/READMEmchview.txt | 34 +++++++++++++--------------- MUON/mchview.cxx | 14 ++++++------ MUON/rootlogon.C | 2 +- 23 files changed, 138 insertions(+), 46 deletions(-) diff --git a/MUON/AliMUONAttPainter.h b/MUON/AliMUONAttPainter.h index 5dcdb7f3436..4945628d744 100644 --- a/MUON/AliMUONAttPainter.h +++ b/MUON/AliMUONAttPainter.h @@ -23,6 +23,7 @@ class AliMUONAttPainter : public TObject { public: + /// Internal status bits enum EBits { kIsCathode0 = BIT(14), kIsCathode1 = BIT(15), diff --git a/MUON/AliMUONBusPatchPainter.h b/MUON/AliMUONBusPatchPainter.h index 2c9b888fdd3..feaec92127a 100644 --- a/MUON/AliMUONBusPatchPainter.h +++ b/MUON/AliMUONBusPatchPainter.h @@ -40,7 +40,7 @@ public: void PaintArea(const AliMUONVTrackerData& data, Int_t dataIndex, Double_t min, Double_t max); - TString Describe(const AliMUONVTrackerData& data, Int_t, + TString Describe(const AliMUONVTrackerData& data, Int_t dataIndex, Double_t x = FLT_MAX, Double_t y = FLT_MAX); virtual AliMUONAttPainter Validate(const AliMUONAttPainter& attributes) const; diff --git a/MUON/AliMUONPCBPainter.cxx b/MUON/AliMUONPCBPainter.cxx index 88fb5032436..c07aa4a8a46 100644 --- a/MUON/AliMUONPCBPainter.cxx +++ b/MUON/AliMUONPCBPainter.cxx @@ -35,7 +35,7 @@ #include "AliMpSlat.h" #include "AliLog.h" -/// \cond(CLASSIMP) +/// \cond CLASSIMP ClassImp(AliMUONPCBPainter) /// \endcond diff --git a/MUON/AliMUONPainterColorSlider.cxx b/MUON/AliMUONPainterColorSlider.cxx index 1b1c0365567..21825d4d5a3 100644 --- a/MUON/AliMUONPainterColorSlider.cxx +++ b/MUON/AliMUONPainterColorSlider.cxx @@ -44,7 +44,7 @@ AliMUONPainterColorSlider::AliMUONPainterColorSlider(const TGWindow* p, /// ctor Int_t ndivisions(20); - Int_t hsize = 20; + Int_t hsize = (h-100)/(ndivisions+2); Int_t topBorder(5); Double_t min(0.0); diff --git a/MUON/AliMUONPainterContourMaker.h b/MUON/AliMUONPainterContourMaker.h index 2206897db42..8333aff2378 100644 --- a/MUON/AliMUONPainterContourMaker.h +++ b/MUON/AliMUONPainterContourMaker.h @@ -63,14 +63,19 @@ public: public: + /// \ingroup graphics + /// \brief Store information about one pad's neighbours. + /// \authorLaurent Aphecetche, Subatech class AliMUONNeighbour : public TObject { public: + /// default ctor AliMUONNeighbour() : fID(-1), fPosition(), fDimensions(), fLeft(kFALSE), fRight(kFALSE), fTop(kFALSE), fBottom(kFALSE) {} + /// normal ctor AliMUONNeighbour(Int_t absID, const TVector2& position, const TVector2& dimensions, @@ -80,26 +85,39 @@ public: fLeft(hasLeftNeighbour), fRight(hasRightNeighbour), fTop(hasTopNeighbour), fBottom(hasBottomNeighbour) {} + /// dtor virtual ~AliMUONNeighbour() {} + /// we are sortable virtual Bool_t IsSortable() const { return kTRUE; } virtual Int_t Compare(const TObject* object) const; + /// our id Int_t ID() const { return fID; } + + /// Whether we have a neighbour on our left Bool_t HasLeftNeighbour() const { return fLeft; } + /// Whether we have a neighbour on our right Bool_t HasRightNeighbour() const { return fRight; } + /// Whether we have a neighbour above Bool_t HasTopNeighbour() const { return fTop; } + /// Whether we have a neighbour below Bool_t HasBottomNeighbour() const { return fBottom; } + /// Our position TVector2 Position() const { return fPosition; } + /// Our (half-)dimensions TVector2 Dimensions() const { return fDimensions; } + /// Lower left corner TVector2 LowerLeft() const { return fPosition - fDimensions; } + /// Upper right corner TVector2 UpperRight() const { return fPosition + fDimensions; } void Print(Option_t* opt="") const; + /// Set our position void SetPosition(Double_t x, Double_t y) { fPosition.Set(x,y); } private: @@ -114,11 +132,6 @@ private: ClassDef(AliMUONNeighbour,1) // Neighbour internal class }; -private: - /// not implemented - AliMUONPainterContourMaker(const AliMUONPainterContourMaker& rhs); - /// not implemented - AliMUONPainterContourMaker& operator=(const AliMUONPainterContourMaker& rhs); public: @@ -205,6 +218,11 @@ public: Bool_t ShouldBeRemoved(const TObjArray& contours, Double_t x, Double_t y) const; private: + /// not implemented + AliMUONPainterContourMaker(const AliMUONPainterContourMaker& rhs); + /// not implemented + AliMUONPainterContourMaker& operator=(const AliMUONPainterContourMaker& rhs); + AliMpExMap* fGlobalTransformations; ///< store of global transformations for DEs TMap* fLocalManuContours; ///< store for local contours of all manus TMap* fContours; ///< store for all our contours diff --git a/MUON/AliMUONPainterHelper.h b/MUON/AliMUONPainterHelper.h index 42a4ecee765..728a6df5191 100644 --- a/MUON/AliMUONPainterHelper.h +++ b/MUON/AliMUONPainterHelper.h @@ -92,6 +92,7 @@ public: AliMUONPainterContour* GetContour(const char* contourName) const; + /// Return a contour by name AliMUONPainterContour* GetContour(const TString& contourName) const { return GetContour(contourName.Data()); } AliMUONPainterContour* GetLocalManuContour(Int_t detElemId, Int_t manuId) const; @@ -148,10 +149,12 @@ public: void Save(); + /// Return the pad store const AliMUONPainterPadStore& PadStore() const { return *fPadStore; } TString FormatValue(const char* name, Double_t value) const; + /// Return the environment AliMUONPainterEnv* Env() { return fEnv; } private: diff --git a/MUON/AliMUONPainterInterfaceHelper.h b/MUON/AliMUONPainterInterfaceHelper.h index 360fd2a3333..8bd27a3f02c 100644 --- a/MUON/AliMUONPainterInterfaceHelper.h +++ b/MUON/AliMUONPainterInterfaceHelper.h @@ -37,6 +37,7 @@ public: void* userData=0x0, Bool_t select=kFALSE); + /// Id of first button in a group static Int_t ButtonStartingId() { return 1; } static void ClearButtons(TGButtonGroup& bg); diff --git a/MUON/AliMUONPainterMasterFrame.cxx b/MUON/AliMUONPainterMasterFrame.cxx index 63fdb74d952..7627879a9ee 100644 --- a/MUON/AliMUONPainterMasterFrame.cxx +++ b/MUON/AliMUONPainterMasterFrame.cxx @@ -126,7 +126,8 @@ AliMUONPainterMasterFrame::AliMUONPainterMasterFrame(const TGWindow* p, UInt_t w1 = wi; - UInt_t h1 = hi - fNavigationFrame->GetHeight() - 3*fgkBorderSize; + // UInt_t h1 = hi - fNavigationFrame->GetHeight() - 3*fgkBorderSize; + UInt_t h1 = hi - 7*12; MakeTopPainterMatrix(w1,h1); @@ -171,8 +172,8 @@ AliMUONPainterMasterFrame::AddPainterMatrix(AliMUONPainterMatrix* painterMatrix) void AliMUONPainterMasterFrame::PainterMatrixWantToShow(AliMUONPainterMatrix* group) { - // FIXME: should check whether we are the active window before - // responding to this message + /// FIXME: should check whether we are the active window before + /// responding to this message ? AliDebug(1,Form("group=%x %s",group,group->GetName())); diff --git a/MUON/AliMUONPainterMasterFrame.h b/MUON/AliMUONPainterMasterFrame.h index 4e875879033..21e3074ab6d 100644 --- a/MUON/AliMUONPainterMasterFrame.h +++ b/MUON/AliMUONPainterMasterFrame.h @@ -59,7 +59,6 @@ private: AliMUONPainterMasterFrame& operator=(const AliMUONPainterMasterFrame& rhs); void AddPainterMatrix(AliMUONPainterMatrix* group); - void AddPainter(AliMUONVPainter* painter); void MakeTopPainterMatrix(UInt_t w, UInt_t h); void SetNavigation(Int_t i); void ShowPainterMatrix(AliMUONPainterMatrix* group); diff --git a/MUON/AliMUONPainterMatrix.cxx b/MUON/AliMUONPainterMatrix.cxx index ac82cadfda8..1953fd272a6 100644 --- a/MUON/AliMUONPainterMatrix.cxx +++ b/MUON/AliMUONPainterMatrix.cxx @@ -261,6 +261,7 @@ AliMUONPainterMatrix::Painter(Int_t index) const AliMUONVTrackerData* AliMUONPainterMatrix::Data() const { + /// Return our data AliMUONPainterGroup* group = Painter(0)->PlotterGroup(); return ( group ? group->Data() : 0x0 ); } @@ -269,6 +270,7 @@ AliMUONPainterMatrix::Data() const TString AliMUONPainterMatrix::DataPattern() const { + /// Return our data pattern AliMUONPainterGroup* group = Painter(0)->PlotterGroup(); return ( group ? group->Type() : "" ); } @@ -277,6 +279,7 @@ AliMUONPainterMatrix::DataPattern() const Int_t AliMUONPainterMatrix::DataIndex() const { + /// Return our data index AliMUONPainterGroup* group = Painter(0)->PlotterGroup(); return ( group ? group->DataIndex() : -1 ); } diff --git a/MUON/AliMUONPainterMatrix.h b/MUON/AliMUONPainterMatrix.h index b5e50a193e4..3dc3b6bf1f1 100644 --- a/MUON/AliMUONPainterMatrix.h +++ b/MUON/AliMUONPainterMatrix.h @@ -42,8 +42,6 @@ public: void Connect(const char* sourceMethod, const char* destClassName, void* destObject, const char* destMethod); -// void ChangeAttributes(const AliMUONAttPainter& attributes); - /// Get our attributes const AliMUONAttPainter& Attributes() const { return fAttributes; } diff --git a/MUON/AliMUONPainterMatrixFrame.cxx b/MUON/AliMUONPainterMatrixFrame.cxx index 25147a8016e..efea6cc28f7 100644 --- a/MUON/AliMUONPainterMatrixFrame.cxx +++ b/MUON/AliMUONPainterMatrixFrame.cxx @@ -82,14 +82,14 @@ AliMUONPainterMatrixFrame::AliMUONPainterMatrixFrame(const TGWindow* window, const Int_t kColorWidth = 100; - fColorSlider = new AliMUONPainterColorSlider(fMainFrame,kColorWidth,hi); + fColorSlider = new AliMUONPainterColorSlider(fMainFrame,kColorWidth,fCanvasHeight); fView = new TRootEmbeddedCanvas("ec",fMainFrame,fCanvasWidth-kColorWidth,fCanvasHeight,kChildFrame); fInterface = new TGHorizontalFrame(this,fCanvasWidth); fMainFrame->AddFrame(fView, new TGLayoutHints(kLHintsLeft)); - fMainFrame->AddFrame(fColorSlider,new TGLayoutHints(kLHintsRight|kLHintsExpandX|kLHintsCenterY,kBorderSize/2)); + fMainFrame->AddFrame(fColorSlider,new TGLayoutHints(kLHintsTop|kLHintsRight|kLHintsExpandX|kLHintsCenterY,kBorderSize/2)); AliMUONPainterInterfaceHelper::SetBackgroundColor("MatrixFrame.ColorSlider",*fColorSlider); diff --git a/MUON/AliMUONTrackerData.cxx b/MUON/AliMUONTrackerData.cxx index f37e91ce928..5f23595a0aa 100644 --- a/MUON/AliMUONTrackerData.cxx +++ b/MUON/AliMUONTrackerData.cxx @@ -607,6 +607,8 @@ AliMUONTrackerData::InternalAdd(const AliMUONVStore& store) Double_t AliMUONTrackerData::Manu(Int_t detElemId, Int_t manuId, Int_t dim) const { + /// Return the value for a given manu and a given dimension + AliMUONVCalibParam* param = ManuParam(detElemId,manuId); return param ? Value(*param,0,dim) : 0.0; } @@ -615,6 +617,7 @@ AliMUONTrackerData::Manu(Int_t detElemId, Int_t manuId, Int_t dim) const AliMUONVCalibParam* AliMUONTrackerData::ManuParam(Int_t detElemId, Int_t manuId) const { + /// Get the VCalibParam for a given manu return fManuValues ? static_cast (fManuValues->FindObject(detElemId,manuId)) : 0x0 ; } diff --git a/MUON/AliMUONTrackerData.h b/MUON/AliMUONTrackerData.h index 5098e3a160b..a824127ca5e 100644 --- a/MUON/AliMUONTrackerData.h +++ b/MUON/AliMUONTrackerData.h @@ -54,6 +54,7 @@ public: virtual Bool_t HasPCB(Int_t detElemId, Int_t pcbIndex) const; + /// Whether we can be run virtual Bool_t IsRunnable() const { return fIsRunnable; } virtual Double_t Manu(Int_t detElemId, Int_t manuId, Int_t dim=0) const; @@ -87,8 +88,10 @@ public: virtual AliMUONVCalibParam* PCBParam(Int_t detElemId, Int_t pcbIndex) const; + /// Index of the dimension containing the number of time an item was hit virtual Int_t IndexOfNumberDimension() const { return fDimension - 1; } + /// Index of the dimension containing the occupancy number virtual Int_t IndexOfOccupancyDimension() const { return fDimension - 2; } private: diff --git a/MUON/AliMUONTrackerOCDBDataMaker.h b/MUON/AliMUONTrackerOCDBDataMaker.h index 411990f6a55..53aef5bebc9 100644 --- a/MUON/AliMUONTrackerOCDBDataMaker.h +++ b/MUON/AliMUONTrackerOCDBDataMaker.h @@ -27,25 +27,34 @@ public: const char* type=""); virtual ~AliMUONTrackerOCDBDataMaker(); + /// Whether we've been properly initialized or not Bool_t IsValid() const { return fIsValid; } + /// Return our data virtual AliMUONVTrackerData* Data() const { return fData; } + /// We are not runnable (i.e. # of event is fixed = 1) virtual Bool_t IsRunnable() const { return kFALSE; } + /// We cannot be running as we are not runnable... virtual Bool_t IsRunning() const { return kFALSE; } + /// N/A virtual void SetRunning(Bool_t /*flag*/) {} + /// N/A virtual Bool_t NextEvent() { return kTRUE; } + /// N/A virtual void Rewind() { } /// Whether we're owner of our data virtual void SetOwner(Bool_t flag) { fIsOwner = flag; } + /// Set our source URI virtual void SetSource(const char* source) { fSource = source; } + /// Get our source URI virtual TString Source() const { return fSource; } private: diff --git a/MUON/AliMUONTrackerRawDataMaker.h b/MUON/AliMUONTrackerRawDataMaker.h index 16e9129e1e2..d16e1c2e7bb 100644 --- a/MUON/AliMUONTrackerRawDataMaker.h +++ b/MUON/AliMUONTrackerRawDataMaker.h @@ -33,14 +33,19 @@ public: AliMUONTrackerRawDataMaker(AliRawReader* reader = 0x0, const char* cdbpath=0x0); virtual ~AliMUONTrackerRawDataMaker(); + /// Whether we have a valid raw reader Bool_t IsValid() const { return fRawReader != 0x0; } + /// Our data AliMUONVTrackerData* Data() const { return fAccumulatedData; } + /// We can be run virtual Bool_t IsRunnable() const { return kTRUE; } + /// Whether we are running or not virtual Bool_t IsRunning() const { return fIsRunning; } + /// Set the running status virtual void SetRunning(Bool_t flag) { fIsRunning = flag; } Bool_t NextEvent(); @@ -49,12 +54,16 @@ public: void Rewind(); + /// Tell if we are owner of our data or not void SetOwner(Bool_t flag) { fIsOwner = flag; } + /// Get our source URI virtual TString Source() const { return fSource.Data(); } + /// Set our source URI void SetSource(const char* source) { fSource = source; } + /// Get our digit store AliMUONVDigitStore* DigitStore() const { return fDigitStore; } private: diff --git a/MUON/AliMUONVPainter.cxx b/MUON/AliMUONVPainter.cxx index 4cb8ef2266f..1754d572585 100644 --- a/MUON/AliMUONVPainter.cxx +++ b/MUON/AliMUONVPainter.cxx @@ -197,8 +197,8 @@ AliMUONVPainter::Children() const void AliMUONVPainter::Clicked(AliMUONVPainter* painter, Double_t* values) { - // let our mother emit the signal as clients are probably connected to - // our (grand)mother, not to us + /// Let our mother emit the signal as clients are probably connected to + /// our (grand)mother, not to us if ( Mother() ) { @@ -216,8 +216,8 @@ AliMUONVPainter::Clicked(AliMUONVPainter* painter, Double_t* values) void AliMUONVPainter::ShiftClicked(AliMUONVPainter* painter, Double_t* values) { - // let our mother emit the signal as clients are probably connected to - // our (grand)mother, not to us + /// Let our mother emit the signal as clients are probably connected to + /// our (grand)mother, not to us if ( Mother() ) { diff --git a/MUON/AliMUONVPainter.h b/MUON/AliMUONVPainter.h index 827c78eb184..2fa94c7c019 100644 --- a/MUON/AliMUONVPainter.h +++ b/MUON/AliMUONVPainter.h @@ -62,6 +62,7 @@ public: /// Convert attributes so they are valid ones for us. virtual AliMUONAttPainter Validate(const AliMUONAttPainter& attributes) const { return attributes; } + /// Get our attributes const AliMUONAttPainter& Attributes() const { return fAttributes; } virtual void ComputeDataRange(const AliMUONVTrackerData& data, Int_t dataIndex, @@ -71,8 +72,10 @@ public: AliMUONVPainter* Detach() const; + /// Whether we are valid or not virtual Bool_t IsValid() const { return fIsValid; } + /// Mark us as not valid void Invalidate() { fIsValid = kFALSE; } Int_t Depth() const; @@ -86,10 +89,13 @@ public: /// Return the contour representing the outline of this object AliMUONPainterContour* Contour() const { return fContour; } + /// Get our name virtual const char* GetName() const { return Name().Data(); } + /// Get our name virtual TString Name() const { return fName; } + /// Get our path name (aka fullname) virtual TString PathName() const { return fPathName; } virtual TString ContourName() const; @@ -108,6 +114,7 @@ public: AliMUONPainterGroup* Group(Int_t depth) const; + /// Whether we handle mouse motion or not virtual Bool_t HandleMouseMotion() const { return kFALSE; } Bool_t IsResponder() const; @@ -165,27 +172,37 @@ public: virtual void PaintArea(const AliMUONVTrackerData& data, Int_t dataIndex, Double_t min, Double_t max); + /// Get the pad in which we are plotted TVirtualPad* Pad() const { return fPad; } + /// Get our line color Int_t GetLineColor() const { return fLineColor; } + /// Get our line width Int_t GetLineWidth() const { return fLineWidth; } + /// Set our line color void SetLineColor(Int_t lineColor) { fLineColor = lineColor; } + /// Set our line width void SetLineWidth(Int_t lineWidth) { fLineWidth = lineWidth; } + /// Set our name void SetName(const char* name) { fName = name; } + /// Set our path name (aka fullname) void SetPathName(const char* pathName) { fPathName = pathName; } static AliMUONVPainter* CreatePainter(const char* className, const AliMUONAttPainter& att, Int_t id1, Int_t id2); + /// Get our first ID Int_t ID0() const { return fID[0]; } + /// Get our second ID Int_t ID1() const { return fID[1]; } + /// Set our IDs void SetID(Int_t id0, Int_t id1) { fID[0] = id0; fID[1] = id1; } virtual TString Describe(const AliMUONVTrackerData& data, Int_t dataIndex, diff --git a/MUON/AliMUONVTrackerData.h b/MUON/AliMUONVTrackerData.h index ca72d27e126..bc1a387d238 100644 --- a/MUON/AliMUONVTrackerData.h +++ b/MUON/AliMUONVTrackerData.h @@ -37,43 +37,62 @@ public: /// Add values for one full store virtual Bool_t Add(const AliMUONVStore& store) = 0; + /// Get the value for a given buspatch and given dimension virtual Double_t BusPatch(Int_t busPatchId, Int_t dim=0) const = 0; + /// Get the value for a given chamber and given dimension virtual Double_t Chamber(Int_t chamberId, Int_t dim=0) const = 0; + /// Get the value for a given channel and given dimension virtual Double_t Channel(Int_t detElemId, Int_t manuId, Int_t manuChannel, Int_t dim=0) const = 0; + /// Reset the data virtual void Clear(Option_t* opt="") = 0; + /// Get the number of times a given channel was hit virtual Double_t Count(Int_t detElemId, Int_t manuId, Int_t manuChannel) const = 0; + /// Get the value for a given DE and given dimension virtual Double_t DetectionElement(Int_t detElemId, Int_t dim=0) const = 0; + /// Get the name of a given dimension virtual TString DimensionName(Int_t dim) const = 0; + /// Whether we have data for a given buspath virtual Bool_t HasBusPatch(Int_t busPatchId) const = 0; + /// Whether we have data for a given chamber virtual Bool_t HasChamber(Int_t chamberId) const = 0; + /// Whether we have data for a given detection element virtual Bool_t HasDetectionElement(Int_t detElemId) const = 0; + /// Whether we have data for a given manu virtual Bool_t HasManu(Int_t detElemId, Int_t manuId) const = 0; + /// Whether we have data for a given PCB virtual Bool_t HasPCB(Int_t detElemId, Int_t pcbIndex) const = 0; + /// Whether we are runnable (e.g. can handle several events) virtual Bool_t IsRunnable() const = 0; + /// Get the value for a given manu and given dimension virtual Double_t Manu(Int_t detElemId, Int_t manuId, Int_t dim=0) const = 0; + /// The number of dimensions we are handling virtual Int_t NumberOfDimensions() const = 0; + /// The number of events we've seen so far virtual Int_t NumberOfEvents() const = 0; + /// Signal to indicate that the number of events changed virtual void NumberOfEventsChanged(); // *SIGNAL* + /// Get our name const char* Name() const { return GetName(); } + /// Get the value for a given PCDB and given dimension virtual Double_t PCB(Int_t detElemId, Int_t pcbIndex, Int_t dim=0) const = 0; /// Print all objects whose name matches wildcard @@ -82,6 +101,7 @@ public: /// Print, with option, all objects whose name matches wildcard virtual void Print(Option_t* wildcard, Option_t* opt) const = 0; + /// Set the name of a given dimension virtual void SetDimensionName(Int_t index, const char* value) = 0; private: diff --git a/MUON/AliMUONVTrackerDataMaker.h b/MUON/AliMUONVTrackerDataMaker.h index fec8172a9b8..807ea681b6b 100644 --- a/MUON/AliMUONVTrackerDataMaker.h +++ b/MUON/AliMUONVTrackerDataMaker.h @@ -24,25 +24,34 @@ public: AliMUONVTrackerDataMaker(); virtual ~AliMUONVTrackerDataMaker(); + /// Whether we are valid or not virtual Bool_t IsValid() const = 0; + /// Our data virtual AliMUONVTrackerData* Data() const = 0; + /// Whether we can be run virtual Bool_t IsRunnable() const = 0; + /// Whether we are running (must be false if IsRunnable is false) virtual Bool_t IsRunning() const = 0; + /// Set the running state (no effect if not runnable) virtual void SetRunning(Bool_t flag) = 0; + /// Advance to next event (no effect if not runnable) virtual Bool_t NextEvent() = 0; + /// Rewind events (no effect if not runnable) virtual void Rewind() = 0; /// Whether we're owner of our data virtual void SetOwner(Bool_t flag) = 0; + /// Set our source URI virtual void SetSource(const char* source) = 0; + /// Get our source URI virtual TString Source() const = 0; ClassDef(AliMUONVTrackerDataMaker,1) // Producer of AliMUONVTrackerData diff --git a/MUON/READMEmchview.txt b/MUON/READMEmchview.txt index 03fc3dedeb9..a5b0a210599 100644 --- a/MUON/READMEmchview.txt +++ b/MUON/READMEmchview.txt @@ -2,23 +2,23 @@ /*! \page README_mchview Tracker visualisation program -A visualisation program, mchview, is now available to display, in two dimensions +A visualisation program, \link mchview.cxx mchview \endlink, is now available to display, in two dimensions (3D visu being done within the EVE framework), the tracker chambers. \section mchview_install Installing the program -mchview should be installed together with the rest of AliRoot. Two points should be noted though. - mchview is using two external files to run properly. One is a resource file $HOME/.mchviewrc, used +\em mchview should be installed together with the rest of AliRoot. Two points should be noted though. + \em mchview is using two external files to run properly. One is a resource file $HOME/.mchviewrc, used to "configure" the program and keep some history of the user interaction with it (e.g. the list of recent data sources used). The other one is a Root file, padstore.root (default name, can be changed with the resource file), which contains lots of precomputed information (like the contours that are being displayed, the geometry transformations, - etc...). By default, mchview will look for this file in the current directory. If it's not there, it will + etc...). By default, \em mchview will look for this file in the current directory. If it's not there, it will ask if it's OK to create it. Be warned that this will take a while (but is only done once). - If you install a new version of mchview, it is recommended to delete this file first, before lauching mchview again. + If you install a new version of \em mchview, it is recommended to delete this file first, before lauching \em mchview again. \section mchview_navigation Navigating the display -When starting mchview (and after the padstore.root file has been created for the first time), +When starting \em mchview (and after the padstore.root file has been created for the first time), you'll be presented with two tabs. The first one allow to navigate within the detector, and the second one to select data sources to be displayed. The first tab offers a global view of the 10 tracking chambers. On the right you'll see @@ -27,7 +27,7 @@ The first tab offers a global view of the 10 tracking chambers. On the right you view things for a given cathode or for a given plane. Note that in some instances those buttons maybe inactive. On the bottom are three groups of radio buttons, labelled "responder", "outline" and "plot", followed by data source buttons (see later) : Each group will contain a number of buttons corresponding to different view levels of the detector (e.g. detection element, manu, buspatch, etc...). - In mchview jargon, what is displayed on screen is called a "painter". The meaning of responder, outline and plot is as follow : + In \em mchview jargon, what is displayed on screen is called a "painter". The meaning of responder, outline and plot is as follow : - responder (only one selected at a time) is the type of painter that responds to mouse events. When you mouse over responder painters, they'll be highlighted (bold yellow line around them), and some information about them will be displayed in the top right corner. @@ -44,13 +44,13 @@ On the bottom left is a group button used to select which data source should be Next to it will be a list of buttons to select exactly what to plot from a data source (once you've selected a data source only). Note that whenever you click on a painter and get a new view, you get use the navigation buttons (top left) to go forward and backward, as in -a web browser for instance. Note also that the mchview menu bar contains a "History" menu where you can see (and pick a view) all the views that were opened. +a web browser for instance. Note also that the \em mchview menu bar contains a "History" menu where you can see (and pick a view) all the views that were opened. Even before selecting something to plot, at this stage you could use the program to familiarize yourself with the detector structure (aka mapping). \section mchview_datasource Specifying the data source -The second tab of the mchview allows to select one or several data sources. +The second tab of the \em mchview allows to select one or several data sources. Each data source, in turn, will provide one or more "things" to be plotted. The number of "things" actually depends on the data source. For instance, a raw data source will allow to plot the mean and the sigma of the pad charges. @@ -71,17 +71,16 @@ and a new data source line will appear in the bottom of that tab (and in also in be selectable for plotting). Each data source line indicates the short name of the data source, the full path, and a list of buttons to run, stop, rewind and remove. Run/Stop/Rewind is only selectable for data sources where the notion of event means something (e.g. for pedestals it won't). -Note that all the file paths can be local ones or alien ones, if you have a correctly installed alien, and you use a short wrapped to call the mchview program. +Note that all the file paths can be local ones or alien ones, if you have a correctly installed alien, and you use a short wrapped to call the \em mchview program. For instance : - +
 alias mchl $HOME/mchview.alien
+
where mchview.alien is a little script : - +
 #!/bin/sh
-
 test=`alien-token-info | grep -c expired`
-
 if [ $test -gt 0 ]; then
   echo "Token expired. Getting a new token"
   alien-token-destroy
@@ -90,17 +89,14 @@ elif [ ! -e /tmp/gclient_env_$UID ]; then
   echo "Getting a token"
   alien-token-init
 fi
-
 if [ ! -e /tmp/gclient_env_$UID ]; then
   echo "No token. Exiting"
   exit
 fi
-
 source /tmp/gclient_env_$UID
-
 export alien_API_USER=youralienuserid # only needed if different from your local username
-
 mchview $*
+
--------- @@ -113,4 +109,6 @@ In principle, you could have several raw data sources running at the same time. Once you have one or more data sources added, you can go back to first tab and start looking at the data ;-) +This chapter is defined in the READMEmchview.txt file. + */ diff --git a/MUON/mchview.cxx b/MUON/mchview.cxx index 623ba500b0d..fef433588cf 100644 --- a/MUON/mchview.cxx +++ b/MUON/mchview.cxx @@ -42,7 +42,7 @@ //_____________________________________________________________________________ void CreateMenuBar(TRint* app, TGMainFrame* mainFrame, UInt_t w) { -/// + /// Create the menu bar of the program TGPopupMenu* file = new TGPopupMenu(gClient->GetRoot()); @@ -62,7 +62,7 @@ void CreateMenuBar(TRint* app, TGMainFrame* mainFrame, UInt_t w) int main(int argc, char** argv) { -/// + /// Main function for the program AliWarningGeneral("main","Remove default storage and run number from here..."); @@ -99,7 +99,7 @@ int main(int argc, char** argv) TGMainFrame* mainFrame = new TGMainFrame(gClient->GetRoot(),w,h); - const Int_t bs = 2; + const Int_t kbs = 2; CreateMenuBar(theApp,mainFrame,w); @@ -110,16 +110,16 @@ int main(int argc, char** argv) TGCompositeFrame* t = tabs->AddTab("Painter Master Frame"); AliMUONPainterMasterFrame* pf = - new AliMUONPainterMasterFrame(t,t->GetWidth()-bs*2,t->GetHeight()-bs*2); + new AliMUONPainterMasterFrame(t,t->GetWidth()-kbs*2,t->GetHeight()-kbs*2); - t->AddFrame(pf, new TGLayoutHints(kLHintsExpandX | kLHintsExpandY,bs,bs,bs,bs)); + t->AddFrame(pf, new TGLayoutHints(kLHintsExpandX | kLHintsExpandY,kbs,kbs,kbs,kbs)); t = tabs->AddTab("Data Sources"); AliMUONPainterDataSourceFrame* dsf = - new AliMUONPainterDataSourceFrame(t,t->GetWidth()-bs*2,t->GetHeight()-bs*2); + new AliMUONPainterDataSourceFrame(t,t->GetWidth()-kbs*2,t->GetHeight()-kbs*2); - t->AddFrame(dsf,new TGLayoutHints(kLHintsExpandX | kLHintsExpandY,bs,bs,bs,bs)); + t->AddFrame(dsf,new TGLayoutHints(kLHintsExpandX | kLHintsExpandY,kbs,kbs,kbs,kbs)); mainFrame->AddFrame(tabs,new TGLayoutHints(kLHintsExpandX | kLHintsExpandY,0,0,0,0)); diff --git a/MUON/rootlogon.C b/MUON/rootlogon.C index 45a56969109..4b4e2ac6465 100644 --- a/MUON/rootlogon.C +++ b/MUON/rootlogon.C @@ -25,7 +25,7 @@ includePath += "-I${ALICE_ROOT}/SHUTTLE/TestShuttle "; includePath += "-I${ALICE_ROOT}/ITS "; includePath += "-I${ALICE_ROOT}/MUON "; - includePath += "-I${ALICE_ROOT}/MUON/mapping"; + includePath += "-I${ALICE_ROOT}/MUON/mapping "; includePath += "-I${ALICE_ROOT}/RAW"; gSystem->SetIncludePath(includePath.Data()); } -- 2.43.0