1 // @(#)alimdc:$Name$:$Id$
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):
51 // Create statistics object.
55 //______________________________________________________________________________
56 AliStats::AliStats(const AliStats &rhs):
59 fFirstRun(rhs.fFirstRun),
60 fFirstEvent(rhs.fFirstEvent),
61 fLastRun(rhs.fLastRun),
62 fLastEvent(rhs.fLastEvent),
65 fFileName(rhs.fFileName),
66 fFileSize(rhs.fFileSize),
67 fCompFactor(rhs.fCompFactor),
68 fCompMode(rhs.fCompMode),
70 fRTHist(rhs.fRTHist ? (TH1F*) rhs.fRTHist->Clone() : 0),
73 // AliStats copy constructor.
77 //______________________________________________________________________________
80 // Cleanup stats object.
85 //______________________________________________________________________________
86 AliStats &AliStats::operator=(const AliStats &rhs)
88 // AliStats assignment operator.
91 TObject::operator=(rhs);
92 fEvents = rhs.fEvents;
93 fFirstRun = rhs.fFirstRun;
94 fFirstEvent = rhs.fFirstEvent;
95 fLastRun = rhs.fLastRun;
96 fLastEvent = rhs.fLastEvent;
99 fFileName = rhs.fFileName;
100 fFileSize = rhs.fFileSize;
101 fCompFactor = rhs.fCompFactor;
102 fCompMode = rhs.fCompMode;
103 fFilter = rhs.fFilter;
104 fRTHist = rhs.fRTHist ? (TH1F*) rhs.fRTHist->Clone() : 0;
110 //______________________________________________________________________________
111 void AliStats::Fill(Float_t time)
113 // Fill histogram. This histogram shows the (hopefully constant) time
114 // it takes to fill the ROOT DB.
115 // Expects to be called 100 times for each file.
118 fRTHist = new TH1F("rtime","Real-time to write data chunk", 100, 0, 100);
119 fRTHist->SetDirectory(0);
122 fRTHist->Fill(fChunk, time);