Changeset 1082 for trunk


Ignore:
Timestamp:
11/15/01 12:06:46 (23 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
35 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/mars.cc

    r1058 r1082  
    11#include <TROOT.h>
    22#include <TApplication.h>
     3
     4#include "MAGIC.h"
     5
     6#include "MLog.h"
     7#include "MLogManip.h"
    38
    49#include "MMars.h"
     
    1520//    started by  h. kornmayer      january, 3rd  2001
    1621
     22void Usage()
     23{
     24    gLog << "Sorry the usage is:" << endl;
     25    gLog << "   mars [-vn]" << endl << endl;
     26    gLog << "     -v0: verbosity level: as less as possible" << endl;
     27    gLog << "     -v1: errors only"                          << endl;
     28    gLog << "     -v2: errors and warnings <default>"        << endl;
     29    gLog << "     -v3: errors, warnings and infos"           << endl;
     30}
     31
    1732int main(int argc, char **argv )
    1833{
     34    gLog << all;
     35
     36    //                1         2         3         4         5
     37    //       12345678901234567890123456789012345678901234567890
     38    gLog << "==================================================" << endl;
     39    gLog << "                    MARS v0.5                     " << endl;
     40    gLog << "    Magic Analysis and Reconstruction Software    " << endl;
     41    gLog << "            Compiled on <" << __DATE__ << ">"       << endl;
     42    gLog << "               Using ROOT v" << ROOTVER             << endl;
     43    gLog << "==================================================" << endl;
     44    gLog << endl;
     45
     46    //
     47    // check for the right usage of the program
     48    //
     49    if (argc<1 || argc>2)
     50    {
     51        Usage();
     52        return -1;
     53    }
     54
     55    if (argc==2)
     56    {
     57        if (argv[1][0]!='-' || argv[1][1]!='v')
     58        {
     59            Usage();
     60            return -1;
     61        }
     62
     63        switch (argv[1][2])
     64        {
     65        case '0':
     66            gLog.SetDebugLevel(0);
     67            break;
     68        case '1':
     69            gLog.SetDebugLevel(1);
     70            break;
     71        case '2':
     72            gLog.SetDebugLevel(2);
     73            break;
     74        case '3':
     75            gLog.SetDebugLevel(3);
     76            break;
     77        default:
     78            Usage();
     79            return -1;
     80        }
     81    }
     82    else
     83        gLog.SetDebugLevel(2);
     84
     85    //
     86    // Swtich of TObjectStreamer in our base classes derived from TObject
     87    //
    1988    MArray::Class()->IgnoreTObjectStreamer();
    2089    MParContainer::Class()->IgnoreTObjectStreamer();
  • trunk/MagicSoft/Mars/merpp.cc

    r1058 r1082  
    5454        return -1;
    5555    }
     56
     57    //
     58    // Set verbosity to highest level.
     59    //
     60    gLog.SetDebugLevel(2);
    5661
    5762    //
  • trunk/MagicSoft/Mars/mgui/MCamDisplay.cc

    r1023 r1082  
    3636    // Construct all hexagons. Use new-operator with placement
    3737    //
     38
     39    // root 3.02
     40    //  * base/inc/TObject.h:
     41    //    register BIT(8) as kNoContextMenu. If an object has this bit set it will
     42    //    not get an automatic context menu when clicked with the right mouse button.
     43
    3844    fPixels = new TClonesArray("MHexagon", fNumPixels);
    3945    for (UInt_t i=0; i<fNumPixels; i++)
  • trunk/MagicSoft/Mars/mgui/MGeomCam.cc

    r1048 r1082  
    1616!
    1717!
    18 !   Author(s): Harald Kornmayer 1/2001 (harald@mppmu.mpg.de)
    19 !   Author(s): Thomas Bretz  12/2000 (tbretz@uni-sw.gwdg.de)
     18!   Author(s): Thomas Bretz  12/2000 <mailto:tbretz@uni-sw.gwdg.de>
     19!   Author(s): Harald Kornmayer 1/2001
    2020!
    2121!   Copyright: MAGIC Software Development, 2000-2001
     
    3737
    3838#include "MLog.h"
     39#include "MLogManip.h"
     40
    3941#include "MGeomPix.h"
    4042#include "MHexagon.h"
     
    105107    //   Print Information about the Geometry of the camera
    106108    //
    107     *fLog << " Number of Pixels (" << GetTitle() << "): " << fNumPixels << endl;
     109    *fLog << all << " Number of Pixels (" << GetTitle() << "): " << fNumPixels << endl;
    108110
    109111    for (UInt_t i=0; i<fNumPixels; i++)
  • trunk/MagicSoft/Mars/mgui/MGeomCamCT1.cc

    r977 r1082  
    1616!
    1717!
    18 !   Author(s): Harald Kornmayer 1/2001 (harald@mppmu.mpg.de)
    19 !   Author(s): Thomas Bretz  12/2000 (tbretz@uni-sw.gwdg.de)
     18!   Author(s): Thomas Bretz  12/2000 <mailto:tbretz@uni-sw.gwdg.de>
     19!   Author(s): Harald Kornmayer 1/2001
    2020!
    2121!   Copyright: MAGIC Software Development, 2000-2001
     
    4242
    4343#include "MLog.h"
     44#include "MLogManip.h"
     45
    4446#include "MGeomPix.h"
    4547
     
    208210    // fill the geometry class with the coordinates of the CT1 camera
    209211    //
    210     *fLog << " Create CT1 geometry " << endl;
     212    *fLog << inf << " Create CT1 geometry " << endl;
    211213
    212214    //
  • trunk/MagicSoft/Mars/mgui/MGeomCamMagic.cc

    r977 r1082  
    1616!
    1717!
    18 !   Author(s): Harald Kornmayer 1/2001 (harald@mppmu.mpg.de)
    19 !   Author(s): Thomas Bretz  12/2000 (tbretz@uni-sw.gwdg.de)
     18!   Author(s): Thomas Bretz  12/2000 <mailto:tbretz@uni-sw.gwdg.de>
     19!   Author(s): Harald Kornmayer 1/2001
    2020!
    2121!   Copyright: MAGIC Software Development, 2000-2001
     
    3838
    3939#include "MLog.h"
     40#include "MLogManip.h"
     41
    4042#include "MGeomPix.h"
    4143
     
    6365    //   fill the geometry class with the coordinates of the MAGIC camera
    6466    //
    65     *fLog << " Creating Magic geometry " << endl ;
     67    *fLog << inf << " Creating Magic geometry " << endl ;
    6668
    6769    //
  • trunk/MagicSoft/Mars/mgui/MGeomPix.cc

    r986 r1082  
    1616!
    1717!
    18 !   Author(s): Harald Kornmayer 1/2001 (harald@mppmu.mpg.de)
    19 !   Author(s): Thomas Bretz  12/2000 (tbretz@uni-sw.gwdg.de)
     18!   Author(s): Thomas Bretz  12/2000 <mailto:tbretz@uni-sw.gwdg.de>
     19!   Author(s): Harald Kornmayer 1/2001
    2020!
    2121!   Copyright: MAGIC Software Development, 2000-2001
     
    3636
    3737#include "MLog.h"
     38#include "MLogManip.h"
    3839
    3940ClassImp(MGeomPix);
     
    8081{
    8182    //   information about a pixel
    82     gLog << "MPixGeom:  x= " << fX
     83    *fLog << all << "MPixGeom:  x= " << fX
    8384        << "  y= " << fY
    8485        << "  r= " << fR
  • trunk/MagicSoft/Mars/mgui/MHexagon.cc

    r1076 r1082  
    1616!
    1717!
    18 !   Author(s): Harald Kornmayer 1/2001 (harald@mppmu.mpg.de)
    19 !   Author(s): Thomas Bretz  12/2000 (tbretz@uni-sw.gwdg.de)
     18!   Author(s): Thomas Bretz  12/2000 <mailto:tbretz@uni-sw.gwdg.de>
     19!   Author(s): Harald Kornmayer 1/2001
    2020!
    2121!   Copyright: MAGIC Software Development, 2000-2001
  • trunk/MagicSoft/Mars/mhist/MFillH.cc

    r1076 r1082  
    1616!
    1717!
    18 !   Author(s): Thomas Bretz  07/2001 (tbretz@uni-sw.gwdg.de)
     18!   Author(s): Thomas Bretz  07/2001 <mailto:tbretz@uni-sw.gwdg.de>
    1919!
    2020!   Copyright: MAGIC Software Development, 2000-2001
     
    4444//   yourself, using MReadTree::EnableBranch()                              //
    4545//                                                                          //
     46//   Checkout the Warning in MTaskList.                                     //
     47//                                                                          //
    4648//  Input Containers:                                                       //
    4749//   A parameter container                                                  //
     
    8890    Init(name, title);
    8991
     92    fHName = hist;
    9093    fParContainerName = par;
    91     fHName = hist;
    9294}
    9395
     
    105107    Init(name, title);
    106108
     109    fHName = hist;
    107110    fParContainer = par;
    108     fHName = hist;
     111    fParContainerName = par->GetName();
    109112}
    110113
     
    122125    Init(name, title);
    123126
     127    fH = hist;
     128    fHName = hist->GetName();
    124129    fParContainerName = par;
    125     fH = hist;
    126130}
    127131
     
    139143    Init(name, title);
    140144
     145    fH = hist;
     146    fHName = hist->GetName();
    141147    fParContainer = par;
    142     fH = hist;
     148    fParContainerName = par->GetName();
    143149}
    144150
     
    158164        if (!fParContainer)
    159165        {
    160             *fLog << dbginf << fParContainerName << " [MParContainer] not found... aborting." << endl;
     166            *fLog << err << dbginf << fParContainerName << " [MParContainer] not found... aborting." << endl;
    161167            return kFALSE;
    162168        }
     
    172178    if (!fH->InheritsFrom("MH"))
    173179    {
    174         *fLog << dbginf << fH->GetDescriptor() << " ";
     180        *fLog << err << dbginf << fH->GetDescriptor() << " ";
    175181        *fLog << "doesn't inherit from MH - cannot be used for MFillH... aborting." << endl;
    176182        return kFALSE;
  • trunk/MagicSoft/Mars/mhist/MH.cc

    r1077 r1082  
    1616!
    1717!
    18 !   Author(s): Thomas Bretz  07/2001 (tbretz@uni-sw.gwdg.de)
     18!   Author(s): Thomas Bretz  07/2001 <mailto:tbretz@uni-sw.gwdg.de>
    1919!
    2020!   Copyright: MAGIC Software Development, 2000-2001
  • trunk/MagicSoft/Mars/mhist/MHFadcCam.cc

    r1077 r1082  
    1616!
    1717!
    18 !   Author(s): Harald Kornmayer 1/2001 (harald@mppmu.mpg.de)
    19 !   Author(s): Thomas Bretz  12/2000 (tbretz@uni-sw.gwdg.de)
     18!   Author(s): Thomas Bretz  12/2000 <mailto:tbretz@uni-sw.gwdg.de>
     19!   Author(s): Harald Kornmayer 1/2001
    2020!
    2121!   Copyright: MAGIC Software Development, 2000-2001
     
    4444//  creates an a list of histograms for all pixels and both gain channels
    4545//
    46 #include <iostream.h>
    4746MHFadcCam::MHFadcCam(const char *name, const char *title)
    4847{
  • trunk/MagicSoft/Mars/mhist/MHFadcPix.cc

    r1030 r1082  
    1616!
    1717!
    18 !   Author(s): Harald Kornmayer 1/2001 (harald@mppmu.mpg.de)
    19 !   Author(s): Thomas Bretz  12/2000 (tbretz@uni-sw.gwdg.de)
     18!   Author(s): Thomas Bretz  12/2000 <mailto:tbretz@uni-sw.gwdg.de>
     19!   Author(s): Harald Kornmayer 1/2001
    2020!
    2121!   Copyright: MAGIC Software Development, 2000-2001
  • trunk/MagicSoft/Mars/mhist/MHHillas.cc

    r1077 r1082  
     1/* ======================================================================== *\
     2!
     3! *
     4! * This file is part of MARS, the MAGIC Analysis and Reconstruction
     5! * Software. It is distributed to you in the hope that it can be a useful
     6! * and timesaving tool in analysing Data of imaging Cerenkov telescopes.
     7! * It is distributed WITHOUT ANY WARRANTY.
     8! *
     9! * Permission to use, copy, modify and distribute this software and its
     10! * documentation for any purpose is hereby granted without fee,
     11! * provided that the above copyright notice appear in all copies and
     12! * that both that copyright notice and this permission notice appear
     13! * in supporting documentation. It is provided "as is" without express
     14! * or implied warranty.
     15! *
     16!
     17!
     18!   Author(s): Thomas Bretz  2001 <mailto:tbretz@uni-sw.gwdg.de>
     19!
     20!   Copyright: MAGIC Software Development, 2000-2001
     21!
     22!
     23\* ======================================================================== */
     24
    125///////////////////////////////////////////////////////////////////////
    226//
  • trunk/MagicSoft/Mars/mhist/MHMcCollectionArea.cc

    r1004 r1082  
    1616!
    1717!
    18 !   Author(s): Harald Kornmayer 1/2001 (harald@mppmu.mpg.de)
    19 !              Thomas Bretz  12/2000 (tbretz@uni-sw.gwdg.de)
     18!   Author(s): Thomas Bretz  12/2000 <mailto:tbretz@uni-sw.gwdg.de>
     19!   Author(s): Harald Kornmayer 1/2001
    2020!
    2121!   Copyright: MAGIC Software Development, 2000-2001
  • trunk/MagicSoft/Mars/mhist/MHMcEnergy.cc

    r1004 r1082  
    1616!
    1717!
    18 !   Author(s): Javier Lopez 05/2001 (jlopez@ifae.es)
     18!   Author(s): Javier Lopez 05/2001 <mailto:jlopez@ifae.es>
     19!   Author(s): Thomas Bretz 05/2001 <mailto:tbretz@uni-sw.gwdg.de>
    1920!
    2021!   Copyright: MAGIC Software Development, 2000-2001
     
    4243
    4344#include "MH.h"
     45
     46#include "MLog.h"
     47#include "MLogManip.h"
    4448
    4549ClassImp(MHMcEnergy);
     
    210214void MHMcEnergy::Print(Option_t*) const
    211215{
    212     cout << "Threshold: " << fThreshold << " +- " << fThresholdErr << endl;
     216    *fLog << all << "Threshold: " << fThreshold << " +- " << fThresholdErr << endl;
    213217}
    214218
  • trunk/MagicSoft/Mars/mhist/MHMcRate.cc

    r1004 r1082  
    1616!
    1717!
    18 !   Author(s): Harald Kornmayer 1/2001 (harald@mppmu.mpg.de)
    19 !   Author(s): Thomas Bretz  12/2000 (tbretz@uni-sw.gwdg.de)
     18!   Author(s): Thomas Bretz  12/2000 <mailto:tbretz@uni-sw.gwdg.de>
     19!   Author(s): Harald Kornmayer 1/2001
    2020!
    2121!   Copyright: MAGIC Software Development, 2000-2001
     
    196196void MHMcRate::Print(Option_t *) const
    197197{
    198     *fLog << "Incident rate " << fShowerRate << " Hz " << endl;
     198    *fLog << all << "Incident rate " << fShowerRate << " Hz " << endl;
    199199    *fLog << "Trigger Rate " << fTriggerRate << " +- " << fTriggerRateError << " Hz" << endl;
    200200}
     
    206206void MHMcRate::Draw(Option_t *)
    207207{
    208     *fLog << dbginf << "To be iplemented" << endl;
     208    *fLog << all << dbginf << " - MHMcRate::Draw: To be iplemented" << endl;
    209209}
    210210
    211211TObject *MHMcRate::DrawClone(Option_t *) const
    212212{
    213     *fLog << dbginf << "To be iplemented" << endl;
     213    *fLog << all << dbginf << " - MHMcRate::DrawClone: To be iplemented" << endl;
    214214    return NULL;
    215215}
  • trunk/MagicSoft/Mars/mhist/MHStarMap.cc

    r1004 r1082  
    1616!
    1717!
    18 !   Author(s): Thomas Bretz  12/2000 (tbretz@uni-sw.gwdg.de)
     18!   Author(s): Thomas Bretz  12/2000 <mailto:tbretz@uni-sw.gwdg.de>
    1919!
    2020!   Copyright: MAGIC Software Development, 2000-2001
  • trunk/MagicSoft/Mars/mmain/MAnalysis.cc

    r1076 r1082  
    1616!
    1717!
    18 !   Author(s): Thomas Bretz  9/2001 (tbretz@uni-sw.gwdg.de)
     18!   Author(s): Thomas Bretz  9/2001 <mailto:tbretz@uni-sw.gwdg.de>
    1919!
    2020!   Copyright: MAGIC Software Development, 2000-2001
  • trunk/MagicSoft/Mars/mmain/MBrowser.cc

    r1052 r1082  
    1616!
    1717!
    18 !   Author(s): Harald Kornmayer 1/2001 (harald@mppmu.mpg.de)
    19 !   Author(s): Thomas Bretz  12/2000 (tbretz@uni-sw.gwdg.de)
     18!   Author(s): Thomas Bretz  12/2000 <mailto:tbretz@uni-sw.gwdg.de>
     19!   Author(s): Harald Kornmayer 1/2001
    2020!
    2121!   Copyright: MAGIC Software Development, 2000-2001
  • trunk/MagicSoft/Mars/mmain/MCameraDisplay.cc

    r959 r1082  
    1616!
    1717!
    18 !   Author(s): Harald Kornmayer 1/2001 (harald@mppmu.mpg.de)
    19 !   Author(s): Thomas Bretz  12/2000 (tbretz@uni-sw.gwdg.de)
     18!   Author(s): Thomas Bretz  12/2000 <mailto:tbretz@uni-sw.gwdg.de>
     19!   Author(s): Harald Kornmayer 1/2001
    2020!
    2121!   Copyright: MAGIC Software Development, 2000-2001
  • trunk/MagicSoft/Mars/mmain/MDataCheck.cc

    r1030 r1082  
    1616!
    1717!
    18 !   Author(s): Harald Kornmayer 1/2001 (harald@mppmu.mpg.de)
    19 !   Author(s): Thomas Bretz  12/2000 (tbretz@uni-sw.gwdg.de)
     18!   Author(s): Thomas Bretz  12/2000 <mailto:tbretz@uni-sw.gwdg.de>
     19!   Author(s): Harald Kornmayer 1/2001
    2020!
    2121!   Copyright: MAGIC Software Development, 2000-2001
  • trunk/MagicSoft/Mars/mmain/MEvtDisp.cc

    r947 r1082  
    1616!
    1717!
    18 !   Author(s): Harald Kornmayer 1/2001 (harald@mppmu.mpg.de)
    19 !   Author(s): Thomas Bretz  12/2000 (tbretz@uni-sw.gwdg.de)
     18!   Author(s): Thomas Bretz  12/2000 <mailto:tbretz@uni-sw.gwdg.de>
     19!   Author(s): Harald Kornmayer 1/2001
    2020!
    2121!   Copyright: MAGIC Software Development, 2000-2001
  • trunk/MagicSoft/Mars/mmain/MMars.cc

    r1052 r1082  
    1616!
    1717!
    18 !   Author(s): Harald Kornmayer 1/2001 (harald@mppmu.mpg.de)
    19 !   Author(s): Thomas Bretz  12/2000 (tbretz@uni-sw.gwdg.de)
     18!   Author(s): Thomas Bretz  12/2000 <mailto:tbretz@uni-sw.gwdg.de>
     19!   Author(s): Harald Kornmayer 1/2001
    2020!
    2121!   Copyright: MAGIC Software Development, 2000-2001
  • trunk/MagicSoft/Mars/mmain/MMonteCarlo.cc

    r1057 r1082  
    1616!
    1717!
    18 !   Author(s): Harald Kornmayer 1/2001 (harald@mppmu.mpg.de)
    19 !   Author(s): Thomas Bretz  12/2000 (tbretz@uni-sw.gwdg.de)
     18!   Author(s): Thomas Bretz  12/2000 <mailto:tbretz@uni-sw.gwdg.de>
     19!   Author(s): Harald Kornmayer 1/2001
    2020!
    2121!   Copyright: MAGIC Software Development, 2000-2001
  • trunk/MagicSoft/Mars/mmontecarlo/MMcCollectionAreaCalc.cc

    r1007 r1082  
    1616!
    1717!
    18 !   Author(s): Harald Kornmayer 1/2001 (harald@mppmu.mpg.de)
    19 !              Thomas Bretz  12/2000 (tbretz@uni-sw.gwdg.de)
     18!   Author(s): Thomas Bretz  12/2000 <mailto:tbretz@uni-sw.gwdg.de>
     19!   Author(s): Harald Kornmayer 1/2001
    2020!
    2121!   Copyright: MAGIC Software Development, 2000-2001
     
    6666    if (!fMcEvt)
    6767    {
    68         *fLog << dbginf << "MMcEvt not found... exit." << endl;
     68        *fLog << err << dbginf << "MMcEvt not found... exit." << endl;
    6969        return kFALSE;
    7070    }
     
    7373    if (!fMcTrig)
    7474    {
    75         *fLog << dbginf << fObjName << " [MMcTrig] not found... exit." << endl;
     75        *fLog << err << dbginf << fObjName << " [MMcTrig] not found... exit." << endl;
    7676        return kFALSE;
    7777    }
  • trunk/MagicSoft/Mars/mmontecarlo/MMcThresholdCalc.cc

    r1007 r1082  
    1616!
    1717!
    18 !   Author(s): Javier Lopez 05/2001 (jlopez@ifae.es)
    19 !              Thomas Bretz 06/2001 (tbretz@uni-sw.gwdg.de)
     18!   Author(s): Javier Lopez 05/2001 <mailto:jlopez@ifae.es>
     19!   Author(s): Thomas Bretz 06/2001 <mailto:tbretz@uni-sw.gwdg.de>
    2020!
    2121!   Copyright: MAGIC Software Development, 2000-2001
     
    107107    if (!fMcEvt)
    108108    {
    109         *fLog << dbginf << "MMcEvt not found... aborting." << endl;
     109        *fLog << err << dbginf << "MMcEvt not found... aborting." << endl;
    110110        return kFALSE;
    111111    }
     
    117117    if (num != fNum)
    118118    {
    119         *fLog << dbginf << fNum << " MMcTrig objects requested, ";
     119        *fLog << err << dbginf << fNum << " MMcTrig objects requested, ";
    120120        *fLog << num << " are available... aborting." << endl;
    121121        return kFALSE;
     
    126126    if (num != fNum)
    127127    {
    128         *fLog << dbginf << fNum << " MHMcEnergy objects requested, ";
     128        *fLog << err << dbginf << fNum << " MHMcEnergy objects requested, ";
    129129        *fLog << num << " are available... aborting." << endl;
    130130        return kFALSE;
  • trunk/MagicSoft/Mars/mmontecarlo/MMcTriggerRateCalc.cc

    r1007 r1082  
    1616!
    1717!
    18 !   Author(s): Harald Kornmayer 1/2001 (harald@mppmu.mpg.de)
    19 !   Author(s): Thomas Bretz  12/2000 (tbretz@uni-sw.gwdg.de)
     18!   Author(s): Thomas Bretz  12/2000 <mailto:tbretz@uni-sw.gwdg.de>
     19!   Author(s): Harald Kornmayer 1/2001
    2020!
    2121!   Copyright: MAGIC Software Development, 2000-2001
     
    131131    if (!fMcEvt)
    132132    {
    133         *fLog << dbginf << "MMcEvt not found... aborting." << endl;
     133        *fLog << err << dbginf << "MMcEvt not found... aborting." << endl;
    134134        return kFALSE;
    135135    }
     
    141141    if (num != fNum)
    142142    {
    143         *fLog << dbginf << fNum << " MMcTrig objects requested, ";
     143        *fLog << err << dbginf << fNum << " MMcTrig objects requested, ";
    144144        *fLog << num << " are available... aborting." << endl;
    145145        return kFALSE;
     
    150150    if (num != fNum)
    151151    {
    152         *fLog << dbginf << fNum << " MHMcRate objects requested, ";
     152        *fLog << err << dbginf << fNum << " MHMcRate objects requested, ";
    153153        *fLog << num << " are available... aborting." << endl;
    154154        return kFALSE;
  • trunk/MagicSoft/Mars/mraw/MRawCrateArray.cc

    r1031 r1082  
    1616!
    1717!
    18 !   Author(s): Thomas Bretz  12/2000 (tbretz@uni-sw.gwdg.de)
     18!   Author(s): Thomas Bretz  12/2000 <mailto:tbretz@uni-sw.gwdg.de>
    1919!
    2020!   Copyright: MAGIC Software Development, 2000-2001
  • trunk/MagicSoft/Mars/mraw/MRawCrateData.cc

    r987 r1082  
    1616!
    1717!
    18 !   Author(s): Thomas Bretz  12/2000 (tbretz@uni-sw.gwdg.de)
     18!   Author(s): Thomas Bretz  12/2000 <mailto:tbretz@uni-sw.gwdg.de>
    1919!
    2020!   Copyright: MAGIC Software Development, 2000-2001
     
    3939
    4040#include "MLog.h"
     41#include "MLogManip.h"
    4142
    4243ClassImp(MRawCrateData);
     
    6465void MRawCrateData::Print(Option_t *t) const
    6566{
    66     gLog << "Crate Number " << fDAQCrateNumber << ":  ";
    67     gLog << "FADCEventNr=" << fFADCEvtNumber << "  ";
    68     gLog << "FADCClockTick=" << fFADCClockTick << " (20MHz)" << endl;
     67    *fLog << all;
     68    *fLog << "Crate Number " << fDAQCrateNumber << ":  ";
     69    *fLog << "FADCEventNr=" << fFADCEvtNumber << "  ";
     70    *fLog << "FADCClockTick=" << fFADCClockTick << " (20MHz)" << endl;
    6971}
  • trunk/MagicSoft/Mars/mraw/MRawEvtData.cc

    r1076 r1082  
    1616!
    1717!
    18 !   Author(s): Thomas Bretz  12/2000 (tbretz@uni-sw.gwdg.de)
     18!   Author(s): Thomas Bretz  12/2000 <mailto:tbretz@uni-sw.gwdg.de>
    1919!
    2020!   Copyright: MAGIC Software Development, 2000-2001
     
    4949
    5050#include "MRawEvtData.h"
    51 
    52 #include <iomanip.h>
    5351
    5452#include <fstream.h>
     
    155153    fLog->unsetf(ios::showbase);
    156154
    157     *fLog << dec;
     155    *fLog << dec << all;
    158156    *fLog << "HiGain: " << nHiPix << " Pixels with " << (Int_t)nHiSamp << " Samples" << endl;
    159157    *fLog << "LoGain: " << nLoPix << " Pixels with " << (Int_t)nLoSamp << " Samples";;
     
    213211    if (GetNumPixels()==0)
    214212    {
    215         *fLog << "Sorry, no pixel to draw!" << endl;
     213        *fLog << warn << "Sorry, no pixel to draw!" << endl;
    216214        return;
    217215    }
     
    229227            num= GetNumPixels();
    230228
    231         *fLog << "Drawing Graph: Pixel #" << num << " of " << (int)GetNumPixels() << endl;
     229        *fLog << inf << "Drawing Graph: Pixel #" << num << " of " << (int)GetNumPixels() << endl;
    232230
    233231        const Int_t n = GetNumHiGainSamples();
     
    288286    }
    289287
    290     *fLog << dbginf << "Warning - You must specify either 'GRAPH' or 'HIST'" << endl;
     288    *fLog << warn << dbginf << "Warning - You must specify either 'GRAPH' or 'HIST'" << endl;
    291289}
    292290
     
    375373    if (nSamp && ns!=nSamp)
    376374    {
    377         *fLog << "RawEvtData::AddPixel: Error, number of samples in ";
     375        *fLog << err << "RawEvtData::AddPixel: Error, number of samples in ";
    378376        *fLog << "TArrayC doesn't match actual number" << endl;
    379377        return;
  • trunk/MagicSoft/Mars/mraw/MRawEvtHeader.cc

    r1004 r1082  
    1616!
    1717!
    18 !   Author(s): Thomas Bretz  12/2000 (tbretz@uni-sw.gwdg.de)
     18!   Author(s): Thomas Bretz  12/2000 <mailto:tbretz@uni-sw.gwdg.de>
    1919!
    2020!   Copyright: MAGIC Software Development, 2000-2001
     
    9999
    100100#include "MLog.h"
     101#include "MLogManip.h"
     102
    101103#include "MTime.h"
    102104#include "MArrayB.h"
     
    117119    //   set all member to zero, init the pointer to ClonesArray,
    118120    //
    119 
    120121    fPixLoGainOn = new MArrayB;
    121122
     
    180181void MRawEvtHeader::Print(Option_t *o) const
    181182{
     183    *fLog << all;
    182184    *fLog << "DAQEvtNr: " << dec << fDAQEvtNumber << "  (";
    183185    *fLog << "Trigger: ";
     
    214216
    215217    *fLog << endl;
    216 
    217218    *fLog << endl;
    218 
    219219}
    220220
  • trunk/MagicSoft/Mars/mraw/MRawEvtPixelIter.cc

    r1052 r1082  
    1616!
    1717!
    18 !   Author(s): Thomas Bretz  12/2000 (tbretz@uni-sw.gwdg.de)
     18!   Author(s): Thomas Bretz  12/2000 <mailto:tbretz@uni-sw.gwdg.de>
    1919!
    2020!   Copyright: MAGIC Software Development, 2000-2001
     
    143143void MRawEvtPixelIter::Draw(Option_t *t)
    144144{
    145   char *txt = new char[6+strlen(t)];
    146   sprintf(txt, "%s%d", t, *fHiGainId);
    147   fData->Draw(txt);
    148   delete txt;
     145    fData->Draw(Form("%s%d", t, *fHiGainId));
    149146}
    150147
  • trunk/MagicSoft/Mars/mraw/MRawFileRead.cc

    r1037 r1082  
    1616!
    1717!
    18 !   Author(s): Thomas Bretz  12/2000 (tbretz@uni-sw.gwdg.de)
     18!   Author(s): Thomas Bretz  12/2000 <mailto:tbretz@uni-sw.gwdg.de>
    1919!
    2020!   Copyright: MAGIC Software Development, 2000-2001
     
    4444
    4545#include "MLog.h"
     46#include "MLogManip.h"
     47
    4648#include "MTime.h"
    4749#include "MParList.h"
     
    9294//
    9395MRawFileRead::MRawFileRead(const char *fname, const char *name, const char *title)
    94     : fFileName(fname)
     96    : fFileName(fname), fIn(NULL)
    9597{
    9698    fName  = name  ? name  : "MRawFileRead";
    9799    fTitle = title ? title : "Read task to read DAQ binary files";
    98100
    99     //
    100     // open the input stream
    101     //
    102     fFileName = fname;
    103     fIn = new ifstream(fname);
     101    fIn = new ifstream;
    104102}
    105103
     
    132130{
    133131    //
     132    // open the input stream
    134133    // first of all check if opening the file in the constructor was
    135134    // successfull
    136135    //
     136    fIn->open(fFileName);
    137137    if (!(*fIn))
    138138    {
    139         *fLog << "Error: Cannot open file '" << fFileName << "'" << endl;
     139        *fLog << err << "Error: Cannot open file '" << fFileName << "'" << endl;
    140140        return kFALSE;
    141141    }
     
    231231// --------------------------------------------------------------------------
    232232//
    233 //  Checks whether the number of read events differs from the number the
    234 //  file should containe (MRawRunHeader). Prints a warning if it doesn't
    235 //  match.
     233//  Close the file. Check whether the number of read events differs from
     234//  the number the file should containe (MRawRunHeader). Prints a warning
     235//  if it doesn't match.
    236236//
    237237Bool_t MRawFileRead::PostProcess()
    238238{
     239    //
     240    // Sanity check for the number of events
     241    //
    239242    if (fRawRunHeader->GetNumEvents() == GetNumExecutions()-1)
    240243        return kTRUE;
    241244
    242     *fLog << "WARNING - number of read events (" << GetNumExecutions()-1;
     245    *fLog << warn << "Warning - number of read events (" << GetNumExecutions()-1;
    243246    *fLog << ") doesn't match number in run header (";
    244247    *fLog << fRawRunHeader->GetNumEvents() << ")." << endl;
  • trunk/MagicSoft/Mars/mraw/MRawFileWrite.cc

    r1031 r1082  
    1616!
    1717!
    18 !   Author(s): Thomas Bretz  12/2000 (tbretz@uni-sw.gwdg.de)
     18!   Author(s): Thomas Bretz  12/2000 <mailto:tbretz@uni-sw.gwdg.de>
    1919!
    2020!   Copyright: MAGIC Software Development, 2000-2001
     
    130130    if (!fRawEvtHeader)
    131131    {
    132         *fLog << dbginf << "MRawEvtHeader not found... aborting." << endl;
     132        *fLog << err << dbginf << "MRawEvtHeader not found... aborting." << endl;
    133133        return kFALSE;
    134134    }
     
    137137    if (!fRawEvtData)
    138138    {
    139         *fLog << dbginf << "MRawEvtData not found... aborting." << endl;
     139        *fLog << err << dbginf << "MRawEvtData not found... aborting." << endl;
    140140        return kFALSE;
    141141    }
     
    144144    if (!fRawCrateArray)
    145145    {
    146         *fLog << dbginf << "MRawCrateArray not found... aborting." << endl;
     146        *fLog << err << dbginf << "MRawCrateArray not found... aborting." << endl;
    147147        return kFALSE;
    148148    }
     
    151151    if (!fRawEvtTime)
    152152    {
    153         *fLog << dbginf << "MRawEvtTime not found... aborting." << endl;
     153        *fLog << err << dbginf << "MRawEvtTime not found... aborting." << endl;
    154154        return kFALSE;
    155155    }
     
    158158    if (!fRawRunHeader)
    159159    {
    160         *fLog << dbginf << "MRawRunHeader not found... aborting." << endl;
     160        *fLog << err << dbginf << "MRawRunHeader not found... aborting." << endl;
    161161        return kFALSE;
    162162    }
     
    254254    }
    255255
    256     *fLog << dbginf << "Got wrong number for the trigger type: " << type;
    257     *fLog << "  - skipping" << endl;
     256    *fLog << warn << dbginf << "Got wrong number for the trigger type: " << type;
     257    *fLog << " - skipped" << endl;
    258258
    259259    return kCONTINUE;
  • trunk/MagicSoft/Mars/mraw/MRawRunHeader.cc

    r1004 r1082  
    1616!
    1717!
    18 !   Author(s): Thomas Bretz  12/2000 (tbretz@uni-sw.gwdg.de)
     18!   Author(s): Thomas Bretz  12/2000 <mailto:tbretz@uni-sw.gwdg.de>
    1919!
    2020!   Copyright: MAGIC Software Development, 2000-2001
     
    3737
    3838#include "MLog.h"
     39#include "MLogManip.h"
     40
    3941#include "MArrayS.h"
    4042
     
    7981    if (fMagicNumber != kMagicNumber)
    8082    {
    81         *fLog << "Error: Wrong Magic Number: Not a Magic File!" << endl;
     83        *fLog << err << "Error: Wrong Magic Number: Not a Magic File!" << endl;
    8284        return;
    8385    }
     
    122124void MRawRunHeader::Print(Option_t *t) const
    123125{
    124     *fLog << endl;
     126    *fLog << all << endl;
    125127    *fLog << "MagicNumber:  0x" << hex << fMagicNumber << " - " << (fMagicNumber==kMagicNumber?"OK":"Wrong!") << endl;
    126128    *fLog << "Version:      " << dec << "Format=" << fFormatVersion << "  ";
Note: See TracChangeset for help on using the changeset viewer.