]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - MUON/AliMUONVPainter.h
TOF QA Task (F. Bellini)
[u/mrichter/AliRoot.git] / MUON / AliMUONVPainter.h
index 2fa94c7c0191c53b3b3059e50f1a3d4df487036f..fe16b5feabbadfcc9830c29c347cb1970e1d4bfe 100644 (file)
@@ -16,8 +16,8 @@
 #ifndef ALIMUONATTPAINTER_H
 #  include "AliMUONAttPainter.h"
 #endif
-#ifndef ROOT_RQ_OBJECT
-#  include <RQ_OBJECT.h>
+#ifndef ROOT_TQObject
+#  include <TQObject.h>
 #endif
 #ifndef ROOT_TString
 #  include "TString.h"
 #endif
 #include <float.h>
 
-class AliMUONPainterContour;
+class AliMUONContour;
 class AliMUONPainterGroup;
 class AliMUONVTrackerData;
 class AliMpArea;
 class TCollection;
+class TH1;
 class TList;
 class TMap;
 class TObjArray;
 class TVirtualPad;
 
-class AliMUONVPainter : public TObject
+class AliMUONVPainter : public TObject, public TQObject
 {
-  RQ_OBJECT("AliMUONVPainter")
-
 public:  
 
+  AliMUONVPainter(TRootIOCtor*);
   AliMUONVPainter(const char* type="");
   AliMUONVPainter(const AliMUONVPainter& rhs);
   AliMUONVPainter& operator=(const AliMUONVPainter& rhs);
@@ -72,6 +72,9 @@ public:
   
   AliMUONVPainter* Detach() const;
   
+  /// Whether this painter can be detached from the current view.
+  virtual Bool_t CanBeDetached() const { return kTRUE; }
+  
   /// Whether we are valid or not
   virtual Bool_t IsValid() const { return fIsValid; }
   
@@ -87,7 +90,7 @@ public:
   virtual void ExecuteEvent(Int_t event, Int_t px, Int_t py);
   
   /// Return the contour representing the outline of this object
-  AliMUONPainterContour* Contour() const { return fContour; }
+  AliMUONContour* Contour() const { return fContour; }
 
   /// Get our name
   virtual const char* GetName() const { return Name().Data(); }
@@ -135,7 +138,7 @@ public:
   AliMUONPainterGroup* ResponderGroup() const { return fResponderGroup; }
 
   /// Set out contour
-  void SetContour(AliMUONPainterContour* contour);
+  void SetContour(AliMUONContour* contour);
   
   void SetData(const char* pattern, AliMUONVTrackerData* data, Int_t dataIndex);
 
@@ -148,9 +151,9 @@ public:
   
   void SetOutlined(const char* pattern, Bool_t flag);
   
-  void SetResponder(const char* pattern);
+  virtual void SetResponder(const char* pattern);
   
-  void SetResponder(Int_t depth);
+  virtual void SetResponder(Int_t depth);
   
   void SetVisible(const char* pattern, Bool_t flag);
   
@@ -169,6 +172,8 @@ public:
 
   virtual void PaintOutline(Int_t color=-1, Int_t width=-1, Double_t x=FLT_MAX, Double_t y=FLT_MAX);
 
+  virtual void PaintArea(Int_t fillColor);
+  
   virtual void PaintArea(const AliMUONVTrackerData& data, Int_t dataIndex,
                          Double_t min, Double_t max);
     
@@ -212,34 +217,91 @@ public:
 
   AliMUONVPainter* Master() const;
   
+  virtual void DrawHistogram(Double_t* values=0x0) const;
+
+  /// To avoid getting a popup asking for the parameter in the GUI...
+  void DrawHistogram0() const { DrawHistogram(0x0); }
+  /// To avoid getting a popup asking for the parameter in the GUI...
+  void DrawHistogramClone0() const { DrawHistogramClone(0x0); }
+
+  virtual void DrawHistogramClone(Double_t* values=0x0) const;
+  
+  virtual void DrawInternalHistogram(Int_t dim) const;
+
+  virtual void DrawInternalHistogramClone(Int_t dim) const;
+
+  /// Append (i.e. don't have the right to clear the array !) our list of manus to manuList
+  virtual void FillManuList(TObjArray& manuList) const;
+  
+  /// following kind of stupid lines (SL), because I don't know how to
+  /// pass parameters to TClassMenuItem for context menu (don't even
+  /// know if that's possible at all)
+  /// SL
+  void DrawInternalHistogramClone0() { DrawInternalHistogramClone(0); }
+  /// SL
+  void DrawInternalHistogramClone1() { DrawInternalHistogramClone(1); }
+  /// SL
+  void DrawInternalHistogramClone2() { DrawInternalHistogramClone(2); }
+  /// SL
+  void DrawInternalHistogramClone3() { DrawInternalHistogramClone(3); }
+  /// SL
+  void DrawInternalHistogramClone4() { DrawInternalHistogramClone(4); }
+  /// SL
+  void DrawInternalHistogramClone5() { DrawInternalHistogramClone(5); }
+  /// SL
+  void DrawInternalHistogramClone6() { DrawInternalHistogramClone(6); }
+  /// SL
+  void DrawInternalHistogramClone7() { DrawInternalHistogramClone(7); }
+  /// SL
+  void DrawInternalHistogramClone8() { DrawInternalHistogramClone(8); }
+  /// SL
+  void DrawInternalHistogramClone9() { DrawInternalHistogramClone(9); }
+  
+  /// Whether or not the part of the detector represented by this painter should be included in readout.
+  virtual Bool_t IsIncluded() const = 0;
+  
+  /// Whether or not the part of the detector represented by this painter should be excluded from readout.
+  Bool_t IsExcluded() const { return ! IsIncluded(); }
+
+  virtual void Include();
+  
+  virtual void Exclude();
+
 protected:
     
   virtual TCollection* Children() const;
+
+  void CreateGroups();
+
+  AliMUONVTrackerData* InteractiveReadOutConfig() const;
   
-private:
+  mutable TH1* fHistogram; //!< histogram
+  
+  TMap* fPainterGroups; ///< map of groups
+  AliMUONPainterGroup* fResponderGroup; ///< the responder group
 
-    void FlatList(TList& list);
+private:
+  
+  void FlatList(TList& list);
 
   AliMUONPainterGroup* CreateGroup(const char* type, Int_t depth);
   
-  void CreateGroups();
-  
   void GetBoundingBox(Double_t& x1, Double_t& y1, 
                       Double_t& x2, Double_t& y2) const;
   
   AliMUONVPainter* GetPainter(Int_t px, Int_t py, Double_t& x, Double_t& y) const;
   
-private:
+  void WriteIROC(Double_t value);
   
+  void GetIROCManuList(TObjArray& manuList);
+
   TString fName; ///< our (short) name
   TString fPathName; ///< our long name
   TString fType; ///< our type (DE, Chamber, MANU, etc...)
   AliMUONVPainter* fMother;  ///< our mother
   AliMUONPainterGroup* fGroup; ///< our group
-  AliMUONPainterContour* fContour;  ///< our contour
-  TMap* fPainterGroups; ///< map of groups
+  AliMUONContour* fContour;  ///< our contour
   TObjArray* fChildren; ///< our children
-  AliMUONPainterGroup* fResponderGroup; ///< the responder group
   AliMUONPainterGroup* fPlotterGroup; ///< the plotter group
   Double_t fBorderFactor; ///< border factor for visu 
   TVirtualPad* fPad; ///< the pad we're drawn in
@@ -249,7 +311,7 @@ private:
   Int_t fID[2]; ///< our ids
   Bool_t fIsValid; ///< whether we were properly initialized
   
-  ClassDef(AliMUONVPainter,1) // Base class of a graphical object for MUON spectrometer
+  ClassDef(AliMUONVPainter,3) // Base class of a graphical object for MUON spectrometer
 };
 
 #endif