]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - OADB/AliOADBFillingScheme.cxx
remove unused code
[u/mrichter/AliRoot.git] / OADB / AliOADBFillingScheme.cxx
index dc92edb242829db0b099f748b148665698c1ded3..1a61fb55b1258c4f90e2f087da2854dd7de7d57f 100644 (file)
@@ -55,21 +55,26 @@ const char *  AliOADBFillingScheme::GetBXIDs(const char * beamSide) const
 {
   //  Returns the bunch crossing numbers for the different beam classes. By default this is empty
 
-  if (!strcmp(beamSide, "AC")) {
-
-    TString  bxa =  ((TObjString*)fBXIds->GetValue("A"))->String(); 
-    TString  bxc =  ((TObjString*)fBXIds->GetValue("C"))->String();
-    if(!bxa && !bxc) return "";
-    if(!bxc)         return bxa.Data();
-    if(!bxa)         return bxa.Data();
-    TString bxBoth = bxa.Data();
+  if( !strcmp(beamSide,"ACE") && !(TObjString*)fBXIds->GetValue(beamSide)) 
+    AliWarning("Beware, no correction for the BXIDs for ACE");
+
+  if (!strcmp(beamSide, "AC") && !(TObjString*)fBXIds->GetValue(beamSide)) {
+
+    TString  &bxa =  ((TObjString*)fBXIds->GetValue("A"))->String(); 
+    TString  &bxc =  ((TObjString*)fBXIds->GetValue("C"))->String();
+    if(bxa.IsNull() && bxc.IsNull()) return "";
+    if(bxc.IsNull())         return bxa.Data();
+    if(bxa.IsNull())         return bxc.Data();
+    static TString bxBoth = bxa.Data();
     bxBoth += bxc.Data();
     return bxBoth.Data();
 
   } 
 
-  TString  bx =  ((TObjString*)fBXIds->GetValue(beamSide))->String(); 
-  if(!bx) return "";
+  if(!(TObjString*)fBXIds->GetValue(beamSide)) return "";
+
+  TString  &bx =  ((TObjString*)fBXIds->GetValue(beamSide))->String(); 
+  if(bx.IsNull()) return "";
   return bx.Data();
   
 }
@@ -97,6 +102,7 @@ void AliOADBFillingScheme::Browse(TBrowser *b)
       }
       b->Add(folder);
       delete tokIter;
+      delete tokens;
     }
     delete mapIter;    
   }     
@@ -107,6 +113,6 @@ void AliOADBFillingScheme::Browse(TBrowser *b)
 void AliOADBFillingScheme::Print(Option_t* option) const {
   // Print Class contents
   // Option is passed to TMap::Print
-  cout << "Filling scheme Name " <<  fFSName.Data() << endl;
+  cout << "Filling scheme Name " <<  fFSName.Data() << option << endl;
   fBXIds->Print(option);
 }