Coverity fixes
authorzampolli <chiara.zampolli@cern.ch>
Mon, 3 Nov 2014 09:47:33 +0000 (10:47 +0100)
committerzampolli <chiara.zampolli@cern.ch>
Mon, 3 Nov 2014 09:47:45 +0000 (10:47 +0100)
TOF/AliTOFAnalysisTaskCalibTree.cxx
TOF/AliTOFAnalysisTaskCalibTree.h

index 9f44d89..5686970 100644 (file)
@@ -49,6 +49,10 @@ AliAnalysisTaskSE(name),
   fTOFcalib(new AliTOFcalib()),             
   fTOFT0maker(new AliTOFT0maker(fESDpid, fTOFcalib)),         
   fTOFT0v1(new AliTOFT0v1(fESDpid)),
+  ftimestamp(0),
+  fVertexZ(99999),
+  ftimezero(9999999),
+  fnhits(-1),
   fOutputTree(0x0)             
 
 {
@@ -56,6 +60,15 @@ AliAnalysisTaskSE(name),
    * default constructor 
    */
 
+  for (Int_t i = 0; i < MAXHITS; i++){
+      fmomentum[i] = 999999;
+      flength[i] = 999999;
+      findex[i] = -1;
+      ftime[i] = 999999;
+      ftot[i] = 999999;
+      ftexp[i] = 999999;
+  }
+
   DefineOutput(1, TTree::Class());  
 
 }
@@ -110,7 +123,7 @@ AliTOFAnalysisTaskCalibTree::UserCreateOutputObjects()
 
 //_______________________________________________________
 
-void AliTOFAnalysisTaskCalibTree::UserExec(Option_t *option) {
+void AliTOFAnalysisTaskCalibTree::UserExec(Option_t *) {
   //
   // user exec
   //
@@ -133,7 +146,7 @@ void AliTOFAnalysisTaskCalibTree::UserExec(Option_t *option) {
   fTOFT0v1->DefineT0("all", 0.0, 0.5);
   Float_t timeZeroTOF = -1000. * fTOFT0v1->GetResult(0);
   Float_t timeZeroTOF_sigma = 1000. * fTOFT0v1->GetResult(1);
-  Int_t timeZeroTOF_tracks = fTOFT0v1->GetResult(3);
+  //Int_t timeZeroTOF_tracks = fTOFT0v1->GetResult(3);  // not used for the time being
 
   // check T0-TOF sigma 
   if (timeZeroTOF_sigma >= 250.) ftimezero = 999999.; 
index c0e5c2e..c5eeb4a 100644 (file)
@@ -36,7 +36,7 @@ public AliAnalysisTaskSE
   virtual ~AliTOFAnalysisTaskCalibTree(); // default destructor
 
   virtual void UserCreateOutputObjects(); // user create output objects
-  virtual void UserExec(Option_t *option); // user exec
+  virtual void UserExec(Option_t *); // user exec
 
   // getters
   AliPhysicsSelection *GetEventCuts() const {return fEventCuts;}; // getter