Replace QADataMakerSteer by QAManager deriving from CDBManager
authorschutz <schutz@f7af4fe6-9843-0410-8265-dc069ae4e863>
Sat, 21 Feb 2009 22:04:32 +0000 (22:04 +0000)
committerschutz <schutz@f7af4fe6-9843-0410-8265-dc069ae4e863>
Sat, 21 Feb 2009 22:04:32 +0000 (22:04 +0000)
STEER/AliCDBManager.cxx
STEER/AliCDBManager.h
STEER/AliQAChecker.cxx
STEER/AliReconstruction.cxx
STEER/AliReconstruction.h
STEER/AliSimulation.cxx
STEER/AliSimulation.h
STEER/CMake_libSTEER.txt
STEER/STEERLinkDef.h
STEER/libSTEER.pkg

index 0bcc853..49ee4f3 100644 (file)
@@ -185,7 +185,6 @@ AliCDBParam* AliCDBManager::CreateParameter(const char* dbString) const {
 // create AliCDBParam object from URI string
 
        TIter iter(&fFactories);
-
         AliCDBStorageFactory* factory=0;
         while ((factory = (AliCDBStorageFactory*) iter.Next())) {
                AliCDBParam* param = factory->CreateParameter(dbString);
@@ -330,6 +329,7 @@ void AliCDBManager::SetDefaultStorage(const char* dbString) {
        if (fStorageMap->Contains("default")) {
                delete fStorageMap->Remove(fStorageMap->GetValue("default"));
        }
+
        fStorageMap->Add(new TObjString("default"), new TObjString(fDefaultStorage->GetURI()));
 }
 
index bfa1ce2..c3d9a8b 100644 (file)
@@ -119,12 +119,15 @@ class AliCDBManager: public TObject {
 
        static AliCDBManager* Instance(TMap *entryCache = NULL, Int_t run = -1);
 
- private:
+       void Init();
+       void InitFromCache(TMap *entryCache, Int_t run);
+  
+protected:
 
        static TString fgkCondUri;      // URI of the Conditions data base folder
        static TString fgkRefUri;       // URI of the Reference data base folder
 
-       AliCDBManager();
+       AliCDBManager() ; 
        AliCDBManager(const AliCDBManager & source);
        AliCDBManager & operator=(const AliCDBManager & source);
 
@@ -138,9 +141,9 @@ class AliCDBManager: public TObject {
        AliCDBParam* SelectSpecificStorage(const TString& path);
        
 
-       void Init();
+//     void Init();
        void InitShortLived();
-       void InitFromCache(TMap *entryCache, Int_t run);
+//     void InitFromCache(TMap *entryCache, Int_t run);
 
 
        TList fFactories;               //! list of registered storage factories
index 6436154..9c7256a 100644 (file)
@@ -22,7 +22,7 @@
 ///////////////////////////////////////////////////////////////////////////////
 
 #include "AliCDBEntry.h"
-#include "AliCDBManager.h"
+#include "AliQAManager.h"
 #include "AliCDBStorage.h"
 #include "AliRunInfo.h" 
 #include "AliLog.h"
@@ -175,7 +175,7 @@ void AliQAChecker::GetRefSubDir(const char * det, const char * task, TDirectory
     AliError(Form("%s is not a valid location for reference data", refStorage.Data())) ; 
     return ; 
   } else {
-    AliCDBManager* man = AliCDBManager::Instance() ;
+    AliQAManager* manQA = AliQAManager::QAManager() ;
     for (Int_t specie = 0 ; specie < AliRecoParam::kNSpecies ; specie++) {
       if ( !AliQA::Instance()->IsEventSpecieSet(specie) ) 
         continue ; 
@@ -185,12 +185,14 @@ void AliQAChecker::GetRefSubDir(const char * det, const char * task, TDirectory
         //  LoadRunInfoFromGRP() ; 
       AliQA::SetQARefDataDirName(specie) ;
       //}
-      if ( ! man->GetLock() ) { 
-        man->SetDefaultStorage(AliQA::GetQARefStorage()) ; 
-        man->SetSpecificStorage("*", AliQA::GetQARefStorage()) ;
+      if ( ! manQA->GetLock() ) { 
+        manQA->SetDefaultStorage(AliQA::GetQARefStorage()) ; 
+        manQA->SetSpecificStorage("*", AliQA::GetQARefStorage()) ;
+        manQA->SetRun(AliCDBManager::Instance()->GetRun()) ; 
+        manQA->SetLock() ; 
       }
       char * detOCDBDir = Form("%s/%s/%s", det, AliQA::GetRefOCDBDirName(), AliQA::GetRefDataDirName()) ; 
-      AliCDBEntry * entry = man->Get(detOCDBDir, man->GetRun()) ;
+      AliCDBEntry * entry = manQA->Get(detOCDBDir, manQA->GetRun()) ;
       if (entry) {
         dirOCDB = new TObjArray*[AliRecoParam::kNSpecies] ;    
         TList * listDetQAD = dynamic_cast<TList *>(entry->GetObject()) ;
index eba15b4..1e3c1e6 100644 (file)
 #include "AliPlaneEff.h"
 #include "AliQA.h"
 #include "AliQADataMakerRec.h" 
-#include "AliQADataMakerSteer.h"
+#include "AliQAManager.h"
 #include "AliRawEvent.h"
 #include "AliRawEventHeaderBase.h"
 #include "AliRawHLTManager.h"
@@ -248,7 +248,7 @@ AliReconstruction::AliReconstruction(const char* gAliceFilename) :
   fInitCDBCalled(kFALSE),
   fSetRunNumberFromDataCalled(kFALSE),
   fQADetectors("ALL"), 
-  fQASteer(NULL),  
+  fQAManager(NULL),  
   fQATasks("ALL"), 
   fRunQA(kTRUE),  
   fRunGlobalQA(kTRUE),
@@ -340,7 +340,7 @@ AliReconstruction::AliReconstruction(const AliReconstruction& rec) :
   fInitCDBCalled(rec.fInitCDBCalled),
   fSetRunNumberFromDataCalled(rec.fSetRunNumberFromDataCalled),
   fQADetectors(rec.fQADetectors), 
-  fQASteer(NULL),  
+  fQAManager(NULL),  
   fQATasks(rec.fQATasks), 
   fRunQA(rec.fRunQA),  
   fRunGlobalQA(rec.fRunGlobalQA),
@@ -469,7 +469,7 @@ AliReconstruction& AliReconstruction::operator = (const AliReconstruction& rec)
   fInitCDBCalled               = rec.fInitCDBCalled;
   fSetRunNumberFromDataCalled  = rec.fSetRunNumberFromDataCalled;
   fQADetectors                 = rec.fQADetectors;
-  fQASteer                     = NULL;  
+  fQAManager                     = NULL;  
   fQATasks                     = rec.fQATasks; 
   fRunQA                       = rec.fRunQA;  
   fRunGlobalQA                 = rec.fRunGlobalQA;
@@ -503,7 +503,7 @@ AliReconstruction::~AliReconstruction()
     delete fAlignObjArray;
   }
   fSpecCDBUri.Delete();
-  delete fQASteer;
+  delete fQAManager;
   AliCodeTimer::Instance()->Print();
 }
 
@@ -934,7 +934,6 @@ Bool_t AliReconstruction::InitGRP() {
   }
 
   fRunInfo = new AliRunInfo(lhcState, beamType, beamEnergy, runType, activeDetectors);
-  printf("qqqqqqqqqqqqqqqqqqqqqqq %s %s %f %s %d\n", lhcState.Data(), beamType.Data(), beamEnergy, runType.Data(), activeDetectors);
   fRunInfo->Dump();
 
 
@@ -1394,22 +1393,23 @@ void AliReconstruction::SlaveBegin(TTree*)
   //QA
   //Initialize the QA and start of cycle 
   if (fRunQA) {
-    fQASteer = new AliQADataMakerSteer("rec") ; 
-    fQASteer->SetActiveDetectors(fQADetectors) ; 
+    fQAManager = AliQAManager::QAManager("rec") ; 
+    fQAManager->SetActiveDetectors(fQADetectors) ; 
     for (Int_t det = 0 ; det < AliQA::kNDET ; det++) {
-      fQASteer->SetCycleLength(AliQA::DETECTORINDEX_t(det), fQACycles[det]) ;  
-      fQASteer->SetWriteExpert(AliQA::DETECTORINDEX_t(det)) ;
+      fQAManager->SetCycleLength(AliQA::DETECTORINDEX_t(det), fQACycles[det]) ;  
+      fQAManager->SetWriteExpert(AliQA::DETECTORINDEX_t(det)) ;
     }
     if (!fRawReader && fQATasks.Contains(AliQA::kRAWS))
       fQATasks.ReplaceAll(Form("%d",AliQA::kRAWS), "") ;
-    fQASteer->SetTasks(fQATasks) ; 
-    fQASteer->InitQADataMaker(AliCDBManager::Instance()->GetRun()) ; 
+    fQAManager->SetTasks(fQATasks) ; 
+    fQAManager->InitQADataMaker(AliCDBManager::Instance()->GetRun()) ; 
   }
   
   if (fRunGlobalQA) {
     Bool_t sameCycle = kFALSE ;
-    if (!fQASteer) fQASteer = new AliQADataMakerSteer("rec") ; 
-    AliQADataMaker *qadm = fQASteer->GetQADataMaker(AliQA::kGLOBAL);
+    if (!fQAManager) 
+      fQAManager = AliQAManager::QAManager("rec") ; 
+    AliQADataMaker *qadm = fQAManager->GetQADataMaker(AliQA::kGLOBAL);
     AliInfo(Form("Initializing the global QA data maker"));
     if (fQATasks.Contains(Form("%d", AliQA::kRECPOINTS))) {
       qadm->StartOfCycle(AliQA::kRECPOINTS, AliCDBManager::Instance()->GetRun(), sameCycle) ; 
@@ -1505,7 +1505,7 @@ Bool_t AliReconstruction::ProcessEvent(Int_t iEvent)
         const AliDetectorRecoParam *par = fRecoParam.GetDetRecoParam(iDet);
         reconstructor->SetRecoParam(par);
         if (fRunQA) {
-          fQASteer->SetRecoParam(iDet, par) ; 
+          fQAManager->SetRecoParam(iDet, par) ; 
         }
       }
     }
@@ -1513,8 +1513,8 @@ Bool_t AliReconstruction::ProcessEvent(Int_t iEvent)
 
     // QA on single raw 
   if (fRunQA) {
-    fQASteer->SetEventSpecie(fRecoParam.GetEventSpecie()) ;
-    fQASteer->RunOneEvent(fRawReader) ;  
+    fQAManager->SetEventSpecie(fRecoParam.GetEventSpecie()) ;
+    fQAManager->RunOneEvent(fRawReader) ;  
   }
     // local single event reconstruction
     if (!fRunLocalReconstruction.IsNull()) {
@@ -1731,15 +1731,15 @@ Bool_t AliReconstruction::ProcessEvent(Int_t iEvent)
     if (fCleanESD) CleanESD(fesd);
 
   if (fRunQA) {
-    fQASteer->SetEventSpecie(fRecoParam.GetEventSpecie()) ;
-    fQASteer->RunOneEvent(fesd) ; 
+    fQAManager->SetEventSpecie(fRecoParam.GetEventSpecie()) ;
+    fQAManager->RunOneEvent(fesd) ; 
   }
   if (fRunGlobalQA) {
-      AliQADataMaker *qadm = fQASteer->GetQADataMaker(AliQA::kGLOBAL);
+      AliQADataMaker *qadm = fQAManager->GetQADataMaker(AliQA::kGLOBAL);
       qadm->SetEventSpecie(fRecoParam.GetEventSpecie()) ;
-      if (qadm && fQATasks.Contains(Form("%d", AliQA::kESDS)))
-        qadm->Exec(AliQA::kESDS, fesd);
-    }
+    if (qadm && fQATasks.Contains(Form("%d", AliQA::kESDS)))
+      qadm->Exec(AliQA::kESDS, fesd);
+  }
 
     if (fWriteESDfriend) {
       //      fesdf->~AliESDfriend();
@@ -1779,7 +1779,7 @@ Bool_t AliReconstruction::ProcessEvent(Int_t iEvent)
     }
        
   if (fRunQA || fRunGlobalQA) 
-      fQASteer->Increment() ; 
+      fQAManager->Increment() ; 
   
     return kTRUE;
 }
@@ -1843,10 +1843,10 @@ void AliReconstruction::SlaveTerminate()
 
   // End of cycle for the in-loop  
   if (fRunQA) 
-    fQASteer->EndOfCycle() ;
+    fQAManager->EndOfCycle() ;
   
   if (fRunGlobalQA) {
-    AliQADataMaker *qadm = fQASteer->GetQADataMaker(AliQA::kGLOBAL);
+    AliQADataMaker *qadm = fQAManager->GetQADataMaker(AliQA::kGLOBAL);
     if (qadm) {
       if (fQATasks.Contains(Form("%d", AliQA::kRECPOINTS))) 
         qadm->EndOfCycle(AliQA::kRECPOINTS);
@@ -1939,8 +1939,8 @@ Bool_t AliReconstruction::RunLocalEventReconstruction(const TString& detectors)
 
                TString detQAStr(fQADetectors) ; 
                if (fRunQA) {
-      fQASteer->SetEventSpecie(fRecoParam.GetEventSpecie()) ;
-                       fQASteer->RunOneEventInOneDetector(iDet, clustersTree) ; 
+      fQAManager->SetEventSpecie(fRecoParam.GetEventSpecie()) ;
+                       fQAManager->RunOneEventInOneDetector(iDet, clustersTree) ; 
     }
        loader->WriteRecPoints("OVERWRITE");
        loader->UnloadRecPoints();
index 3b3ea78..4b71cdc 100644 (file)
@@ -35,7 +35,7 @@ class AliVertexerTracks;
 class TFile;
 class TTree;
 class TList;
-class AliQADataMakerSteer; 
+class AliQAManager; 
 class TMap;
 class AliRecoParam;
 class AliDetectorRecoParam;
@@ -264,7 +264,7 @@ private:
   Int_t  fQACycles[     AliQA::kNDET];  // # events over which QA data are accumulated
   Bool_t fQAWriteExpert[AliQA::kNDET];  // Flag to save or not expert QA data
   TString               fQADetectors ;  // list of detectors to be QA'ed       
-  AliQADataMakerSteer * fQASteer    ;   //! steering class to run QA
+  AliQAManager * fQAManager    ;   //! steering class to run QA
   TString               fQATasks ;      // list of QA tasks to be performed    
   Bool_t                fRunQA ;        // Run QA flag
   Bool_t                fRunGlobalQA;   // Run global QA flag
index 77ff6f9..07e0fb4 100644 (file)
@@ -191,7 +191,7 @@ AliSimulation::AliSimulation(const char* configFileName,
   fLego(NULL),
   fQADetectors("ALL"),                  
   fQATasks("ALL"),     
-  fQASteer(NULL), 
+  fQAManager(NULL), 
   fRunQA(kTRUE), 
   fEventSpecie(AliRecoParam::kDefault),
   fRunHLT("default"),
@@ -202,10 +202,10 @@ AliSimulation::AliSimulation(const char* configFileName,
   SetGAliceFile("galice.root");
   
 // for QA
-       fQASteer = new AliQADataMakerSteer("sim") ; 
-       fQASteer->SetActiveDetectors(fQADetectors) ; 
+       fQAManager = AliQAManager::QAManager("sim") ; 
+       fQAManager->SetActiveDetectors(fQADetectors) ; 
        fQATasks = Form("%d %d %d", AliQA::kHITS, AliQA::kSDIGITS, AliQA::kDIGITS) ; 
-       fQASteer->SetTasks(fQATasks) ;  
+       fQAManager->SetTasks(fQATasks) ;        
 }
 
 //_____________________________________________________________________________
@@ -225,7 +225,7 @@ AliSimulation::~AliSimulation()
   fSpecCDBUri.Delete();
   if (fgInstance==this) fgInstance = 0;
 
-       delete fQASteer ; 
+       delete fQAManager ; 
        
   AliCodeTimer::Instance()->Print();
 }
@@ -1983,12 +1983,12 @@ Bool_t AliSimulation::RunQA()
        // run the QA on summable hits, digits or digits
        
   if(!gAlice) return kFALSE;
-       fQASteer->SetRunLoader(AliRunLoader::Instance()) ;
+       fQAManager->SetRunLoader(AliRunLoader::Instance()) ;
 
        TString detectorsw("") ;  
        Bool_t rv = kTRUE ; 
-  fQASteer->SetEventSpecie(fEventSpecie) ;
-       detectorsw = fQASteer->Run(fQADetectors.Data()) ; 
+  fQAManager->SetEventSpecie(fEventSpecie) ;
+       detectorsw = fQAManager->Run(fQADetectors.Data()) ; 
        if ( detectorsw.IsNull() ) 
                rv = kFALSE ; 
        return rv ; 
@@ -2035,10 +2035,10 @@ Bool_t AliSimulation::SetRunQA(TString detAndAction)
     tempo.ReplaceAll(Form("%d", AliQA::kDIGITS), AliQA::GetTaskName(AliQA::kDIGITS)) ;         
        AliInfo( Form("QA will be done on \"%s\" for \"%s\"\n", fQADetectors.Data(), tempo.Data()) ) ;  
        fRunQA = kTRUE ;
-       fQASteer->SetActiveDetectors(fQADetectors) ; 
-       fQASteer->SetTasks(fQATasks) ; 
+       fQAManager->SetActiveDetectors(fQADetectors) ; 
+       fQAManager->SetTasks(fQATasks) ; 
   for (Int_t det = 0 ; det < AliQA::kNDET ; det++) 
-    fQASteer->SetWriteExpert(AliQA::DETECTORINDEX_t(det)) ;
+    fQAManager->SetWriteExpert(AliQA::DETECTORINDEX_t(det)) ;
   
        return kTRUE; 
 } 
index 8349af1..f7121d1 100644 (file)
@@ -16,7 +16,7 @@
 #include <TString.h>
 #include <TObjArray.h>
 #include "AliQA.h"
-#include "AliQADataMakerSteer.h"
+#include "AliQAManager.h"
 
 class AliCDBId;
 class AliCDBParam;
@@ -112,10 +112,10 @@ public:
 
   //Quality Assurance
   Int_t       GetDetIndex(const char * detector);
-  void        SetQACycles(AliQA::DETECTORINDEX_t det, const Int_t cycles) {  fQASteer->SetCycleLength(det, cycles) ; }
+  void        SetQACycles(AliQA::DETECTORINDEX_t det, const Int_t cycles) {  fQAManager->SetCycleLength(det, cycles) ; }
   Bool_t      RunQA() ;
   Bool_t      SetRunQA(TString detAndAction="ALL:ALL") ; 
-  void        SetQAWriteExpert(AliQA::DETECTORINDEX_t det) { fQASteer->SetWriteExpert(det) ; }
+  void        SetQAWriteExpert(AliQA::DETECTORINDEX_t det) { fQAManager->SetWriteExpert(det) ; }
 
   void SetWriteGRPEntry(Bool_t flag = kTRUE) { fWriteGRPEntry = flag; }
   void WriteGRPEntry();
@@ -175,7 +175,7 @@ private:
   static const char *  fgkDetectorName[fgkNDetectors] ; // names of detectors
   TString              fQADetectors ;                   // list of detectors to be QA'ed       
   TString              fQATasks ;                       // list of QA tasks to be performed    
-  AliQADataMakerSteer * fQASteer ;                      // steering object to run QA
+  AliQAManager * fQAManager ;                      // steering object to run QA
   Bool_t               fRunQA ;                         // Runs the QA at the end of simulation
   AliRecoParam::EventSpecie_t fEventSpecie ;                   // type of event (see AliRecoParam::EventSpecie_t)
 
index 59e235e..1d29319 100644 (file)
@@ -53,7 +53,7 @@ AliGlobalQADataMaker.cxx
 AliQADataMakerSim.cxx 
 AliQADataMakerRec.cxx 
 AliCorrQADataMakerRec.cxx 
-AliQADataMakerSteer.cxx 
+AliQAManager.cxx 
 AliQAChecker.cxx 
 AliCorrQAChecker.cxx 
 AliGlobalQAChecker.cxx 
index 31fa36f..4621ca3 100644 (file)
 #pragma link C++ class AliQADataMakerRec+;
 #pragma link C++ class AliCorrQADataMakerRec+;
 #pragma link C++ class AliGlobalQADataMaker+;
-#pragma link C++ class AliQADataMakerSteer+;
+#pragma link C++ class AliQAManager+;
 #pragma link C++ class AliQAChecker+;
 #pragma link C++ class AliCorrQAChecker+;
 #pragma link C++ class AliGlobalQAChecker+;
index 8cea582..f54f481 100644 (file)
@@ -53,7 +53,7 @@ AliGlobalQADataMaker.cxx \
 AliQADataMakerSim.cxx \
 AliQADataMakerRec.cxx \
 AliCorrQADataMakerRec.cxx \
-AliQADataMakerSteer.cxx \
+AliQAManager.cxx \
 AliQAChecker.cxx \
 AliCorrQAChecker.cxx \
 AliGlobalQAChecker.cxx \