]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - MUON/AliMUONVCalibParam.cxx
AliTriggerAnalysis: added switch to disable FMD histograms (runs much faster) (consta...
[u/mrichter/AliRoot.git] / MUON / AliMUONVCalibParam.cxx
index 7fa6c393e9e263d54caaf35530ecd166eb33618f..5cdafd09bb3cc2c4271c537906f76fd040c0f9a3 100644 (file)
 /// id1 might be left to zero if not required (e.g. for calibparam which 
 /// can be identified by a single integer)
 ///
+/// Note that the ValueAsXXX methods have 2 versions : with or without bound
+/// checking. The latter is to be used in e.g. loops, where you know for
+/// sure the indices are ok, in order to gain some time.
+///
 /// \author Laurent Aphecetche, Subatech
 //-----------------------------------------------------------------------------
 
@@ -122,6 +126,14 @@ AliMUONVCalibParam::SetValueAsDouble(Int_t, Int_t, Double_t)
   AliFatal("Not implemented");
 }
 
+//_____________________________________________________________________________
+void 
+AliMUONVCalibParam::SetValueAsDoubleFast(Int_t, Int_t, Double_t)
+{
+  /// By default, this one does not exist
+  AliFatal("Not implemented");
+}
+
 //_____________________________________________________________________________
 Double_t 
 AliMUONVCalibParam::ValueAsDouble(Int_t , Int_t ) const
@@ -131,3 +143,35 @@ AliMUONVCalibParam::ValueAsDouble(Int_t , Int_t ) const
   return 0;
 }
 
+//_____________________________________________________________________________
+Double_t 
+AliMUONVCalibParam::ValueAsDoubleFast(Int_t , Int_t ) const
+{
+  /// By default, this one does not exist
+  AliFatal("Not implemented");
+  return 0;
+}
+
+//_____________________________________________________________________________
+Int_t 
+AliMUONVCalibParam::Compare(const TObject* object) const
+{
+  /// Compare AliMUONVCalibParam objects, trying to get as complete an order as possible.
+  /// We sort by ID0, then by ID1
+  ///
+  const AliMUONVCalibParam* param = static_cast<const AliMUONVCalibParam*>(object);
+  
+  if ( ID0() == param->ID0() )
+  {
+    if ( ID1() == param->ID1() )
+    {
+      return 0;
+    }
+    else
+      return (ID1() >= param->ID1()) ? 1 : -1;
+  }
+  else
+    return ( ID0() >= param->ID0()) ? 1 : -1;
+}
+
+