]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
change the identification method of expert detectors; allow to write TObject in the...
authorschutz <schutz@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 2 Sep 2008 15:26:53 +0000 (15:26 +0000)
committerschutz <schutz@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 2 Sep 2008 15:26:53 +0000 (15:26 +0000)
STEER/AliQA.cxx
STEER/AliQA.h
STEER/AliQADataMaker.cxx
STEER/AliQADataMakerRec.cxx
STEER/AliQADataMakerSteer.cxx

index 765e9cb255f3f2fd23d50401fed72e04aa232df7..f72869c2df1e948c914ec717bb44ec23e4ad322a 100644 (file)
@@ -76,7 +76,8 @@ const TString AliQA::fkgQACorrNtName     = "CorrQA" ;
 const TString AliQA::fkgRefOCDBDirName   = "Ref"  ; 
 TString AliQA::fkgRefDataDirName              = ""  ; 
 const TString AliQA::fkgQARefOCDBDefault = "alien://folder=/alice/QA/20"  ; 
-const TString AliQA::fkgExpert           = "QAExpErT" ; 
+const TString AliQA::fkgExpert           = "Expert" ; 
+const UInt_t  AliQA::fkgExpertBit        = 16 ; 
 
 //____________________________________________________________________________
 AliQA::AliQA() : 
@@ -395,7 +396,7 @@ const AliQA::TASKINDEX_t AliQA::GetTaskIndex(const char * name)
 {
        // returns the detector index corresponding to a given name
        TString sname(name) ; 
-       TASKINDEX_t rv ; 
+       TASKINDEX_t rv = kNULLTASKINDEX 
        for (Int_t tsk = 0; tsk < kNTASKINDEX ; tsk++) {
                if ( GetTaskName(tsk) == sname ) {
                        rv = TASKINDEX_t(tsk) ; 
@@ -718,7 +719,7 @@ void AliQA::ShowASCIIStatus(DETECTORINDEX_t det, ALITASK_t tsk, const ULong_t st
                }
        }
        if (! text.IsNull())
-               printf("           %8s %4s 0x%4x, Problem signalled: %8s \n", GetDetName(det).Data(), GetAliTaskName(tsk), status, text.Data()) ; 
+               printf("           %8s %4s 0x%4lx, Problem signalled: %8s \n", GetDetName(det).Data(), GetAliTaskName(tsk), status, text.Data()) ; 
 }
 
 //_______________________________________________________________
index 257f2d28b52c5bade9ce97777bb922dc5648d078..1ef9c1d9372cdbc0a291079e42735a892a0720e6 100644 (file)
@@ -51,6 +51,7 @@ public:
        static void            Close() ; 
        static const char *    GetAliTaskName(ALITASK_t tsk) ;
   static const TString   GetExpert() { return fkgExpert ; }
+  static const UInt_t    GetExpertBit() { return fkgExpertBit ; }
        static const TString   GetLabLocalFile() { return fkgLabLocalFile ; } 
        static const TString   GetLabLocalOCDB() { return fkgLabLocalOCDB ; } 
        static const TString   GetLabAliEnOCDB() { return fkgLabAliEnOCDB ; } 
@@ -125,6 +126,7 @@ private:
        static TString       fgRTNames[]                  ; //! list of Run Type names   
        static TString       fgTaskNames[]              ; //! list of tasks names   
   static const TString fkgExpert              ; //! name for the expert directory
+  static const UInt_t  fkgExpertBit           ; //! TObject bit identifing the object as "expert"
        static const TString fkgLabLocalFile        ; //! label to identify a file as local 
        static const TString fkgLabLocalOCDB        ; //! label to identify a file as local OCDB 
        static const TString fkgLabAliEnOCDB        ; //! label to identify a file as AliEn OCDB 
index 6142b13fe4e390bf88e35a7b4c60c20f29591f1d..bbd3da17549de6d71eef01f35951835ff1be842b 100644 (file)
@@ -91,12 +91,11 @@ Int_t AliQADataMaker::Add2List(TH1 * hist, const Int_t index, TObjArray * list,
                return -1 ; 
        } else {
                hist->SetDirectory(0) ; 
-    if (expert) {
-      TString name(hist->GetTitle()) ; 
-      name.Append(AliQA::GetExpert()) ; 
-      hist->SetTitle(name) ;
-    }
-               list->AddAtAndExpand(hist, index) ; 
+    
+    if (expert) 
+      hist->SetBit(AliQA::GetExpertBit()) ; 
+               
+    list->AddAtAndExpand(hist, index) ; 
     char * name = Form("%s_%s", list->GetName(), hist->GetName()) ;  
     TParameter<double> * p = new TParameter<double>(name, 9999.9999) ;
     if(saveForCorr) {  
index c519ace3325630903c8d8380c8cb7f0cb4451907..ca8ee953d1fded31bcd6dccd4d67572070d0ed9b 100644 (file)
@@ -131,25 +131,20 @@ void AliQADataMakerRec::EndOfCycle(AliQA::TASKINDEX_t task)
                subDir->cd() ; 
                if (list) {
       TIter next(list) ; 
-      TH1 * obj ; 
-      while ( (obj = dynamic_cast<TH1 *>(next())) ) {
-        TString name(obj->GetTitle()) ;
-        if (!name.Contains(AliQA::GetExpert())) {
+      TObject * obj ; 
+      while( (obj = next()) ) {
+        if (!obj->TestBit(AliQA::GetExpertBit()))
           obj->Write() ;
-        }
       }
       if (WriteExpert()) {
         TDirectory * expertDir = subDir->GetDirectory(AliQA::GetExpert()) ; 
         if ( expertDir ) { // Write only if requested
           expertDir->cd() ;
           next.Reset() ; 
-          while ( (obj = dynamic_cast<TH1 *>(next())) ) {
-            TString name(obj->GetTitle()) ;
-            if (!name.Contains(AliQA::GetExpert())) 
+          while( (obj = next()) ) {
+            if (!obj->TestBit(AliQA::GetExpertBit()))
               continue ; 
-            name.ReplaceAll(AliQA::GetExpert(), "") ;
-            obj->SetTitle(name) ; 
-          obj->Write() ;
+            obj->Write() ;
           }      
         }
       }
index 271966ac10b21ac44c865cda963e78b82682ff7c..2b78a24cf07053c0851e0a1db5a0ebb8986f2797 100644 (file)
@@ -640,7 +640,6 @@ Bool_t AliQADataMakerSteer::MergeData(const Int_t runNumber) const
        ifstream in("tempo.txt") ; 
        const Int_t runMax = 10 ;  
        TString file[AliQA::kNDET*runMax] ;
-       Int_t run[AliQA::kNDET*runMax] = {-1} ;
        
        Int_t index = 0 ; 
        while ( 1 ) {