1 #ifndef ALI_ITS_ONLINESPDPHYS_H
2 #define ALI_ITS_ONLINESPDPHYS_H
4 ////////////////////////////////////////////////////////////
5 // Author: Henrik Tydesjo //
6 // Interface class to the containers of an online //
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 ////////////////////////////////////////////////////////////
18 class AliITSOnlineSPDphysInfo;
19 class AliITSOnlineSPDHitArray;
21 class AliITSOnlineSPDphys {
24 AliITSOnlineSPDphys():fFile(NULL),fWrite(kFALSE),fModified(kFALSE),fInfoModified(kFALSE),fPhysInfo(NULL),fFileName("."){for(Int_t ihs=0; ihs<6; ihs++) fHitArray[ihs]=0x0;}
25 AliITSOnlineSPDphys(const Char_t *fileName, Bool_t readFromGridFile=kFALSE);
26 AliITSOnlineSPDphys(const AliITSOnlineSPDphys& phys);
27 virtual ~AliITSOnlineSPDphys();
28 AliITSOnlineSPDphys& operator=(const AliITSOnlineSPDphys& phys);
30 virtual void AddPhys(AliITSOnlineSPDphys* phys2);
31 virtual void ClearThis();
32 void InitializeHitMap() {InitHitmap();} // online monitoring
33 // SET METHODS ***********************************
34 void AddRunNr(UInt_t val);
35 void SetEqNr(UInt_t val);
37 void SetNrEvents(UInt_t val);
38 void AddNrEvents(Int_t val);
39 void IncrementNrEvents();
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;
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);
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