Changeset 7820 for trunk


Ignore:
Timestamp:
07/30/06 16:54:56 (18 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/Changelog

    r7818 r7820  
    1818
    1919                                                 -*-*- END OF LINE -*-*-
     20 2006/07/30 Thomas Bretz
     21
     22   * macros/starfield.c:
     23     - updated to use resources/mirrors.def by default
     24
     25
     26
    2027 2006/07/29 Thomas Bretz
    2128
  • trunk/MagicSoft/Mars/macros/starfield.C

    r4358 r7820  
    4141///////////////////////////////////////////////////////////////////////////
    4242
    43 void ReadSetup(TString fname, MAstroCamera &cam)
     43void ReadSetup(MAstroCamera &cam)
    4444{
    45     MMcConfigRunHeader *config=0;
    46     MGeomCam           *geom=0;
     45    /*
     46     // Name of a MC file having MGeomCam and MMcConfigRunHeader
     47     TString fname = "../Mars/Gamma_zbin7_90_7_53395to53399_w0.root";
    4748
    48     TFile file(fname);
    49     TTree *tree = (TTree*)file.Get("RunHeaders");
    50     tree->SetBranchAddress("MMcConfigRunHeader", &config);
    51     if (tree->GetBranch("MGeomCam"))
    52         tree->SetBranchAddress("MGeomCam", &geom);
    53     tree->GetEntry(0);
     49     MMcConfigRunHeader *config=0;
     50     MGeomCam           *geom=0;
    5451
    55     cam.SetMirrors(*config->GetMirrors());
    56     cam.SetGeom(*geom);
     52     TFile file(fname);
     53     TTree *tree = (TTree*)file.Get("RunHeaders");
     54     tree->SetBranchAddress("MMcConfigRunHeader", &config);
     55     if (tree->GetBranch("MGeomCam"))
     56         tree->SetBranchAddress("MGeomCam", &geom);
     57     tree->GetEntry(0);
    5758
    58     /* Alternative:
     59     cam.SetMirrors(*config->GetMirrors());
     60     cam.SetGeom(*geom);
     61     */
    5962
    60      MGeomCamMagic geom;
    61      cam.SetGeom(geom);
    62      cam.SetMirrors("magic.def");
    63      */
     63    MGeomCamMagic geom;
     64    cam.SetGeom(geom);
     65    cam.SetMirrors("resources/mirrors.def");
    6466}
    6567
    6668void starfield()
    6769{
    68     // Name of a MC file having MGeomCam and MMcConfigRunHeader
    69     TString fname = "../Mars/Gamma_zbin7_90_7_53395to53399_w0.root";
    70 
    7170    // Time for which to get the picture
    7271    MTime time;
     
    8786    //MAstroCatalog stars;     // Use this top display a catalog
    8887    MAstroCamera stars;        // Use this top display a catalog on top of a camera
    89     ReadSetup(fname, stars);   // Use this top display a catalog on top of a camera
     88    ReadSetup(stars);   // Use this top display a catalog on top of a camera
    9089    stars.SetLimMag(6);
    9190    stars.SetRadiusFOV(3);
Note: See TracChangeset for help on using the changeset viewer.