removed histogram fill function from converter components, use AliSysInfo instead
authorsgweber <steffen.georg.weber@cern.ch>
Thu, 12 Jun 2014 16:23:57 +0000 (18:23 +0200)
committersgweber <steffen.georg.weber@cern.ch>
Thu, 12 Jun 2014 16:23:57 +0000 (18:23 +0200)
HLT/global/AliHLTGlobalEsdConverterComponent.cxx
HLT/global/AliHLTGlobalEsdConverterComponent.h
HLT/global/AliHLTGlobalFlatEsdConverterComponent.cxx
HLT/global/AliHLTGlobalFlatEsdConverterComponent.h

index c395b20..40d556c 100644 (file)
@@ -54,6 +54,7 @@
 #include "AliESDVZERO.h"
 #include "AliHLTGlobalVertexerComponent.h"
 #include "AliHLTVertexFinderBase.h"
+#include "AliSysInfo.h"
 
 /** ROOT macro for the implementation of ROOT specific class methods */
 ClassImp(AliHLTGlobalEsdConverterComponent)
@@ -65,22 +66,13 @@ AliHLTGlobalEsdConverterComponent::AliHLTGlobalEsdConverterComponent()
   , fESD(NULL)
   , fSolenoidBz(-5.00668)
   , fBenchmark("EsdConverter")
-  , fBenchmarkHistosFilename("$PWD/histosBenchmark.root")
-  , fInitialTime(0)
 {
   // see header file for class documentation
   // or
   // refer to README to build package
   // or
   // visit http://web.ift.uib.no/~kjeks/doc/alice-hlt
-  
-    TFile *f = TFile::Open(fBenchmarkHistosFilename,"READ");
-  if(f!=0x0){
-       TNamed *t = (TNamed*)f->Get("time");
-       if(t!=0x0){
-         fInitialTime = atoi(t->GetTitle());
-       }
-  }
+
   
 }
 
@@ -304,12 +296,17 @@ int AliHLTGlobalEsdConverterComponent::DoDeinit()
   return 0;
 }
 
-int AliHLTGlobalEsdConverterComponent::DoEvent(const AliHLTComponentEventData& /*evtData*/, 
+int AliHLTGlobalEsdConverterComponent::DoEvent(const AliHLTComponentEventData& evtData, 
                                               AliHLTComponentTriggerData& trigData)
 {
   // see header file for class documentation
   int iResult=0;
+
+
+AliSysInfo::AddStamp("DoEvent.Start", evtData.fStructSize);
+
   bool benchmark = true;
+
   if (!fESD) return -ENODEV;
 
   if (!IsDataEvent()) return iResult;
@@ -379,29 +376,24 @@ int AliHLTGlobalEsdConverterComponent::DoEvent(const AliHLTComponentEventData& /
   
     if(benchmark){
        
-       TTimeStamp ts;
-       Double_t time = (Double_t) ts.GetSec() - fInitialTime;
-       Int_t nV0s = pESD->GetNumberOfV0s();
-       Int_t nTracks = pESD->GetNumberOfTracks();
+               Int_t nV0s = pESD->GetNumberOfV0s();
+               Int_t nTracks = pESD->GetNumberOfTracks();
        
        
        Double_t statistics[10]; 
        TString names[10];
        fBenchmark.GetStatisticsData(statistics, names);
-         statistics[5] = nTracks;
-         statistics[6] = time;
-         statistics[7] = nV0s;
+       //  statistics[5] = nTracks;
+       //  statistics[6] = time;
+       //  statistics[7] = nV0s;
          
-         FillBenchmarkHistos( statistics, names);
-  printf("\nTIME:  %.9f \n\n",time);
+       //  FillBenchmarkHistos( statistics, names);
          fBenchmark.Reset();
   
+       AliSysInfo::AddStamp("DoEvent.Stop", (int)(1000*statistics[1]), (int)(1000*statistics[2]) );
   }
   
   
-  
-  
-
   return iResult;
 }
 
@@ -918,7 +910,8 @@ int AliHLTGlobalEsdConverterComponent::ProcessBlocks(TTree* pTree, AliESDEvent*
 
 
 void AliHLTGlobalEsdConverterComponent::FillBenchmarkHistos(Double_t *statistics, TString */*names*/){
-
+return;
+/*
 
 //  cout<<"Now writing benchmarks to " <<  fBenchmarkHistosFilename <<endl<<endl;
     
@@ -936,5 +929,5 @@ void AliHLTGlobalEsdConverterComponent::FillBenchmarkHistos(Double_t *statistics
   histosList.Add(s);
   histosList.Add(t);
   histosList.SaveAs(fBenchmarkHistosFilename);
-  
+ */ 
 }
index 379fb97..8e54ed2 100644 (file)
@@ -1,5 +1,6 @@
 //-*- Mode: C++ -*-
 // $Id$
+
 #ifndef ALIHLTGLOBALESDCONVERTERCOMPONENT_H
 #define ALIHLTGLOBALESDCONVERTERCOMPONENT_H
 //* This file is property of and copyright by the ALICE HLT Project        * 
@@ -108,8 +109,6 @@ protected:
   /// solenoid b field
   Double_t fSolenoidBz; //! transient
   AliHLTComponentBenchmark fBenchmark; // benchmark
-  TString fBenchmarkHistosFilename;
-  Int_t fInitialTime;
 
   ClassDef(AliHLTGlobalEsdConverterComponent, 0)
 };
index c5d5a2b..53d2ec1 100644 (file)
@@ -50,8 +50,6 @@
 #include "TTree.h"
 #include "TList.h"
 #include "TClonesArray.h"
-#include "TTimeStamp.h"
-#include "THnSparse.h"
 //#include "AliHLTESDCaloClusterMaker.h"
 //#include "AliHLTCaloClusterDataStruct.h"
 //#include "AliHLTCaloClusterReader.h"
@@ -74,25 +72,13 @@ AliHLTGlobalFlatEsdConverterComponent::AliHLTGlobalFlatEsdConverterComponent()
   , fVerbosity(0)  
   , fSolenoidBz(-5.00668)
   , fBenchmark("FlatEsdConverter")
-  , fBenchmarkHistosFilename("$PWD/histosBenchmark.root")
-  , fInitialTime(0)
 {
   // see header file for class documentation
   // or
   // refer to README to build package
   // or
   // visit http://web.ift.uib.no/~kjeks/doc/alice-hlt
-  
-  
-  
-  
-  TFile *f = TFile::Open(fBenchmarkHistosFilename,"READ");
-  if(f!=0x0){
-       TNamed *t = (TNamed*)f->Get("time");
-       if(t!=0x0){
-         fInitialTime = atoi(t->GetTitle());
-       }
-  }
+
 }
 
 AliHLTGlobalFlatEsdConverterComponent::~AliHLTGlobalFlatEsdConverterComponent()
@@ -738,22 +724,13 @@ int AliHLTGlobalFlatEsdConverterComponent::DoEvent( const AliHLTComponentEventDa
   
   if(benchmark){
        
-       TTimeStamp ts;
-       Double_t time = (Double_t) ts.GetSec() - fInitialTime;
-  
-       
-       
        Double_t statistics[10]; 
        TString names[10];
        fBenchmark.GetStatisticsData(statistics, names);
-         statistics[5] = tracksTPC.size();
-         statistics[6] = time;
-         statistics[7] = nV0s;
+       //  statistics[5] = tracksTPC.size();
+       //  statistics[7] = nV0s;
          
-         FillBenchmarkHistos( statistics, names);
-  printf("\nTIME:  %.1f \n\n",time);
- // printf("\nreal time:  %.9f \n\n",statistics[4]);
- // printf("\ncpu time:  %.9f \n\n",statistics[3]);
+       //  FillBenchmarkHistos( statistics, names);
          fBenchmark.Reset();
   
   }
@@ -763,9 +740,9 @@ int AliHLTGlobalFlatEsdConverterComponent::DoEvent( const AliHLTComponentEventDa
 
 void AliHLTGlobalFlatEsdConverterComponent::FillBenchmarkHistos(Double_t *statistics, TString */*names*/){
 
-
+return;
 //  cout<<"Now writing benchmarks to " <<  fBenchmarkHistosFilename <<endl<<endl;
-    
+    /*
   TFile *f = TFile::Open(fBenchmarkHistosFilename,"UPDATE");
   THnSparseD *s = (THnSparseD*)f->Get("benchmarkInformation");
   TNamed *t = (TNamed*)f->Get("time");
@@ -780,5 +757,5 @@ void AliHLTGlobalFlatEsdConverterComponent::FillBenchmarkHistos(Double_t *statis
   histosList.Add(s);
   histosList.Add(t);
   histosList.SaveAs(fBenchmarkHistosFilename);
-  
-}
\ No newline at end of file
+ */ 
+}
index 0933c23..a372361 100644 (file)
@@ -98,9 +98,6 @@ protected:
   /// solenoid b field
   Double_t fSolenoidBz; //! transient
   AliHLTComponentBenchmark fBenchmark; // benchmark
-  TString fBenchmarkHistosFilename;
-  Int_t fInitialTime;
-  
   
   ClassDef(AliHLTGlobalFlatEsdConverterComponent, 0)
 };