optional reset of histograms for every event (Gaute)
authorrichterm <richterm@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 30 Jul 2008 23:54:15 +0000 (23:54 +0000)
committerrichterm <richterm@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 30 Jul 2008 23:54:15 +0000 (23:54 +0000)
HLT/TPCLib/AliHLTTPCTrackHistoComponent.cxx
HLT/TPCLib/AliHLTTPCTrackHistoComponent.h

index ef4bba0..3399b14 100644 (file)
@@ -74,6 +74,7 @@ fHistoNClustersOnTracks(NULL),
   fPlotNTracks(kFALSE),
   fPlotQMaxClusters(kFALSE),
   fPlotQMaxUsedClusters(kFALSE),
+  fResetPlots(kFALSE),
   fClusters(),
   fTracks()
 {
@@ -156,6 +157,7 @@ int AliHLTTPCTrackHistoComponent::DoInit( int argc, const char** argv )
   fPlotNTracks=kFALSE;        
   fPlotQMaxClusters=kFALSE;
   fPlotQMaxUsedClusters=kFALSE;
+  fResetPlots=kFALSE;
 
   int iResult=0;
   TString configuration="";
@@ -355,7 +357,11 @@ int AliHLTTPCTrackHistoComponent::DoEvent(const AliHLTComponentEventData& /*evtD
         fPlotQMaxUsedClusters=kTRUE;  
         continue;
        }
-
+       else if (argument.CompareTo("-reset-plots")==0) {
+        HLTInfo("Reseting plots");
+        fResetPlots=kTRUE;  
+        continue;
+       }
        else {
         HLTError("unknown argument %s", argument.Data());
         iResult=-EINVAL;
@@ -450,15 +456,17 @@ void AliHLTTPCTrackHistoComponent::PushHisto(){
     PushBack( (TObject*) fHistoQMaxUsedClusters,kAliHLTDataTypeHistogram, fSpecification);
   }
   
-  fHistoNClustersOnTracks->Reset();                                 
-  fHistoChargeAllClusters->Reset();                                                                         
-  fHistoChargeUsedClusters->Reset();                                                                        
-  fHistoPT->Reset();                                                                                
-  fHistoResidual->Reset();                                                                            
-  fHistoTgl->Reset();        
-  fHistoNClusters->Reset();     
-  fHistoNUsedClusters->Reset();
-  fHistoNTracks->Reset();
-  fHistoQMaxAllClusters->Reset();
-  fHistoQMaxUsedClusters->Reset();
+  if(fResetPlots){
+    fHistoNClustersOnTracks->Reset();                                 
+    fHistoChargeAllClusters->Reset();                                                                         
+    fHistoChargeUsedClusters->Reset();                                                                        
+    fHistoPT->Reset();                                                                                
+    fHistoResidual->Reset();                                                                            
+    fHistoTgl->Reset();        
+    fHistoNClusters->Reset();     
+    fHistoNUsedClusters->Reset();
+    fHistoNTracks->Reset();
+    fHistoQMaxAllClusters->Reset();
+    fHistoQMaxUsedClusters->Reset();
+  }
 }
index 31c816c..3755dae 100644 (file)
@@ -63,7 +63,8 @@ class TH1F;
  *      Plots the Q Max for all clusters in the event (default kFALSE)
  * \li -plot-QMaxUsed <br>
  *      Plots the Q Max for clusters used on tracks (default kFALSE)
- *
+ * \li -reset-plots <br>
+ *      Will reset the plots for every event (default kFALSE)
  *
  * <h2>Configuration:</h2>
  * 
@@ -161,6 +162,7 @@ private:
   Bool_t fPlotNTracks;                                             //! transient
   Bool_t fPlotQMaxClusters;                                        //! transient
   Bool_t fPlotQMaxUsedClusters;                                    //! transient
+  Bool_t fResetPlots;                                              //! transient
 
   vector<AliHLTTPCSpacePointData> fClusters;                       //! transient
   vector<AliHLTTPCTrackSegmentData> fTracks;                       //! transient