]> git.uio.no Git - u/mrichter/AliRoot.git/blob - STEER/AliDetectorTag.h
changing msg to aliinfo
[u/mrichter/AliRoot.git] / STEER / AliDetectorTag.h
1 #ifndef ALIDETECTORTAG_H
2 #define ALIDETECTORTAG_H
3 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4  * See cxx source for full Copyright notice                               */
5
6
7 /* $Id$ */
8
9 //-------------------------------------------------------------------------
10 //                          Class AliDetectorTag
11 //   This is the class to deal with the tags for the detector level
12 //
13 //    Origin: Panos Christakoglou, UOA-CERN, Panos.Christakoglou@cern.ch
14 //-------------------------------------------------------------------------
15
16 #include "TObject.h"
17 #include "TObjArray.h"
18 #include "AliDAQ.h"
19
20 //___________________________________________________________________________
21 class AliDetectorTag : public TObject {
22  public:
23   AliDetectorTag();
24   AliDetectorTag(const AliDetectorTag & t);
25
26   AliDetectorTag &operator=(const AliDetectorTag &rhs);
27   virtual ~AliDetectorTag();
28   
29   void UpdateFromRunTable(AliDetectorTag &detTag);
30
31   //____________________________________________________//
32   void SetDetectorMask(UInt_t mask)     {fMaskDAQ = mask; fMaskReco = mask; }
33   void SetDetectorMaskDAQ(UInt_t mask)  {fMaskDAQ = mask;}
34   void SetDetectorMaskReco(UInt_t mask) {fMaskReco = mask;}
35   void SetDetectorValidityRange(UChar_t idet, UShort_t vr) {fDetectorValidityRange[idet] = vr; }
36   void SetDetectorStatus(UChar_t idet, TString co) { fDetectorStatus[idet] = co; }
37   TObjArray *GetDetectorMask() { return 0; } // {return fDetectorArray;}
38   UInt_t GetIntDetectorMask() { return fMaskDAQ; }
39   UInt_t GetIntDetectorMaskDAQ() { return fMaskDAQ; }
40   UInt_t GetIntDetectorMaskReco() { return fMaskReco; }
41   UShort_t GetDetectorValidityRange(UChar_t idet) const { return fDetectorValidityRange[idet]; }
42   TString  GetDetectorStatus(UChar_t idet) const { return fDetectorStatus[idet]; }
43   const char *GetDetectorMaskDAQ() { return AliDAQ::ListOfTriggeredDetectors(fMaskDAQ); }
44   const char *GetDetectorMaskReco() { return AliDAQ::ListOfTriggeredDetectors(fMaskReco); }
45   void PrintDetectorMask();
46
47   //____________________________________________________//
48   Bool_t GetITSSPD() const {return fMaskDAQ & AliDAQ::kSPD;}
49   Bool_t GetITSSDD() const {return fMaskDAQ & AliDAQ::kSSD;}
50   Bool_t GetITSSSD() const {return fMaskDAQ & AliDAQ::kSSD;}
51   Bool_t GetTPC()    const {return fMaskDAQ & AliDAQ::kTPC;}
52   Bool_t GetTRD()    const {return fMaskDAQ & AliDAQ::kTRD;}
53   Bool_t GetTOF()    const {return fMaskDAQ & AliDAQ::kTOF;}
54   Bool_t GetHMPID()  const {return fMaskDAQ & AliDAQ::kHMPID;}
55   Bool_t GetPHOS()   const {return fMaskDAQ & AliDAQ::kPHOS;}
56   Bool_t GetPMD()    const {return fMaskDAQ & AliDAQ::kPMD;}
57   Bool_t GetMUON()   const {return fMaskDAQ & AliDAQ::kMUON;}
58   Bool_t GetFMD()    const {return fMaskDAQ & AliDAQ::kFMD;}
59   Bool_t GetTZERO()  const {return fMaskDAQ & AliDAQ::kT0;}
60   Bool_t GetVZERO()  const {return fMaskDAQ & AliDAQ::kVZERO;}
61   Bool_t GetZDC()    const {return fMaskDAQ & AliDAQ::kZDC;}
62   Bool_t GetEMCAL()  const {return fMaskDAQ & AliDAQ::kEMCAL;}
63   
64   //____________________________________________________//
65  private:
66   //  void Int2Bin();
67   //   void SetDetectorConfiguration();
68
69   void SetITSSPD() {fMaskDAQ |= AliDAQ::kSPD  ;}
70   void SetITSSDD() {fMaskDAQ |= AliDAQ::kSDD  ;}
71   void SetITSSSD() {fMaskDAQ |= AliDAQ::kSSD  ;}
72   void SetTPC()    {fMaskDAQ |= AliDAQ::kTPC  ;}
73   void SetTRD()    {fMaskDAQ |= AliDAQ::kTRD  ;}
74   void SetTOF()    {fMaskDAQ |= AliDAQ::kTOF  ;}
75   void SetHMPID()  {fMaskDAQ |= AliDAQ::kHMPID;}
76   void SetPHOS()   {fMaskDAQ |= AliDAQ::kPHOS ;}
77   void SetPMD()    {fMaskDAQ |= AliDAQ::kPMD  ;}
78   void SetMUON()   {fMaskDAQ |= AliDAQ::kMUON ;}
79   void SetFMD()    {fMaskDAQ |= AliDAQ::kFMD  ;}
80   void SetTZERO()  {fMaskDAQ |= AliDAQ::kT0   ;}
81   void SetVZERO()  {fMaskDAQ |= AliDAQ::kVZERO;}
82   void SetZDC()    {fMaskDAQ |= AliDAQ::kZDC  ;}
83   void SetEMCAL()  {fMaskDAQ |= AliDAQ::kEMCAL;}
84   
85   //   TObjArray *fDetectorArray; //detectors' names - active
86   UInt_t     fMaskDAQ;          //detector mask in DAQ
87   UInt_t     fMaskReco;         //detector mask in Reco
88   //   UInt_t     fDetectors[32]; //detector mask
89   //   Bool_t     fITSSPD;        //ITS-SPD active = 1
90   //   Bool_t     fITSSDD;        //ITS-SDD active = 1
91   //   Bool_t     fITSSSD;        //ITS-SSD active = 1
92   //   Bool_t     fTPC;           //TPC active = 1
93   //   Bool_t     fTRD;           //TRD active = 1
94   //   Bool_t     fTOF;           //TOF active = 1
95   //   Bool_t     fHMPID;         //HMPID active = 1
96   //   Bool_t     fPHOS;          //PHOS active = 1
97   //   Bool_t     fPMD;           //PMD active = 1
98   //   Bool_t     fMUON;          //MUON active = 1
99   //   Bool_t     fFMD;           //FMD active = 1
100   //   Bool_t     fTZERO;         //TZERO active = 1
101   //   Bool_t     fVZERO;         //VZERO active = 1
102   //   Bool_t     fZDC;           //ZDC active = 1
103   //   Bool_t     fEMCAL;         //EMCAL active = 1
104
105   UShort_t   fDetectorValidityRange[AliDAQ::kHLTId];
106   TString    fDetectorStatus[AliDAQ::kHLTId];
107
108   ClassDef(AliDetectorTag, 6)  //(ClassName, ClassVersion)
109 };
110 //______________________________________________________________________________
111
112 #endif