]> git.uio.no Git - u/mrichter/AliRoot.git/blame_incremental - RAW/AliRawDB.h
Eauqlization coefficients included
[u/mrichter/AliRoot.git] / RAW / AliRawDB.h
... / ...
CommitLineData
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
27#ifndef ROOT_TString
28#include <TString.h>
29#endif
30
31#include "AliDAQ.h"
32
33// Forward class declarations
34class AliRawEvent;
35class AliRawDataArray;
36class AliStats;
37class TFile;
38class AliESDEvent;
39
40class AliRawDB : public TObject {
41
42public:
43 AliRawDB(AliRawEvent *event,
44 AliESDEvent *esd,
45 Int_t compress,
46 const char* fileName = NULL);
47 virtual ~AliRawDB();
48
49 virtual const char *GetOpenOption() const { return "RECREATE"; }
50 virtual Int_t GetNetopt() const { return 0; }
51 virtual Bool_t Create(const char* fileName = NULL);
52 virtual Int_t Close();
53 Int_t Fill();
54 Int_t GetTotalSize();
55
56 void WriteStats(AliStats* stats);
57
58 void SetMaxSize(Double_t maxSize) { fMaxSize = maxSize; }
59 void SetFS(const char* fs1, const char* fs2 = NULL);
60 void SetDeleteFiles(Bool_t deleteFiles = kTRUE) { fDeleteFiles = deleteFiles; }
61
62 Bool_t NextFile(const char* fileName = NULL);
63
64 Double_t GetBytesWritten() const { return fRawDB->GetBytesWritten(); }
65 TFile *GetDB() const { return fRawDB; }
66 const char *GetDBName() const { return fRawDB->GetName(); }
67 Int_t GetEvents() const { return (Int_t) fTree->GetEntries(); }
68 AliRawEvent *GetEvent() const { return fEvent; }
69 Float_t GetCompressionFactor() const;
70 Int_t GetCompressionMode() const { return fRawDB->GetCompressionLevel(); }
71 void Stop() { fStop = kTRUE; }
72 static const char *GetAliRootTag();
73 Bool_t WriteGuidFile(TString &guidFileFolder);
74
75protected:
76 TFile *fRawDB; // DB to store raw data
77 TTree *fTree; // tree used to store raw data
78 AliRawEvent *fEvent; // AliRawEvent via which data is stored
79 AliRawDataArray *fDetRawData[AliDAQ::kNDetectors+1]; // Detectors raw-data payload
80 TTree *fESDTree; // tree for storing HLT ESD information
81 AliESDEvent *fESD; // pointer to HLT ESD object
82 Int_t fCompress; // compression mode (1 default)
83 Double_t fMaxSize; // maximum size in bytes of the raw DB
84 TString fFS1; // first raw DB file system location
85 TString fFS2; // second raw DB file system location
86 Bool_t fDeleteFiles; // flag for deletion of files
87 Bool_t fStop; // stop execution (triggered by SIGUSR1)
88 static const char *fgkAliRootTag; // string with the aliroot tag id
89
90 virtual const char *GetFileName() const;
91 virtual Bool_t FSHasSpace(const char *fs) const;
92 virtual void MakeTree();
93
94private:
95 AliRawDB(const AliRawDB& rawDB);
96 AliRawDB& operator = (const AliRawDB& rawDB);
97
98 ClassDef(AliRawDB,2) // Raw DB
99};
100
101#endif