Coding conventions
[u/mrichter/AliRoot.git] / ITS / AliITSHandleDaSSD.h
CommitLineData
f67db810 1#ifndef ALIITSHANDLEDASSD_H
2#define ALIITSHANDLEDASSD_H
3
4#include <math.h>
5#include <sstream>
6#include <string>
7#include "TObject.h"
8#include "TFile.h"
9#include "TObjArray.h"
10#include "AliRawReaderDate.h"
11
12#include "AliITSChannelDaSSD.h"
13#include "AliITSModuleDaSSD.h"
14
15#ifndef PHYSICS_EVENT
16#define PHYSICS_EVENT 7
17#endif
18
19class AliITSHandleDaSSD : public TObject {
20 public :
21 AliITSHandleDaSSD();
22 explicit AliITSHandleDaSSD(const Int_t numberofmodules);
23 AliITSHandleDaSSD(const AliITSHandleDaSSD& ssdadldc);
24 AliITSHandleDaSSD& operator = (const AliITSHandleDaSSD& ssdadldc);
25 virtual ~AliITSHandleDaSSD();
26
27 Int_t GetNumberOfModules() const { return fNumberOfModules; }
28
29 AliITSModuleDaSSD* GetModule (const UChar_t ddlID, const UChar_t ad, const UChar_t adc) const;
30 AliITSModuleDaSSD* GetModule (const Int_t index) const
31 {if ((fModules) && (index < fNumberOfModules)) return fModules[index]; else return NULL;}
32 AliITSChannelDaSSD* GetStrip (const UChar_t ddlID, const UChar_t ad, const UChar_t adc, const UShort_t stripID) const;
33 TObjArray* GetCalibrationSSDLDC() const;
34 Bool_t SaveCalibrationSSDLDC(std::string& dafname) const;
35
36 Bool_t SetNumberOfModules (const Int_t numberofmodules);
37 Bool_t SetModule(AliITSModuleDaSSD *const module, const Int_t index);
38 Bool_t ReadCalibrationDataFile (const char* fileName, const Long_t eventsnumber);
39
40 virtual Bool_t CalculatePedestal();
41 virtual Bool_t CalculateNoise();
42 virtual Bool_t CalculateNoiseCM();
43
44 void DeleteSignal() { if (fModules) for (Int_t i = 0; i < fNumberOfModules; i++) if (fModules[i]) fModules[i]->DeleteSignal();}
45
46 static Int_t GetNumberOfSSDModulesConst() { return fgkNumberOfSSDModules; }
47
48 protected :
49 static const Int_t fgkNumberOfSSDModules = 1698;
50
51 Int_t fNumberOfModules; // number of AliITSModuleDaSSD to allocate
52 AliITSModuleDaSSD **fModules; //[fNumberOfModules] array of all SSD 1698 Modules (2608128 strips)
53 UInt_t fLdcId; // LDC number, read from header
54 UInt_t fRunId; // Run number, read from header
55
56 private :
57 Bool_t CalculateCM(const Int_t modind, const Int_t stripind, Float_t* const cm);
58 Bool_t RelocateModules();
59 Bool_t SignalOutOfRange (const Short_t signal) const { return (signal >= AliITSChannelDaSSD::GetOverflowConst()); }
60
61 ClassDef(AliITSHandleDaSSD, 1)
62
63};
64
65#endif