]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Eff C++ warnings removal (Stefan Rosseger)
authormarian <marian@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 17 Mar 2008 16:33:08 +0000 (16:33 +0000)
committermarian <marian@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 17 Mar 2008 16:33:08 +0000 (16:33 +0000)
TPC/AliTPCAltroEmulator.cxx
TPC/AliTPCAltroEmulator.h
TPC/AliTPCTempMap.cxx

index 57b733a6c4136484a8868412b53d0f3bbcb9594a..969b8548581cfd8a673bacb9c461afecc8084687 100644 (file)
  *     @param Channel an <tt> short* </tt> Pointer to a 1d short Array with the input Data
  */
 
-AliTPCAltroEmulator::AliTPCAltroEmulator(int timebins, short* Channel){
+AliTPCAltroEmulator::AliTPCAltroEmulator(int timebins, short* Channel) : 
+  TNamed(),
+  ftimebins(timebins),
+//  fChannelIn(Channel),
+  fChannelShort(Channel), 
+  fADCkeep(0),     
+  fOnBSL1(0), 
+  fOnTCF(0),  
+  fOnBSL2(0), 
+  fOnClip(0), 
+  fOnZSU(0),  
+
+  fConfiguredAltro(0),   // ConfiguredAltro
+  fConfiguredBSL1(0),    // ConfiguredBSL1
+  fConfiguredTCF(0),     // ConfiguredTCF
+  fConfiguredBSL2(0),    // ConfiguredBSL2
+  fConfiguredZSU(0),     // ConfiguredZSU
+  fBSL1mode(0),          // BSL1mode
+  fBSL1ValuePeDestal(0), // BSL1ValuePeDestal
+  fBSL1PedestalMem(0),  // BSL1PedestalMem
+  fBSL1polarity(0),      // BSL1polarity
+
+  fTCFK1(0), // K1
+  fTCFK2(0), // K2
+  fTCFK3(0), // K3
+  fTCFL1(0), // L1
+  fTCFL2(0), // L2
+  fTCFL3(0), // L3
+
+  fTCFK1Int(0), // K1Int
+  fTCFK2Int(0), // K2Int
+  fTCFK3Int(0), // K3Int
+  fTCFL1Int(0), // L1Int
+  fTCFL2Int(0), // L2Int
+  fTCFL3Int(0), // L3Int
+
+  fBSL2HighThreshold(0), // BSL2HighThreshold
+  fBSL2LowThreshold(0),  // BSL2LowThreshold
+  fBSL2Offset(0),        // BSL2Offset
+  fBSL2Presamples(0),    // BSL2Presamples(0),
+  fBSL2Postsamples(0),   // BSL2Postsamples
+
+  fZSUThreshold(0),      // ZSUThreshold
+
+  fZSUMinSamplesaboveThreshold(0), // ZSUMinSamplesaboveThreshold
+  fZSUPresamples(0),     // ZSUPresamples
+  fZSUPostsamples(0)     // ZSUPostsamples
+
+{
   //
   // Constructor of Altro Class
   //
-
+  /*
   ftimebins = timebins;
   
   fChannelShort = Channel;
@@ -59,12 +107,63 @@ AliTPCAltroEmulator::AliTPCAltroEmulator(int timebins, short* Channel){
   fConfiguredTCF = 0;
   fConfiguredBSL2 = 0;
   fConfiguredZSU = 0;
+  */
 }
 
-AliTPCAltroEmulator::AliTPCAltroEmulator(const AliTPCAltroEmulator &altro){
+
+AliTPCAltroEmulator::AliTPCAltroEmulator(const AliTPCAltroEmulator &altro):
+  TNamed(),
+  ftimebins(altro.ftimebins),
+//  fChannelIn(Channel),
+  fChannelShort(altro.fChannelShort), 
+  fADCkeep(0),     
+  fOnBSL1(0), 
+  fOnTCF(0),  
+  fOnBSL2(0), 
+  fOnClip(0), 
+  fOnZSU(0),  
+
+  fConfiguredAltro(0),   // ConfiguredAltro
+  fConfiguredBSL1(0),    // ConfiguredBSL1
+  fConfiguredTCF(0),     // ConfiguredTCF
+  fConfiguredBSL2(0),    // ConfiguredBSL2
+  fConfiguredZSU(0),     // ConfiguredZSU
+  fBSL1mode(0),          // BSL1mode
+  fBSL1ValuePeDestal(0), // BSL1ValuePeDestal
+  fBSL1PedestalMem(0),  // BSL1PedestalMem
+  fBSL1polarity(0),      // BSL1polarity
+
+  fTCFK1(0), // K1
+  fTCFK2(0), // K2
+  fTCFK3(0), // K3
+  fTCFL1(0), // L1
+  fTCFL2(0), // L2
+  fTCFL3(0), // L3
+
+  fTCFK1Int(0), // K1Int
+  fTCFK2Int(0), // K2Int
+  fTCFK3Int(0), // K3Int
+  fTCFL1Int(0), // L1Int
+  fTCFL2Int(0), // L2Int
+  fTCFL3Int(0), // L3Int
+
+  fBSL2HighThreshold(0), // BSL2HighThreshold
+  fBSL2LowThreshold(0),  // BSL2LowThreshold
+  fBSL2Offset(0),        // BSL2Offset
+  fBSL2Presamples(0),    // BSL2Presamples(0),
+  fBSL2Postsamples(0),   // BSL2Postsamples
+
+  fZSUThreshold(0),      // ZSUThreshold
+
+  fZSUMinSamplesaboveThreshold(0), // ZSUMinSamplesaboveThreshold
+  fZSUPresamples(0),     // ZSUPresamples
+  fZSUPostsamples(0)     // ZSUPostsamples
+
+{
   //
   // copy constructor of Altro Class
   //
+
 }
 
 
@@ -119,6 +218,7 @@ void AliTPCAltroEmulator::ConfigAltro(int ONBaselineCorrection1, int ONTailcance
   fOnBSL2 = InRange(ONBaselineCorrection2,0,1,"AliTPCAltroEmulator::ConfigAltro","ONBaselineCorrection2");
   fOnClip = InRange(ONClipping,0,1,"AliTPCAltroEmulator::ConfigAltro","ONClipping");
   fOnZSU = InRange(ONZerosuppression,0,1,"AliTPCAltroEmulator::ConfigAltro","ONZerosuppression");
+  ONDataFormatting; // does not have to be checked
   fConfiguredAltro = 1;
 }
 
index 77629cc8eaca8551faa8868241b00b9f17ecba4c..a0d8acbb4e9edcd9864d4efde6605dde54a4b3a9 100644 (file)
@@ -18,6 +18,9 @@
 //  Class for emulation of the ALTRO chip (Altro digital Chain) in C++       //
 ///////////////////////////////////////////////////////////////////////////////
 
+#include "TSystem.h"
+
+
 #include <iostream>
 #include <stdlib.h>
 #include <stdio.h>
@@ -25,8 +28,9 @@
 
 using namespace std;
 
-class AliTPCAltroEmulator{
-       public:
+class AliTPCAltroEmulator : public TNamed {
+
+public:
        AliTPCAltroEmulator(int timebins, short* Channel);
        AliTPCAltroEmulator(const AliTPCAltroEmulator &sig);
        ~AliTPCAltroEmulator();
@@ -63,7 +67,7 @@ class AliTPCAltroEmulator{
        private:
        int ftimebins;          // timebins
 
-       short *fChannelIn;      // ChannelIn
+       //      short *fChannelIn;      // ChannelIn
        short *fChannelShort;   // incoming signal in short format
        short *fADCkeep;        // ADCkeep
 
index 29028e8585921870136210dea9814e046b52f6dd..97d01b6cce1dfbe399bae4febde4b52f2c9eaa01 100644 (file)
@@ -106,7 +106,7 @@ Double_t AliTPCTempMap::GetTempGradientY(UInt_t timeSec, Int_t side){
  //        or simply chi2 for validity check? 
  //        -> better use GetLinearFitter - function in this case!
   
- TLinearFitter fitter(3,"x0++x1++x2");
+ TLinearFitter *fitter = new TLinearFitter(3,"x0++x1++x2");
  TVectorD param(3);
  Int_t i = 0;
 
@@ -120,14 +120,15 @@ Double_t AliTPCTempMap::GetTempGradientY(UInt_t timeSec, Int_t side){
      x[1]=entry->GetX();
      x[2]=entry->GetY();    
      Double_t y = entry->GetValue(timeSec); // get temperature value
-     fitter.AddPoint(x,y,1); // add values to LinearFitter
+     fitter->AddPoint(x,y,1); // add values to LinearFitter
      i++;
    }
 
  }  
- fitter.Eval();
- fitter.GetParameters(param);
- fitter.~TLinearFitter();
+ fitter->Eval();
+ fitter->GetParameters(param);
+
+ fitter->~TLinearFitter();
 
  return param[2]; // return vertical (Y) tempGradient in [K/cm]
   
@@ -203,7 +204,7 @@ TLinearFitter *AliTPCTempMap::GetLinearFitter(Int_t type, Int_t side, UInt_t tim
 
   // returns TLinearFitter object where Chi2, Fitparameters and residuals can 
   // be extracted via usual memberfunctions
-  // example: fitter.GetParameters(param)
+  // example: fitter->GetParameters(param)
   // In case of type IFC or OFC, the parameters are the gradients in 
   // Z and Y direction (see fitformula)
   // Caution: Parameters are [K/cm] except Y at IFC,OFC ([K/radius])