AliPhysics  754e963 (754e963)
Go to the documentation of this file.
1 #if !defined(__CINT__) || defined(__MAKECINT__)
2 #include <Riostream.h>
3 #include <TArrayF.h>
4 #include <TString.h>
6 class TH2;
8 #ifndef _TINFO_
9 #define _TINFO_
10 class TInfo : public TObject {
11  public:
12  TInfo(Int_t rn=0) : fRunNo(rn), fMinT(160), fMaxT(160), fAvTime(0), fFirstTime(0), fLastTime(0), fNFaulty(25) {;}
13  virtual ~TInfo() {;}
14  Float_t AbsMinT(Int_t t=1) const;
15  Float_t AbsMaxT(Int_t t=2) const;
16  Float_t AvgT(Int_t sm) const;
17  UInt_t AvTime() const { return fAvTime; }
18  Float_t Diff(Int_t ns ) const { return fMaxT.At(ns)-fMinT.At(ns); }
19  UInt_t FirstTime() const { return fAvTime; }
20  UInt_t GetAverageTime() const { return fAvTime;}
21  UInt_t GetFirstTime() const { return fFirstTime;}
22  TH2 *GetHist(Int_t type=1) const;
23  UInt_t GetLastTime() const { return fLastTime;}
24  const char *GetName() const { return Form("TempInfo_%d",fRunNo); }
25  Int_t GetRunNo() const { return fRunNo; }
26  Int_t GetNFaulty() const { return fNFaulty; }
28  Double_t Fraction() const { return 1.*Nvalid()/(NSensors()-GetNFaulty()); }
29  UInt_t LastTime() const { return fAvTime; }
30  Bool_t IsValid(Int_t ns) const { return ((fMinT.At(ns)>0)&&(fMaxT.At(ns)>0)); }
31  Int_t RunNo() const { return fRunNo; }
32  Float_t T(Int_t ns, Int_t t) const;
33  Float_t MinT(Int_t ns) const { return fMinT.At(ns); }
34  Float_t MaxT(Int_t ns) const { return fMaxT.At(ns); }
35  TArrayF &MinT() { return fMinT; }
36  TArrayF &MaxT() { return fMaxT; }
37  Int_t Nvalid() const { Int_t ret=0; for (Int_t i=0;i<160;++i) ret += IsValid(i); return ret;}
38  void Print(Option_t *option="") const;
39  void Set(Int_t ns, Float_t min, Float_t max) { fMinT.SetAt(min,ns); fMaxT.SetAt(max,ns); }
40  void SetNFaulty(Int_t n) { fNFaulty=n; }
41  void SetTime(UInt_t av, UInt_t f, UInt_t l) { fAvTime=av; fFirstTime=f; fLastTime=l; }
43  static const char *Type(Int_t t);
44  static Int_t GetBin(Int_t ns);
45  static Int_t SM(Int_t ns) { return ns/8; }
46  static Int_t NSensors() { return 160; }
47  static Int_t SensId(Int_t sm, Int_t row, Int_t col);
49  protected:
50  Int_t fRunNo; // run number
51  TArrayF fMinT; // min temperature per sensor
52  TArrayF fMaxT; // max temperature per sensor
53  UInt_t fAvTime; // average start time
54  UInt_t fFirstTime; // first time
55  UInt_t fLastTime; // last time
57  ClassDef(TInfo, 3); // Temperature info class
58 };
59 #endif
60 #endif
Float_t Diff(Int_t ns) const
Definition: TInfo.h:18
Float_t MinT(Int_t ns) const
Definition: TInfo.h:33
TArrayF & MaxT()
Definition: TInfo.h:36
double Double_t
Definition: External.C:58
Int_t RunNo() const
Definition: TInfo.h:31
UInt_t GetLastTime() const
Definition: TInfo.h:23
Definition: TInfo.h:10
UInt_t fAvTime
Definition: TInfo.h:53
static Int_t NSensors()
Definition: TInfo.h:46
Int_t GetNFaulty() const
Definition: TInfo.h:26
UInt_t GetAverageTime() const
Definition: TInfo.h:20
Float_t AbsMaxT(Int_t t=2) const
Definition: TInfo.cxx:23
static Int_t GetBin(Int_t ns)
Definition: TInfo.cxx:90
Int_t fNFaulty
Definition: TInfo.h:56
Int_t fRunNo
Definition: TInfo.h:50
virtual ~TInfo()
Definition: TInfo.h:13
TInfo(Int_t rn=0)
Definition: TInfo.h:12
void SetNFaulty(Int_t n)
Definition: TInfo.h:40
Int_t Nvalid() const
Definition: TInfo.h:37
void Set(Int_t ns, Float_t min, Float_t max)
Definition: TInfo.h:39
int Int_t
Definition: External.C:63
unsigned int UInt_t
Definition: External.C:33
float Float_t
Definition: External.C:68
const char * GetName() const
Definition: TInfo.h:24
void SetTime(UInt_t av, UInt_t f, UInt_t l)
Definition: TInfo.h:41
Bool_t IsValid(Int_t ns) const
Definition: TInfo.h:30
static Int_t SM(Int_t ns)
Definition: TInfo.h:45
TArrayF fMaxT
Definition: TInfo.h:52
UInt_t GetFirstTime() const
Definition: TInfo.h:21
TH2 * GetHist(Int_t type=1) const
Definition: TInfo.cxx:46
void Print(Option_t *option="") const
Definition: TInfo.cxx:66
UInt_t AvTime() const
Definition: TInfo.h:17
Float_t MaxT(Int_t ns) const
Definition: TInfo.h:34
static Int_t SensId(Int_t sm, Int_t row, Int_t col)
Definition: TInfo.cxx:272
TArrayF & MinT()
Definition: TInfo.h:35
Definition: External.C:220
Float_t T(Int_t ns, Int_t t) const
Definition: TInfo.cxx:75
TArrayF fMinT
Definition: TInfo.h:51
UInt_t FirstTime() const
Definition: TInfo.h:19
UInt_t fFirstTime
Definition: TInfo.h:54
const char Option_t
Definition: External.C:48
Float_t AbsMinT(Int_t t=1) const
Definition: TInfo.cxx:10
Double_t Fraction() const
Definition: TInfo.h:28
Float_t AvgT(Int_t sm) const
Definition: TInfo.cxx:36
bool Bool_t
Definition: External.C:53
static const char * Type(Int_t t)
Definition: TInfo.cxx:314
UInt_t fLastTime
Definition: TInfo.h:55
Int_t GetRunNo() const
Definition: TInfo.h:25
UInt_t LastTime() const
Definition: TInfo.h:29