fixed the tainted variables
[u/mrichter/AliRoot.git] / ITS / AliITSOnlineSPDphys.h
CommitLineData
6727e2db 1#ifndef ALI_ITS_ONLINESPDPHYS_H
2#define ALI_ITS_ONLINESPDPHYS_H
3
4////////////////////////////////////////////////////////////
5// Author: Henrik Tydesjo //
6// Interface class to the containers of an online //
7// physics run. //
8// Directly connected to a TFile with all containers. //
9// Handles reading and writing of this TFile. Hitmaps are //
10// stored in this file (AliITSOnlineSPDHitArray). //
11// Also some general information is stored //
12// (AliITSOnlineSPDphysInfo). //
13////////////////////////////////////////////////////////////
14
15#include <TString.h>
16
17class TFile;
18class AliITSOnlineSPDphysInfo;
19class AliITSOnlineSPDHitArray;
20
21class AliITSOnlineSPDphys {
22
23 public:
24 AliITSOnlineSPDphys():fFile(NULL),fWrite(kFALSE),fModified(kFALSE),fInfoModified(kFALSE),fPhysInfo(NULL),fFileName("."){}
6ddf3d66 25 AliITSOnlineSPDphys(const Char_t *fileName, Bool_t readFromGridFile=kFALSE);
6727e2db 26 AliITSOnlineSPDphys(const AliITSOnlineSPDphys& phys);
27 virtual ~AliITSOnlineSPDphys();
28 AliITSOnlineSPDphys& operator=(const AliITSOnlineSPDphys& phys);
29
30 virtual void AddPhys(AliITSOnlineSPDphys* phys2);
31 virtual void ClearThis();
c53f028c 32 void InitializeHitMap() {InitHitmap();} // online monitoring
6727e2db 33 // SET METHODS ***********************************
34 void AddRunNr(UInt_t val);
35 void SetEqNr(UInt_t val);
36
37 void SetNrEvents(UInt_t val);
38 void AddNrEvents(Int_t val);
39 void IncrementNrEvents();
40
41 void SetHits(UInt_t hs, UInt_t chipi, UInt_t coli, UInt_t rowi, UInt_t val);
42 void AddHits(UInt_t hs, UInt_t chipi, UInt_t coli, UInt_t rowi, Int_t val);
43 void IncrementHits(UInt_t hs, UInt_t chipi, UInt_t coli, UInt_t rowi);
44 // GET METHODS ***********************************
45 UInt_t GetNrRuns() const;
46 UInt_t GetRunNr(UInt_t posi) const;
47 UInt_t GetEqNr() const;
48 UInt_t GetNrEvents() const;
49
50 UInt_t GetHits(UInt_t hs, UInt_t chipi, UInt_t coli, UInt_t rowi);
51 Float_t GetHitsEfficiency(UInt_t hs, UInt_t chipi, UInt_t coli, UInt_t rowi);
52 Float_t GetHitsEfficiencyError(UInt_t hs, UInt_t chipi, UInt_t coli, UInt_t rowi);
53 Float_t GetAverageMultiplicity(UInt_t hs, UInt_t chipi);
54 Float_t GetAverageMultiplicityTot(UInt_t hs);
55
56 protected:
57 TFile *fFile; // file to read and write from
58 Bool_t fWrite; // is file opened for writing?
59 Bool_t fModified; // is the hitmap modified (needs saving)?
60 Bool_t fInfoModified; // is the overall phys information modified (needs saving)?
61 AliITSOnlineSPDphysInfo *fPhysInfo; // overall phys information
62 AliITSOnlineSPDHitArray *fHitArray[6]; // hit array, one for each halfstave
63 TString fFileName; // filename of file to read write
64
65 void InitHitmap();
66 void ReadHitmap();
67 void SaveHitmap();
68
69};
70
71#endif