]> git.uio.no Git - u/mrichter/AliRoot.git/blame_incremental - EVE/Alieve/AliEveMUONChamber.h
Temporary fix to avoid xrootd thrashing
[u/mrichter/AliRoot.git] / EVE / Alieve / AliEveMUONChamber.h
... / ...
CommitLineData
1// $Id$
2// Main authors: Matevz Tadel & Alja Mrak-Tadel: 2006, 2007
3
4/**************************************************************************
5 * Copyright(c) 1998-2008, ALICE Experiment at CERN, all rights reserved. *
6 * See http://aliceinfo.cern.ch/Offline/AliRoot/License.html for *
7 * full copyright notice. *
8 **************************************************************************/
9#ifndef ALIEVE_MUONChamber_H
10#define ALIEVE_MUONChamber_H
11
12#include <TEveElement.h>
13#include <TEveQuadSet.h>
14#include <TEvePointSet.h>
15
16#include <TNamed.h>
17#include <TAtt3D.h>
18#include <TAttBBox.h>
19
20
21class AliEveMUONData;
22class AliEveMUONChamberData;
23class AliEveMUONChamberEditor;
24class AliEveMUONChamberGL;
25
26class AliEveMUONChamber : public TEveElement,
27 public TNamed,
28 public TAtt3D,
29 public TAttBBox
30
31{
32
33 friend class AliEveMUONChamberGL;
34 friend class AliEveMUONChamberEditor;
35
36 AliEveMUONChamber(const AliEveMUONChamber&); // Not implemented
37 AliEveMUONChamber& operator=(const AliEveMUONChamber&); // Not implemented
38
39 protected:
40
41 void UpdateQuads();
42
43 AliEveMUONData* fMUONData; // data for the current event
44 Color_t fFrameColor; // main coloring
45 UInt_t fRTS; //! Rendering Time Stamp
46 Int_t fChamberID; // number of the chamber, 0 to 13
47 TEveQuadSet fQuadSet1; // 1st cathode plane digits
48 TEveQuadSet fQuadSet2; // 2nd cathode plane digits
49 TEvePointSet fPointSet1; // reconstructed points (1st cathode)
50 TEvePointSet fPointSet2; // simulation hits
51 Short_t fThreshold; // digit amplitude threshold
52 Int_t fMaxVal; // digit amplitude maximum value
53 Int_t fClusterSize; // cluster point size
54 Int_t fHitSize; // hit point size
55
56 void SetupColor(Int_t val, UChar_t* pix) const;
57
58 mutable UChar_t* fColorArray;
59 void ClearColorArray();
60 void SetupColorArray() const;
61 UChar_t* ColorFromArray(Int_t val) const;
62 void ColorFromArray(Int_t val, UChar_t* pix) const;
63 Int_t ColorIndex(Int_t val) const;
64
65public:
66
67 AliEveMUONChamber(Int_t id, const Text_t* n = "AliEveMUONChamber", const Text_t* t = 0);
68 virtual ~AliEveMUONChamber();
69
70 virtual void ComputeBBox();
71 virtual void Paint(Option_t* option = "");
72 virtual UInt_t IncRTS() { return ++fRTS; };
73 virtual Bool_t CanEditMainColor() { return kTRUE; }
74
75 void SetDataSource(AliEveMUONData *data);
76 void SetChamberID(Int_t id);
77 void SetFrameColor(Color_t col) { fFrameColor = col; IncRTS(); };
78 AliEveMUONData* GetData() const { return fMUONData; };
79 AliEveMUONChamberData* GetChamberData() const;
80 Int_t GetID() const { return fChamberID; };
81 void SetThreshold(Short_t t);
82 void SetMaxVal(Int_t mv);
83 void SetClusterSize(Int_t size);
84 void SetHitSize(Int_t size);
85
86 ClassDef(AliEveMUONChamber,1); // Visualisation of the MUON chambers
87
88};
89
90inline UChar_t* AliEveMUONChamber::ColorFromArray(Int_t val) const
91{
92 if(val < fThreshold) val = fThreshold;
93 if(val > fMaxVal) val = fMaxVal;
94 return fColorArray + 4 * (val - fThreshold);
95}
96
97inline void AliEveMUONChamber::ColorFromArray(Int_t val, UChar_t* pix) const
98{
99 UChar_t* c = ColorFromArray(val);
100 pix[0] = c[0]; pix[1] = c[1]; pix[2] = c[2]; pix[3] = c[3];
101}
102
103#endif