]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - STEER/AliQADataMaker.cxx
Fix fixed-string length bug
[u/mrichter/AliRoot.git] / STEER / AliQADataMaker.cxx
index 38c880ef8af0f5079dea3875158b4d1c20d86a22..55a6b7008853a337918e18983c6c0a0be8135013 100644 (file)
@@ -76,6 +76,11 @@ Int_t AliQADataMaker::Add2List(TH1 * hist, const Int_t index, TObjArray * list)
 { 
        // Set histograms memory resident and add to the list
        // Maximm allowed is 10000
+        TString className(hist->ClassName()) ;
+        if( ! className.BeginsWith("T") ) {
+               AliError(Form("QA data Object must be a generic ROOT object and not %s", className.Data())) ; 
+//             return -1 ;
+       }
        if ( index > 10000 ) {
                AliError("Max number of authorized QA objects is 10000") ; 
                return -1 ; 
@@ -103,7 +108,8 @@ void AliQADataMaker::DefaultEndOfDetectorCycle(AliQA::TASKINDEX_t task)
 void AliQADataMaker::Finish() const 
 { 
        // write to the output File
-       fOutput->Close() ; 
+       if (fOutput) 
+               fOutput->Close() ; 
 } 
 
 //____________________________________________________________________________