]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - HLT/misc/AliHLTStopwatch.cxx
L3 becomes HLT
[u/mrichter/AliRoot.git] / HLT / misc / AliHLTStopwatch.cxx
similarity index 75%
rename from HLT/misc/AliL3Stopwatch.cxx
rename to HLT/misc/AliHLTStopwatch.cxx
index 316c154534872f451d3e06da849ffdffbeba7698..4e26171aa4af2a759fc72c0077d5cb14ae2a270a 100644 (file)
@@ -3,21 +3,21 @@
 // Author: C. Loizides <mailto:loizides@ikf.uni-frankfurt.de>
 //*-- Copyright &copy ALICE HLT Group
 
-#include "AliL3Stopwatch.h"
+#include "AliHLTStopwatch.h"
 
 #ifdef no_root
 
-#include "AliL3StandardIncludes.h"
+#include "AliHLTStandardIncludes.h"
 
 #if __GNUC__ == 3
 using namespace std;
 #endif
 
 
-/** \class AliL3Stopwatch
+/** \class AliHLTStopwatch
 <pre>
 //----------------------------------------------------
-// AliL3Stopwatch
+// AliHLTStopwatch
 //
 // Stopwatch class. This class returns the real and cpu time between   
 // the start and stop events (taken from Root)
@@ -25,11 +25,11 @@ using namespace std;
 */
 
 
-ClassImp(AliL3Stopwatch)
+ClassImp(AliHLTStopwatch)
 
-clock_t AliL3Stopwatch::gTicks = 0;
+clock_t AliHLTStopwatch::gTicks = 0;
 
-AliL3Stopwatch::AliL3Stopwatch()
+AliHLTStopwatch::AliHLTStopwatch()
 {
   // Create a stopwatch and start it.
   if (!gTicks) gTicks = (clock_t)sysconf(_SC_CLK_TCK);
@@ -40,11 +40,11 @@ AliL3Stopwatch::AliL3Stopwatch()
   Start();
 }
 
-AliL3Stopwatch::~AliL3Stopwatch()
+AliHLTStopwatch::~AliHLTStopwatch()
 {
 }
 
-void AliL3Stopwatch::Start(Bool_t reset)
+void AliHLTStopwatch::Start(Bool_t reset)
 {
   // Start the stopwatch. If reset is kTRUE reset the stopwatch before
   // starting it (including the stopwatch counter).
@@ -64,7 +64,7 @@ void AliL3Stopwatch::Start(Bool_t reset)
   fCounter++;
 }
 
-void AliL3Stopwatch::Stop()
+void AliHLTStopwatch::Stop()
 {
    // Stop the stopwatch.
    fStopRealTime = GetRealTime();
@@ -76,13 +76,13 @@ void AliL3Stopwatch::Stop()
    fState = kStopped;
 }
 
-void AliL3Stopwatch::Continue()
+void AliHLTStopwatch::Continue()
 {
   // Resume a stopped stopwatch. The stopwatch continues counting from the last
   // Start() onwards (this is like the laptimer function).
   
   if (fState == kUndefined){
-    cerr << "Error in AliL3Stopwatch::Continue! Stopwatch not started." << endl;
+    cerr << "Error in AliHLTStopwatch::Continue! Stopwatch not started." << endl;
     return;
   }
 
@@ -94,13 +94,13 @@ void AliL3Stopwatch::Continue()
   fState = kRunning;
 }
 
-Double_t AliL3Stopwatch::RealTime()
+Double_t AliHLTStopwatch::RealTime()
 {
   // Return the realtime passed between the start and stop events. If the
   // stopwatch was still running stop it first.
   
   if (fState == kUndefined){
-    cerr << "Error in AliL3Stopwatch::RealTime! Stopwatch not started." << endl;
+    cerr << "Error in AliHLTStopwatch::RealTime! Stopwatch not started." << endl;
     return -1.0;
   }
 
@@ -110,13 +110,13 @@ Double_t AliL3Stopwatch::RealTime()
   return fTotalRealTime;
 }
 
-Double_t AliL3Stopwatch::CpuTime()
+Double_t AliHLTStopwatch::CpuTime()
 {
   // Return the cputime passed between the start and stop events. If the
   // stopwatch was still running stop it first.
   
   if (fState == kUndefined){
-    cerr << "Error in AliL3Stopwatch::CpuTime! Stopwatch not started." << endl;
+    cerr << "Error in AliHLTStopwatch::CpuTime! Stopwatch not started." << endl;
     return -1.0;
   }
   if (fState == kRunning)
@@ -125,14 +125,14 @@ Double_t AliL3Stopwatch::CpuTime()
   return fTotalCpuTime;
 }
 
-Double_t AliL3Stopwatch::GetRealTime()
+Double_t AliHLTStopwatch::GetRealTime()
 {
   struct tms cpt;
   Double_t trt =  (Double_t)times(&cpt);
   return trt / (Double_t)gTicks;
 }
 
-Double_t AliL3Stopwatch::GetCPUTime()
+Double_t AliHLTStopwatch::GetCPUTime()
 {
    struct tms cpt;
    times(&cpt);
@@ -140,13 +140,13 @@ Double_t AliL3Stopwatch::GetCPUTime()
 }
 
 //______________________________________________________________________________
-void AliL3Stopwatch::Print(Char_t *opt) const
+void AliHLTStopwatch::Print(Char_t *opt) const
 {
    // Print the real and cpu time passed between the start and stop events.
    // and the number of times (slices) this TStopwatch was called
    // (if this number > 1)
 
-   Double_t  realt = ((AliL3Stopwatch*)(this))->RealTime();
+   Double_t  realt = ((AliHLTStopwatch*)(this))->RealTime();
 
    Int_t  hours = Int_t(realt / 3600);
    realt -= hours * 3600;
@@ -155,9 +155,9 @@ void AliL3Stopwatch::Print(Char_t *opt) const
    Int_t  sec   = Int_t(realt);
    Int_t counter = Counter();
    if (counter <= 1 )
-      printf("Real time %d:%d:%d, CP time %.3f", hours, min, sec, ((AliL3Stopwatch*)(this))->CpuTime());
+      printf("Real time %d:%d:%d, CP time %.3f", hours, min, sec, ((AliHLTStopwatch*)(this))->CpuTime());
    else
-      printf("Real time %d:%d:%d, CP time %.3f, %d slices", hours, min, sec, ((AliL3Stopwatch*)(this))->CpuTime(),counter);
+      printf("Real time %d:%d:%d, CP time %.3f, %d slices", hours, min, sec, ((AliHLTStopwatch*)(this))->CpuTime(),counter);
 }
 
 #endif