]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Possibility to delete recpoints and digits after each event reco
authorshahoian <shahoian@f7af4fe6-9843-0410-8265-dc069ae4e863>
Sat, 10 Dec 2011 22:48:59 +0000 (22:48 +0000)
committershahoian <shahoian@f7af4fe6-9843-0410-8265-dc069ae4e863>
Sat, 10 Dec 2011 22:48:59 +0000 (22:48 +0000)
STEER/STEER/AliReconstruction.cxx
STEER/STEER/AliReconstruction.h

index 788752e420cf872911a7f0b7ab6e12035f553ede..67783ed5024ba15ed1976fd8b2ba4f528e17873c 100644 (file)
@@ -237,6 +237,8 @@ AliReconstruction::AliReconstruction(const char* gAliceFilename) :
   fRunLocalReconstruction("ALL"),
   fRunTracking("ALL"),
   fFillESD("ALL"),
+  fDeleteRecPoints(""),
+  fDeleteDigits(""),
   fLoadCDB(""),
   fUseTrackingErrorsForAlignment(""),
   fGAliceFileName(gAliceFilename),
@@ -358,6 +360,8 @@ AliReconstruction::AliReconstruction(const AliReconstruction& rec) :
   fRunLocalReconstruction(rec.fRunLocalReconstruction),
   fRunTracking(rec.fRunTracking),
   fFillESD(rec.fFillESD),
+  fDeleteRecPoints(""),
+  fDeleteDigits(""),
   fLoadCDB(rec.fLoadCDB),
   fUseTrackingErrorsForAlignment(rec.fUseTrackingErrorsForAlignment),
   fGAliceFileName(rec.fGAliceFileName),
@@ -495,6 +499,8 @@ AliReconstruction& AliReconstruction::operator = (const AliReconstruction& rec)
   fRunLocalReconstruction        = rec.fRunLocalReconstruction;
   fRunTracking                   = rec.fRunTracking;
   fFillESD                       = rec.fFillESD;
+  fDeleteRecPoints               = rec.fDeleteRecPoints;
+  fDeleteDigits                  = rec.fDeleteDigits;
   fLoadCDB                       = rec.fLoadCDB;
   fUseTrackingErrorsForAlignment = rec.fUseTrackingErrorsForAlignment;
   fGAliceFileName                = rec.fGAliceFileName;
@@ -1099,6 +1105,8 @@ Bool_t AliReconstruction::InitGRP() {
     fRunTracking = MatchDetectorList(fRunTracking,detMask);
     fFillESD = MatchDetectorList(fFillESD,detMask);
     fQADetectors = MatchDetectorList(fQADetectors,detMask);
+    fDeleteRecPoints = MatchDetectorList(fDeleteRecPoints,detMask);
+    fDeleteDigits    = MatchDetectorList(fDeleteDigits,detMask);
     fLoadCDB.Form("%s %s %s %s",
                  fRunLocalReconstruction.Data(),
                  fRunTracking.Data(),
@@ -2353,7 +2361,10 @@ Bool_t AliReconstruction::ProcessEvent(Int_t iEvent)
   if (fRunQA || fRunGlobalQA) 
     AliQAManager::QAManager()->Increment() ; 
 
-    return kTRUE;
+  DeleteRecPoints(fDeleteRecPoints);
+  DeleteDigits(fDeleteDigits);
+  //
+  return kTRUE;
 }
 
 //_____________________________________________________________________________
@@ -4314,6 +4325,40 @@ void AliReconstruction::WriteESDfriend() {
     new (fesdf) AliESDfriend(); // Reset...
     fesdf->SetSkipBit(kTRUE);
   }
-  
+  //
   ftreeF->Fill();
 }
+
+//_________________________________________________________________
+void AliReconstruction::DeleteDigits(const TString& detectors)
+{
+  // delete requested digit files produced at current event
+  static int iEvent = 0;
+  if (detectors.IsNull()) return;
+  TString detStr = detectors;
+  AliInfo(Form("Deleting Digits: %s",detectors.Data()));
+
+  for (Int_t iDet = 0; iDet < kNDetectors; iDet++) {
+    gSystem->Exec(Form("if [ -e %s.Digits.root ]; then\nrm %s.Digits.root\nfi",
+                      fgkDetectorName[iDet],fgkDetectorName[iDet]));
+  }
+  AliSysInfo::AddStamp(Form("DelDigits_%d",iEvent), 0,0,iEvent);
+  iEvent++;
+}
+
+//_________________________________________________________________
+void AliReconstruction::DeleteRecPoints(const TString& detectors)
+{
+  // delete requested recpoint files produced at current event
+  static int iEvent = 0;
+  if (detectors.IsNull()) return;
+  TString detStr = detectors;
+  AliInfo(Form("Deleting Recpoints: %s",detectors.Data()));
+  //
+  for (Int_t iDet = 0; iDet < kNDetectors; iDet++) {
+    gSystem->Exec(Form("if [ -e %s.RecPoints.root ]; then\nrm %s.RecPoints.root\nfi",
+                      fgkDetectorName[iDet],fgkDetectorName[iDet]));
+  }
+  AliSysInfo::AddStamp(Form("DelRecPoints_%d",iEvent), 0,0,iEvent);
+  iEvent++;
+}
index bc37864e4d940f5f2cf3cff4a0a4e16a53e9d0ce..5cd4c5c53767e64eec14757002d857dfdaa74494 100644 (file)
@@ -81,6 +81,8 @@ public:
     SetRunLocalReconstruction(detectors); 
     SetRunTracking(detectors);
     SetFillESD(detectors);};
+  void           SetDeleteRecPoints(const char* dets) {fDeleteRecPoints = dets;}
+  void           SetDeleteDigits(const char* dets)    {fDeleteDigits = dets;}
   void           SetUseTrackingErrorsForAlignment(const char* detectors) 
     {fUseTrackingErrorsForAlignment = detectors;};
   void           SetLoadAlignFromCDB(Bool_t load)  {fLoadAlignFromCDB = load;};
@@ -222,6 +224,8 @@ private:
   Bool_t         FillTriggerESD(AliESDEvent*& esd);
   Bool_t         FillTriggerScalers(AliESDEvent*& esd);
   Bool_t         FillRawEventHeaderESD(AliESDEvent*& esd);
+  void           DeleteRecPoints(const TString& detectors);
+  void           DeleteDigits(const TString& detectors);
 
   Bool_t         IsSelected(TString detName, TString& detectors) const;
   Bool_t         InitRunLoader();
@@ -275,6 +279,8 @@ private:
   TString        fRunLocalReconstruction; // run the local reconstruction for these detectors
   TString        fRunTracking;        // run the tracking for these detectors
   TString        fFillESD;            // fill ESD for these detectors
+  TString        fDeleteRecPoints;    // delete recpoints after each event
+  TString        fDeleteDigits;       // delete digits after each event
   TString        fLoadCDB;            // prefetch CDB entries and init reco-params for these detectors
   TString        fUseTrackingErrorsForAlignment; // for these detectors
   TString        fGAliceFileName;     // name of the galice file