]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Changed name of the QA data output file. Close file at the beginning of new cycle
authorschutz <schutz@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 9 Oct 2007 08:01:56 +0000 (08:01 +0000)
committerschutz <schutz@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 9 Oct 2007 08:01:56 +0000 (08:01 +0000)
PHOS/AliPHOSQualAssDataMaker.cxx
STEER/AliQualAss.cxx
STEER/AliQualAss.h
STEER/AliQualAssCheckerBase.cxx
STEER/AliQualAssDataMaker.cxx
STEER/AliQualAssDataMaker.h

index 73df306a252c13b40d947e609bcf479f37d2b8be..805c619553a9ff5e098bc9021b77aa653fa6454f 100644 (file)
@@ -156,7 +156,7 @@ void AliPHOSQualAssDataMaker::InitRaws()
   for (Int_t mod = 0; mod < modMax; mod++) {
    sprintf(title, "Raws x Columns for PHOS module %d", mod+1) ;  
    sprintf(name, "hPHOSxyMod%d", mod+1) ; 
-   h1[mod] = new TH2I(name, title, 64, 0, 63, 56, 0, 55) ; 
+   h1[mod] = new TH2I(name, title, 64, 1, 65, 56, 1, 57) ; 
    Add2RawsList(h1[mod], mod+1) ;
   }
   TH1F * h6 = new TH1F("hPhosRawtime", "Time of raw hits in PHOS", 100, 0, 100.) ; 
index 04bdc4f31a4b0552fc85ddc064b3bffe5ff5ba3c..d75e7fd8a804f31641981105796da8d011c4344e 100644 (file)
@@ -45,7 +45,7 @@ ClassImp(AliQualAss)
 
   AliQualAss * AliQualAss::fgQA        = 0x0 ;
   TFile      * AliQualAss::fgDataFile  = 0x0 ;   
-  TString      AliQualAss::fgDataName  = "QAData" ;   
+  TString      AliQualAss::fgDataName  = "QA" ;   
   TString      AliQualAss::fgDetNames[]  = {"ITS", "TPC", "TRD", "TOF", "PHOS", "HMPID", "EMCAL", "MUON", "FMD",
                                        "ZDC", "PMD", "T0", "VZERO", "ACORDE", "HLT"} ;   
   TString      AliQualAss::fgTaskNames[]  = {"Raws", "Hits", "SDigits", "Digits", "RecPoints", "TrackSegments", "RecParticles", "ESDs"} ;   
@@ -162,11 +162,11 @@ const Bool_t AliQualAss::CheckRange(QABIT bit) const
 
 
 //_______________________________________________________________
-TFile * AliQualAss::GetQADMOutFile(Int_t run, Int_t cycle) 
+TFile * AliQualAss::GetQADMOutFile(const char * name, const Int_t run, const Int_t cycle) 
 {
   // opens the file to store the detectors Quality Assurance Data Maker results
   char temp[100] ; 
-  sprintf(temp, "%s_%d_%d.root", fgDataName.Data(), run, cycle) ; 
+  sprintf(temp, "%s.%s.%d.%d.root", name, fgDataName.Data(), run, cycle) ; 
   TString opt ; 
   if (! fgDataFile ) {     
     if  (gSystem->AccessPathName(temp))
index ee4e68b7740010abcc92c38fa6abddd91c25e817..cd3335d4c12d2a59695f7b6a7a618d9065879272 100644 (file)
@@ -49,7 +49,7 @@ public:
   static const TString   GetDetName(DETECTORINDEX det) { return fgDetNames[det] ; }
   static const TString   GetTaskName(TASKINDEX tsk) { return fgTaskNames[tsk] ; }
   static const char *    GetDetName(Int_t det) ;
-  static TFile *         GetQADMOutFile(Int_t run, Int_t cycle) ; 
+  static TFile *         GetQADMOutFile(const char * name, const Int_t run, const Int_t cycle) ; 
   void                   Set(QABIT bit) ;
   void                   Show() const { ShowStatus(fDet) ; }
   void                   ShowAll() const ;
index 9db870b37d3ffa0bb0f2dd5912ddd1ffade2d603..7bcf92c0df627ea457e289c2165255ae2235e6c5 100644 (file)
@@ -90,13 +90,13 @@ const Double_t AliQualAssCheckerBase::Check()
        TKey * key ;
        count = 0 ; 
        while ( (key = static_cast<TKey *>(next())) ) {
-        TObject * odata = fRefSubDir->Get(key->GetName()) ; 
-        if ( odata->IsA()->InheritsFrom("TH1") ) {
-          TH1 * hdata = static_cast<TH1*>(odata) ; 
-          TH1 * href  = static_cast<TH1*>(fRefSubDir->Get(key->GetName())) ;
-          if (!href) 
+           TObject * odata = fRefSubDir->Get(key->GetName()) ; 
+           if ( odata->IsA()->InheritsFrom("TH1") ) {
+            TH1 * hdata = static_cast<TH1*>(odata) ; 
+            TH1 * href  = static_cast<TH1*>(fRefSubDir->Get(key->GetName())) ;
+           if (!href) 
             test = -1 ; // no reference data ; 
-          else {
+           else {
             Double_t rv =  DiffK(hdata, href) ;
             AliInfo(Form("%s ->Test = %f", hdata->GetName(), rv)) ; 
             test += rv ; 
index 844904c72be2be47e103bce2bc6f251669b56e7e..eeb00f9103cbeb8ca5687bb8b986287cf66ba36a 100644 (file)
@@ -60,9 +60,6 @@ AliQualAssDataMaker::AliQualAssDataMaker(const char * name, const char * title)
   fRun(0)
 {
   // ctor
-  TString tmp(GetName()) ; 
-  tmp.Append("QA") ; 
-  SetName(tmp.Data()) ; 
   fDetectorDirName = GetName() ; 
 }
 
@@ -234,6 +231,7 @@ void AliQualAssDataMaker::Exec(AliQualAss::TASKINDEX task, TObject * data)
 void AliQualAssDataMaker::Finish(AliQualAss::TASKINDEX) const 
 { 
   // write to the output File
+  fOutput->Close() ; 
 } 
 
 //____________________________________________________________________________ 
@@ -245,7 +243,7 @@ TList *  AliQualAssDataMaker::Init(AliQualAss::TASKINDEX task, Int_t run, Int_t
   if (cycles > 0)
     SetCycle(cycles) ;  
        
-  switch (task) { 
+  switch (task) {
   case AliQualAss::kRAWS: 
    {
        fRawsQAList = new TList() ;      
@@ -305,14 +303,13 @@ void AliQualAssDataMaker::StartOfCycle(AliQualAss::TASKINDEX task, Option_t * sa
 { 
   // Finishes a cycle of QA data acquistion
  
- if ( (strcmp(sameCycle, "same") != 0) ) {
-   fCurrentCycle++ ; 
+ if ( (strcmp(sameCycle, "new") == 0) )  {
    ResetCycle() ;
} else if ( !(strcmp(sameCycle, "") != 0) 
-   AliFatal(Form("%s is an invalid option, valid options are: same", sameCycle)) ; 
-
- fOutput = AliQualAss::GetQADMOutFile(fRun, fCurrentCycle) ;   
-
  if (fOutput
+       fOutput->Close() ; 
+   fOutput = AliQualAss::GetQADMOutFile(GetName(), fRun, fCurrentCycle) ;      
+ }
+       
  AliInfo(Form(" Run %d Cycle %d task %s file %s", 
        fRun, fCurrentCycle, AliQualAss::GetTaskName(task).Data(), fOutput->GetName() )) ;
 
index 7bbe98d695f5d081db36ef9b9a3636ee1be450b5..bed0b6f56eae4baddc638350740ff28fce97ca01 100644 (file)
@@ -47,26 +47,26 @@ public:
   const Int_t         Increment() { return ++fCycleCounter ; } 
   TList *             Init(AliQualAss::TASKINDEX, Int_t run, Int_t cycles = -1) ;
   const Bool_t        IsCycleDone() const { return fCycleCounter > fCycle ? kTRUE : kFALSE ; }
-  const Int_t         Add2DigitsList(TH1 * hist, Int_t index)    { return Add2List(hist, index, fDigitsQAList) ; }
-  const Int_t         Add2ESDsList(TH1 * hist, Int_t index)      { return Add2List(hist, index, fESDsQAList) ; }
-  const Int_t         Add2HitsList(TH1 * hist, Int_t index)      { return Add2List(hist, index, fHitsQAList) ; }
-  const Int_t         Add2RecPointsList(TH1 * hist, Int_t index) { return Add2List(hist, index, fRecPointsQAList) ; }
-  const Int_t         Add2RawsList(TH1 * hist, Int_t index)      { return Add2List(hist, index, fRawsQAList) ; }
-  const Int_t         Add2SDigitsList(TH1 * hist, Int_t index)   { return Add2List(hist, index, fSDigitsQAList) ; }
-  TH1 *               GetDigitsData(Int_t index)    { return dynamic_cast<TH1 *>(GetData(fDigitsQAList, index)) ; }
-  TH1 *               GetESDsData(Int_t index)      { return dynamic_cast<TH1 *>(GetData(fESDsQAList, index)) ; }
-  TH1 *               GetHitsData(Int_t index)      { return dynamic_cast<TH1 *>(GetData(fHitsQAList, index)) ; }
-  TH1 *               GetRecPointsData(Int_t index) { return dynamic_cast<TH1 *>(GetData(fRecPointsQAList, index)) ; }
-  TH1 *               GetRawsData(Int_t index)      { return dynamic_cast<TH1 *>(GetData(fRawsQAList, index)) ; }
-  TH1 *               GetSDigitsData(Int_t index)   { return dynamic_cast<TH1 *>(GetData(fSDigitsQAList, index)) ; }
+  const Int_t         Add2DigitsList(TH1 * hist, const Int_t index)    { return Add2List(hist, index, fDigitsQAList) ; }
+  const Int_t         Add2ESDsList(TH1 * hist, const Int_t index)      { return Add2List(hist, index, fESDsQAList) ; }
+  const Int_t         Add2HitsList(TH1 * hist, const Int_t index)      { return Add2List(hist, index, fHitsQAList) ; }
+  const Int_t         Add2RecPointsList(TH1 * hist, const Int_t index) { return Add2List(hist, index, fRecPointsQAList) ; }
+  const Int_t         Add2RawsList(TH1 * hist, const Int_t index)      { return Add2List(hist, index, fRawsQAList) ; }
+  const Int_t         Add2SDigitsList(TH1 * hist, const Int_t index)   { return Add2List(hist, index, fSDigitsQAList) ; }
+  TH1 *               GetDigitsData(const Int_t index)    { return dynamic_cast<TH1 *>(GetData(fDigitsQAList, index)) ; }
+  TH1 *               GetESDsData(const Int_t index)      { return dynamic_cast<TH1 *>(GetData(fESDsQAList, index)) ; }
+  TH1 *               GetHitsData(const Int_t index)      { return dynamic_cast<TH1 *>(GetData(fHitsQAList, index)) ; }
+  TH1 *               GetRecPointsData(const Int_t index) { return dynamic_cast<TH1 *>(GetData(fRecPointsQAList, index)) ; }
+  TH1 *               GetRawsData(const Int_t index)      { return dynamic_cast<TH1 *>(GetData(fRawsQAList, index)) ; }
+  TH1 *               GetSDigitsData(const Int_t index)   { return dynamic_cast<TH1 *>(GetData(fSDigitsQAList, index)) ; }
   void                SetCycle(Int_t nevts) { fCycle = nevts ; } 
-  void                StartOfCycle(AliQualAss::TASKINDEX, Option_t * sameCycle = "") ;
+  void                StartOfCycle(AliQualAss::TASKINDEX, Option_t * sameCycle = "new") ;
 
 protected: 
 
-  Int_t          Add2List(TH1 * hist, Int_t index, TList * list) { list->AddAt(hist, index) ; return list->LastIndex() ; }
+  Int_t          Add2List(TH1 * hist, const Int_t index, TList * list) { list->AddAt(hist, index) ; return list->LastIndex() ; }
   virtual void   EndOfDetectorCycle() {AliInfo("To be implemented by detectors");} 
-  TObject *      GetData(TList * list, Int_t index)  { return list->At(index) ; } 
+  TObject *      GetData(TList * list, const Int_t index)  { return list->At(index) ; } 
   virtual void   InitDigits()        {AliInfo("To be implemented by detectors");}
   virtual void   InitESDs()          {AliInfo("To be implemented by detectors");}
   virtual void   InitHits()          {AliInfo("To be implemented by detectors");}
@@ -83,7 +83,7 @@ protected:
   virtual void   MakeRecPoints(TTree * )           {AliInfo("To be implemented by detectors");} 
   virtual void   MakeSDigits(TClonesArray * )      {AliInfo("To be implemented by detectors");} 
   //virtual void   MakeTrackSegments(TTree * )       {AliInfo("To be implemented by detectors");} 
-  void           ResetCycle() { fCycleCounter = 0 ; } 
+  void           ResetCycle() { fCurrentCycle++ ; fCycleCounter = 0 ; } 
   virtual void   StartOfDetectorCycle() {AliInfo("To be implemented by detectors");} 
 
   TFile *        fOutput ;          //! output root file