]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - ITS/AliITSPlaneEff.cxx
fix compilation
[u/mrichter/AliRoot.git] / ITS / AliITSPlaneEff.cxx
index ae8af5b74df996e874ce1f71e529013d83f93c2a..4a74d83c46387cb4afa1266cd258a9b6528377e7 100644 (file)
 
 ClassImp(AliITSPlaneEff)
 //______________________________________________________________________
-AliITSPlaneEff::AliITSPlaneEff(): TObject(),
+AliITSPlaneEff::AliITSPlaneEff(): AliPlaneEff(),
 fRunNumber(0), 
 fCDBUri(""),
-fInitCDBCalled(kFALSE)
+fInitCDBCalled(kFALSE),
+fHis(kFALSE)
 {
     // Default constructor
     // Inputs:
@@ -46,13 +47,14 @@ fInitCDBCalled(kFALSE)
     //    none.
     // Return:
     //    a default constructed AliITSPlaneEff class
- InitCDB();
//InitCDB();
 }
 //______________________________________________________________________
-AliITSPlaneEff::AliITSPlaneEff(const AliITSPlaneEff &s) : TObject(s),
+AliITSPlaneEff::AliITSPlaneEff(const AliITSPlaneEff &s) : AliPlaneEff(s),
 fRunNumber(s.fRunNumber),
 fCDBUri(s.fCDBUri),
-fInitCDBCalled(s.fInitCDBCalled)
+fInitCDBCalled(s.fInitCDBCalled),
+fHis(s.fHis)
 {
     //     Copy Constructor
     // Inputs:
@@ -90,18 +92,31 @@ AliITSPlaneEff&  AliITSPlaneEff::operator=(const AliITSPlaneEff &source){
        source.Copy(*this);
     }
     return *this;
-//    if(&s == this) return *this;
-//    this->fRunNumber         = s.fRunNumber;
-//    this->fCDBUri            = s.fCDBUri;
-//    this->fInitCDBCalled     = s.fInitCDBCalled;
-//    return *this;
 }
-//_____________________________________________________________
+//_________________________________________________________________________
+/*
+AliPlaneEff&  AliITSPlaneEff::operator=(const
+                                           AliPlaneEff &s){
+    //    Assignment operator
+    // Inputs:
+    //    AliPlaneEff &s The original class for which
+    //                          this class is a copy of
+    // Outputs:
+    //    none.
+    // Return: 
+
+    if(&s == this) return *this;
+    AliWarning("AliITSPlaneEff Not allowed to make a = Using default creator instead");
+    return *this;
+}
+*/
+//_________________________________________________________________________
 void AliITSPlaneEff::Copy(TObject &obj) const {
   // copy this to obj
   ((AliITSPlaneEff& ) obj).fRunNumber          = fRunNumber;
   ((AliITSPlaneEff& ) obj).fCDBUri             = fCDBUri;
   ((AliITSPlaneEff& ) obj).fInitCDBCalled      = fInitCDBCalled;
+  ((AliITSPlaneEff& ) obj).fHis                        = fHis;
 }
 //_________________________________________________________________________
 Double_t AliITSPlaneEff::PlaneEff(Int_t nf,Int_t nt) const {
@@ -133,8 +148,8 @@ Double_t AliITSPlaneEff::ErrPlaneEff(Int_t nf,Int_t nt) const{
 if(nf<0 || nt<=0 || nt<nf) {
    AliInfo(Form("AliITSPlaneEff::ErrPlaneEff: nfound= %i, ntried= %i",nf,nt)); 
    return -1.;}
- Double_t err=TMath::Sqrt(nf*(1.-nf/nt));
- return err/=nt;
+ Double_t err=TMath::Sqrt((Double_t)nf*(1.-(Double_t)nf/(Double_t)nt));
+ return err/=(Double_t)nt;
 }
 //______________________________________________________________________
 Int_t AliITSPlaneEff::GetNTracksForGivenEff(Double_t eff, Double_t RelErr) const {
@@ -158,7 +173,7 @@ void AliITSPlaneEff::InitCDB()
 // First check if we have any CDB storage set, because it is used
 // to retrieve the calibration and alignment constants
 
-  if (fInitCDBCalled) return;
+  //if (fInitCDBCalled) return;
   fInitCDBCalled = kTRUE;
 
   AliCDBManager* man = AliCDBManager::Instance();
@@ -177,7 +192,7 @@ void AliITSPlaneEff::InitCDB()
         AliDebug(2, Form("Default CDB storage is set to: %s", fCDBUri.Data()));
         AliDebug(2, "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!");
     } else {
-        fCDBUri="local://$ALICE_ROOT";
+        fCDBUri="local://$ALICE_ROOT/OCDB";
         AliWarning("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!");
         AliWarning("Default CDB storage not yet set !!!!");
         AliWarning(Form("Setting it now to: %s", fCDBUri.Data()));
@@ -185,7 +200,9 @@ void AliITSPlaneEff::InitCDB()
 
     }
     man->SetDefaultStorage(fCDBUri);
+    man->SetRun(fRunNumber);
   }
+  return;
 }
 //_____________________________________________________________________________
 void AliITSPlaneEff::SetDefaultStorage(const char* uri) {