]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Removed warnings
authorpulvir <pulvir@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 24 Jun 2008 08:37:25 +0000 (08:37 +0000)
committerpulvir <pulvir@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 24 Jun 2008 08:37:25 +0000 (08:37 +0000)
PWG2/RESONANCES/AliRsnAnalysisSimple.cxx
PWG2/RESONANCES/AliRsnCut.cxx
PWG2/RESONANCES/AliRsnCut.h
PWG2/RESONANCES/AliRsnCutMgr.h
PWG2/RESONANCES/AliRsnCutSet.cxx
PWG2/RESONANCES/AliRsnCutSet.h
PWG2/RESONANCES/AliRsnEventBuffer.h
PWG2/RESONANCES/AliRsnExpression.cxx
PWG2/RESONANCES/AliRsnPIDIndex.cxx
PWG2/RESONANCES/AliRsnPairParticle.cxx

index b4d60df945a9981de2ec58a7c269f8c074c18000..df9f6fa5eb07cbb37abcb3b2d1791ce1965d7685 100644 (file)
@@ -69,7 +69,7 @@ AliRsnAnalysisSimple::AliRsnAnalysisSimple(AliRsnAnalyzerSimple *ana, AliRsnPID
 
 
 //_____________________________________________________________________________
-void AliRsnAnalysisSimple::Clear(Option_t *option)
+void AliRsnAnalysisSimple::Clear(Option_t* /*option*/)
 {
 //
 // Clear heap
index 732f37f467ff74b6eaeb8545b3e2800ae7a822ba..415e317c50f0dffb9a92d59a7c0b3fb403b1bd04 100644 (file)
@@ -18,7 +18,7 @@
 //
 // General implementation of a single cut strategy, which can be:
 // - a value contained in a given interval  [--> IsBetween()]
-// - a value equal to a given reference     [--> IsEqual()  ]
+// - a value equal to a given reference     [--> MatchesValue()  ]
 // In all cases, the reference value(s) is (are) given as data members
 // and each kind of cut requires a given value type (Int, UInt, Double),
 // but the cut check procedure is then automatized and chosen thanks to
@@ -150,7 +150,7 @@ Bool_t AliRsnCut::IsBetween (const Double_t & theValue)
 }
 
 //________________________________________________________________________________________________________________
-Bool_t AliRsnCut::IsEqual (const Int_t &theValue)
+Bool_t AliRsnCut::MatchesValue (const Int_t &theValue)
 {
 //
 // Reference check.
@@ -160,7 +160,7 @@ Bool_t AliRsnCut::IsEqual (const Int_t &theValue)
 }
 
 //________________________________________________________________________________________________________________
-Bool_t AliRsnCut::IsEqual (const UInt_t &theValue)
+Bool_t AliRsnCut::MatchesValue (const UInt_t &theValue)
 {
 //
 // Reference check.
@@ -170,7 +170,7 @@ Bool_t AliRsnCut::IsEqual (const UInt_t &theValue)
 }
 
 //________________________________________________________________________________________________________________
-Bool_t AliRsnCut::IsEqual (const Double_t &theValue)
+Bool_t AliRsnCut::MatchesValue (const Double_t &theValue)
 {
 //
 // Reference check.
@@ -256,7 +256,7 @@ Bool_t AliRsnCut::IsSelected(ECutSetType type, AliRsnDaughter *daughter)
         case kChargeNeg:
             return (daughter->Charge() < 0);
         case kPIDType:
-            return IsEqual((Int_t)daughter->PIDType());
+            return MatchesValue((Int_t)daughter->PIDType());
         /*
         case kEtaMC:
             if (mcinfo) return IsBetween (mcinfo->Eta());
@@ -269,6 +269,9 @@ Bool_t AliRsnCut::IsSelected(ECutSetType type, AliRsnDaughter *daughter)
         case kEsdNSigmaCalculate:
             return IsBetween (daughter->GetESDInfo()->GetNSigmaCalculate());
         */
+        default:
+            AliWarning("Requested a cut which cannot be applied to a single track");
+            return kTRUE;
     }
 
     return kTRUE;
@@ -306,6 +309,9 @@ Bool_t AliRsnCut::IsSelected(ECutSetType type, AliRsnPairParticle * pair)
             return pair->IsLabelEqual();
         case kIsTruePair:
             return pair->IsTruePair(fIMin);
+        default:
+            AliWarning("Requested a cut which cannot be applied to a pair");
+            return kTRUE;
     }
 
     return kTRUE;
index 7bc5b990fd9f3e98e5c2ddcf3d45bfd82f16aed3..02581a9a5fd3c88d4c5d14bc4818851e3f7b43ec 100644 (file)
@@ -87,9 +87,9 @@ public:
     void      PrintAllValues();
 
     Bool_t    IsBetween (const Double_t &theValue);
-    Bool_t    IsEqual (const Int_t &theValue);
-    Bool_t    IsEqual (const UInt_t &theValue);
-    Bool_t    IsEqual (const Double_t &theValue);
+    Bool_t    MatchesValue (const Int_t &theValue);
+    Bool_t    MatchesValue (const UInt_t &theValue);
+    Bool_t    MatchesValue (const Double_t &theValue);
 
 private:
 
index 5f3b2a6d22865c7b7dd2dcef6b4df58db80b6f51..13cd8516f82812b70cdeca3df0a2740ffe82feed 100644 (file)
@@ -15,7 +15,7 @@ class AliRsnCutSet;
 class AliRsnCutMgr : public TNamed
 {
   public:
-    
+
 //     enum ECutSetType {
 //       kParticle= 0,
 //       kPair,
@@ -23,21 +23,24 @@ class AliRsnCutMgr : public TNamed
 //       kLastCutSetIndex
 //     };
 
-    
+
     AliRsnCutMgr();
     AliRsnCutMgr(const char *name, const char* title);
 
     ~AliRsnCutMgr();
-    
+
     void SetCutSet(AliRsnCut::ECutSetType type,AliRsnCutSet* cutset);
     AliRsnCutSet* GetCutSet(AliRsnCut::ECutSetType type) { return fCutSets[type];}
-    
+
     Bool_t IsSelected(AliRsnCut::ECutSetType type,TObject *obj);
 
   private:
 
+    AliRsnCutMgr(const AliRsnCutMgr &cut):TNamed(cut) {}
+    AliRsnCutMgr& operator=(const AliRsnCutMgr& /*cut*/) {return *this;}
+
     AliRsnCutSet *fCutSets[AliRsnCut::kLastCutSetIndex];
-    
+
     ClassDef ( AliRsnCutMgr,1 );
 };
 
index 4c07d3fcc53293180bf26cc3de71696c114c38c3..b3aaf90c3c39a1dac54f075654da5bb492688487 100644 (file)
@@ -8,22 +8,21 @@
 ClassImp ( AliRsnCutSet )
 
 AliRsnCutSet::AliRsnCutSet()
-    : TNamed(),fNumOfCuts ( 0 ),
+    : TNamed(),fCuts(0),fNumOfCuts ( 0 ),
     fCutScheme ( "" ),
     fCutSchemeIndexed ( "" ),
-    fBoolValues ( 0 ),fIsScheme ( kFALSE )
+    fBoolValues ( 0 ),fIsScheme ( kFALSE ),fExpression(0)
 {
   fBoolValues = new Bool_t[1];
 //   fExpression = new AliRsnExpression ( fCutSchemeIndexed );
-  fExpression = 0;
   AliRsnExpression::sCutSet = this;
 }
 
 AliRsnCutSet::AliRsnCutSet ( TString name )
-    : TNamed ( name,name ),fNumOfCuts ( 0 ),
+    : TNamed ( name,name ),fCuts(0),fNumOfCuts ( 0 ),
     fCutScheme ( "" ),
     fCutSchemeIndexed ( "" ),
-    fBoolValues ( 0 ),fIsScheme ( kFALSE )
+    fBoolValues ( 0 ),fIsScheme ( kFALSE ),fExpression(0)
 {
   fBoolValues = new Bool_t[1];
   fExpression = 0;
@@ -34,6 +33,7 @@ AliRsnCutSet::AliRsnCutSet ( const AliRsnCutSet & copy )
     :    TNamed ( ( TNamed ) copy ),fCuts ( copy.fCuts ),fNumOfCuts ( copy.fNumOfCuts ),
     fCutScheme ( copy.fCutScheme ),
     fCutSchemeIndexed ( copy.fCutSchemeIndexed ),
+    fBoolValues(0),
     fIsScheme ( copy.fIsScheme ),
     fExpression ( copy.fExpression )
 {
@@ -127,6 +127,7 @@ void AliRsnCutSet::SetCutScheme ( const TString & theValue )
 void AliRsnCutSet::SetCutSchemeIndexed ( TString theValue )
 {
   AliDebug ( AliLog::kDebug,"<-" );
+  theValue.Append(" ");
 //   fCutSchemeIndexed = theValue;
   fCutSchemeIndexed = GetCutSchemeIndexed();
   AliDebug ( AliLog::kDebug,"->" );
@@ -186,6 +187,7 @@ Int_t AliRsnCutSet::TestExpression ( TString opt )
 //   set->SetCutScheme ( "(aaa&!(ccc))&(bbb&!(ccc))" );
 //
 //   set->ShowCuts ();
+    AliDebug(1, opt.Data());
 
   return 0;
 }
index 80bf5425a167a5dd4f2ef2750968e6b9d71b78e2..e2255f9906aab0ee275059432dabe38e93da5205 100644 (file)
@@ -5,7 +5,7 @@
 #include <TObjArray.h>
 
 #include "AliRsnCut.h"
-// class AliRsnCut; 
+// class AliRsnCut;
 class AliRsnCutMgr;
 
 class AliRsnDaughter;
@@ -14,7 +14,7 @@ class AliRsnPairParticle;
 
 class AliRsnCutSet : public TNamed
 {
-  
+
   public:
     AliRsnCutSet();
     AliRsnCutSet ( TString name );
@@ -51,6 +51,9 @@ class AliRsnCutSet : public TNamed
 
 
   private:
+
+    AliRsnCutSet& operator=(const AliRsnCutSet& /*copy*/) {return (*this);}
+
     TObjArray     fCuts;                  // array of cuts
     Int_t         fNumOfCuts;             // number of cuts
     TString       fCutScheme;             // cut scheme
index 7d5463942993c473623c6f793e2b682264539336..69e4bb98f5b7593e690a64be636378c5fe2560e5 100644 (file)
@@ -2,7 +2,7 @@
  * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
  * See cxx source for full Copyright notice                               *
  **************************************************************************/
+
 //
 // Class AliRsnEventBuffer
 //
@@ -39,13 +39,13 @@ public:
 
     void SetDeleteBufferWhenReset (const Bool_t& theValue = kTRUE) { fDeleteBufferWhenReset = theValue; }
     Bool_t GetDeleteBufferWhenReset() const { return fDeleteBufferWhenReset; }
-    
+
     Int_t NEmptySlots();
 
   private:
-  
-    AliRsnEventBuffer (const AliRsnEventBuffer& /*buf*/) :
-      fDeleteBufferWhenReset(0),fEventsBufferSize(0),fEventsBufferIndex(0) {}
+
+    AliRsnEventBuffer (const AliRsnEventBuffer& buf) :
+      TObject(buf), fDeleteBufferWhenReset(0),fEventsBufferSize(0),fEventsBufferIndex(0) {}
     const AliRsnEventBuffer& operator=(const AliRsnEventBuffer& /*buf*/) {return (*this);}
 
     Bool_t       fDeleteBufferWhenReset;  // flag if buffer should be deleted when reset is done
index 8d9f590b692bdecf93eeb5cc16f9af412d23e4ac..68a3da896ade815d5dca530310412a7849c92c6a 100644 (file)
@@ -98,7 +98,7 @@ Bool_t AliRsnExpression::Value ( TObjArray &vars )
   }
 
 //   AliDebug(AliLog::kDebug,Form("fOperator %d",fOperator));
-  
+
   switch ( fOperator )
   {
 
@@ -216,8 +216,8 @@ TObjArray* AliRsnExpression::Tokenize ( TString str ) const
 //     TObjString* val3 = ( TObjString* ) tokens->At ( i );
 //     AliInfo ( Form ( "%d %s",i,val3->String().Data() ) );
 //   }
-//   
-//   
+//
+//
   delete valtok;
   delete optok;
 
@@ -365,9 +365,9 @@ AliRsnExpression* AliRsnExpression::Expression ( TObjArray &st,Int_t &i )
 ClassImp ( AliRsnVariableExpression )
 
 //______________________________________________________________________________
-Bool_t AliRsnVariableExpression::Value ( TObjArray& pgm )
+Bool_t AliRsnVariableExpression::Value ( TObjArray& /*pgm*/)
 {
-  
+
 //   Int_t indexx = sCutSet->GetIndexByCutName ( fVname.Data() );
   AliDebug(AliLog::kDebug,Form("Vname %s",fVname.Data()));
 //   return sCutSet->GetBoolValue ( indexx );
index bb66cd14fb54afd48036abae7dc165bf73de9fdc..22ec09b2db8a307d38e965e1e147a850f709f98b 100644 (file)
@@ -109,6 +109,7 @@ void AliRsnPIDIndex::Print (Option_t * option) const
 // Prints AliRsnPIDIndex info
 //
     Int_t i, j;
+    if (!option) return;
     for (i = 0; i < 2; i++) {
         for (j = 0; j < AliRsnPID::kSpecies + 1; j++) {
             AliInfo (Form (" [%d][%d] %d %d", i, j, fIndex[i][j].GetSize(), fNumOfIndex[i][j]));
index 040c3b05ffc44012e121857f75b48573e87eae74..3260889935bb6aea4a5694cb7be2bf9acc033c5f 100644 (file)
@@ -179,8 +179,6 @@ Double_t AliRsnPairParticle::GetDaughterEnergy(const Int_t &index, const Double_
 // The index argument refers to the used track among the two of the pair.
 //
 
-    Int_t i;
-    Double_t p2Tot = 0.0;
     if (mass > 0 && index >= 0 && index < 2) {
         AliRsnDaughter temp(*fDaughter[index]);
         temp.SetM(mass);