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("."){}
25 AliITSOnlineSPDphys(const Char_t *fileName);
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 // SET METHODS ***********************************
33 void AddRunNr(UInt_t val);
34 void SetEqNr(UInt_t val);
36 void SetNrEvents(UInt_t val);
37 void AddNrEvents(Int_t val);
38 void IncrementNrEvents();
40 void SetHits(UInt_t hs, UInt_t chipi, UInt_t coli, UInt_t rowi, UInt_t val);
41 void AddHits(UInt_t hs, UInt_t chipi, UInt_t coli, UInt_t rowi, Int_t val);
42 void IncrementHits(UInt_t hs, UInt_t chipi, UInt_t coli, UInt_t rowi);
43 // GET METHODS ***********************************
44 UInt_t GetNrRuns() const;
45 UInt_t GetRunNr(UInt_t posi) const;
46 UInt_t GetEqNr() const;
47 UInt_t GetNrEvents() const;
49 UInt_t GetHits(UInt_t hs, UInt_t chipi, UInt_t coli, UInt_t rowi);
50 Float_t GetHitsEfficiency(UInt_t hs, UInt_t chipi, UInt_t coli, UInt_t rowi);
51 Float_t GetHitsEfficiencyError(UInt_t hs, UInt_t chipi, UInt_t coli, UInt_t rowi);
52 Float_t GetAverageMultiplicity(UInt_t hs, UInt_t chipi);
53 Float_t GetAverageMultiplicityTot(UInt_t hs);
56 TFile *fFile; // file to read and write from
57 Bool_t fWrite; // is file opened for writing?
58 Bool_t fModified; // is the hitmap modified (needs saving)?
59 Bool_t fInfoModified; // is the overall phys information modified (needs saving)?
60 AliITSOnlineSPDphysInfo *fPhysInfo; // overall phys information
61 AliITSOnlineSPDHitArray *fHitArray[6]; // hit array, one for each halfstave
62 TString fFileName; // filename of file to read write