]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - RAW/AliTPCHuffman.cxx
fix some coding violations.
[u/mrichter/AliRoot.git] / RAW / AliTPCHuffman.cxx
index 15bc19f6126b44d8c7cd573da0319787aba6310e..e59e2e0dca2c2250911900b342b8f43a71f3be08 100644 (file)
@@ -48,7 +48,8 @@ AliTPCHNode::AliTPCHNode(Int_t sym, Double_t freq){
 
 //////////////////////////////////////////////////////////////////////////////
 
-AliTPCHNode::AliTPCHNode(const AliTPCHNode &source){
+AliTPCHNode::AliTPCHNode(const AliTPCHNode &source)
+  :TObject(source){
   //Copy Constructor 
   if(&source == this) return;
   this->fSymbol = source.fSymbol;
@@ -118,7 +119,8 @@ AliTPCHTable::AliTPCHTable(Int_t size){
 
 //////////////////////////////////////////////////////////////////////////////
 
-AliTPCHTable::AliTPCHTable(const AliTPCHTable &source){
+AliTPCHTable::AliTPCHTable(const AliTPCHTable &source)
+  :TObject(source){
   //Copy Constructor 
   if(&source == this) return;
   this->fSize = source.fSize;
@@ -188,16 +190,16 @@ void AliTPCHTable::PrintTable()const{
     if (fCodeLen[i]){
       cout.width(6);cout<<fSym[i];
       cout.width(3);cout<<"|";
-      cout.width(6);cout<<hex<<(ULong_t)fCode[i]<<dec;
+      cout.width(6);cout<<hex<<(UInt_t)fCode[i]<<dec;
       cout.width(5);cout<<"|";
-      cout.width(6);cout<<(ULong_t)fCodeLen[i]<<endl;  
+      cout.width(6);cout<<(UInt_t)fCodeLen[i]<<endl;  
     }//end if
   }//end for
 }
 
 //////////////////////////////////////////////////////////////////////////////
 
-Bool_t AliTPCHTable::SpanTree(AliTPCHNode *start, ULong_t code, UChar_t len){
+Bool_t AliTPCHTable::SpanTree(AliTPCHNode *start, UInt_t code, UChar_t len){
   //Hoffman codes are generated spanning the Huffman tree
   //In an Huffman tree any internal node has always two children
   AliTPCHNode * visited;
@@ -234,7 +236,7 @@ void AliTPCHTable::ClearTable(){
 Int_t  AliTPCHTable::GetFrequencies(const char *fname){
   //It fills the "fCode" array with the frequencies of the symbols read from the file
   AliTPCBuffer160 buff(fname,0);
-  ULong_t numberOfWords=0;
+  UInt_t numberOfWords=0;
   Int_t val;
   while((val=buff.GetNext())!=-1){
     fCode[val]++;
@@ -252,7 +254,7 @@ Int_t  AliTPCHTable::GetFrequencies(const char *fname){
   return 0;
 }
 
-Int_t AliTPCHTable::SetValFrequency(const Int_t Val,Double_t Value){
+Int_t AliTPCHTable::SetValFrequency(Int_t Val,Double_t Value){
   //This method sets to "Value" the frequency of the symbol "Val"
   fCode[Val]=Value;
   fNum=1;
@@ -261,7 +263,7 @@ Int_t AliTPCHTable::SetValFrequency(const Int_t Val,Double_t Value){
 
 //////////////////////////////////////////////////////////////////////////////
 
-Int_t AliTPCHTable::SetFrequency(const Int_t Val){
+Int_t AliTPCHTable::SetFrequency(Int_t Val){
   //It increments by one the frequency of the symbol "Val" whose frequency is 
   //stored in the fCode array
   fCode[Val]++;
@@ -306,7 +308,7 @@ void AliTPCHTable::CompleteTable(Int_t k){
   //According to the kind of table (0..4) it associates a dummy frequency (1) to 
   //every symbols whose real frequency is zero, in a given range 0..max
   Int_t max;
-  ULong_t val;
+  UInt_t val;
   switch(k){
   case 0:
     max=fSize;