]> git.uio.no Git - u/mrichter/AliRoot.git/blame - RAW/AliRawDB.h
Set local coordinate for HasPad method (Ivana)
[u/mrichter/AliRoot.git] / RAW / AliRawDB.h
CommitLineData
a197a4ce 1#ifndef ALIRAWDB_H
2#define ALIRAWDB_H
3// @(#)alimdc:$Name$:$Id$
4// Author: Fons Rademakers 26/11/99
5
6/* Copyright(c) 1998-2003, ALICE Experiment at CERN, All rights reserved. *
7 * See cxx source for full Copyright notice */
8
9//////////////////////////////////////////////////////////////////////////
10// //
11// AliRawDB //
12// //
13//////////////////////////////////////////////////////////////////////////
14
15#ifndef ROOT_TObject
16#include <TObject.h>
17#endif
18
19#ifndef ROOT_TFile
20#include <TFile.h>
21#endif
22
23#ifndef ROOT_TTree
24#include <TTree.h>
25#endif
26
e10815f1 27#ifndef ROOT_TString
28#include <TString.h>
29#endif
30
a197a4ce 31
32// Forward class declarations
33class AliRawEvent;
b7d09bb3 34class AliStats;
a197a4ce 35class TFile;
a109e73e 36class AliESD;
a197a4ce 37
38class AliRawDB : public TObject {
39
40public:
a109e73e 41 AliRawDB(AliRawEvent *event,
a109e73e 42 AliESD *esd,
e10815f1 43 Int_t compress,
44 const char* fileName = NULL);
a197a4ce 45 virtual ~AliRawDB() { Close(); }
46
47 virtual const char *GetOpenOption() const { return "RECREATE"; }
48 virtual Int_t GetNetopt() const { return 0; }
e10815f1 49 virtual Bool_t Create(const char* fileName = NULL);
a197a4ce 50 virtual void Close();
e10815f1 51 Int_t Fill();
a197a4ce 52
b7d09bb3 53 void WriteStats(AliStats* stats);
54
e10815f1 55 void SetMaxSize(Double_t maxSize) { fMaxSize = maxSize; }
56 void SetFS(const char* fs1, const char* fs2 = NULL);
57 void SetDeleteFiles(Bool_t deleteFiles = kTRUE) { fDeleteFiles = deleteFiles; }
58
59 Bool_t NextFile(const char* fileName = NULL);
a197a4ce 60
61 Double_t GetBytesWritten() const { return fRawDB->GetBytesWritten(); }
62 TFile *GetDB() const { return fRawDB; }
63 const char *GetDBName() const { return fRawDB->GetName(); }
64 Int_t GetEvents() const { return (Int_t) fTree->GetEntries(); }
65 AliRawEvent *GetEvent() const { return fEvent; }
66 Float_t GetCompressionFactor() const;
67 Int_t GetCompressionMode() const { return fRawDB->GetCompressionLevel(); }
e10815f1 68 void Stop() { fStop = kTRUE; }
69
70 enum {kMDC = 6}; // Which MDC is this...
a197a4ce 71
72protected:
73 TFile *fRawDB; // DB to store raw data
74 TTree *fTree; // tree used to store raw data
75 AliRawEvent *fEvent; // AliRawEvent via which data is stored
a109e73e 76 TTree *fESDTree; // tree for storing HLT ESD information
77 AliESD *fESD; // pointer to HLT ESD object
a197a4ce 78 Int_t fCompress; // compression mode (1 default)
79 Double_t fMaxSize; // maximum size in bytes of the raw DB
e10815f1 80 TString fFS1; // first raw DB file system location
81 TString fFS2; // second raw DB file system location
82 Bool_t fDeleteFiles; // flag for deletion of files
83 Bool_t fStop; // stop execution (triggered by SIGUSR1)
a197a4ce 84
85 virtual const char *GetFileName() const;
86 virtual Bool_t FSHasSpace(const char *fs) const;
87 virtual void MakeTree();
88
89private:
90 AliRawDB(const AliRawDB& rawDB);
91 AliRawDB& operator = (const AliRawDB& rawDB);
92
93 ClassDef(AliRawDB,0) // Raw DB
94};
95
96#endif