|
Last change
on this file since 719 was 695, checked in by tbretz, 25 years ago |
|
*** empty log message ***
|
-
Property svn:executable
set to
*
|
|
File size:
1009 bytes
|
| Line | |
|---|
| 1 | #include "MGeomCam.h"
|
|---|
| 2 |
|
|---|
| 3 | #include "MLog.h"
|
|---|
| 4 | #include "MHexagon.h"
|
|---|
| 5 |
|
|---|
| 6 | ClassImp(MGeomCam)
|
|---|
| 7 |
|
|---|
| 8 | MGeomCam::MGeomCam(UInt_t npix, const char *name, const char *title)
|
|---|
| 9 | {
|
|---|
| 10 | *fName = name ? name : "MGeomCam";
|
|---|
| 11 | *fTitle = title ? title : "Storage container for a camera geometry";
|
|---|
| 12 |
|
|---|
| 13 | fNumPixels = npix;
|
|---|
| 14 | fPixels = new TObjArray(npix);
|
|---|
| 15 |
|
|---|
| 16 | //
|
|---|
| 17 | // make sure that the destructor delete all contained objects
|
|---|
| 18 | //
|
|---|
| 19 | fPixels->SetOwner();
|
|---|
| 20 |
|
|---|
| 21 | for (UInt_t i=0; i<npix; i++)
|
|---|
| 22 | (*fPixels)[i] = new MGeomPix;
|
|---|
| 23 | }
|
|---|
| 24 |
|
|---|
| 25 | void MGeomCam::Draw( Option_t * )
|
|---|
| 26 | {
|
|---|
| 27 | //
|
|---|
| 28 | // Draw the Camera
|
|---|
| 29 | //
|
|---|
| 30 | for (UInt_t i=0; i<fNumPixels; i++)
|
|---|
| 31 | {
|
|---|
| 32 | MHexagon *el = new MHexagon((*this)[i]);
|
|---|
| 33 | el->Draw();
|
|---|
| 34 | }
|
|---|
| 35 | }
|
|---|
| 36 |
|
|---|
| 37 | void MGeomCam::Print(Option_t *)
|
|---|
| 38 | {
|
|---|
| 39 | //
|
|---|
| 40 | // Print Information about the Geometry of the camera
|
|---|
| 41 | //
|
|---|
| 42 | *fLog << " Number of Pixels: " << fNumPixels << endl ;
|
|---|
| 43 |
|
|---|
| 44 | for (UInt_t i=0; i<fNumPixels; i++ )
|
|---|
| 45 | {
|
|---|
| 46 | *fLog << " Pixel: " << i << " ";
|
|---|
| 47 | (*this)[i].Print() ;
|
|---|
| 48 | }
|
|---|
| 49 | }
|
|---|
| 50 |
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.