]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
ALL QA naming conventions and files in AliQA
authorschutz <schutz@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 7 Nov 2007 10:54:11 +0000 (10:54 +0000)
committerschutz <schutz@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 7 Nov 2007 10:54:11 +0000 (10:54 +0000)
STEER/AliQAChecker.cxx
STEER/AliQAChecker.h
STEER/AliQACheckerBase.cxx
STEER/AliQADataMaker.cxx

index 22173614a260677a7571065e2b962d790a6c779b..17fc2d6a1fdbca90bc4be1453adc844ec6f5845c 100644 (file)
 
 ClassImp(AliQAChecker)
   AliQAChecker * AliQAChecker::fgQAChecker = 0x0 ;
-  TFile   * AliQAChecker::fgQAResultFile        = 0x0 ;  
-//  TString   AliQAChecker::fgQAResultDirName     = "local://RUN/";  
-//  TString   AliQAChecker::fgQAResultFileName    = "QA.root" ; 
 
 //_____________________________________________________________________________
 AliQAChecker::AliQAChecker(const char* name, const char* title) :
   TNamed(name, title),
   fDataFile(0x0), 
-//  fRefDirName("./Ref/"), 
-//  fRefName("QA.root"), 
   fFoundDetectors(".")
 {
   // ctor: initialise checkers and open the data file   
   for (Int_t det = 0 ; det < AliQA::kNDET ; det++) 
     fCheckers[det] = NULL ; 
-  
-//  fRefDirName.Append(fRefName) ; 
 }
 
 //_____________________________________________________________________________
 AliQAChecker::AliQAChecker(const AliQAChecker& qac) :
   TNamed(qac),
   fDataFile(qac.fDataFile), 
-//  fRefDirName(qac.fRefDirName), 
-//  fRefName(qac.fRefName), 
   fFoundDetectors(qac.fFoundDetectors)
 {
   // copy constructor
@@ -86,48 +77,7 @@ AliQAChecker::~AliQAChecker()
 {
 // clean up
   delete [] fCheckers ; 
-  fgQAResultFile->Close() ; 
-}
-
-//_____________________________________________________________________________
-TFile * AliQAChecker:: GetDataFile(const char * fileName)
-{
-  // Open if necessary the Data file and return its pointer
-
-  if (!fDataFile) 
-       if (!fileName) 
-               fileName = AliQA::GetDataName() ; 
-       if  (!gSystem->AccessPathName(fileName)) {
-               fDataFile =  TFile::Open(fileName) ;
-       } else {
-               AliFatal(Form("File %s not found", fileName)) ; 
-       }
-  return fDataFile ; 
-}
-
-//_____________________________________________________________________________
-TFile * AliQAChecker:: GetQAResultFile() 
-{
-  // Check if file to store QA exists, if not create it
-
-  if (fgQAResultFile) { 
-    if (fgQAResultFile->IsOpen()){
-      fgQAResultFile->Close() ; 
-      fgQAResultFile = 0x0 ; 
-    }
-  }   
-//  if ( fgQAResultFileName.Contains("local://")) 
-//    fgQAResultFileName.ReplaceAll("local:/", "") ;
-//  
-//  TString opt("") ; 
-//  if ( !gSystem->AccessPathName(fgQAResultFileName) )
-//    opt = "UPDATE" ; 
-//  else 
-//    opt = "NEW" ; 
-//  fgQAResultFile = TFile::Open(fgQAResultFileName, opt) ;   
-//      
-  fgQAResultFile = AliQA::GetQAResultFile() ; 
-  return fgQAResultFile ; 
+  AliQA::Close() ; 
 }
 
 //_____________________________________________________________________________
@@ -212,7 +162,7 @@ Bool_t AliQAChecker::Run(const char * fileName)
   stopwatch.Start();
 
   //search for all detectors QA directories
-  TList * detKeyList = GetDataFile(fileName)->GetListOfKeys() ; 
+  TList * detKeyList = AliQA::GetQADataFile(fileName)->GetListOfKeys() ; 
   TIter nextd(detKeyList) ; 
   TKey * detKey ; 
   while ( (detKey = dynamic_cast<TKey *>(nextd()) ) ) {
@@ -229,7 +179,7 @@ Bool_t AliQAChecker::Run(const char * fileName)
        break ; 
       }
     } 
-    TDirectory * detDir = GetDataFile(fileName)->GetDirectory(detKey->GetName()) ; 
+    TDirectory * detDir = AliQA::GetQADataFile(fileName)->GetDirectory(detKey->GetName()) ; 
     TList * taskKeyList = detDir->GetListOfKeys() ;
     TIter nextt(taskKeyList) ; 
     TKey * taskKey ; 
@@ -310,7 +260,6 @@ Bool_t AliQAChecker::Run(AliQA::DETECTORINDEX det, AliQA::TASKINDEX task, TList
                index = AliQA::kREC ; 
   else if ( task == AliQA::kESDS ) 
                index = AliQA::kESD ; 
-
   TDirectory * refDir = GetRefSubDir(AliQA::GetDetName(det).Data(), AliQA::GetTaskName(task).Data()) ;
   if ( refDir ) { 
        qac->Init(det) ; 
@@ -321,31 +270,5 @@ Bool_t AliQAChecker::Run(AliQA::DETECTORINDEX det, AliQA::TASKINDEX task, TList
   
 }
 
-//_____________________________________________________________________________
-//void AliQAChecker::SetQAResultDirName(const char * name)
-//{
-//  // Set the root directory where to store the QA status object
-//
-//  fgQAResultDirName.Prepend(name) ; 
-//  AliInfo(Form("QA results are in  %s", fgQAResultDirName.Data())) ;
-//  if ( fgQAResultDirName.Contains("local://")) 
-//    fgQAResultDirName.ReplaceAll("local:/", "") ;
-//  fgQAResultFileName.Prepend(fgQAResultDirName) ;
-//}
-
-//_____________________________________________________________________________
-//void AliQAChecker::SetRefDirName(const char * name)
-//{
-//  // Set the root directory of reference data
-//
-//  fRefDirName.Prepend(name) ; 
-//  fRefDirName.Append(fRefName) ; 
-//  AliInfo(Form("Reference data are taken from %s", fRefDirName.Data())) ;
-//  if ( fRefDirName.Contains("local://")) 
-//    fRefDirName.ReplaceAll("local:/", "") ; 
-//}
-//
-
-
 
 
index 8e72f14199d324d9bb53c878433615caa9a86cc5..a8ca77164eaebb00684102a0069736c4eda21f9b 100644 (file)
@@ -31,7 +31,7 @@ public:
   static  AliQAChecker * Instance() ;
   AliQACheckerBase *     GetDetQAChecker(Int_t det) ; 
   TDirectory *           GetRefSubDir(const char * det, const char * task) ;
-  static TFile *         GetQAResultFile() ;
+//  static TFile *         GetQAResultFile() ;
 //  static const char *    GetQAResultFileName() { return fgQAResultFileName.Data() ; }
 //  void                   SetQAResultDirName(const char * name) ; 
 //  void                   SetRefDirName(const char * name) ; 
@@ -40,15 +40,9 @@ public:
   virtual Bool_t Run(AliQA::DETECTORINDEX det, AliQA::TASKINDEX task, TList * list);
 
 private:
-  TFile *      GetDataFile(const char * fileName) ; 
 
   static AliQAChecker *fgQAChecker ; // pointer to the instance of the singleton
   TFile * fDataFile ;                     //! Data file to check
-  static TFile * fgQAResultFile ;         //! File where to find the QA result
-//  static TString fgQAResultDirName ;      //! directory where to find the QA result
-//  static TString fgQAResultFileName ;     //! file name where to find the QA result
-//  TString fRefDirName ;                   //! name of directory where to find the reference data file
-//  TString fRefName ;                      //! file name where to find the reference data
   TString fFoundDetectors ;               //! detectors for which the Quality assurance could be done
   AliQACheckerBase * fCheckers[AliQA::kNDET] ; //! list of detectors checkers
   ClassDef(AliQAChecker, 1)  // class for running generation, simulation and digitization
index 4812889c16a735833b8644876c54a025b4a1a333..a5b8131de15c466bffc45c8b85d80e388624197e 100644 (file)
@@ -160,7 +160,7 @@ const Double_t AliQACheckerBase::DiffC(const TH1 * href, const TH1 * hin) const
 {
   // compares two histograms using the Chi2 test
   if ( hin->Integral() == 0 ) {
-    AliWarning(Form("Spectrum %s in %s is empty", hin->GetName(), AliQA::GetDataName())) ; 
+    AliWarning(Form("Spectrum %s is empty", hin->GetName())) ; 
     return 0. ;
   }
     
@@ -172,7 +172,7 @@ const Double_t AliQACheckerBase::DiffK(const TH1 * href, const TH1 * hin) const
 {
   // compares two histograms using the Kolmogorov test
   if ( hin->Integral() == 0 ) {
-    AliWarning(Form("Spectrum %s in %s is empty", hin->GetName(), AliQA::GetDataName())) ; 
+    AliWarning(Form("Spectrum %s is empty", hin->GetName())) ; 
     return 0. ;
   }
     
@@ -217,7 +217,6 @@ void AliQACheckerBase::Finish() const
     
   AliQA * qa = AliQA::Instance() ; 
   qa->Show() ;
-  AliQAChecker::GetQAResultFile()->cd() ; 
+  AliQA::GetQAResultFile()->cd() ; 
   qa->Write(qa->GetName(), kWriteDelete) ;   
-  AliQAChecker::GetQAResultFile()->Close() ;  
 }
index c23f8ec958b576b4343dc79442df7e1e18ce1e61..f2a08ef11006fcfcbdcde28001f5edb0bfc87315 100644 (file)
@@ -373,8 +373,8 @@ void AliQADataMaker::StartOfCycle(AliQA::TASKINDEX task, const Bool_t sameCycle)
        ResetCycle() ;
        if (fOutput) 
                fOutput->Close() ; 
-       fOutput = AliQA::GetQADMOutFile(GetName(), fRun, fCurrentCycle) ;       
- }     
+       fOutput = AliQA::GetQADataFile(GetName(), fRun, fCurrentCycle) ;        
+}      
  AliInfo(Form(" Run %d Cycle %d task %s file %s", 
        fRun, fCurrentCycle, AliQA::GetTaskName(task).Data(), fOutput->GetName() )) ;