Changeset 5158


Ignore:
Timestamp:
10/01/04 17:34:52 (20 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/mhist/MHCamEvent.cc

    r5156 r5158  
    5353//    Make sure to set an empty x-axis title.
    5454//
    55 //
    5655// For example:
    5756//   MHCamEvent myhist("Titele;;y [cm]");
  • trunk/MagicSoft/Mars/mhist/MHCamEventRot.cc

    r5156 r5158  
    2929// Derotate MCamEvent before filling a 2D histogram.
    3030//
    31 // To be done: Set the sky position of the center of the display and
    32 //             correct if the pointing position of the telescope is
    33 //             different
     31// Axis titles
     32// ===========
     33//
     34// 1) If no other title is given 'a.u.' or 'counts'is used.
     35// 2) If the corresponding MBinning has no default title. This title
     36//    is used for the z-axis
     37// 3) If the title of MHCamEvent is different from the default,
     38//    it is used as histogram title. You can use this to set the
     39//    axis title, too. For more information see TH1::SetTitle, eg.
     40//       SetTitle("MyHist;;;z[photons]");
     41//    The x- and y-axis title is ignored.
     42//
     43// For example:
     44//   MHCamEventRot myhist("Title;;;z[photons]");
     45//
     46//
     47// To be done: * Set the sky position of the center of the display and
     48//               correct if the pointing position of the telescope is
     49//               different.
     50//             * Make it quadratic like MHCamera
    3451//
    3552//////////////////////////////////////////////////////////////////////////////
     
    6683using namespace std;
    6784
     85const TString MHCamEventRot::gsDefName  = "MHCamEventRot";
     86const TString MHCamEventRot::gsDefTitle = "Plot showing derotated MCamEvent data";
     87
    6888// --------------------------------------------------------------------------
    6989//
     
    7797    //   set the name and title of this object
    7898    //
    79     fName  = name  ? name  : "MHCamEventRot";
    80     fTitle = title ? title : "Plot showing derotated MCamEvent data";
     99    fName  = name  ? name  : gsDefName.Data();
     100    fTitle = title ? title : gsDefTitle.Data();
    81101
    82102    fHist.SetDirectory(NULL);
    83103
    84     fHist.SetName("Alpha");
     104    fHist.SetName("Derot");
    85105    fHist.SetTitle("2D-plot of MCamEvents (derotated)");
    86     fHist.SetXTitle("x [\\circ]");
    87     fHist.SetYTitle("y [\\circ]");
    88     fHist.SetZTitle("Counts");
    89106}
    90107
     
    137154        fDec = fPointPos->GetDec();
    138155    }
     156
     157    if (bins && bins->HasTitle())
     158        fHist.SetZTitle(bins->GetTitle());
     159    else
     160        if (fTitle!=gsDefTitle)
     161        {
     162            fHist.SetTitle(fTitle);
     163            fHist.SetXTitle("x [\\circ]");
     164            fHist.SetYTitle("y [\\circ]");
     165        }
     166        else
     167            if (!fTitle.Contains(";"))
     168                fHist.SetZTitle(fUseThreshold==kNoBound?"a.u.":"Counts");
    139169
    140170    return kTRUE;
  • trunk/MagicSoft/Mars/mjobs/MJStar.cc

    r5157 r5158  
    294294    tlist2.AddToList(&fill0a);
    295295    tlist2.AddToList(&fill0b);
    296     tlist2.AddToList(&fill0r);
     296    //tlist2.AddToList(&fill0r);
    297297    tlist2.AddToList(&hcalc);
    298298    tlist2.AddToList(&fill1);
  • trunk/MagicSoft/Mars/mjobs/MJob.cc

    r5064 r5158  
    211211        if (o->Read(o->GetName())<=0)
    212212        {
    213             *fLog << err << dbginf << "ERROR - Writing " << o->GetDescriptor() << " to file " << gFile->GetName() << endl;
     213            *fLog << err << dbginf << "ERROR - Reading " << o->GetDescriptor() << " from file " << gFile->GetName() << endl;
    214214            return kFALSE;
    215215        }
Note: See TracChangeset for help on using the changeset viewer.