Correct compilation errors on HP
authorfca <fca@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 2 Aug 1999 09:20:52 +0000 (09:20 +0000)
committerfca <fca@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 2 Aug 1999 09:20:52 +0000 (09:20 +0000)
MUON/AliMUON.cxx
MUON/AliMUON.h
MUON/AliMUONClusterFinder.cxx
MUON/AliMUONdisplay.cxx
MUON/AliMUONv0.cxx

index 2ce4bf4368043236256b6e42950452e678318dac..1edc5120eee65565cbe3e72670c36dee5d278d19 100644 (file)
@@ -103,7 +103,7 @@ Float_t type_of_call rndm() {return gRandom->Rndm();}
 // Static variables for the pad-hit iterator routines
 static Int_t sMaxIterPad=0;
 static Int_t sCurIterPad=0;
-static TTree *TH1;
+static TTree *TrH1;
 static TTree *TK1;
 static TClonesArray *fHits2;        //Listof hits for one track only
 static TClonesArray *fClusters2;    //List of clusters for one track only
@@ -206,24 +206,25 @@ AliMUON::~AliMUON()
 
     printf("Calling AliMUON destructor !!!\n");
     
+  Int_t i;
   fIshunt  = 0;
   delete fHits;
   delete fClusters;
   delete fTreeC;
 
-  for (Int_t i=0;i<10;i++) {
+  for (i=0;i<10;i++) {
       delete (*fDchambers)[i];
       fNdch[i]=0;
   }
   delete fDchambers;
 
-  for (Int_t i=0;i<10;i++) {
+  for (i=0;i<10;i++) {
       delete (*fRawClusters)[i];
       fNrawch[i]=0;
   }
   delete fRawClusters;
 
-  for (Int_t i=0;i<10;i++) {
+  for (i=0;i<10;i++) {
       delete (*fCathCorrel)[i];
       fNcorch[i]=0;
   }
@@ -722,8 +723,8 @@ void AliMUON::Digitise(Int_t nev,Int_t bgr_ev,Option_t *option,Option_t *opt,Tex
     // keep galice.root for signal and name differently the file for 
     // background when add! otherwise the track info for signal will be lost !
   
-    static Bool_t first=true;
-//    static TTree *TH1;
+    static Bool_t first=kTRUE;
+//    static TTree *TrH1;
     static TFile *File;
     char *Add = strstr(option,"Add");
     //char *listoftracks = strstr(opt,"listoftracks");
@@ -751,37 +752,37 @@ void AliMUON::Digitise(Int_t nev,Int_t bgr_ev,Option_t *option,Option_t *opt,Tex
            fHits2     = new TClonesArray("AliMUONhit",1000  );
            fClusters2 = new TClonesArray("AliMUONcluster",10000);
        }           
-       first=false;
+       first=kFALSE;
        File->cd();
        //File->ls();
        // Get Hits Tree header from file
        if(fHits2) fHits2->Clear();
        if(fClusters2) fClusters2->Clear();
-       if(TH1) delete TH1;
-       TH1=0;
+       if(TrH1) delete TrH1;
+       TrH1=0;
        
        char treeName[20];
        sprintf(treeName,"TreeH%d",bgr_ev);
-       TH1 = (TTree*)gDirectory->Get(treeName);
-        //printf("TH1 %p of treename %s for event %d \n",TH1,treeName,bgr_ev);
+       TrH1 = (TTree*)gDirectory->Get(treeName);
+        //printf("TrH1 %p of treename %s for event %d \n",TrH1,treeName,bgr_ev);
        
-       if (!TH1) {
+       if (!TrH1) {
            printf("ERROR: cannot find Hits Tree for event:%d\n",bgr_ev);
        }
        // Set branch addresses
        TBranch *branch;
        char branchname[20];
        sprintf(branchname,"%s",GetName());
-       if (TH1 && fHits2) {
-           branch = TH1->GetBranch(branchname);
+       if (TrH1 && fHits2) {
+           branch = TrH1->GetBranch(branchname);
            if (branch) branch->SetAddress(&fHits2);
        }
-       if (TH1 && fClusters2) {
-           branch = TH1->GetBranch("MUONCluster");
+       if (TrH1 && fClusters2) {
+           branch = TrH1->GetBranch("MUONCluster");
            if (branch) branch->SetAddress(&fClusters2);
        }
 // test
-       //Int_t ntracks1 =(Int_t)TH1->GetEntries();
+       //Int_t ntracks1 =(Int_t)TrH1->GetEntries();
        //printf("background - ntracks1 - %d\n",ntracks1);
     }
     //
@@ -943,7 +944,7 @@ void AliMUON::Digitise(Int_t nev,Int_t bgr_ev,Option_t *option,Option_t *opt,Tex
        // open the file with background
        
        if (Add ) {
-           ntracks =(Int_t)TH1->GetEntries();
+           ntracks =(Int_t)TrH1->GetEntries();
            //printf("background - icat,ntracks1  %d %d\n",icat,ntracks);
            //printf("background - Start loop over tracks \n");     
 //
@@ -954,7 +955,7 @@ void AliMUON::Digitise(Int_t nev,Int_t bgr_ev,Option_t *option,Option_t *opt,Tex
                if (fHits2)       fHits2->Clear();
                if (fClusters2)   fClusters2->Clear();
 
-               TH1->GetEvent(track);
+               TrH1->GetEvent(track);
 //
 //   Loop over hits
                AliMUONhit* mHit;
@@ -968,12 +969,12 @@ void AliMUON::Digitise(Int_t nev,Int_t bgr_ev,Option_t *option,Option_t *opt,Tex
                    Int_t rmax = (Int_t)iChamber->ROuter();
                     Float_t xbgr=mHit->fX;
                    Float_t ybgr=mHit->fY;
-                   Bool_t cond=false;
+                   Bool_t cond=kFALSE;
                    
                    for (Int_t imuon =0; imuon < nmuon[nch]; imuon++) {
                        Float_t dist= (xbgr-xhit[nch][imuon])*(xbgr-xhit[nch][imuon])
                            +(ybgr-yhit[nch][imuon])*(ybgr-yhit[nch][imuon]);
-                       if (dist<100) cond=true;
+                       if (dist<100) cond=kTRUE;
                    }
                    if (!cond) continue;
                    
@@ -1150,11 +1151,11 @@ void AliMUON::Digitise(Int_t nev,Int_t bgr_ev,Option_t *option,Option_t *opt,Tex
        MUON->ResetDigits();
        list->Delete();
        //printf("Here\n");
-       for(Int_t i=0;i<10;++i) {
-           if (HitMap[i]) {
-               hm=HitMap[i];
+       for(Int_t ii=0;ii<10;++ii) {
+           if (HitMap[ii]) {
+               hm=HitMap[ii];
                delete hm;
-               HitMap[i]=0;
+               HitMap[ii]=0;
            }
        }
        
@@ -1321,7 +1322,7 @@ void AliMUON::CathodeCorrelation(Int_t nev)
 // Loop on chambers and on clusters on the cathode plane with the highest
 // number of clusters
 
-    static Bool_t first=true;
+    static Bool_t first=kTRUE;
 
      AliMUONRawCluster  *mRaw1;
      AliMUONRawCluster  *mRaw2;
@@ -1346,7 +1347,7 @@ void AliMUON::CathodeCorrelation(Int_t nev)
      Float_t xrec2, yrec2;
      Float_t xd0, xdif, ydif;
      Float_t ysrch,xd,xmax,ymax;
-     Int_t ilow, iup, iraw1;
+     Int_t ilow, iup, iraw1, i;
      //
      Float_t xarray[50];
      Float_t xdarray[50];
@@ -1356,14 +1357,14 @@ void AliMUON::CathodeCorrelation(Int_t nev)
 
      // Int_t nraw[2], entry,cathode;
 
-     for (int i=0;i<50;i++) {
+     for (i=0;i<50;i++) {
          xdarray[i]=1100.;
          xarray[i]=0.;
          yarray[i]=0.;
          qarray[i]=0.;
          idx2[i]=-1;
      }
-     for (int i=0;i<4;i++) {
+     for (i=0;i<4;i++) {
           idx[i]=-1;
           xc2[i]=0.;
           yc2[i]=0.;
@@ -1508,17 +1509,17 @@ void AliMUON::CathodeCorrelation(Int_t nev)
                 //if (idx[0] <0)  printf("iraw1 imax idx2[0] idx[0] %d %d %d %d\n",iraw1,imax,idx2[0],idx[0]);
                  AddCathCorrel(ich,idx,xc2,yc2);
                 // reset
-                 for (int i=0;i<counter;i++) {
-                    xdarray[i]=1100.;
-                    xarray[i]=0.;
-                    yarray[i]=0.;
-                    qarray[i]=0.;
-                    idx2[i]=-1;
+                 for (Int_t ii=0;ii<counter;ii++) {
+                    xdarray[ii]=1100.;
+                    xarray[ii]=0.;
+                    yarray[ii]=0.;
+                    qarray[ii]=0.;
+                    idx2[ii]=-1;
                 }
-                 for (int i=0;i<3;i++) {
-                    idx[i]=-1;
-                    xc2[i]=0.;
-                    yc2[i]=0.;
+                 for (Int_t iii=0;iii<3;iii++) {
+                    idx[iii]=-1;
+                    xc2[iii]=0.;
+                    yc2[iii]=0.;
                 }
             } // iraw1
         }
@@ -1532,7 +1533,7 @@ void AliMUON::CathodeCorrelation(Int_t nev)
 // 
      if (first) {
          MakeTreeC("C");
-         first=false;
+         first=kFALSE;
      }
      TTree *TC=TreeC();
      TC->Fill();
@@ -1542,10 +1543,10 @@ void AliMUON::CathodeCorrelation(Int_t nev)
      static Int_t countev=0;
      Int_t countch=0;
 
-     for (int i=0;i<10;i++) {
-          fCch= CathCorrelAddress(i);
+     for (Int_t ii=0;ii<10;ii++) {
+          fCch= CathCorrelAddress(ii);
           Int_t ncor=fCch->GetEntriesFast();
-          printf (" i, ncor %d %d \n",i,ncor);
+          printf (" ii, ncor %d %d \n",ii,ncor);
            if (ncor>=2) countch++;
      }
 
@@ -1804,7 +1805,7 @@ void AliMUON::Reconst(Int_t &ifit, Int_t &idebug, Int_t bgd_ev, Int_t &nev, Int_
   //
   // open kine and hits tree of background file for reconstruction of geant hits 
   // call tracking fortran program
-  static Bool_t first=true;
+  static Bool_t first=kTRUE;
   static TFile *File;
   char *Add = strstr(option,"Add");
   
@@ -1816,31 +1817,31 @@ void AliMUON::Reconst(Int_t &ifit, Int_t &idebug, Int_t bgd_ev, Int_t &nev, Int_
       cout<<"I have opened "<<fFileName<<" file "<<endl;
       fHits2     = new TClonesArray("AliMUONhit",1000  );
       fParticles2 = new TClonesArray("GParticle",1000);
-      first=false;
+      first=kFALSE;
     }
     File->cd();
     if(fHits2) fHits2->Clear();
     if(fParticles2) fParticles2->Clear();
-    if(TH1) delete TH1;
-    TH1=0;
+    if(TrH1) delete TrH1;
+    TrH1=0;
     if(TK1) delete TK1;
     TK1=0;
     // Get Hits Tree header from file
     char treeName[20];
     sprintf(treeName,"TreeH%d",bgd_ev);
-    TH1 = (TTree*)gDirectory->Get(treeName);
-    if (!TH1) {
+    TrH1 = (TTree*)gDirectory->Get(treeName);
+    if (!TrH1) {
       printf("ERROR: cannot find Hits Tree for event:%d\n",bgd_ev);
     }
     // set branch addresses
     TBranch *branch;
     char branchname[30];
     sprintf(branchname,"%s",GetName());
-    if (TH1 && fHits2) {
-      branch = TH1->GetBranch(branchname);
+    if (TrH1 && fHits2) {
+      branch = TrH1->GetBranch(branchname);
       if (branch) branch->SetAddress(&fHits2);
     }
-    TH1->GetEntries();
+    TrH1->GetEntries();
     // get the Kine tree
     sprintf(treeName,"TreeK%d",bgd_ev);
     TK1 = (TTree*)gDirectory->Get(treeName);
@@ -2412,15 +2413,15 @@ void trackf_read_geant(Int_t *itypg, Double_t *xtrg, Double_t *ytrg, Double_t *p
       } // if MUON
   } // track loop first file
 
-  if (TH1 && fHits2 ) { // if background file
-    ntracks =(Int_t)TH1->GetEntries();
+  if (TrH1 && fHits2 ) { // if background file
+    ntracks =(Int_t)TrH1->GetEntries();
     printf("Trackf_read - 2-nd file - ntracks %d\n",ntracks);
 
     //  Loop over tracks
     for (Int_t track=0; track<ntracks; track++) {
       
       if (fHits2) fHits2->Clear();
-      TH1->GetEvent(track);
+      TrH1->GetEvent(track);
 
       //  Loop over hits
       for (int i=0;i<fHits2->GetEntriesFast();i++) 
@@ -2469,7 +2470,7 @@ void trackf_read_geant(Int_t *itypg, Double_t *xtrg, Double_t *ytrg, Double_t *p
          } // check limits (maxidg)
        } // hit loop 
     } // track loop
-  } // if TH1
+  } // if TrH1
 
   ievr = nev;
   nhittot1 = maxidg ;
index 3e32f6f3a911b83dadfaebecf467a0eb7670dfbc..0d53e7421c46adaee86265089fcd91043330a93b 100644 (file)
@@ -344,7 +344,7 @@ public:
 
    Float_t GetRadius() {return TMath::Sqrt(fX*fX+fY*fY);}
 
-   Bool_t IsSortable() const {return true;}
+   Bool_t IsSortable() const {return kTRUE;}
    Int_t  Compare(TObject *obj);
    Int_t PhysicsContribution();
    static Int_t BinarySearch(Float_t r, TArrayF, Int_t from, Int_t upto);
index 687559a8ec094d2d49bd8c3c3f7802372735b242..472c8a13cb4e0dbe88a4b1c2999a39042466b9d3 100644 (file)
@@ -463,9 +463,9 @@ void AliMUONClusterFinder::SplitByLocalMaxima(AliMUONRawCluster *c)
             cnew.fX=Float_t(xrec[j]);
             cnew.fY=Float_t(yrec[j]);
             if (j==0) {
-                cnew.fQ=static_cast<Int_t>(gChargeTot*qfrac);
+                cnew.fQ=Int_t(gChargeTot*qfrac);
             } else {
-                cnew.fQ=static_cast<Int_t>(gChargeTot*(1-qfrac));
+                cnew.fQ=Int_t(gChargeTot*(1-qfrac));
             }
             gSegmentation->SetHit(xrec[j],yrec[j]);
             for (i=0; i<mul; i++) {
@@ -483,7 +483,7 @@ void AliMUONClusterFinder::SplitByLocalMaxima(AliMUONRawCluster *c)
         }
      }
 
-     Bool_t fitted=true;
+     Bool_t fitted=kTRUE;
 
      if (NLocal !=2 || !fitted) {
  // Check if enough local clusters have been found,
@@ -855,7 +855,7 @@ SinoidalFit(Float_t x, Float_t y, TF1 &func)
     count++;
     sprintf(canvasname,"c%d",count);
 
-    Int_t ns=101;
+    const Int_t ns=101;
     Float_t xg[ns], yg[ns], xrg[ns], yrg[ns];
     Float_t xsig[ns], ysig[ns];
    
@@ -1060,7 +1060,7 @@ Float_t DiscrCharge(Int_t i,Double_t *par)
        }
        gFirst=0;
        //printf("\n sum of charge from DiscrCharge %f\n", qtot);
-       gChargeTot=static_cast<Int_t>(qtot);
+       gChargeTot=Int_t(qtot);
        
     }
     gSegmentation->SetPad(gix[i], giy[i]);
index 10cbb9a1b90e44284c4b86fce614c18ce0bc1c64..547b82bec26411f7bbafc73ea6fcd76cdf585d4f 100644 (file)
@@ -935,6 +935,7 @@ void AliMUONdisplay::LoadHits(Int_t chamber)
 // Loop on all detectors
 
    if (chamber > 10) return;
+   Int_t track;
 
    fChamber=chamber;
  
@@ -951,7 +952,7 @@ void AliMUONdisplay::LoadHits(Int_t chamber)
 
 
    Int_t nthits=0;
-    for (Int_t track=0; track<ntracks;track++) {
+    for (track=0; track<ntracks;track++) {
       gAlice->ResetHits();
       gAlice->TreeH()->GetEvent(track);
          TClonesArray *MUONhits  = MUON->Hits();
@@ -974,7 +975,7 @@ void AliMUONdisplay::LoadHits(Int_t chamber)
    // end old stuff
 
     Int_t nhold=0;
-    for (Int_t track=0; track<ntracks;track++) {
+    for (track=0; track<ntracks;track++) {
       gAlice->ResetHits();
       gAlice->TreeH()->GetEvent(track);
          TClonesArray *MUONhits  = MUON->Hits();
index c40dac891d7e8f9a21aea716a9207f5eda50dc59..a36153e4df58bc1d1bff26430335ea2fc4383fc4 100644 (file)
@@ -93,7 +93,7 @@ void AliMUONv0::CreateGeometry()
      Float_t zpos1, zpos2, zfpos;
      Float_t dframep=3.; // Value for station 3 should be 6 ...
      Float_t dframep1=3.;
-     Bool_t frames=true;
+     Bool_t frames=kTRUE;
      
      
      Float_t dframez=0.9;