Changeset 963 for trunk/MagicSoft/Mars/mgui
- Timestamp:
- 10/16/01 10:42:09 (23 years ago)
- Location:
- trunk/MagicSoft/Mars/mgui
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mgui/MCamDisplay.h
r961 r963 42 42 TVirtualPad *fDrawingPad; 43 43 44 TBox *GetBox(Int_t i){ return (TBox*) fLegend->At(i); }44 TBox *GetBox(Int_t i) { return (TBox*) fLegend->At(i); } 45 45 TText *GetText(Int_t i) { return (TText*)fLegText->At(i); } 46 46 … … 50 50 } 51 51 52 MHexagon &operator[](int i) { return *((MHexagon*)fPixels->At(i)); } 53 54 Int_t GetColor(Float_t wert); 55 56 void UpdateLegend(); 57 52 58 public: 53 54 MCamDisplay (MGeomCam *geom); 55 59 MCamDisplay(MGeomCam *geom); 56 60 ~MCamDisplay(); 57 61 … … 62 66 63 67 void Reset(); 64 65 MHexagon &operator[](int i) { return *((MHexagon*)fPixels->At(i)); }66 67 Int_t GetColor(Float_t wert);68 69 void UpdateLegend();70 68 71 69 void SetAutoScale(Bool_t input = kTRUE) -
trunk/MagicSoft/Mars/mgui/MGeomCam.cc
r749 r963 24 24 \* ======================================================================== */ 25 25 26 /////////////////////////////////////////////////////////////////////// 27 // 28 // MGeomCam 29 // 30 // This is the base class of different camera geometries. It creates 31 // a pixel object for a given number of pixels and defines the 32 // interface of how to acccess the geometry information. 33 // 34 /////////////////////////////////////////////////////////////////////// 35 26 36 #include "MGeomCam.h" 27 37 … … 29 39 #include "MHexagon.h" 30 40 31 ClassImp(MGeomCam) 41 ClassImp(MGeomCam); 32 42 43 // -------------------------------------------------------------------------- 44 // 45 // Initializes a Camera Geometry with npix pixels. All pixels 46 // are deleted when the corresponding array is deleted. 47 // 33 48 MGeomCam::MGeomCam(UInt_t npix, const char *name, const char *title) 34 49 { … … 48 63 } 49 64 50 void MGeomCam::Draw( Option_t * ) 51 { 52 // 53 // Draw the Camera 54 // 55 for (UInt_t i=0; i<fNumPixels; i++) 56 { 57 MHexagon *el = new MHexagon((*this)[i]); 58 el->Draw(); 59 } 60 } 61 65 // -------------------------------------------------------------------------- 66 // 67 // Prints the Geometry information of all pixels in the camera 68 // 62 69 void MGeomCam::Print(Option_t *) 63 70 { … … 65 72 // Print Information about the Geometry of the camera 66 73 // 67 *fLog << " Number of Pixels : " << fNumPixels << endl;74 *fLog << " Number of Pixels (" << GetTitle() << "): " << fNumPixels << endl; 68 75 69 for (UInt_t i=0; i<fNumPixels; i++ 76 for (UInt_t i=0; i<fNumPixels; i++) 70 77 { 71 78 *fLog << " Pixel: " << i << " "; 72 (*this)[i].Print() 79 (*this)[i].Print(); 73 80 } 74 81 } -
trunk/MagicSoft/Mars/mgui/MGeomCam.h
r961 r963 27 27 virtual ~MGeomCam() { delete fPixels; } 28 28 29 virtual void Draw(Option_t *option = "" );30 31 29 UInt_t GetNumPixels() const { return fNumPixels; } 32 30 -
trunk/MagicSoft/Mars/mgui/MGeomCamCT1.cc
r749 r963 24 24 \* ======================================================================== */ 25 25 26 /////////////////////////////////////////////////////////////////////// 27 // 28 // MGeomCamCT1 29 // 30 // This class stores the geometrz information of the CT1 camera. 31 // The next neighbor information comes from a table, the geometry layout 32 // is calculated (for Algorithm see CreateCam 33 // 34 /////////////////////////////////////////////////////////////////////// 35 26 36 #include "MGeomCamCT1.h" 27 37 … … 32 42 #include "MLog.h" 33 43 34 ClassImp(MGeomCamCT1) 35 44 ClassImp(MGeomCamCT1); 45 46 // -------------------------------------------------------------------------- 47 // 48 // CT1 camera has 127 pixels. For geometry and Next Neighbor info see 49 // CreateCam and CreateNN 50 // 36 51 MGeomCamCT1::MGeomCamCT1(const char *name) : MGeomCam(127, name, "Geometry information of CT1 camera") 37 52 { … … 40 55 } 41 56 42 void MGeomCamCT1::Draw( Option_t * ) 43 { 44 TCanvas *can = new TCanvas("cam", "Camera Geometry", 4 ) ; 45 46 can->Range(-175, -175, 175, 175 ) ; 47 48 MGeomCam::Draw(); 49 } 50 51 57 // -------------------------------------------------------------------------- 58 // 59 // Create Next Neighbors: Fill the NN Info into the pixel objects. 60 // 52 61 void MGeomCamCT1::CreateNN() 53 62 { … … 179 188 { 88, 89, 123, 125, -1, -1}, 180 189 { 89, 90, 124, 126, -1, -1} // 126 181 } 190 }; 182 191 183 192 for (Int_t i=0; i<127; i++) … … 186 195 } 187 196 197 // -------------------------------------------------------------------------- 198 // 199 // Calculate the geometry information of CT1 and fill this information 200 // into the pixel objects. 201 // 188 202 void MGeomCamCT1::CreateCam() 189 203 { … … 197 211 // it was punt into a root/C++ context by Harald Kornmayer and Thomas Bretz 198 212 199 const Float_t diameter = 21 213 const Float_t diameter = 21; // units are mm 200 214 const Float_t kS32 = sqrt(3)/2; 201 215 -
trunk/MagicSoft/Mars/mgui/MGeomCamCT1.h
r753 r963 20 20 MGeomCamCT1(const char *name=NULL); 21 21 22 void Draw(Option_t *option = "" ) ;23 24 22 ClassDef(MGeomCamCT1, 1) // Geometry class for the CT1 camera 25 23 }; -
trunk/MagicSoft/Mars/mgui/MGeomCamMagic.cc
r749 r963 24 24 \* ======================================================================== */ 25 25 26 /////////////////////////////////////////////////////////////////////// 27 // 28 // MGeomCamMagic 29 // 30 // This class stores the geometry information of the Magic camera. 31 // All information are copied from tables, see source code. 32 // 33 /////////////////////////////////////////////////////////////////////// 34 26 35 #include "MGeomCamMagic.h" 27 36 … … 32 41 ClassImp(MGeomCamMagic) 33 42 43 // -------------------------------------------------------------------------- 44 // 45 // Magic camera has 577 pixels. For geometry and Next Neighbor info see 46 // CreateCam and CreateNN 47 // 34 48 MGeomCamMagic::MGeomCamMagic(const char *name) : MGeomCam(577, name, "Geometry information of Magic Camera") 35 49 { … … 38 52 } 39 53 40 void MGeomCamMagic::Draw(Option_t *) 41 { 42 TCanvas *can = new TCanvas("can", "Camera Geometry", 4 ) ; 43 44 can->Range(-600, -600, 600, 600 ) ; 45 46 MGeomCam::Draw(); 47 } 48 54 // -------------------------------------------------------------------------- 55 // 56 // This fills the geometry information from a table into the pixel objects. 57 // 49 58 void MGeomCamMagic::CreateCam() 50 59 { … … 292 301 } 293 302 303 // -------------------------------------------------------------------------- 304 // 305 // This fills the next neighbor information from a table into the pixel 306 // objects. 307 // 294 308 void MGeomCamMagic::CreateNN() 295 309 { -
trunk/MagicSoft/Mars/mgui/MGeomCamMagic.h
r749 r963 19 19 MGeomCamMagic(const char *name=NULL); 20 20 21 void Draw(Option_t *option = "");22 23 21 ClassDef(MGeomCamMagic, 1) // Geometry class for the Magic camera 24 22 }; -
trunk/MagicSoft/Mars/mgui/MGeomPix.cc
r749 r963 24 24 \* ======================================================================== */ 25 25 26 /////////////////////////////////////////////////////////////////////// 27 // 28 // MGeomPix 29 // 30 // This container stores the geometry (position) information of 31 // a single pixel together with the information about next neighbors. 32 // 33 /////////////////////////////////////////////////////////////////////// 34 26 35 #include "MGeomPix.h" 27 36 28 37 #include "MLog.h" 29 38 30 ClassImp(MGeomPix) 39 ClassImp(MGeomPix); 31 40 41 // -------------------------------------------------------------------------- 42 // 43 // Initialiyes one pixel 44 // 32 45 MGeomPix::MGeomPix(Float_t x, Float_t y, Float_t r) : fX(x), fY(y), fR(r) 33 46 { … … 35 48 } 36 49 50 // -------------------------------------------------------------------------- 51 // 52 // Initialiyes Next Neighbors. 53 // 54 // WARNING: This function is public, but it is not ment for user access. 55 // It should only be used from geometry classes (like MGeomCam) 56 // 37 57 void MGeomPix::SetNeighbors(Short_t i0, Short_t i1, Short_t i2, 38 58 Short_t i3, Short_t i4, Short_t i5) … … 53 73 } 54 74 55 75 // -------------------------------------------------------------------------- 76 // 77 // Print the geometry information of one pixel. 78 // 56 79 void MGeomPix::Print(Option_t *opt) 57 80 {
Note:
See TracChangeset
for help on using the changeset viewer.