changed the name of the Sim->sin and Rec->rec libraries; printout the QA status only...
authorschutz <schutz@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 18 Jun 2009 11:54:34 +0000 (11:54 +0000)
committerschutz <schutz@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 18 Jun 2009 11:54:34 +0000 (11:54 +0000)
STEER/AliQACheckerBase.cxx
STEER/AliQAManager.cxx
STEER/AliQAManager.h
STEER/AliReconstruction.cxx
STEER/AliSimulation.cxx
test/QA/Save2OCDB.C

index 6226a0a..eda65bb 100644 (file)
@@ -263,7 +263,7 @@ void AliQACheckerBase::Finish() const
 {
        // wrap up and save QA in proper file
        AliQAv1 * qa = AliQAv1::Instance() ; 
-       qa->Show() ;
+       //qa->Show() ;
        AliQAv1::GetQAResultFile()->cd() ; 
        qa->Write(qa->GetName(), kWriteDelete) ;   
        AliQAv1::GetQAResultFile()->Close() ; 
index c1d73b9..6d0babc 100644 (file)
 //                                                                           //
 // class for running the QA makers                                           //
 //                                                                           //
-//   AliQAManager qas;                                                //
-//   qas.Run(AliQAv1::kRAWS, rawROOTFileName);                                 //
-//   qas.Run(AliQAv1::kHITS);                                                  //
-//   qas.Run(AliQAv1::kSDIGITS);                                               //
-//   qas.Run(AliQAv1::kDIGITS);                                                //
-//   qas.Run(AliQAv1::kRECPOINTS);                                             //
-//   qas.Run(AliQAv1::kESDS);                                                  //
+//   AliQAManager qas;                                                       //
+//   qas.Run(AliQAv1::kRAWS, rawROOTFileName);                               //
+//   qas.Run(AliQAv1::kHITS);                                                //
+//   qas.Run(AliQAv1::kSDIGITS);                                             //
+//   qas.Run(AliQAv1::kDIGITS);                                              //
+//   qas.Run(AliQAv1::kRECPOINTS);                                           //
+//   qas.Run(AliQAv1::kESDS);                                                //
 //                                                                           //
 ///////////////////////////////////////////////////////////////////////////////
 
@@ -135,6 +135,7 @@ AliQAManager::AliQAManager(const Char_t * mode, const Char_t* gAliceFilename) :
     }
   }
   SetWriteExpert() ; 
+  fMode.ToLower() ; 
   if (fMode.Contains("sim")) 
                fMode.ReplaceAll("s", "S") ; 
   else if (fMode.Contains("rec")) 
@@ -377,7 +378,7 @@ AliLoader * AliQAManager::GetLoader(Int_t iDet)
 {
        // get the loader for a detector
 
-       if ( !fRunLoader || iDet == AliQAv1::kCORR) 
+       if ( !fRunLoader || iDet == AliQAv1::kCORR || iDet == AliQAv1::kGLOBAL ) 
                return NULL ; 
        
        TString detName = AliQAv1::GetDetName(iDet) ;
@@ -470,7 +471,7 @@ AliQADataMaker * AliQAManager::GetQADataMaker(const Int_t iDet)
       if ( AliRecoParam::Convert(qadm->GetRecoParam()->GetEventSpecie()) != AliRecoParam::kDefault)  
         qadm->SetEventSpecie(qadm->GetRecoParam()->GetEventSpecie()) ; 
 
-  } else {
+  } else if ( iDet != AliQAv1::kCORR ) {
     
     // load the QA data maker object
     TPluginManager* pluginManager = gROOT->GetPluginManager() ;
@@ -483,7 +484,9 @@ AliQADataMaker * AliQAManager::GetQADataMaker(const Int_t iDet)
     if (!pluginHandler) {
       AliDebug(AliQAv1::GetQADebugLevel(), Form("defining plugin for %s", qadmName.Data())) ;
       TString libs = gSystem->GetLibraries() ;
-      if (libs.Contains("lib" + detName + GetMode() + ".so") || (gSystem->Load("lib" + detName + GetMode() + ".so") >= 0)) {
+      TString temp(GetMode()) ;
+      temp.ToLower() ; 
+      if (libs.Contains("lib" + detName + GetMode() + ".so") || (gSystem->Load("lib" + detName + temp.Data() + ".so") >= 0)) {
         pluginManager->AddHandler("AliQADataMaker", detName, qadmName, detName + "qadm", qadmName + "()") ;
       } else {
         pluginManager->AddHandler("AliQADataMaker", detName, qadmName, detName, qadmName + "()") ;
@@ -1080,8 +1083,10 @@ AliQAManager * AliQAManager::QAManager(const Char_t * mode, TMap *entryCache, In
   // returns AliQAManager instance (singleton)
   
        if (!fgQAInstance) {
-    if ( (strcmp(mode, "sim") != 0) && (strcmp(mode, "rec") != 0) )
-      AliFatalClass("You must specify sim or rec") ; 
+    if ( (strcmp(mode, "sim") != 0) && (strcmp(mode, "rec") != 0) ) {
+      AliErrorClass("You must specify sim or rec") ; 
+      return NULL ; 
+    }
     fgQAInstance = new AliQAManager(mode) ;  
     if (!entryCache)
                  fgQAInstance->Init();
@@ -1431,8 +1436,8 @@ void AliQAManager::SetWriteExpert()
 
 //_____________________________________________________________________________
 void AliQAManager::Destroy() {
-// delete AliQAManager instance and
-// all associated objects
+  // delete AliQAManager instance and
+  // all associated objects
 
   if (fgQAInstance) {
     delete fgQAInstance ;
@@ -1440,3 +1445,10 @@ void AliQAManager::Destroy() {
   }
 }
 
+//_____________________________________________________________________________
+void AliQAManager::ShowQA() {
+  // Show the result of the QA checking
+  // for all detectors 
+       for ( Int_t detIndex = 0 ; detIndex < AliQAv1::kNDET ; detIndex++) 
+    AliQAv1::Instance(AliQAv1::GetDetIndex(AliQAv1::GetDetName(detIndex)))->Show() ; 
+}
index edaa287..4ef5c80 100644 (file)
@@ -43,7 +43,8 @@ private:
   ~AliQAManager() ; 
 
 public:
-       void             EndOfCycle(TObjArray * detArray=0x0) ; 
+  static void      Destroy() ;
+  void             EndOfCycle(TObjArray * detArray=0x0) ; 
   void             EndOfCycle(TString detectors) ; 
        UInt_t           GetCurrentEvent() const { return fCurrentEvent ; }
        TObjArray *      GetFromOCDB(AliQAv1::DETECTORINDEX_t det, AliQAv1::TASKINDEX_t task, const Char_t * year) const ; 
@@ -78,8 +79,8 @@ public:
        void             SetRunLoader(AliRunLoader * rl) { fRunLoader = rl ; }
        void             SetTasks(TString tasks) { fTasks = tasks ; }
   void             SetWriteExpert() ; 
-  static void      Destroy();
-
+  void             ShowQA() ; 
+  
 private: 
        Bool_t                  DoIt(const AliQAv1::TASKINDEX_t taskIndex) ;
        AliLoader * GetLoader(Int_t iDet) ; 
index d63f8bc..a1ad956 100644 (file)
@@ -2840,6 +2840,8 @@ void AliReconstruction::CleanUp()
     ffile = NULL;
   }
 
+  if (AliQAManager::QAManager())
+    AliQAManager::QAManager()->ShowQA() ; 
   AliQAManager::Destroy() ; 
   
   TGeoGlobalMagField::Instance()->SetField(NULL);
index 312e237..cb51924 100644 (file)
@@ -226,7 +226,8 @@ AliSimulation::~AliSimulation()
   fSpecCDBUri.Delete();
   if (fgInstance==this) fgInstance = 0;
 
-  AliQAManager:: Destroy() ;   
+  AliQAManager::QAManager()->ShowQA() ; 
+  AliQAManager::Destroy() ;    
   AliCodeTimer::Instance()->Print();
 }
 
index b5e3913..8f74199 100644 (file)
@@ -1,12 +1,12 @@
 void Save2OCDB(Int_t runNumber=0) 
 {
   // Save QA data generated by DataMaker into OCDB
-  const char * kYear = "08" ; 
+  const char * kYear = "09" ; 
   // where ? 
   //AliQA::SetQARefStorage(Form("%s%s/", AliQA::GetQARefDefaultStorage(), kYear)) ;
-  AliQA::SetQARefStorage("local://$ALICE_ROOT/OCDB") ;
-  AliQA::SetQARefDataDirName(AliQA::kMONTECARLO) ; //RUN_TYPE
+  AliQA::SetQARefStorage("local://$ALICE_ROOT/QAref/TOF/QA") ;
+  AliQA::SetQARefDataDirName(AliQA::kLowMul) ; //Event Specie
   AliQADataMakerSteer qas ; 
-  qas.Save2OCDB(runNumber) ; 
+  qas.Save2OCDB(runNumber, AliRecoParam::kLowMult, kYear, "TOF") ; 
 }