]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Fixes for compile issues in HLT branch with clang 5.0/C++11 (savannah #103408).
authortkollegg <Thorsten.Kollegger@cern.ch>
Tue, 10 Dec 2013 20:25:44 +0000 (21:25 +0100)
committertkollegg <Thorsten.Kollegger@cern.ch>
Tue, 10 Dec 2013 21:24:32 +0000 (22:24 +0100)
HLT/JET/AliHLTJETReader.cxx
HLT/MUON/OnlineAnalysis/AliHLTMUONFullTracker.cxx
HLT/MUON/OnlineAnalysis/AliHLTMUONFullTracker.h
HLT/RCU/AliHLTAltroGenerator.cxx
HLT/RCU/AliHLTAltroGenerator.h
HLT/TPCLib/AliHLTTPCClusterFinder.cxx
HLT/TPCLib/AliHLTTPCHWCFSpacePointContainer.cxx
HLT/TPCLib/AliHLTTPCRawSpacePointContainer.cxx
HLT/TPCLib/tracking-ca/AliTPCtrackerCA.cxx
HLT/TPCLib/transform/AliHLTTPCFastTransform.cxx
HLT/global/AliHLTGlobalEsdConverterComponent.cxx

index 6b144e66b47a634767676e8e511a4eb9c54511ff..3aa10b2526f499b2d481ba617456ce9112a1c980 100644 (file)
@@ -508,7 +508,7 @@ Bool_t AliHLTJETReader::FillGridMC() {
     if ( ! fTrackCuts->IsSelected(particle) )
       continue;
 
-    const Float_t aEtaPhi[]  = { particle->Eta(), particle->Phi(), particle->Pt() }; 
+    const Float_t aEtaPhi[]  = { static_cast<Float_t>(particle->Eta()), static_cast<Float_t>(particle->Phi()), static_cast<Float_t>(particle->Pt()) }; 
           Int_t   aGridIdx[] = { -1, -1, -1, -1, -1 };
 
     fGrid->FillTrack(particle, aEtaPhi, aGridIdx);
@@ -557,7 +557,7 @@ Bool_t AliHLTJETReader::FillGridHLTMC() {
     if ( ! fTrackCuts->IsSelected(particle) )
       continue;
 
-    const Float_t aEtaPhi[]  = { particle->Eta(), particle->Phi(), particle->Pt() }; 
+    const Float_t aEtaPhi[]  = { static_cast<Float_t>(particle->Eta()), static_cast<Float_t>(particle->Phi()), static_cast<Float_t>(particle->Pt()) }; 
           Int_t   aGridIdx[] = { -1, -1, -1, -1, -1 };
 
     // -- Fill grid
@@ -615,7 +615,7 @@ Bool_t AliHLTJETReader::FillGridESD() {
     if ( ! fTrackCuts->IsSelected(esdTrack) )
       continue;
 
-    const Float_t aEtaPhi[]  = { esdTrack->Eta(), esdTrack->Phi(), esdTrack->Pt() }; 
+    const Float_t aEtaPhi[]  = { static_cast<Float_t>(esdTrack->Eta()), static_cast<Float_t>(esdTrack->Phi()), static_cast<Float_t>(esdTrack->Pt()) }; 
           Int_t   aGridIdx[] = { -1, -1, -1, -1, -1 };
 
     // -- Fill grid
index 57fa935047a446ce4c6a1cd6bacae782202e035c..b26f5a4e0f5ccb819e8f3d7f57b7d8b4255cf4da 100644 (file)
@@ -90,7 +90,7 @@ class TMap;
 
 class AliHLTMUONFullTracker;
 
-const Float_t AliHLTMUONFullTracker::fgkTrackDetCoordinate[3] = {
+const Double_t AliHLTMUONFullTracker::fgkTrackDetCoordinate[3] = {
   155.179+20.0,  166.234+20.0, 
   (AliMUONConstants::DefaultChamberZ(4)+ AliMUONConstants::DefaultChamberZ(5))/2.0
 };
index e1814a93f23827abf2a80a5f87acac242b749bc9..10519c6dfa792e0f7b2377ec8c8eff68b4cc9e9b 100644 (file)
@@ -113,7 +113,7 @@ class AliHLTMUONFullTracker : public AliHLTLogging
     Int_t fCharge;       /// charge
   }; 
 
-  static const Float_t fgkTrackDetCoordinate[3]; /// set the constant value for third station position and size
+  static const Double_t fgkTrackDetCoordinate[3]; /// set the constant value for third station position and size
   
   static const Double_t fgkAbsoedge[4] ;     /// edge of the absorber
   static const Double_t fgkRadLen[3] ;       /// radiation length of the main three matirials of the front absorber
index c7b00af09a4ffdaba0e17b5f808fd444eb1af99d..d4bc2bbe4fb4bc11ada30d9ea4abccda68460c03 100644 (file)
@@ -116,7 +116,7 @@ int AliHLTAltroGenerator::Generate()
     HLTDebug("simulate channel %d: address %d", channel, channelAddress);
 
     // save beginning of this channel for better navigation
-    AliChannelPosition position={channelAddress, dataPos, 0};
+    AliChannelPosition position={static_cast<AliHLTUInt16_t>(channelAddress), dataPos, 0};
 
     // add channel address and bunch count at the beginning
     if (fpSimData->GetSize()<dataPos+2) fpSimData->Set(dataPos+2);
index 35375305bce1e78cdd46dc0274bd84d6ac2c8640..ddba74733dcb39fb0274cb483c0d4d32a4b28151 100644 (file)
@@ -24,7 +24,7 @@
 #include <vector>
 #include <ostream>
 
-class AliRawDataHeader;
+struct AliRawDataHeader;
 class TArrayS;
 class TArrayC;
 class TRandom;
index d582f80682239d42f93aededa1c92d254dd78066..c131c40bea8600f9c2c614ef157442788640ca88 100644 (file)
@@ -1213,7 +1213,7 @@ void AliHLTTPCClusterFinder::WriteClusters(Int_t nclusters,AliClusterData *list)
          fSpacePointData[counter].fZ = xyz[2];
        }
        else{
-         Double_t x[3]={thisrow,fpad+.5,ftime}; 
+         Double_t x[3]={static_cast<Double_t>(thisrow),fpad+.5,ftime}; 
          Int_t iSector[1]={thissector};
          fOfflineTransform->Transform(x,iSector,0,1);
          double y[3] = {x[0], x[1], x[2] };      
index 1f9eed51838d72a3a0dda2a5d2bb700072716e07..433b4b6ac19f70fd044db44278abacc6a0fb6302 100644 (file)
@@ -463,7 +463,7 @@ void AliHLTTPCHWCFSpacePointContainer::Print(ostream& out, Option_t */*option*/)
        cl!=fClusters.end(); cl++) {
     str << " 0x" << hex << setw(8) << setfill('0') << cl->first << dec << cl->second << endl;
   }
-  out << str;
+  out << str.str();
 }
 
 AliHLTSpacePointContainer* AliHLTTPCHWCFSpacePointContainer::SelectByMask(AliHLTUInt32_t mask, bool /*bAlloc*/) const
@@ -888,7 +888,7 @@ void AliHLTTPCHWCFSpacePointContainer::AliHLTTPCHWCFSpacePointProperties::Print(
       << " " << setw(5) << decoder->GetCharge(fIndex) 
       << " " << setw(5) << decoder->GetQMax(fIndex)
       << " " << fTrackId << " " << fMCId << " " << fUsed;
-  out << str;
+  out << str.str();
 }
 
 ostream& operator<<(ostream &out, const AliHLTTPCHWCFSpacePointContainer::AliHLTTPCHWCFSpacePointProperties& p)
index b8b79c2aa9f2e2c8ba9d9627d4c2a174ff6d167a..92751a51016d4dba00240e3b101f2aa557de5de8 100644 (file)
@@ -433,7 +433,7 @@ void AliHLTTPCRawSpacePointContainer::Print(ostream& out, Option_t */*option*/)
        cl!=fClusters.end(); cl++) {
     str << " 0x" << hex << setw(8) << setfill('0') << cl->first << dec << cl->second << endl;
   }
-  out << str;
+  out << str.rdbuf();
 }
 
 AliHLTSpacePointContainer* AliHLTTPCRawSpacePointContainer::SelectByMask(AliHLTUInt32_t mask, bool /*bAlloc*/) const
@@ -860,7 +860,7 @@ void AliHLTTPCRawSpacePointContainer::AliHLTTPCRawSpacePointProperties::Print(os
       << " " << setw(5) << fpCluster->GetCharge() 
       << " " << setw(5) << fpCluster->GetQMax()
       << " " << fTrackId << " " << fMCId << " " << fUsed;
-  out << str;
+  out << str.rdbuf();
 }
 
 ostream& operator<<(ostream &out, const AliHLTTPCRawSpacePointContainer::AliHLTTPCRawSpacePointProperties& p)
index 1ec9bbb268f02e80bc12828ba5fc80e2e62c82ef..3556530a3582fd423531c7e7dbfae21203c85193 100644 (file)
@@ -312,7 +312,7 @@ int AliTPCtrackerCA::LoadClusters ( TTree * fromTree )
       }
 
       transform->SetCurrentRecoParam((AliTPCRecoParam*)AliTPCReconstructor::GetRecoParam());
-      double xx[3] = {cluster->GetRow(), cluster->GetPad(), cluster->GetTimeBin()};
+      double xx[3] = {static_cast<double>(cluster->GetRow()), cluster->GetPad(), cluster->GetTimeBin()};
       int id[1] = {cluster->GetDetector()};
       transform->Transform( xx, id, 0, 1 );
 
index 0014ab6c31ad98a9933d24c6c5b00886b28bb654..6eadb91584fc50fd23c5505930d3888ab93a295e 100644 (file)
@@ -217,8 +217,9 @@ Int_t AliHLTTPCFastTransform::SetCurrentTimeStamp( Long_t TimeStamp )
   Int_t nTimeBins = tpcParam->GetMaxTBin();
   Int_t is[]={0};
   bool sign = 0;
-  for( fLastTimeBin=0; fLastTimeBin<nTimeBins; fLastTimeBin++){  
-    Double_t xx[]={0,0,fLastTimeBin};
+  for( fLastTimeBin=0; fLastTimeBin<nTimeBins; fLastTimeBin++){
+    // static cast is okay since fLastTimeBin has limited value range  
+    Double_t xx[]={0,0,static_cast<Double_t>(fLastTimeBin)};
     fOrigTransform->Transform(xx,is,0,1);
     bool s = (xx[2]>=0);
     if( fLastTimeBin==0 ) sign = s;
@@ -275,7 +276,7 @@ Int_t AliHLTTPCFastTransform::InitRow( Int_t iSector, Int_t iRow )
     for( Int_t j=0; j<fRows[iSector][iRow]->fSpline[i].GetNPoints(); j++){
       Float_t pad, time;
       fRows[iSector][iRow]->fSpline[i].GetAB(j,pad,time);
-      Double_t xx[]={iRow,pad,time};
+      Double_t xx[]={static_cast<Double_t>(iRow),pad,time};
       fOrigTransform->Transform(xx,is,0,1);
       fRows[iSector][iRow]->fSpline[i].Fill(j,xx);    
     }
index fc5cb03b6e74e0064d54e0b3636e89efe41bdd90..b3b318b0b79841a4f7fdf46c464c06eaea2418f5 100644 (file)
@@ -462,10 +462,10 @@ int AliHLTGlobalEsdConverterComponent::ProcessBlocks(TTree* pTree, AliESDEvent*
       for (vector<AliHLTGlobalBarrelTrack>::iterator element=tracks.begin();
           element!=tracks.end(); element++) {
        Float_t points[4] = {
-         element->GetX(),
-         element->GetY(),
-         element->GetLastPointX(),
-         element->GetLastPointY()
+         static_cast<Float_t>(element->GetX()),
+         static_cast<Float_t>(element->GetY()),
+         static_cast<Float_t>(element->GetLastPointX()),
+         static_cast<Float_t>(element->GetLastPointY())
        };
 
        Int_t mcLabel = -1;