2 // Author: Fons Rademakers 26/11/99
4 /**************************************************************************
5 * Copyright(c) 1998-2003, ALICE Experiment at CERN, All rights reserved. *
7 * Author: The ALICE Off-line Project. *
8 * Contributors are mentioned in the code where appropriate. *
10 * Permission to use, copy, modify and distribute this software and its *
11 * documentation strictly for non-commercial purposes is hereby granted *
12 * without fee, provided that the above copyright notice appears in all *
13 * copies and that both the copyright notice and this permission notice *
14 * appear in the supporting documentation. The authors make no claims *
15 * about the suitability of this software for any purpose. It is *
16 * provided "as is" without express or implied warranty. *
17 **************************************************************************/
19 //////////////////////////////////////////////////////////////////////////
23 //////////////////////////////////////////////////////////////////////////
34 //______________________________________________________________________________
35 AliStats::AliStats(const char *filename, Int_t compmode, Bool_t filter):
50 // Create statistics object.
54 //______________________________________________________________________________
55 AliStats::AliStats(const AliStats &rhs):
59 fFirstEvent(rhs.fFirstEvent),
60 fLastEvent(rhs.fLastEvent),
63 fFileName(rhs.fFileName),
64 fFileSize(rhs.fFileSize),
65 fCompFactor(rhs.fCompFactor),
66 fCompMode(rhs.fCompMode),
68 fRTHist(rhs.fRTHist ? (TH1F*) rhs.fRTHist->Clone() : 0),
71 // AliStats copy constructor.
75 //______________________________________________________________________________
78 // Cleanup stats object.
83 //______________________________________________________________________________
84 AliStats &AliStats::operator=(const AliStats &rhs)
86 // AliStats assignment operator.
89 TObject::operator=(rhs);
90 fEvents = rhs.fEvents;
92 fFirstEvent = rhs.fFirstEvent;
93 fLastEvent = rhs.fLastEvent;
96 fFileName = rhs.fFileName;
97 fFileSize = rhs.fFileSize;
98 fCompFactor = rhs.fCompFactor;
99 fCompMode = rhs.fCompMode;
100 fFilter = rhs.fFilter;
101 fRTHist = rhs.fRTHist ? (TH1F*) rhs.fRTHist->Clone() : 0;
107 //______________________________________________________________________________
108 void AliStats::Fill(Float_t time)
110 // Fill histogram. This histogram shows the (hopefully constant) time
111 // it takes to fill the ROOT DB.
112 // Expects to be called 100 times for each file.
115 fRTHist = new TH1F("rtime","Real-time to write data chunk", 100, 0, 100);
116 fRTHist->SetDirectory(0);
119 fRTHist->Fill(fChunk, time);