]> git.uio.no Git - u/mrichter/AliRoot.git/blame_incremental - RAW/AliRawDB.h
Remove custom streamer, it was not active in the old Root versions with split level...
[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 AliRawEventV2;
35class AliRawDataArrayV2;
36class TFile;
37class AliESDEvent;
38
39class AliRawDB : public TObject {
40
41public:
42 AliRawDB(AliRawEventV2 *event,
43 AliESDEvent *esd,
44 Int_t compress,
45 const char* fileName = NULL,
46 Int_t basketsize = 32000);
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 Long64_t Close();
53 Int_t Fill();
54 Long64_t GetTotalSize();
55 Long64_t AutoSave();
56
57 void SetMaxSize(Double_t maxSize) { fMaxSize = maxSize; }
58 void SetFS(const char* fs1, const char* fs2 = NULL);
59 void SetDeleteFiles(Bool_t deleteFiles = kTRUE) { fDeleteFiles = deleteFiles; }
60
61 Bool_t NextFile(const char* fileName = NULL);
62
63 Double_t GetBytesWritten() const { return fRawDB->GetBytesWritten(); }
64 TFile *GetDB() const { return fRawDB; }
65 const char *GetDBName() const { return fRawDB->GetName(); }
66 Int_t GetEvents() const { return (fTree) ? (Int_t) fTree->GetEntries() : 0; }
67 AliRawEventV2 *GetEvent() const { return fEvent; }
68 Float_t GetCompressionFactor() const;
69 Int_t GetCompressionMode() const { return fRawDB->GetCompressionLevel(); }
70 Int_t GetBasketSize() const { return fBasketSize; }
71 void Stop() { fStop = kTRUE; }
72 static const char *GetAliRootTag();
73 Bool_t WriteGuidFile(TString &guidFileFolder);
74 void Reset();
75 AliRawDataArrayV2 *GetRawDataArray(UInt_t eqSize, UInt_t eqId) const;
76
77protected:
78 TFile *fRawDB; // DB to store raw data
79 TTree *fTree; // tree used to store raw data
80 AliRawEventV2 *fEvent; // AliRawEvent via which data is stored
81 AliRawDataArrayV2 **fDetRawData[AliDAQ::kNDetectors+1]; // Detectors raw-data payload
82 TTree *fESDTree; // tree for storing HLT ESD information
83 AliESDEvent *fESD; // pointer to HLT ESD object
84 Int_t fCompress; // compression mode (1 default)
85 Int_t fBasketSize; // root i/o basket size (default = 32000)
86 Double_t fMaxSize; // maximum size in bytes of the raw DB
87 TString fFS1; // first raw DB file system location
88 TString fFS2; // second raw DB file system location
89 Bool_t fDeleteFiles; // flag for deletion of files
90 Bool_t fStop; // stop execution (triggered by SIGUSR1)
91 static const char *fgkAliRootTag; // string with the aliroot tag id
92
93 static Int_t fgkDetBranches[AliDAQ::kNDetectors+1]; // Number of branches in each detector
94
95 virtual const char *GetFileName() const;
96 virtual Bool_t FSHasSpace(const char *fs) const;
97 virtual void MakeTree();
98
99private:
100 AliRawDB(const AliRawDB& rawDB);
101 AliRawDB& operator = (const AliRawDB& rawDB);
102
103 ClassDef(AliRawDB,5) // Raw DB
104};
105
106#endif