]> git.uio.no Git - u/mrichter/AliRoot.git/blame - MUON/AliMUONAttPainter.h
Fixed coding conventions in MUONQADataMaker classes.
[u/mrichter/AliRoot.git] / MUON / AliMUONAttPainter.h
CommitLineData
0145e89a 1#ifndef ALIMUONATTPAINTER_H
2#define ALIMUONATTPAINTER_H
3
4/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5* See cxx source for full Copyright notice */
6
7// $Id$
8
9/// \ingroup graphics
10/// \class AliMUONAttPainter
11/// \brief Basic attributes shared by all painters
12///
13// Author Laurent Aphecetche, Subatech
14
15#ifndef ROOT_TObject
16# include "TObject.h"
17#endif
18#ifndef ROOT_TString
19# include "TString.h"
20#endif
21
22class AliMUONAttPainter : public TObject
23{
24public:
25
26 enum EBits {
27 kIsCathode0 = BIT(14),
28 kIsCathode1 = BIT(15),
29 kIsBendingPlane = BIT(16),
30 kIsNonBendingPlane = BIT(17),
31 kIsFrontView = BIT(18),
32 kIsBackView = BIT(19),
33 kIsCathodeAndPlaneMutuallyExclusive = BIT(20),
34 kIsValid = BIT(21),
35 kIsSinglePainter = BIT(22),
36 kIsCathodeAndPlaneDisabled = BIT(23)
37 };
38
39 AliMUONAttPainter();
40 virtual ~AliMUONAttPainter();
41
42 /// Return our name
43 virtual const char* GetName() const { return Name(); }
44
45 TString Name() const;
46
47 TString CathodeName() const;
48
49 TString ViewPointName() const;
50
51 TString PlaneName() const;
52
53 /// Whether cathode & plane are disabled
54 Bool_t IsCathodeAndPlaneDisabled() const { return TestBit(kIsCathodeAndPlaneDisabled); }
55
56 /// Whether we are representing bending plane
57 Bool_t IsBendingPlane() const { return TestBit(kIsBendingPlane); }
58
59 /// Whether we are representing cathode 0
60 Bool_t IsCathode0() const { return TestBit(kIsCathode0); }
61
62 /// Whether we are representing cathode 1
63 Bool_t IsCathode1() const { return TestBit(kIsCathode1); }
64
65 /// Whether we can select both cathode and plane
66 Bool_t IsCathodeAndPlaneMutuallyExclusive() const { return TestBit(kIsCathodeAndPlaneMutuallyExclusive); }
67
68 /// Whether we are defined by cathode
69 Bool_t IsCathodeDefined() const { return IsCathode0() || IsCathode1(); }
70
71 /// Whether we are representing non bending plane
72 Bool_t IsNonBendingPlane() const { return TestBit(kIsNonBendingPlane); }
73
74 /// Whether we are defined by plane
75 Bool_t IsPlaneDefined() const { return IsBendingPlane() || IsNonBendingPlane(); }
76
77 /// Whether we are valid
78 Bool_t IsValid() const { return TestBit(kIsValid); }
79
80 /// Set our cathode states
81 void SetCathode(Bool_t cath0, Bool_t cath1) { SetBit(kIsCathode0,cath0); SetBit(kIsCathode1,cath1); }
82
83 /// Set our plane states
84 void SetPlane(Bool_t bending, Bool_t nonBending) { SetBit(kIsBendingPlane,bending); SetBit(kIsNonBendingPlane,nonBending); }
85
86 /// Set single status
87 void SetSingle(Bool_t value) { SetBit(kIsSinglePainter,value); }
88
89 /// Whether the painter is to be represented from front (as seen from IP)
90 Bool_t IsFrontView() const { return TestBit(kIsFrontView); }
91
92 /// Whether the painter is to be represented from back (as seen from IP)
93 Bool_t IsBackView() const { return TestBit(kIsBackView); }
94
95 /// Set view point
96 void SetViewPoint(Bool_t front, Bool_t back) { SetBit(kIsFrontView,front); SetBit(kIsBackView,back); }
97
98 /// Set mutually exclusive flag
99 void SetCathodeAndPlaneMutuallyExclusive(Bool_t value) { SetBit(kIsCathodeAndPlaneMutuallyExclusive,value); }
100
101 /// Set valid flag
102 void SetValid(Bool_t value) { SetBit(kIsValid,value); }
103
104 /// Whether we represent attributes of a single painter (if false, means it's a painter group)
105 Bool_t IsSinglePainter() const { return TestBit(kIsSinglePainter); }
106
107 /// Set cathode & plane disable flag
108 void SetCathodeAndPlaneDisabled(Bool_t value) { SetBit(kIsCathodeAndPlaneDisabled,value); }
109
110 void Print(Option_t* opt="") const;
111
112 ClassDef(AliMUONAttPainter,1) // Basic attributes of painters
113};
114
115#endif