]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - OADB/AliOADBFillingScheme.cxx
Next version of centrality including other detectors (Alberica)
[u/mrichter/AliRoot.git] / OADB / AliOADBFillingScheme.cxx
index dc92edb242829db0b099f748b148665698c1ded3..dfaa6a12adc8833552563a762024d250aa75fcaa 100644 (file)
@@ -55,21 +55,23 @@ 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, "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();
   
 }
@@ -107,6 +109,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);
 }