]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWGPP/TRD/info/AliTRDeventInfo.h
Fix coverity issues
[u/mrichter/AliRoot.git] / PWGPP / TRD / info / AliTRDeventInfo.h
1 #ifndef ALITRDEVENTINFO_H
2 #define ALITRDEVENTINFO_H
3
4 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5  * See cxx source for full Copyright notice                               */
6 ////////////////////////////////////////////////////////////////////////////
7 //                                                                        //
8 //  Event info for TRD performance train                                  //
9 //                                                                        //
10 //  Authors:                                                              //
11 //    Markus Fasel <M.Fasel@gsi.de>                                       //
12 //                                                                        //
13 ////////////////////////////////////////////////////////////////////////////
14
15 #include <TObject.h>
16 #include <TString.h>
17
18 class AliESDHeader;
19 class AliESDRun;
20 class TH1D;
21 class AliTRDeventInfo : public TObject{
22 public:
23   enum{
24     kCentralityClasses = 5
25    ,kLHCbunches = 3500
26   };
27   AliTRDeventInfo();
28   AliTRDeventInfo(AliESDHeader *header, AliESDRun *run);
29   AliTRDeventInfo(const AliTRDeventInfo &info);
30   AliTRDeventInfo& operator=(const AliTRDeventInfo &info);
31   virtual ~AliTRDeventInfo();
32   virtual void  Delete(const Option_t *);
33
34   AliESDHeader* GetEventHeader() const                 { return fHeader; }
35   AliESDRun*    GetRunInfo() const                     { return fRun; }
36   Int_t         GetCentrality() const                  { return fCentrality; }
37   static Int_t  GetCentralityBin(Float_t cenPer);
38   TString       GetFiredTriggerClasses();
39   Int_t         GetMultiplicity() const                { return fMult; }
40   static Int_t  GetMultiplicityBin(Int_t n);
41   UShort_t      GetBunchFill() const;
42   static void   GetListOfIsolatedBunches(TH1D *hbc, Int_t bunchSpacing=10);
43   Bool_t        IsOwner() const                        { return TestBit(kOwner); }
44   void          SetEventHeader(AliESDHeader *evHeader) { fHeader = evHeader; }
45   void          SetRunInfo(AliESDRun *evRun)           { fRun = evRun; }
46   void          SetCentrality(Float_t cent)            { fCentrality = cent>=0.?GetCentralityBin(cent):-1;}
47   void          SetMultiplicity(Int_t n)               { fMult = n>=0?GetMultiplicityBin(n):-1;}
48   void          SetOwner();
49
50 private:
51   enum{
52     kOwner = BIT(14)
53   };
54   static Int_t const   fgkMultBin[kCentralityClasses-1]; // multiplicity bins
55   static Float_t const fgkCentBin[kCentralityClasses-1]; // centrality bins
56   AliESDHeader* fHeader;      //! The ESD Header
57   AliESDRun*    fRun;         //! The ESD Run Info
58   Int_t         fCentrality;  //! Centrality class based on AliCentrality
59   Int_t         fMult;        //! Centrality class based on AliMultiplicity
60
61   ClassDef(AliTRDeventInfo, 2) // Event info  relevant for TRD analysis
62 };
63 #endif