]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - MUON/AliMUONVTrackerData.h
Trigger scalers added to ESD header.
[u/mrichter/AliRoot.git] / MUON / AliMUONVTrackerData.h
index bc1a387d238bda75c1c7b1b7191deffef1a3c765..8ef7db2aab7f9489b5c9512b6c369c198926c8ed 100644 (file)
@@ -6,7 +6,7 @@
 
 // $Id$
 
-/// \ingroup core
+/// \ingroup calib
 /// \class AliMUONVTrackerData
 /// \brief Base class for MUON data that can be presented at different levels
 /// in the hierarchy of the MUON system.
 #ifndef ROOT_TString
 #  include "TString.h"
 #endif
-#ifndef ROOT_RQ_OBJECT
-#   include <RQ_OBJECT.h>
+#ifndef ROOT_TQObject
+#   include <TQObject.h>
 #endif
 
+class AliMUONSparseHisto;
 class AliMUONVStore;
+class TCollection;
+class TArrayI;
 
-class AliMUONVTrackerData : public TNamed
+class AliMUONVTrackerData : public TNamed, public TQObject
 {
-  RQ_OBJECT("AliMUONVTrackerData")
-  
 public:
   
-  AliMUONVTrackerData(const char* name="",const char* title="", Bool_t runnable=kTRUE);
+  AliMUONVTrackerData(const char* name="",const char* title="", 
+                      Bool_t issingleevent=kFALSE);
   virtual ~AliMUONVTrackerData();
   
-  /// Add values for one full store
-  virtual Bool_t Add(const AliMUONVStore& store) = 0;
+  /// Add values for one event from one full store
+  virtual Bool_t Add(const AliMUONVStore& store, TArrayI* arrayOfNofEventsPerDDL=0x0) = 0;
 
+  /// Replace values
+  virtual Bool_t Replace(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;
   
@@ -56,12 +61,18 @@ public:
   /// 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
+  /// Get the name of a given (internal) dimension
   virtual TString DimensionName(Int_t dim) const = 0;
 
+  /// Get the name of a given (external) dimension
+  virtual TString ExternalDimensionName(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 a given channel or not
+  virtual Bool_t HasChannel(Int_t detElemId, Int_t manuId, Int_t manuChannel) const;
+  
   /// Whether we have data for a given chamber
   virtual Bool_t HasChamber(Int_t chamberId) const = 0;
   
@@ -74,8 +85,8 @@ public:
   /// 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;
+  /// Whether we deal with only one event at a time
+  virtual Bool_t IsSingleEvent() 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;
@@ -83,8 +94,16 @@ public:
   /// 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;
+  /// Convert from internal to external dimension
+  virtual Int_t InternalToExternal(Int_t dim) const = 0;
+  
+  /// The number of dimensions we are inputting
+  virtual Int_t ExternalDimension() const = 0;
+
+  /** The number of events we've seen so far in a given DDL (or any DDL if param<0)
+   ddlNumber is 0..19
+   */
+  virtual Int_t NumberOfEvents(Int_t ddlNumber) const = 0;
 
   /// Signal to indicate that the number of events changed
   virtual void NumberOfEventsChanged(); // *SIGNAL*
@@ -103,6 +122,42 @@ public:
 
   /// Set the name of a given dimension
   virtual void SetDimensionName(Int_t index, const char* value) = 0;
+
+  /// Whether or not we can make histograms.
+  virtual Bool_t CanHistogram() const { return kFALSE; }
+  
+  /// Select a dimension to be histogrammed (if CanHistogram==kTRUE) only
+  virtual void MakeHistogramForDimension(Int_t /* index */, Bool_t /* value */,
+    Double_t /*xmin*/=0.0, Double_t /*xmax*/=4096.0) { }
+
+  /// Get histogram range
+  virtual void HistogramRange(Double_t& xmin, Double_t& xmax) const { xmin=xmax=0.0; }
+
+  /// Whether we have histograms for a given dimension, or not
+  virtual Bool_t IsHistogrammed(Int_t /*dim*/) const { return kFALSE; }
+
+  /// Get sparse histogram for a given channel
+  virtual AliMUONSparseHisto* GetChannelSparseHisto(Int_t detElemId, Int_t manuId, 
+                                                    Int_t manuChannel, Int_t dim=0) const = 0;
+
+  /// Get sparse histogram for a given manu (valid only if IsChannelLevelEnabled()==kFALSE and IsManuLevelEnabled()==kTRUE)
+  virtual AliMUONSparseHisto* GetManuSparseHisto(Int_t detElemId, Int_t manuId, 
+                                                 Int_t dim=0) const = 0;
+  
+  /// To allow merging of different objects
+  virtual Long64_t Merge(TCollection* list) = 0;
+
+       /// Disable recording of information at the channel level
+       virtual void DisableChannelLevel() = 0;
+       
+       /// Whether we store values at the channel level
+       virtual Bool_t IsChannelLevelEnabled() const = 0;
+
+  /// Disable recording of information at the manu level (and below)
+       virtual void DisableManuLevel() = 0;
+       
+       /// Whether we store values at the channel level
+       virtual Bool_t IsManuLevelEnabled() const = 0;
   
 private:
   /// not implemented
@@ -110,7 +165,7 @@ private:
   /// not implemented
   AliMUONVTrackerData& operator=(const AliMUONVTrackerData& rhs);
   
-  ClassDef(AliMUONVTrackerData,1) // Base class of MUON data that can be represented graphically
+  ClassDef(AliMUONVTrackerData,2) // Base class of MUON data that can be represented graphically
 };
 
 #endif