]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWG2/RESONANCES/AliRsnMiniMonitor.h
Added an experimental class for single-track monitors.
[u/mrichter/AliRoot.git] / PWG2 / RESONANCES / AliRsnMiniMonitor.h
1 #ifndef AliRsnMiniMonitor_H
2 #define AliRsnMiniMonitor_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 //
9 //  Monitors
10 //
11 ////////////////////////////////////////////////////////////////////////////////
12
13 #include "TObjArray.h"
14
15 class AliRsnDaughter;
16 class AliRsnEvent;
17
18 class AliRsnMiniMonitor : public TNamed {
19 public:
20
21    enum EType {
22       kdEdxTPCvsP,    // TPC signal vs. momentum
23       ktimeTOFvsP,    // TOF time vs. momentum
24       kTypes          // total number of cuts
25    };
26
27    AliRsnMiniMonitor();
28    AliRsnMiniMonitor(const char *name, EType type, Int_t cutID);
29    AliRsnMiniMonitor(const AliRsnMiniMonitor& copy);
30    AliRsnMiniMonitor& operator=(const AliRsnMiniMonitor& copy);
31    virtual ~AliRsnMiniMonitor() { }
32
33    EType              GetType()   {return fType;}
34    Int_t              GetCutID()  {return fCutID;}
35    Int_t              GetListID() {return fListID;}
36    
37    void               SetType(EType type)  {fType = type;}
38    void               SetCutID(Int_t id)   {fCutID = id;}
39
40    static const char* Label(EType type); 
41    Bool_t             Init(const char *name, TList *list);
42    Bool_t             Fill(AliRsnDaughter *track, AliRsnEvent *event);
43
44 protected:
45
46    EType      fType;     //  monitor type
47    Int_t      fCutID;    //  ID for cut to be used
48    Int_t      fListID;   //  histogram ID in the list
49    TList     *fList;     //! global output list
50                                        
51    ClassDef(AliRsnMiniMonitor, 1)  //  AliRsnMiniMonitor class
52 };
53
54 inline const char* AliRsnMiniMonitor::Label(EType type)
55 {
56    switch (type) {
57       case kdEdxTPCvsP: return "TPCsignal";
58       case ktimeTOFvsP: return "TOFsignal";
59       default         : return "X";
60    }
61 }
62
63 #endif