Changeset 963


Ignore:
Timestamp:
10/16/01 10:42:09 (23 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/mbase/MReadTree.cc

    r949 r963  
    136136//  out.
    137137//
    138 Bool_t MReadTree::PreProcess (MParList *pList)
     138Bool_t MReadTree::PreProcess(MParList *pList)
    139139{
    140140    //
     
    145145    if (!fNumEntries)
    146146    {
    147         *fLog << dbginf << "No Entries found in chain (file/s)." << endl;
     147        *fLog << dbginf << "No entries found in chain (file/s)." << endl;
    148148        return kFALSE;
    149149    }
     
    152152    // output logging information
    153153    //
    154     *fLog << fNumEntries << " Entries found in file(s)." << endl;
     154    *fLog << fNumEntries << " entries found in file(s)." << endl;
    155155
    156156    //
     
    160160    TIter Next(fChain->GetListOfBranches());
    161161    TBranch *branch=NULL;
    162    
     162
     163    Int_t num=0;
    163164    //
    164165    // loop over all tasks for processing
     
    175176        //
    176177        if (HasVeto(name))
     178        {
     179            *fLog << "Branch " << name << " has veto... skipped." << endl;
    177180            continue;
     181        }
    178182
    179183        //
     
    204208        //
    205209        fChain->SetBranchAddress(name, pcont);
    206     }
     210        *fLog << "Branch " << name << " enabled for reading." << endl;
     211
     212        num++;
     213    }
     214
     215    *fLog << "MReadTree will read " << num << " branches." << endl;
    207216
    208217    return kTRUE;
     
    238247// Get the Event with the current EventNumber fNumEntry
    239248//
    240 Bool_t MReadTree::GetEvent() 
     249Bool_t MReadTree::GetEvent()
    241250{
    242251    fChain->GetEntry(fNumEntry);
  • trunk/MagicSoft/Mars/mgui/MCamDisplay.h

    r961 r963  
    4242    TVirtualPad *fDrawingPad;
    4343
    44     TBox *GetBox(Int_t i)   { return (TBox*) fLegend->At(i); }
     44    TBox  *GetBox(Int_t i)  { return (TBox*) fLegend->At(i); }
    4545    TText *GetText(Int_t i) { return (TText*)fLegText->At(i); }
    4646
     
    5050    }
    5151
     52    MHexagon &operator[](int i) { return *((MHexagon*)fPixels->At(i)); }
     53
     54    Int_t GetColor(Float_t wert);
     55
     56    void UpdateLegend();
     57
    5258public:
    53 
    54     MCamDisplay (MGeomCam *geom);
    55 
     59    MCamDisplay(MGeomCam *geom);
    5660    ~MCamDisplay();
    5761
     
    6266
    6367    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();
    7068
    7169    void SetAutoScale(Bool_t input = kTRUE)
  • trunk/MagicSoft/Mars/mgui/MGeomCam.cc

    r749 r963  
    2424\* ======================================================================== */
    2525
     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
    2636#include "MGeomCam.h"
    2737
     
    2939#include "MHexagon.h"
    3040
    31 ClassImp(MGeomCam)
     41ClassImp(MGeomCam);
    3242
     43// --------------------------------------------------------------------------
     44//
     45// Initializes a Camera Geometry with npix pixels. All pixels
     46// are deleted when the corresponding array is deleted.
     47//
    3348MGeomCam::MGeomCam(UInt_t npix, const char *name, const char *title)
    3449{
     
    4863}
    4964
    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//
    6269void MGeomCam::Print(Option_t *)
    6370{
     
    6572    //   Print Information about the Geometry of the camera
    6673    //
    67     *fLog << " Number of Pixels: " << fNumPixels << endl ;
     74    *fLog << " Number of Pixels (" << GetTitle() << "): " << fNumPixels << endl;
    6875
    69     for (UInt_t i=0; i<fNumPixels; i++ )
     76    for (UInt_t i=0; i<fNumPixels; i++)
    7077    {
    7178        *fLog << " Pixel: " << i << "  ";
    72         (*this)[i].Print() ;
     79        (*this)[i].Print();
    7380    }
    7481}
  • trunk/MagicSoft/Mars/mgui/MGeomCam.h

    r961 r963  
    2727    virtual ~MGeomCam() { delete fPixels; }
    2828
    29     virtual void Draw(Option_t *option = "" );
    30 
    3129    UInt_t GetNumPixels() const { return fNumPixels; }
    3230
  • trunk/MagicSoft/Mars/mgui/MGeomCamCT1.cc

    r749 r963  
    2424\* ======================================================================== */
    2525
     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
    2636#include "MGeomCamCT1.h"
    2737
     
    3242#include "MLog.h"
    3343
    34 ClassImp(MGeomCamCT1)
    35 
     44ClassImp(MGeomCamCT1);
     45
     46// --------------------------------------------------------------------------
     47//
     48//  CT1 camera has 127 pixels. For geometry and Next Neighbor info see
     49//  CreateCam and CreateNN
     50//
    3651MGeomCamCT1::MGeomCamCT1(const char *name) : MGeomCam(127, name, "Geometry information of CT1 camera")
    3752{
     
    4055}
    4156
    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//
    5261void MGeomCamCT1::CreateNN()
    5362{
     
    179188      { 88,  89, 123, 125,  -1,  -1},
    180189      { 89,  90, 124, 126,  -1,  -1}   // 126
    181   } ;
     190  };
    182191
    183192  for (Int_t i=0; i<127; i++)
     
    186195}
    187196
     197// --------------------------------------------------------------------------
     198//
     199//  Calculate the geometry information of CT1 and fill this information
     200//  into the pixel objects.
     201//
    188202void MGeomCamCT1::CreateCam()
    189203{
     
    197211    // it was punt into a root/C++ context by Harald Kornmayer and Thomas Bretz
    198212   
    199     const Float_t diameter = 21 ;    // units are mm
     213    const Float_t diameter = 21;    // units are mm
    200214    const Float_t kS32  = sqrt(3)/2;
    201215
  • trunk/MagicSoft/Mars/mgui/MGeomCamCT1.h

    r753 r963  
    2020    MGeomCamCT1(const char *name=NULL);
    2121
    22     void Draw(Option_t *option = "" ) ;
    23 
    2422    ClassDef(MGeomCamCT1, 1)            // Geometry class for the CT1 camera
    2523};
  • trunk/MagicSoft/Mars/mgui/MGeomCamMagic.cc

    r749 r963  
    2424\* ======================================================================== */
    2525
     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
    2635#include "MGeomCamMagic.h"
    2736
     
    3241ClassImp(MGeomCamMagic)
    3342
     43// --------------------------------------------------------------------------
     44//
     45//  Magic camera has 577 pixels. For geometry and Next Neighbor info see
     46//  CreateCam and CreateNN
     47//
    3448MGeomCamMagic::MGeomCamMagic(const char *name) : MGeomCam(577, name, "Geometry information of Magic Camera")
    3549{
     
    3852}
    3953
    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//
    4958void MGeomCamMagic::CreateCam()
    5059{
     
    292301}
    293302
     303// --------------------------------------------------------------------------
     304//
     305//  This fills the next neighbor information from a table into the pixel
     306//  objects.
     307//
    294308void MGeomCamMagic::CreateNN()
    295309{
  • trunk/MagicSoft/Mars/mgui/MGeomCamMagic.h

    r749 r963  
    1919    MGeomCamMagic(const char *name=NULL);
    2020
    21     void Draw(Option_t *option = "");
    22 
    2321    ClassDef(MGeomCamMagic, 1)          // Geometry class for the Magic camera
    2422};
  • trunk/MagicSoft/Mars/mgui/MGeomPix.cc

    r749 r963  
    2424\* ======================================================================== */
    2525
     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
    2635#include "MGeomPix.h"
    2736
    2837#include "MLog.h"
    2938
    30 ClassImp(MGeomPix)
     39ClassImp(MGeomPix);
    3140
     41// --------------------------------------------------------------------------
     42//
     43// Initialiyes one pixel
     44//
    3245MGeomPix::MGeomPix(Float_t x, Float_t y, Float_t r) : fX(x), fY(y), fR(r)
    3346{
     
    3548}
    3649
     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//
    3757void MGeomPix::SetNeighbors(Short_t i0, Short_t i1, Short_t i2,
    3858                            Short_t i3, Short_t i4, Short_t i5)
     
    5373}
    5474
    55 
     75// --------------------------------------------------------------------------
     76//
     77// Print the geometry information of one pixel.
     78//
    5679void MGeomPix::Print(Option_t *opt)
    5780{
Note: See TracChangeset for help on using the changeset viewer.