#include <TTree.h>
#include <TH1.h>
#include <TROOT.h>
-#include <TStopwatch.h>
#include "AliAnalysisManager.h"
#include "AliAnalysisDataContainer.h"
:TObject(), fLfn(), fGUID(), fUrl(), fPfn(), fSE(),
fIsArchive(kFALSE), fImage(0), fNreplicas(0),
fStartBytes(0), fReadBytes(0), fSize(0), fOpenedAt(0),
- fOpenTime(0.), fProcessingTime(0.), fThroughput(0.)
+ fOpenTime(0.), fProcessingTime(0.), fThroughput(0.), fTimer()
{
// I/O constructor
}
:TObject(), fLfn(), fGUID(), fUrl(), fPfn(), fSE(),
fIsArchive(kFALSE), fImage(0), fNreplicas(0),
fStartBytes(0), fReadBytes(0), fSize(0), fOpenedAt(0),
- fOpenTime(0.), fProcessingTime(0.), fThroughput(0.)
+ fOpenTime(0.), fProcessingTime(0.), fThroughput(0.), fTimer()
{
// Normal constructor
if (file->InheritsFrom("TAlienFile")) {
fIsArchive(other.fIsArchive), fImage(other.fImage),
fNreplicas(other.fNreplicas), fStartBytes(other.fStartBytes), fReadBytes(other.fReadBytes),
fSize(other.fSize), fOpenedAt(other.fOpenedAt), fOpenTime(other.fOpenTime),
- fProcessingTime(other.fProcessingTime), fThroughput(other.fThroughput)
+ fProcessingTime(other.fProcessingTime), fThroughput(other.fThroughput), fTimer()
{
// CC
}
void AliAnalysisFileDescriptor::Done()
{
// Must be called at the end of processing, providing file->GetBytesRead() as argument.
+ fTimer.Stop();
const Double_t megabyte = 1048576.;
- Long64_t stampnow = time(0);
+// Long64_t stampnow = time(0);
fReadBytes = TFile::GetFileBytesRead()-fStartBytes;
- fProcessingTime = stampnow-fOpenedAt;
+// fProcessingTime = stampnow-fOpenedAt;
+ fProcessingTime = fTimer.RealTime();
Double_t readsize = fReadBytes/megabyte;
fThroughput = readsize/fProcessingTime;
}
#include "TString.h"
#endif
+#ifndef ROOT_TStopwatch
+#include "TStopwatch.h"
+#endif
+
class TClass;
class TFile;
class TObjArray;
// AliAnalysisFileDescriptor - A simple wrapper for data related to accessing
// an analysis input file.
//==============================================================================
-class TStopwatch;
-
class AliAnalysisFileDescriptor : public TObject {
public:
Double_t fOpenTime; // Time elapsed to open file
Double_t fProcessingTime; // Processing
Double_t fThroughput; // Throughput
+ TStopwatch fTimer; //! Processing time
ClassDef(AliAnalysisFileDescriptor,1) // Class describing a a file processed in the analysis
};