Changeset 2173


Ignore:
Timestamp:
06/13/03 16:42:37 (22 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft
Files:
199 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/Changelog

    r2172 r2173  
    11                                                 -*-*- END OF LINE -*-*-
     2
     3 2003/06/13: Thomas Bretz (making Mars work with gcc 3.3 on Suse 8.2)
     4
     5   * Makefile.conf.linux:
     6     - removed nonull-objects, Wtraditional and Wnested-externs
     7       due to warnings in gcc 3.3
     8     
     9   * *:
     10     - added 'using namespace std;'
     11     - exchanged *.h C++ headers by correct headers (like <fstream>)
     12     - replaced forward declarations of streams by <iosfwd>
     13
     14   * manalysis/MCerPhotAnal.cc:
     15     - cast arguments of sqrt to correct type
     16     - corrected argument type for SetPedestalRms
     17     
     18   * manalysis/MCurrents.h:
     19     - const operator[] uses 'this' now
     20     
     21   * manalysis/MEnergyEstParam.[h,cc], manalysis/MSigmabarParam.[h,cc]:
     22     - fixed definition of Print
     23
     24   * manalysis/MMcPedestalCopy.cc, manalysis/MPedCalcPedRun.cc,
     25     mgui/MCamDisplay.cc, mmontecarlo/MMcThresholdCalc.cc:
     26     - cast arguments of sqrt to correct type
     27
     28   * manalysis/MMultiDimDistCalc.cc:
     29     - changed type of numg/numh to Int_t
     30     
     31   * mbase/BaseLinkDef.h:
     32     - removed pragma for __omanip_debug
     33
     34   * mbase/MLog.[h,cc]:
     35     - fixed copy constructor
     36     - removed usage of mkstemp -- TO BE FIXED
     37
     38   * mbase/MLogManip.[h,cc]:
     39     - completely replaced
     40
     41   * mdata/MDataArray.cc:
     42     - fixed variable type ncols (Double_t -> Int_t)
     43   
     44   * mdata/MDataChain.cc:
     45     - fixed argument type of gRandom->Integer()
     46   
     47   * meventdisp/MGEvtDisplay.[h,cc]:
     48     - implemented skiping of  events which have 0 Pixels
     49     
     50   * mfileio/MCT1ReadPreProc.cc:
     51     - fixed conversion for istream::read from Byte_t* to char*
     52     - fixed argument type in Fill (fmcsize_phel)
     53     
     54   * mfileio/MChain.h:
     55     - ResetTree must also set fTreeNumber to -1 due to changes in
     56       TChain::LoadTree
     57
     58   * mfilter/MFAlpha.[h,cc]:
     59      fixed type of Alpha in Init (Float_t instead of Int_t)
     60     
     61   * mfilter/MFEventSelector2.[h,cc]:
     62     - renamed Read member function to ReadDistribution
     63     
     64   * mfilter/MFilterList.h:
     65     - fixed overloading of GetRule
     66     
     67   * mhist/MBinning.cc, mhist/MH3.cc:
     68     - removed default argument in source file
     69
     70   * mhist/MHArray.cc:
     71      fixed type of sstyle (Stat_t -> Int_t)
     72     
     73   * mhist/MHCerPhotEvt.[h,cc], mhist/MHCurrents.[h,cc]:
     74     - fixed definition of Clear()
     75     
     76   * mhist/MHFadcCam.[h,cc]:
     77     - renamed Reset to ResetEntry
     78     
     79   * mhistmc/MHMcEnergy.cc:
     80     - fixed argument type of log
     81   
     82   * mhistmc/MHMcRate.cc:
     83     - cast argument of pow() to correct type
     84   
     85   * mimage/MHillas.cc:
     86     - replaced default value for MeanX and MeanY by 0
     87
     88   * mmain/MMars.cc:
     89     - fixed argument type in TGLayoutHints
     90
     91   * mmain/MStatusDisplay.cc:
     92     - fixed some argument types
     93     - for the moment removed the update of the ps-header
     94
     95   * mmc/MMcTrig.cxx:
     96     - use binary shift instead of pow for power of two
     97
     98   * mmontecarlo/MMcEnergyEst.[h,cc]:
     99     - declared fcn as static
     100     - fixed definition of Print
     101
     102   * mmontecarlo/MMcTimeGenerate.cc:
     103     - fixed argument type of SetTime
     104   
     105   * mmontecarlo/MMcTriggerRateCalc.[h,cc]:
     106     - fixed definition of Draw
     107
     108   * mfileio/MReadRflFile.cc, mraw/MRawCrateData.cc, mraw/MRawEvtData.cc,
     109     mraw/MRawEvtHeader.cc, mraw/MRawRunHeader.cc:
     110     - fixed conversion for istream::read from Byte_t* to char*
     111
     112   * mreflector/MRflEvtData.cc, mreflector/MRflSinglePhoton.cc:
     113     - fixed definition of Print
     114
    2115
    3116 2003/06/13: Robert Wagner
  • trunk/MagicSoft/Mars/Makefile.conf.linux

    r2054 r2173  
    2020#  ----->>>   settings for compilation
    2121#
    22 OPTIM    = -O5 -Wall -fnonnull-objects -fno-exceptions -fPIC -Wtraditional -Wpointer-arith -Wcast-align -Wconversion -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Woverloaded-virtual
     22OPTIM    = -O5 -Wall -fno-exceptions -fPIC -Wpointer-arith -Wcast-align -Wconversion -Wstrict-prototypes -Wmissing-prototypes -Woverloaded-virtual
     23# ggc 3.2: removed -fnonnull-objects -Wtraditional -Wnested-externs
    2324DEBUG    =
    2425ARCHDEF  = -D__LINUX__
  • trunk/MagicSoft/Mars/macros/readMagic.C

    r2026 r2173  
    4646}
    4747
    48 void readMagic(const char *fname="~/data/Gamma_0_7*.root")
     48void readMagic(const char *fname="~/Proton_zbin0_0_7_11650to11659_w0.root")
    4949{
    5050    MParList plist;
  • trunk/MagicSoft/Mars/manalysis/MBlindPixelCalc.cc

    r2015 r2173  
    6767#include "MBlindPixelCalc.h"
    6868
    69 #include <fstream.h>
     69#include <fstream>
    7070
    7171#include "MLog.h"
     
    8383
    8484ClassImp(MBlindPixelCalc);
     85
     86using namespace std;
    8587
    8688static const TString gsDefName  = "MBlindPixelCalc";
  • trunk/MagicSoft/Mars/manalysis/MCT1PointingCorrCalc.cc

    r2088 r2173  
    4343
    4444ClassImp(MCT1PointingCorrCalc);
     45
     46using namespace std;
    4547
    4648// --------------------------------------------------------------------------
  • trunk/MagicSoft/Mars/manalysis/MCT1SupercutsCalc.cc

    r2109 r2173  
    3131
    3232#include <math.h>
    33 #include <fstream.h>
     33#include <fstream>
    3434
    3535#include "MLog.h"
     
    4545
    4646ClassImp(MCT1SupercutsCalc);
     47
     48using namespace std;
    4749
    4850void MCT1SupercutsCalc::InitParams()
  • trunk/MagicSoft/Mars/manalysis/MCerPhotAnal.cc

    r2135 r2173  
    5454ClassImp(MCerPhotAnal);
    5555
     56using namespace std;
     57
    5658// --------------------------------------------------------------------------
    5759//
     
    178180
    179181        sigmaped /= (fRawEvt->GetNumHiGainSamples()-5);
    180         sigmaped = sqrt(sumlocal);
     182        sigmaped = sqrt((float)sumlocal);
    181183
    182184        const UInt_t pixid = pixel.GetPixelId();
     
    195197        fCerPhotEvt->AddPixel(pixid, nphot, sigmaped/2.236);
    196198        ped.SetPedestal(pedes, sigmaped);
    197         ped.SetPedestalRms(sigmaped/sqrt(fRawEvt->GetNumHiGainSamples()-5),
    198                            sigmaped/sqrt(2*(fRawEvt->GetNumHiGainSamples()-5)));
     199        ped.SetPedestalRms(sigmaped/sqrt(fRawEvt->GetNumHiGainSamples()-5.),
     200                           sigmaped/sqrt(2.*(fRawEvt->GetNumHiGainSamples()-5)));
    199201
    200202        // FIXME! Handling of Lo Gains is missing!
  • trunk/MagicSoft/Mars/manalysis/MCerPhotCalc.cc

    r2135 r2173  
    5757ClassImp(MCerPhotCalc);
    5858
     59using namespace std;
     60
    5961// --------------------------------------------------------------------------
    6062//
  • trunk/MagicSoft/Mars/manalysis/MCerPhotEvt.cc

    r2147 r2173  
    2828#include <math.h>
    2929#include <limits.h>
    30 #include <fstream.h>
     30#include <fstream>
    3131
    3232#include <TCanvas.h>
     
    3737
    3838ClassImp(MCerPhotEvt);
     39
     40using namespace std;
    3941
    4042// --------------------------------------------------------------------------
  • trunk/MagicSoft/Mars/manalysis/MCerPhotPix.cc

    r2056 r2173  
    2929ClassImp(MCerPhotPix);
    3030
     31using namespace std;
     32
    3133// --------------------------------------------------------------------------
    3234//
  • trunk/MagicSoft/Mars/manalysis/MCompProbCalc.cc

    r1574 r2173  
    4646
    4747ClassImp(MCompProbCalc);
     48
     49using namespace std;
    4850
    4951// --------------------------------------------------------------------------
  • trunk/MagicSoft/Mars/manalysis/MCurrents.cc

    r2147 r2173  
    3636
    3737ClassImp(MCurrents);
     38
     39using namespace std;
    3840
    3941// --------------------------------------------------------------------------
  • trunk/MagicSoft/Mars/manalysis/MCurrents.h

    r2147 r2173  
    2727    UInt_t GetCurrent(Int_t i) const { return (*this)[i]; }
    2828    UInt_t &operator[](Int_t i) { return (UInt_t&)fArray[i]; }
    29     const UInt_t &operator[](Int_t i) const { return ((TArrayI)fArray)[i]; }
     29    const UInt_t &operator[](Int_t i) const { return (*this)[i]; }
    3030
    3131    UInt_t GetMin() const;
  • trunk/MagicSoft/Mars/manalysis/MEnergyEst.cc

    r1525 r2173  
    3939ClassImp(MEnergyEst);
    4040
     41using namespace std;
     42
    4143// --------------------------------------------------------------------------
    4244//
  • trunk/MagicSoft/Mars/manalysis/MEnergyEstParam.cc

    r1886 r2173  
    4646ClassImp(MEnergyEstParam);
    4747
     48using namespace std;
     49
    4850// --------------------------------------------------------------------------
    4951//
     
    284286}
    285287
    286 void MEnergyEstParam::Print(Option_t *opt)
     288void MEnergyEstParam::Print(Option_t *opt) const
    287289{
    288290    for (int i=0; i<fA.GetSize(); i++)
  • trunk/MagicSoft/Mars/manalysis/MEnergyEstParam.h

    r1886 r2173  
    6161    Double_t GetCoeff(Int_t i) { return i<fA.GetSize()? fA[i] : fB[i-fA.GetSize()]; }
    6262
    63     void Print(Option_t *o=NULL);
     63    void Print(Option_t *o=NULL) const;
    6464
    6565    ClassDef(MEnergyEstParam, 0) // Task to estimate the energy
  • trunk/MagicSoft/Mars/manalysis/MEnergyEstimate.cc

    r1211 r2173  
    4545ClassImp(MEnergyEstimate);
    4646
     47using namespace std;
     48
     49
    4750// --------------------------------------------------------------------------
    4851//
  • trunk/MagicSoft/Mars/manalysis/MFiltercutsCalc.cc

    r2125 r2173  
    4747
    4848ClassImp(MFiltercutsCalc);
     49
     50using namespace std;
    4951
    5052// --------------------------------------------------------------------------
  • trunk/MagicSoft/Mars/manalysis/MHadronness.cc

    r1557 r2173  
    3939ClassImp(MHadronness);
    4040
     41using namespace std;
     42
    4143// --------------------------------------------------------------------------
    4244//
  • trunk/MagicSoft/Mars/manalysis/MMcPedestalCopy.cc

    r1965 r2173  
    5353
    5454ClassImp(MMcPedestalCopy);
     55
     56using namespace std;
    5557
    5658MMcPedestalCopy::MMcPedestalCopy(const char *name, const char *title)
     
    136138
    137139        const Float_t pedest = fMcPed->GetPedestal(i);
    138         const Float_t pedrms = pedest/sqrt(num);
     140        const Float_t pedrms = pedest/sqrt((float)num);
    139141
    140142        const Float_t sigma  = fMcPed->GetPedestalRms(i);
    141         const Float_t sigrms = sigma/sqrt(num*2);
     143        const Float_t sigrms = sigma/sqrt(num*2.);
    142144
    143145        pix.SetPedestal(pedest, sigma);
  • trunk/MagicSoft/Mars/manalysis/MMcPedestalNSBAdd.cc

    r2139 r2173  
    7070ClassImp(MMcPedestalNSBAdd);
    7171
     72using namespace std;
     73
    7274// --------------------------------------------------------------------------
    7375//
  • trunk/MagicSoft/Mars/manalysis/MMcTriggerLvl2.cc

    r2005 r2173  
    5656#include <TCanvas.h>
    5757
    58 
    59 ClassImp(MMcTriggerLvl2)
     58ClassImp(MMcTriggerLvl2);
     59
     60using namespace std;
    6061
    6162// ---------------------------
  • trunk/MagicSoft/Mars/manalysis/MMcTriggerLvl2Calc.cc

    r1991 r2173  
    4949#include "MGeomCam.h"
    5050
     51ClassImp(MMcTriggerLvl2Calc);
    5152
    52 ClassImp(MMcTriggerLvl2Calc);
     53using namespace std;
    5354
    5455// --------------------------------------------------------------------------
  • trunk/MagicSoft/Mars/manalysis/MMultiDimDistCalc.cc

    r2114 r2173  
    4545#include "MMultiDimDistCalc.h"
    4646
    47 #include <fstream.h>
     47#include <fstream>
    4848
    4949#include "MHMatrix.h" // must be before MLogManip.h
     
    5959
    6060ClassImp(MMultiDimDistCalc);
     61
     62using namespace std;
    6163
    6264static const TString gsDefName  = "MMultiDimDistCalc";
     
    176178    *fData >> event;
    177179
    178     Double_t numg = fNum;
    179     Double_t numh = fNum;
     180    Int_t numg = fNum;
     181    Int_t numh = fNum;
    180182    if (fNum==0)
    181183    {
  • trunk/MagicSoft/Mars/manalysis/MPadding.cc

    r1951 r2173  
    9898ClassImp(MPadding);
    9999
     100using namespace std;
     101
    100102// --------------------------------------------------------------------------
    101103//
  • trunk/MagicSoft/Mars/manalysis/MParameters.cc

    r1947 r2173  
    3535#include "MParameters.h"
    3636
    37 #include <fstream.h>
     37#include <fstream>
    3838
    3939#include "MLog.h"
     
    4343ClassImp(MParameterI);
    4444//ClassImp(MParameter);
     45
     46using namespace std;
    4547
    4648// --------------------------------------------------------------------------
  • trunk/MagicSoft/Mars/manalysis/MPedCalcPedRun.cc

    r1081 r2173  
    5050
    5151ClassImp(MPedCalcPedRun);
     52
     53using namespace std;
    5254
    5355MPedCalcPedRun::MPedCalcPedRun(const char *name, const char *title)
     
    135137Float_t MPedCalcPedRun::CalcHiGainMeanErr(Float_t higainrms) const
    136138{
    137     return higainrms/sqrt(fNumHiGainSamples);
     139    return higainrms/sqrt((float)fNumHiGainSamples);
    138140}
    139141
  • trunk/MagicSoft/Mars/manalysis/MPedestalCam.cc

    r2135 r2173  
    4040#include "MGeomCam.h"
    4141
     42ClassImp(MPedestalCam);
    4243
    43 ClassImp(MPedestalCam);
     44using namespace std;
    4445
    4546// --------------------------------------------------------------------------
  • trunk/MagicSoft/Mars/manalysis/MSigmabar.cc

    r2103 r2173  
    5555ClassImp(MSigmabar);
    5656
     57using namespace std;
     58
    5759// --------------------------------------------------------------------------
    5860//
  • trunk/MagicSoft/Mars/manalysis/MSigmabarCalc.cc

    r1951 r2173  
    5050
    5151ClassImp(MSigmabarCalc);
     52
     53using namespace std;
    5254
    5355// --------------------------------------------------------------------------
  • trunk/MagicSoft/Mars/manalysis/MSigmabarParam.cc

    r1682 r2173  
    4646ClassImp(MSigmabarParam);
    4747
     48using namespace std;
     49
    4850MSigmabarParam::MSigmabarParam(const char *name, const char *title) : fSigmabarMin(0), fSigmabarMax(0), fMjdMin(0), fMjdMax(0), fThetaMin(0), fThetaMax(0), fRunNumber(0)
    4951{
     
    7375}
    7476
    75 void MSigmabarParam::Print()
     77void MSigmabarParam::Print(Option_t *) const
    7678{
    7779  *fLog << endl << "Run " << fRunNumber << " | "
  • trunk/MagicSoft/Mars/manalysis/MSigmabarParam.h

    r2001 r2173  
    3333  Double_t GetThetaMax() const { return fThetaMax; }
    3434
    35   void Print();
     35  void Print(Option_t *o="") const;
    3636     
    3737  ClassDef(MSigmabarParam, 1)  // Storage container for characterizing a distribution of events in the Sigmabar-Theta plane
  • trunk/MagicSoft/Mars/manalysis/MSrcPosCam.cc

    r1487 r2173  
    3434#include "MSrcPosCam.h"
    3535
    36 #include <fstream.h>
     36#include <fstream>
    3737
    3838#include "MLog.h"
     
    4040
    4141ClassImp(MSrcPosCam);
     42
     43using namespace std;
    4244
    4345static const TString gsDefName  = "MSrcPosCam";
  • trunk/MagicSoft/Mars/mars.cc

    r2054 r2173  
    1414#include "MLogo.h"
    1515#endif
     16
     17using namespace std;
    1618
    1719// **********************************************************************
  • trunk/MagicSoft/Mars/mbase/BaseLinkDef.h

    r2156 r2173  
    1010#pragma link C++ global kRad2Deg;
    1111//#pragma link C++ global kPI;
    12 
    13 #pragma link C++ function __omanip_debug;
    1412
    1513#pragma link C++ global gLog;
  • trunk/MagicSoft/Mars/mbase/MClone.cc

    r1080 r2173  
    5858
    5959ClassImp(MClone);
     60
     61using namespace std;
    6062
    6163// --------------------------------------------------------------------------
  • trunk/MagicSoft/Mars/mbase/MContinue.cc

    r2117 r2173  
    5050
    5151ClassImp(MContinue);
     52
     53using namespace std;
    5254
    5355// --------------------------------------------------------------------------
  • trunk/MagicSoft/Mars/mbase/MEvtLoop.cc

    r2161 r2173  
    7070
    7171#include <time.h>           // time_t
    72 #include <fstream.h>        // ofstream, SavePrimitive
    73 #include <iostream.h>
     72#include <fstream>          // ofstream, SavePrimitive
    7473
    7574#include <TTime.h>          // TTime
     
    9190
    9291ClassImp(MEvtLoop);
     92
     93using namespace std;
    9394
    9495
  • trunk/MagicSoft/Mars/mbase/MGList.cc

    r1353 r2173  
    3535#include "MGList.h"
    3636
    37 #include <iostream.h>
     37#include <iostream>
    3838
    3939#include <TClass.h>
     
    4242#include <TGPicture.h>
    4343
    44 
    4544ClassImp(MGList);
     45
     46using namespace std;
    4647
    4748// --------------------------------------------------------------------------
     
    149150    if (IsExisting(obj))
    150151    {
     152        // FIXME: Replace by gLog
    151153        const Int_t id = GetWidget(obj)->WidgetId();
    152154        cout << "Widget with id #" << id << " (";
  • trunk/MagicSoft/Mars/mbase/MGTask.cc

    r1080 r2173  
    4141
    4242ClassImp(MGTask);
     43
     44using namespace std;
    4345
    4446// --------------------------------------------------------------------------
  • trunk/MagicSoft/Mars/mbase/MLog.cc

    r2120 r2173  
    9797
    9898#include <stdlib.h>     // mkstempe
    99 #include <fstream.h>
     99#include <fstream>
    100100#ifdef _REENTRANT
    101101#include <pthread.h>
     
    106106
    107107ClassImp(MLog);
     108
     109using namespace std;
    108110
    109111// root 3.02:
     
    210212// copyt constructor
    211213//
    212 MLog::MLog(MLog &log)
    213 {
    214     fOutputLevel = log.fOutputLevel;
    215     fDebugLevel  = log.fDebugLevel;
    216     fDevice      = log.fDevice;
    217 }
     214/*
     215MLog::MLog(MLog const& log)
     216{
     217//    fOutputLevel = log.fOutputLevel;
     218//    fDebugLevel  = log.fDebugLevel;
     219//    fDevice      = log.fDevice;
     220}
     221*/
    218222
    219223void MLog::Underline()
     
    447451void MLog::AllocateFile(const char *fname)
    448452{
     453    // gcc 3.2:
    449454    char *txt = (char*)"logXXXXXX";
    450     fout = fname ? new ofstream(fname) : new ofstream(mkstemp(txt));
     455    fout = fname ? new ofstream(fname) : new ofstream(/*mkstemp(*/txt/*)*/);
    451456    fOutAllocated = kTRUE;
    452457}
  • trunk/MagicSoft/Mars/mbase/MLog.h

    r2123 r2173  
    99#endif
    1010
    11 #ifndef __CINT__
    12 #include <iostream.h>  // base classes for MLog
    13 #else
    14 class streambuf;
    15 class ostream;
    16 #endif
     11#include <iostream>  // base classes for MLog
    1712
    1813#define bsz    160 // two standard lines
     
    2015class TGTextView;
    2116
    22 class MLog : public streambuf, public ostream, public TObject
     17class MLog : public std::streambuf, public std::ostream, public TObject
    2318{
    2419public:
     
    9489    MLog(const char *fname, int flag=-1);
    9590
    96     MLog(MLog &log);
     91    MLog(MLog const& log) : ostream((std::streambuf*)&log)
     92    {
     93        fOutputLevel = log.fOutputLevel;
     94        fDebugLevel  = log.fDebugLevel;
     95        fDevice      = log.fDevice;
     96    }
    9797    ~MLog();
    9898
     
    186186        const int save = fOutputLevel;
    187187        SetOutputLevel(outlvl);
    188         (*this) << str << endl;
     188        (*this) << str << std::endl;
    189189        fOutputLevel = save;
    190190    }
  • trunk/MagicSoft/Mars/mbase/MLogManip.cc

    r2120 r2173  
    2525#include "MLog.h"
    2626#include "MLogManip.h"
    27 
     27/*
    2828// ----------------------------------------------------------------
    2929//            Definitions of the manipulator functions
     
    124124    return lout;
    125125}
    126 
     126*/
  • trunk/MagicSoft/Mars/mbase/MLogManip.h

    r2142 r2173  
    22#define MARS_MLogManip
    33
    4 #include <iomanip.h>
     4#include <iomanip>
    55
    6 // ----------------------------------------------------------------
    7 //                 Definitions of the manipulators
    8 // ----------------------------------------------------------------
     6#include "MLog.h"
    97
    10 //
    11 // define a general simple macro for manipulator definitions (int)
    12 //
    13 #define MANIPULATOR0(name) \
    14    extern ostream& ##name(ostream& lout);
     8// --------------------- simple manipulators -----------------------
    159
    16 #ifndef OMANIP
    17    #define MANIPULATOR1(name) \
    18       extern ostream& __omanip_##name(ostream& lout, int i); \
    19       inline omanip<int> ##name(int i)                \
    20       {                                               \
    21          return omanip<int>(__omanip_##name, i);     \
    22       }
     10enum MLogManip {
     11    underline
     12};
    2313
    24 #else
    25    #define MANIPULATOR1(name) \
    26        extern ostream& __omanip_##name(ostream& lout, int i); \
    27        inline OMANIP(int) ##name(int i)                \
    28        {                                               \
    29           return OMANIP(int)(__omanip_##name, i);      \
    30        }
     14inline std::ostream &operator<<(std::ostream &lout, MLogManip u)
     15{
     16    MLog *log=/*<dynamic_cast>*/(MLog*)lout.rdbuf();
     17    if (log)
     18        log->Underline();
     19    return lout;
     20}
    3121
    32 #endif
    3322
    34 //
    35 // definitions
    36 //
    37 MANIPULATOR0(underline); // underline output
    38 MANIPULATOR1(debug);     // set debug level
    39 MANIPULATOR1(device);    // set ouput devices
    40 MANIPULATOR1(edev);      // enable additional output devices
    41 MANIPULATOR1(ddev);      // disable given output
    42 //#ifndef __CINT__
    43 //__DEFINE_IOMANIP_FN1(smanip, int, debug);    // set debug level
    44 //__DEFINE_IOMANIP_FN1(smanip, int, device);   // set ouput devices
    45 //__DEFINE_IOMANIP_FN1(smanip, int, edev);     // enable additional output devices
    46 //__DEFINE_IOMANIP_FN1(smanip, int, ddev);     // disable given output
    47 //#endif
     23// ----------------------------- debug -----------------------------
    4824
    49 // ----------------------------------------------------------------
    50 //                         Debug helper macros
    51 // ----------------------------------------------------------------
     25struct _Debug { int level; };
    5226
    53 //
    54 // Output debug information into the stream
    55 //  - this can only be done by a macro
    56 //
     27inline _Debug debug(int level)
     28{
     29    _Debug d;
     30    d.level = level;
     31    return d;
     32}
     33
     34inline std::ostream &operator<<(std::ostream &lout, _Debug d)
     35{
     36    MLog *log=/*<dynamic_cast>*/(MLog*)lout.rdbuf();
     37    if (log)
     38        log->SetOutputLevel(d.level);
     39    return lout;
     40}
     41
     42// ------------------------------- edev ----------------------------
     43
     44struct _EnableDev { MLog::_flags dev; };
     45
     46inline _EnableDev edev(MLog::_flags i)
     47{
     48    _EnableDev e;
     49    e.dev = i;
     50    return e;
     51}
     52
     53inline std::ostream &operator<<(std::ostream &lout, _EnableDev e)
     54{
     55    MLog *log=/*<dynamic_cast>*/(MLog*)lout.rdbuf();
     56    if (log)
     57        log->EnableOutputDevice(e.dev);
     58    return lout;
     59}
     60
     61// ------------------------------- sdev ----------------------------
     62
     63struct _DisableDev { MLog::_flags dev; };
     64
     65inline _DisableDev ddev(MLog::_flags i)
     66{
     67    _DisableDev d;
     68    d.dev = i;
     69    return d;
     70}
     71
     72inline std::ostream &operator<<(std::ostream &lout, _DisableDev d)
     73{
     74    MLog *log=/*<dynamic_cast>*/(MLog*)lout.rdbuf();
     75    if (log)
     76        log->EnableOutputDevice(d.dev);
     77    return lout;
     78}
     79
     80// ------------------------------ Macros ---------------------------
     81
    5782#ifndef __CINT__
    58 //#define dbginf dbg << __FILE__ << " l." << dec << __LINE__ << ": "
    5983#define dbginf __FILE__ << " l." << dec << __LINE__ << ": "
    6084#define all    debug(0) // use this for output in any case
     
    6488#define dbg    debug(4) // use this for debug messages (blue)
    6589#endif
    66 //
    67 // flush the old buffer, set a new debug level
    68 // and output the debug information code
    69 //
    70 // Be careful: Only use them with a MLogging stream facility.
    71 // Remark:     All this is compiled into the code.
    72 //
    73 /*
    74 #ifndef __CINT__
    75 #define DEBUG(lvl)  flush << debug(lvl) << dbginf
    76 #endif
    77 */
    78 /*
    79 class SMANIP(T) {
    80     ios& (*fct)(ios&,T) ;
    81     T arg ;
    82 public:
    83     SMANIP(T)(ios& (*f)(ios&, T), T a) :
    84         fct(f), arg(a) { }
    85         friend istream& operator>>(istream& i, const SMANIP(T)& m)
    86         {
    87             ios* s = &i ;
    88             (*m.fct)(*s,m.arg) ; return i ;
    89         }
    90         friend ostream& operator<<(ostream& o, const SMANIP(T)& m)
    91         {
    92             ios* s = &o ;
    93             (*m.fct)(*s,m.arg) ; return o ;
    94         }
    95 } ;
    96 */
    9790
    9891#endif
  • trunk/MagicSoft/Mars/mbase/MParContainer.cc

    r2109 r2173  
    3838
    3939#include <ctype.h>        // isdigit
    40 #include <fstream.h>      // ofstream, AsciiWrite
     40#include <fstream      // ofstream, AsciiWrite
    4141
    4242#include <TEnv.h>         // Env::Lookup
     
    5858
    5959ClassImp(MParContainer);
     60
     61using namespace std;
    6062
    6163// --------------------------------------------------------------------------
  • trunk/MagicSoft/Mars/mbase/MParContainer.h

    r2120 r2173  
    2020#endif
    2121
    22 class ofstream;
    23 class ifstream;
     22// gcc 3.2
     23#include <iosfwd>
     24//class ofstream;
     25//class ifstream;
    2426
    2527class TEnv;
  • trunk/MagicSoft/Mars/mbase/MParList.cc

    r2120 r2173  
    4141#include "MParList.h"
    4242
    43 #include <fstream.h>     // ofstream, SavePrimitive
     43#include <fstream>     // ofstream, SavePrimitive
    4444
    4545#include <TNamed.h>
     
    5353
    5454ClassImp(MParList);
     55
     56using namespace std;
    5557
    5658static const TString gsDefName  = "MParList";
  • trunk/MagicSoft/Mars/mbase/MPrint.cc

    r1542 r2173  
    4646
    4747ClassImp(MPrint);
     48
     49using namespace std;
    4850
    4951// --------------------------------------------------------------------------
  • trunk/MagicSoft/Mars/mbase/MTask.cc

    r2117 r2173  
    6868#include "MTask.h"
    6969
    70 #include <fstream.h>
     70#include <fstream>
    7171#include <TBaseClass.h>
    7272
     
    7979
    8080ClassImp(MTask);
     81
     82using namespace std;
    8183
    8284MTask::MTask(const char *name, const char *title)
  • trunk/MagicSoft/Mars/mbase/MTaskInteractive.cc

    r2156 r2173  
    3636#include "MTaskInteractive.h"
    3737
    38 #include <iostream.h>
    39 
    4038#include <Api.h>
    4139#include <TMethodCall.h>
     
    4543
    4644ClassImp(MTaskInteractive);
     45
     46using namespace std;
    4747
    4848// --------------------------------------------------------------------------
  • trunk/MagicSoft/Mars/mbase/MTaskList.cc

    r2120 r2173  
    5757#include "MTaskList.h"
    5858
    59 #include <fstream.h>        // ofstream, SavePrimitive
     59#include <fstream>        // ofstream, SavePrimitive
    6060
    6161#include <TClass.h>
     
    7373
    7474ClassImp(MTaskList);
     75
     76using namespace std;
    7577
    7678const TString MTaskList::gsDefName  = "MTaskList";
  • trunk/MagicSoft/Mars/mbase/MTime.cc

    r1080 r2173  
    3333#include "MTime.h"
    3434
    35 #include <iomanip.h>
     35#include <iomanip>
    3636
    3737#include "MLog.h"
    3838
    3939ClassImp(MTime);
     40
     41using namespace std;
    4042
    4143void MTime::Print(Option_t *) const
  • trunk/MagicSoft/Mars/mdata/DataIncl.h

    r1287 r2173  
    11#ifndef __CINT__
    22
    3 #include <fstream.h>
     3//#include <fstream>
    44
    55#include <TFile.h>
  • trunk/MagicSoft/Mars/mdata/MData.cc

    r1574 r2173  
    6363#include "MData.h"
    6464
    65 #include <fstream.h>
     65#include <fstream>
    6666
    6767#include "MLog.h"
    6868
    6969ClassImp(MData);
     70
     71using namespace std;
    7072
    7173Bool_t MData::AsciiWrite(ostream &out) const
  • trunk/MagicSoft/Mars/mdata/MDataArray.cc

    r2114 r2173  
    3333#include "MDataArray.h"
    3434
    35 #include <fstream.h>
     35#include <fstream>
    3636
    3737#include <TVector.h>
     
    4343
    4444ClassImp(MDataArray);
     45
     46using namespace std;
    4547
    4648static const TString gsDefName  = "MDataArray";
     
    194196void MDataArray::GetData(TVector &v) const
    195197{
    196     Double_t ncols = GetNumEntries();
     198    Int_t ncols = GetNumEntries();
    197199
    198200    v.ResizeTo(ncols);
  • trunk/MagicSoft/Mars/mdata/MDataChain.cc

    r2117 r2173  
    126126
    127127ClassImp(MDataChain);
     128
     129using namespace std;
    128130
    129131// --------------------------------------------------------------------------
     
    543545    case kERad2Deg:  return val*180/TMath::Pi();
    544546    case kEDeg2Rad:  return val*TMath::Pi()/180;
    545     case kERandom:   return gRandom ? gRandom->Uniform(val)   : 0;
    546     case kERandomP:  return gRandom ? gRandom->Poisson(val)   : 0;
    547     case kERandomE:  return gRandom ? gRandom->Exp(val)       : 0;
    548     case kERandomI:  return gRandom ? gRandom->Integer(val)  : 0;
     547    case kERandom:   return gRandom ? gRandom->Uniform(val)      : 0;
     548    case kERandomP:  return gRandom ? gRandom->Poisson(val)      : 0;
     549    case kERandomE:  return gRandom ? gRandom->Exp(val)          : 0;
     550    case kERandomI:  return gRandom ? gRandom->Integer((int)val) : 0;
    549551    case kERandomG:  return gRandom ? gRandom->Gaus(0, val)   : 0;
    550552    case kERandomL:  return gRandom ? gRandom->Landau(0, val) : 0;
  • trunk/MagicSoft/Mars/mdata/MDataElement.cc

    r2098 r2173  
    3838#include "MDataElement.h"
    3939
    40 #include <fstream.h>
     40#include <fstream>
    4141
    4242#include "MHMatrix.h"
     
    4848
    4949ClassImp(MDataElement);
     50
     51using namespace std;
    5052
    5153// --------------------------------------------------------------------------
  • trunk/MagicSoft/Mars/mdata/MDataList.cc

    r1574 r2173  
    3636ClassImp(MDataList);
    3737
     38using namespace std;
     39
    3840// --------------------------------------------------------------------------
    3941//
  • trunk/MagicSoft/Mars/mdata/MDataMember.cc

    r1709 r2173  
    3838#include "MDataMember.h"
    3939
    40 #include <fstream.h>
     40#include <fstream>
    4141
    4242#include <TMethodCall.h>
     
    4848
    4949ClassImp(MDataMember);
     50
     51using namespace std;
    5052
    5153// --------------------------------------------------------------------------
  • trunk/MagicSoft/Mars/mdata/MDataValue.cc

    r1474 r2173  
    3838ClassImp(MDataValue);
    3939
     40using namespace std;
     41
    4042// --------------------------------------------------------------------------
    4143//
  • trunk/MagicSoft/Mars/mdatacheck/MDumpEvtHeader.cc

    r1081 r2173  
    5151ClassImp(MDumpEvtHeader);
    5252
     53using namespace std;
     54
    5355// --------------------------------------------------------------------------
    5456//
  • trunk/MagicSoft/Mars/mdatacheck/MGDisplayAdc.cc

    r2010 r2173  
    2727
    2828#include <stdlib.h>              // mkstemp
    29 #include <iostream.h>            // cout for debugging
     29#include <iostream            // cout for debugging
    3030
    3131#include <TSystem.h>             // gSystem
     
    3939
    4040#include "MHFadcCam.h"
     41
     42using namespace std;
    4143
    4244enum ComIdentDisplayAdc
  • trunk/MagicSoft/Mars/merpp.cc

    r1936 r2173  
    1616#include "MRawCrateArray.h"
    1717#include "MInputStreamID.h"
     18
     19using namespace std;
    1820
    1921//////////////////////////////////////////////////////////////////////////////
  • trunk/MagicSoft/Mars/meventdisp/MGEvtDisplay.cc

    r2161 r2173  
    4949#include "MReadMarsFile.h"
    5050#include "MGeomCamMagic.h"
     51#include "MRawEvtData.h"
    5152#include "MRawEvtHeader.h"
    5253
     
    536537//  and updates the display
    537538//
    538 void MGEvtDisplay::ReadinEvent()
    539 {
    540     if (GetTaskList()->Process())
     539void MGEvtDisplay::ReadinEvent(Int_t dir)
     540{
     541    MRawEvtData *raw = (MRawEvtData*)GetParList()->FindObject("MRawEvtData");
     542    if (!raw)
     543        return;
     544    do
    541545    {
     546        if (dir<0 && !GetReader()->DecEventNum())
     547            return;
     548        if (dir>0 && !GetReader()->IncEventNum())
     549            return;
     550
     551        if (!GetTaskList()->Process())
     552            return;
     553
    542554        GetReader()->DecEventNum();
    543         UpdateMcLabel();
    544         UpdateDisplay();
    545     }
     555
     556    } while (raw->GetNumPixels()<1);
     557
     558    UpdateMcLabel();
     559    UpdateDisplay();
    546560
    547561    fTxtEvtNr->SetText(Form("%d", GetReader()->GetNumEntry()+1));
     
    645659            {
    646660            case kEvtPrev:
    647                 if (GetReader()->DecEventNum())
    648                     ReadinEvent();
     661                ReadinEvent(-1);
    649662                return kTRUE;
    650663
    651664            case kEvtNext:
    652                 if (GetReader()->IncEventNum())
    653                     ReadinEvent();
     665                ReadinEvent(+1);
    654666                return kTRUE;
    655667            }
  • trunk/MagicSoft/Mars/meventdisp/MGEvtDisplay.h

    r1668 r2173  
    4444
    4545    void SaveAsDialog() const;
    46     void ReadinEvent();
     46    void ReadinEvent(Int_t dir=0);
    4747
    4848    Bool_t fInitOk;
  • trunk/MagicSoft/Mars/meventdisp/MGFadcDisp.cc

    r1939 r2173  
    2727#include <limits.h>               // INT_MAX
    2828#include <stdlib.h>               // atoi
    29 #include <iostream.h>             // cout for debugging
     29#include <iostream             // cout for debugging
    3030
    3131#include <TList.h>                // TList
     
    5151
    5252ClassImp(MGFadcDisp);
     53
     54using namespace std;
    5355
    5456enum MGFadcDispCommand
  • trunk/MagicSoft/Mars/mfileio/MCT1ReadAscii.cc

    r2138 r2173  
    1616!
    1717!
    18 !   Author(s): Thomas Bretz  12/2000 <mailto:tbretz@astro.uni-wuerzburg.de>
    19 !   Author(s): Harald Kornmayer 1/2001 (harald@mppmu.mpg.de)
    20 !
    21 !   Copyright: MAGIC Software Development, 2000-2002
     18!   Author(s): Thomas Bretz, 12/2000 <mailto:tbretz@astro.uni-wuerzburg.de>
     19!   Author(s): Harald Kornmayer, 1/2001
     20!
     21!   Copyright: MAGIC Software Development, 2000-2003
    2222!
    2323!
     
    4141#include "MCT1ReadAscii.h"
    4242
    43 #include <fstream.h>
     43#include <fstream>
    4444
    4545#include <TList.h>
     
    5656
    5757ClassImp(MCT1ReadAscii);
     58
     59using namespace std;
    5860
    5961// --------------------------------------------------------------------------
  • trunk/MagicSoft/Mars/mfileio/MCT1ReadPreProc.cc

    r2152 r2173  
    1616!
    1717!
    18 !   Author(s): Thomas Bretz 11/2002 <mailto:tbretz@astro.uni-wuerzburg.de>
     18!   Author(s): Thomas Bretz, 11/2002 <mailto:tbretz@astro.uni-wuerzburg.de>
    1919!
    2020!   Copyright: MAGIC Software Development, 2000-2003
     
    4747#include "MCT1ReadPreProc.h"
    4848
    49 #include <fstream.h>
     49#include <fstream>
    5050
    5151#include <TList.h>
     
    8585
    8686ClassImp(MCT1ReadPreProc);
     87
     88using namespace std;
    8789
    8890// --------------------------------------------------------------------------
     
    469471    }
    470472
    471     fIn->read((Byte_t*)&outpars, sizeof(struct outputpars));
     473    fIn->read((char*)&outpars, sizeof(struct outputpars));
    472474
    473475    ProcessRunHeader(outpars);
     
    509511
    510512    struct filterresults filterres;
    511     fIn->read((Byte_t*)&filterres, sizeof(struct filterresults));
     513    fIn->read((char*)&filterres, sizeof(struct filterresults));
    512514    /*
    513515     int   imax_alt_arcs;            // maximum altitude reached during the run
     
    996998                 0, /* uiPco */
    997999                 0, /* uiPelS */
    998                  fIsMcFile ? event.fmcsize_phel : 0, /* uiPelC, Simulated SIZE */
     1000                 (int)(fIsMcFile ? event.fmcsize_phel : 0), /* uiPelC, Simulated SIZE */
    9991001                 0, /* elec */
    10001002                 0, /* muon */
     
    11341136
    11351137    // read the eventrecord from the file
    1136     fIn->read((Byte_t*)&event, sizeof(struct eventrecord));
     1138    fIn->read((char*)&event, sizeof(struct eventrecord));
    11371139
    11381140    switch (ProcessEvent(event))
  • trunk/MagicSoft/Mars/mfileio/MChain.cc

    r1583 r2173  
    1616!
    1717!
    18 !   Author(s): Thomas Bretz  12/2000 <mailto:tbretz@astro.uni-wuerzburg.de>
     18!   Author(s): Thomas Bretz, 12/2000 <mailto:tbretz@astro.uni-wuerzburg.de>
    1919!
    20 !   Copyright: MAGIC Software Development, 2000-2002
     20!   Copyright: MAGIC Software Development, 2000-2003
    2121!
    2222!
  • trunk/MagicSoft/Mars/mfileio/MChain.h

    r1664 r2173  
    1515    MChain(const char *name, const char *title="") : TChain(name, title), fNotified(kFALSE) {}
    1616
    17     void ResetTree() { fTree = 0; }
     17    void ResetTree() { fTree = 0; fTreeNumber = -1; }
    1818
    1919    virtual Bool_t Notify() { fNotified = kTRUE; return kTRUE; }
  • trunk/MagicSoft/Mars/mfileio/MRead.cc

    r2117 r2173  
    1616!
    1717!
    18 !   Author(s): Thomas Bretz  12/2000 <mailto:tbretz@astro.uni-wuerzburg.de>
     18!   Author(s): Thomas Bretz, 12/2000 <mailto:tbretz@astro.uni-wuerzburg.de>
    1919!
    20 !   Copyright: MAGIC Software Development, 2000-2002
     20!   Copyright: MAGIC Software Development, 2000-2003
    2121!
    2222!
     
    4141
    4242ClassImp(MRead);
     43
     44using namespace std;
    4345
    4446Bool_t MRead::Rewind()
  • trunk/MagicSoft/Mars/mfileio/MReadCurrents.cc

    r2161 r2173  
    3737
    3838#include <stdlib.h>  // atoi
    39 #include <fstream.h>
     39#include <fstream>
    4040
    4141#include <TList.h>
     
    5151
    5252ClassImp(MReadCurrents);
     53
     54using namespace std;
    5355
    5456// --------------------------------------------------------------------------
  • trunk/MagicSoft/Mars/mfileio/MReadMarsFile.cc

    r2123 r2173  
    1616!
    1717!
    18 !   Author(s): Thomas Bretz  12/2000 <mailto:tbretz@astro.uni-wuerzburg.de>
    19 !
    20 !   Copyright: MAGIC Software Development, 2000-2002
     18!   Author(s): Thomas Bretz, 12/2000 <mailto:tbretz@astro.uni-wuerzburg.de>
     19!
     20!   Copyright: MAGIC Software Development, 2000-2003
    2121!
    2222!
     
    3333//                                                                         //
    3434/////////////////////////////////////////////////////////////////////////////
    35 
    3635#include "MReadMarsFile.h"
    3736
     
    4847
    4948ClassImp(MReadMarsFile);
     49
     50using namespace std;
    5051
    5152// --------------------------------------------------------------------------
  • trunk/MagicSoft/Mars/mfileio/MReadRflFile.cc

    r2136 r2173  
    3232#include "MReadRflFile.h"
    3333
    34 #include <fstream.h>
     34#include <fstream>
    3535
    3636#include <TSystem.h>
     
    4747
    4848ClassImp(MReadRflFile);
     49
     50using namespace std;
    4951
    5052// ------------------------------------------------
     
    7072    {
    7173        RflEventHeader_old revth;
    72         fIn->read(&revth, sizeof(RflEventHeader_old));
    73         fEvtHeader->SetEvtNumber(revth.EvtNumber);
     74        fIn->read((char*)&revth, sizeof(RflEventHeader_old));
     75        fEvtHeader->SetEvtNumber((int)revth.EvtNumber);
    7476//        *fLog << "Event Number: " << revth.EvtNumber;
    7577//        *fLog << "  Primary ID: " << revth.PrimaryID;
     
    8082    {
    8183        RflEventHeader revth;
    82         fIn->read(&revth, sizeof(RflEventHeader));
    83         fEvtHeader->SetEvtNumber(revth.EvtNumber);
     84        fIn->read((char*)&revth, sizeof(RflEventHeader));
     85        fEvtHeader->SetEvtNumber((int)revth.EvtNumber);
    8486//        *fLog << "Event Number: " << revth.EvtNumber;
    8587//        *fLog << "  Primary ID: " << revth.PrimaryID;
     
    178180        {
    179181            RflRunHeader rrunh;
    180             fIn->read(&rrunh, sizeof(RflRunHeader));
     182            fIn->read((char*)&rrunh, sizeof(RflRunHeader));
    181183            if (*fIn)
    182184            {
    183185                *fLog << inf << "FIXME: Call ReInit" << endl;
    184186
    185                 fRunHeader->SetRunNumber(rrunh.RunNumber);
     187                fRunHeader->SetRunNumber((int)rrunh.RunNumber);
    186188                *fLog << underline << "RunHeader:" << endl;
    187189                *fLog << " Run Number:   " << rrunh.RunNumber << endl;
  • trunk/MagicSoft/Mars/mfileio/MReadTree.cc

    r2130 r2173  
    1616!
    1717!
    18 !   Author(s): Thomas Bretz  12/2000 <mailto:tbretz@astro.uni-wuerzburg.de>
     18!   Author(s): Thomas Bretz, 12/2000 <mailto:tbretz@astro.uni-wuerzburg.de>
    1919!
    20 !   Copyright: MAGIC Software Development, 2000-2002
     20!   Copyright: MAGIC Software Development, 2000-2003
    2121!
    2222!
     
    5151#include "MReadTree.h"
    5252
    53 #include <fstream.h>
     53#include <fstream>
    5454
    5555#include <TFile.h>           // TFile::GetName
     
    6868
    6969ClassImp(MReadTree);
     70
     71using namespace std;
    7072
    7173// --------------------------------------------------------------------------
  • trunk/MagicSoft/Mars/mfileio/MWriteAsciiFile.cc

    r1583 r2173  
    1616!
    1717!
    18 !   Author(s): Thomas Bretz  06/2001 <mailto:tbretz@astro.uni-wuerzburg.de>
    19 !
    20 !   Copyright: MAGIC Software Development, 2000-2002
     18!   Author(s): Thomas Bretz, 06/2001 <mailto:tbretz@astro.uni-wuerzburg.de>
     19!
     20!   Copyright: MAGIC Software Development, 2000-2003
    2121!
    2222!
     
    4848#include "MWriteAsciiFile.h"
    4949
    50 #include <fstream.h>
     50#include <fstream>
    5151
    5252#include <TMethodCall.h> // TMethodCall, AsciiWrite
     
    6363
    6464ClassImp(MWriteAsciiFile);
     65
     66using namespace std;
    6567
    6668// --------------------------------------------------------------------------
  • trunk/MagicSoft/Mars/mfileio/MWriteFile.cc

    r1583 r2173  
    1616!
    1717!
    18 !   Author(s): Thomas Bretz  06/2001 <mailto:tbretz@astro.uni-wuerzburg.de>
     18!   Author(s): Thomas Bretz, 6/2001 <mailto:tbretz@astro.uni-wuerzburg.de>
    1919!
    20 !   Copyright: MAGIC Software Development, 2000-2002
     20!   Copyright: MAGIC Software Development, 2000-2003
    2121!
    2222!
     
    3737#include "MWriteFile.h"
    3838
    39 #include <fstream.h>
     39#include <fstream>
    4040
    4141#include "MLog.h"
     
    4545
    4646ClassImp(MWriteFile);
     47
     48using namespace std;
    4749
    4850// --------------------------------------------------------------------------
  • trunk/MagicSoft/Mars/mfileio/MWriteRootFile.cc

    r2130 r2173  
    1616!
    1717!
    18 !   Author(s): Thomas Bretz  06/2001 <mailto:tbretz@astro.uni-wuerzburg.de>
    19 !
    20 !   Copyright: MAGIC Software Development, 2000-2002
     18!   Author(s): Thomas Bretz, 6/2001 <mailto:tbretz@astro.uni-wuerzburg.de>
     19!
     20!   Copyright: MAGIC Software Development, 2000-2003
    2121!
    2222!
     
    3636#include "MWriteRootFile.h"
    3737
    38 #include <fstream.h>
     38#include <fstream>
    3939
    4040#include <TFile.h>
     
    4848ClassImp(MRootFileBranch);
    4949ClassImp(MWriteRootFile);
     50
     51using namespace std;
    5052
    5153static const TString gsDefName  = "MWriteRootFile";
  • trunk/MagicSoft/Mars/mfilter/MF.cc

    r2123 r2173  
    8383#include <ctype.h>        // isalnum, ...
    8484#include <stdlib.h>       // strtod, ...
    85 #include <fstream.h>      // ofstream, ...
     85#include <fstream>      // ofstream, ...
    8686
    8787#include <TMethodCall.h>
     
    9797
    9898ClassImp(MF);
     99
     100using namespace std;
    99101
    100102const TString MF::gsDefName  = "MF";
  • trunk/MagicSoft/Mars/mfilter/MFAlpha.cc

    r1483 r2173  
    3131
    3232#include <math.h>
    33 #include <fstream.h>
     33#include <fstream>
    3434
    3535#include "MLog.h"
     
    4242ClassImp(MFAlpha);
    4343
     44using namespace std;
    4445
    4546// --------------------------------------------------------------------------
     
    6263// --------------------------------------------------------------------------
    6364//
    64 void MFAlpha::Init(const char type, const Int_t val,
     65void MFAlpha::Init(const char type, const Float_t val,
    6566                   const char *name, const char *title)
    6667{
  • trunk/MagicSoft/Mars/mfilter/MFAlpha.h

    r1481 r2173  
    2727    Float_t fValue; // [deg]
    2828
    29     void Init(const char type, const Int_t val,
     29    void Init(const char type, const Float_t val,
    3030              const char *name, const char *title);
    3131
  • trunk/MagicSoft/Mars/mfilter/MFCT1SelBasic.cc

    r2037 r2173  
    5757ClassImp(MFCT1SelBasic);
    5858
     59using namespace std;
     60
    5961// --------------------------------------------------------------------------
    6062//
  • trunk/MagicSoft/Mars/mfilter/MFCT1SelFinal.cc

    r2076 r2173  
    5757
    5858ClassImp(MFCT1SelFinal);
     59
     60using namespace std;
    5961
    6062// --------------------------------------------------------------------------
  • trunk/MagicSoft/Mars/mfilter/MFCT1SelStandard.cc

    r2059 r2173  
    5858ClassImp(MFCT1SelStandard);
    5959
     60using namespace std;
     61
    6062// --------------------------------------------------------------------------
    6163//
  • trunk/MagicSoft/Mars/mfilter/MFDataChain.cc

    r2098 r2173  
    4444#include "MFDataChain.h"
    4545
    46 #include <fstream.h>
     46#include <fstream>
    4747
    4848#include <TMethodCall.h>
     
    5454
    5555ClassImp(MFDataChain);
     56
     57using namespace std;
    5658
    5759// --------------------------------------------------------------------------
  • trunk/MagicSoft/Mars/mfilter/MFDataMember.cc

    r1661 r2173  
    4444#include "MFDataMember.h"
    4545
    46 #include <fstream.h>
     46#include <fstream>
    4747
    4848#include <TMethodCall.h>
     
    5454
    5555ClassImp(MFDataMember);
     56
     57using namespace std;
    5658
    5759// --------------------------------------------------------------------------
  • trunk/MagicSoft/Mars/mfilter/MFEnergySlope.cc

    r2010 r2173  
    4848#include "MFEnergySlope.h"
    4949
    50 #include <fstream.h>
     50#include <fstream>
    5151#include <TRandom.h>
    5252
     
    6060
    6161ClassImp(MFEnergySlope);
     62
     63using namespace std;
    6264
    6365// --------------------------------------------------------------------------
  • trunk/MagicSoft/Mars/mfilter/MFEventSelector.cc

    r2118 r2173  
    7474ClassImp(MFEventSelector);
    7575
     76using namespace std;
     77
    7678static const TString gsDefName  = "MFEventSelector";
    7779static const TString gsDefTitle = "Filter to select events";
  • trunk/MagicSoft/Mars/mfilter/MFEventSelector2.cc

    r2118 r2173  
    112112
    113113ClassImp(MFEventSelector2);
     114
     115using namespace std;
    114116
    115117const TString MFEventSelector2::gsDefName  = "MFEventSelector2";
     
    133135//     would result in redistributing cos(Theta).
    134136//
    135 MFEventSelector2::MFEventSelector2(MH3 &hist, const char *name=NULL, const char *title=NULL)
     137MFEventSelector2::MFEventSelector2(MH3 &hist, const char *name, const char *title)
    136138: fHistOrig(NULL), fHistNom(&hist), fHistRes(NULL),
    137139  fDataX(hist.GetRule('x')), fDataY(hist.GetRule('y')),
     
    178180// Reading task of the present loop is used in a new eventloop.
    179181//
    180 Bool_t MFEventSelector2::Read(MRead &read)
     182Bool_t MFEventSelector2::ReadDistribution(MRead &read)
    181183{
    182184    if (read.GetEntries() > INT_MAX) // FIXME: LONG_MAX ???
     
    355357
    356358    // Read primary distribution
    357     if (!Read(*read))
     359    if (!ReadDistribution(*read))
    358360        return kFALSE;
    359361
  • trunk/MagicSoft/Mars/mfilter/MFEventSelector2.h

    r2118 r2173  
    4444
    4545    TH1   &InitHistogram(MH3* &hist);
    46     Bool_t Read(MRead &read);
     46    Bool_t ReadDistribution(MRead &read);
    4747    void   PrepareHistograms();
    4848    Bool_t PreProcessData(MParList *parlist);
  • trunk/MagicSoft/Mars/mfilter/MFParticleId.cc

    r1483 r2173  
    3434#include "MFParticleId.h"
    3535
    36 #include <fstream.h>
     36#include <fstream>
    3737
    3838#include "MLog.h"
     
    4545ClassImp(MFParticleId);
    4646
     47using namespace std;
    4748
    4849// --------------------------------------------------------------------------
  • trunk/MagicSoft/Mars/mfilter/MFTriggerLvl1.cc

    r1483 r2173  
    3030#include "MFTriggerLvl1.h"
    3131
    32 #include <fstream.h>
     32#include <fstream>
    3333
    3434#include "MLog.h"
     
    4141ClassImp(MFTriggerLvl1);
    4242
     43using namespace std;
    4344
    4445// --------------------------------------------------------------------------
  • trunk/MagicSoft/Mars/mfilter/MFTriggerLvl2.cc

    r1777 r2173  
    2020!   Copyright: MAGIC Software Development, 2000-2003
    2121!
    22 !   Filter for L2Trigger. 02/2003
    23 !
    2422\* ======================================================================== */
    2523
     
    3331#include "MFTriggerLvl2.h"
    3432
    35 #include <fstream.h>
     33#include <fstream>
    3634
    3735#include "MLog.h"
     
    4442ClassImp(MFTriggerLvl2);
    4543
     44using namespace std;
    4645
    4746// --------------------------------------------------------------------------
  • trunk/MagicSoft/Mars/mfilter/MFilterList.cc

    r1936 r2173  
    3030#include "MFilterList.h"
    3131
    32 #include <fstream.h>
     32#include <fstream>
    3333
    3434#include <TString.h>
     
    4040
    4141ClassImp(MFilterList);
     42
     43using namespace std;
    4244
    4345static const TString gsDefName  = "MFilterList";
  • trunk/MagicSoft/Mars/mfilter/MFilterList.h

    r1486 r2173  
    5050
    5151    void Print(Option_t *opt = "") const;
    52     TString GetRule(Option_t *opt="") const;
     52    TString GetRule() const { return GetRule(""); }
     53    TString GetRule(Option_t *opt) const;
    5354
    5455    ClassDef(MFilterList, 1)            // List to combine several filters logically
  • trunk/MagicSoft/Mars/mgeom/MGeomCam.cc

    r2135 r2173  
    4343
    4444ClassImp(MGeomCam);
     45
     46using namespace std;
    4547
    4648// --------------------------------------------------------------------------
  • trunk/MagicSoft/Mars/mgeom/MGeomCamECO1000.cc

    r2037 r2173  
    3939
    4040ClassImp(MGeomCamECO1000);
     41
     42using namespace std;
    4143
    4244// --------------------------------------------------------------------------
  • trunk/MagicSoft/Mars/mgeom/MGeomCamECO1000HG.cc

    r2126 r2173  
    4343
    4444ClassImp(MGeomCamECO1000HG);
     45
     46using namespace std;
    4547
    4648// --------------------------------------------------------------------------
  • trunk/MagicSoft/Mars/mgeom/MGeomMirror.cc

    r1696 r2173  
    3737
    3838ClassImp(MGeomMirror);
     39
     40using namespace std;
    3941
    4042// --------------------------------------------------------------------------
  • trunk/MagicSoft/Mars/mgeom/MGeomPMT.cc

    r1632 r2173  
    3737ClassImp(MGeomPMT);
    3838
     39using namespace std;
     40
    3941// --------------------------------------------------------------------------
    4042//
  • trunk/MagicSoft/Mars/mgeom/MGeomPix.cc

    r2135 r2173  
    4747
    4848ClassImp(MGeomPix);
     49
     50using namespace std;
    4951
    5052// --------------------------------------------------------------------------
  • trunk/MagicSoft/Mars/mgui/MCamDisplay.cc

    r2158 r2173  
    3737#include "MCamDisplay.h"
    3838
    39 #include <fstream.h>
    40 #include <iostream.h>
     39#include <fstream>
     40#include <iostream>
    4141
    4242#include <TBox.h>
     
    7070ClassImp(MCamDisplay);
    7171
     72using namespace std;
     73
    7274// ------------------------------------------------------------------------
    7375//
     
    133135    const Float_t h = 2./kItemsLegend;
    134136
    135     const Float_t w = fRange/sqrt(fNumPixels);
     137    const Float_t w = fRange/sqrt((float)fNumPixels);
    136138
    137139    fLegend  = new TClonesArray("TBox",  kItemsLegend);
  • trunk/MagicSoft/Mars/mgui/MHexagon.cc

    r2135 r2173  
    3232#include "MHexagon.h"
    3333
    34 #include <fstream.h>
    35 #include <iostream.h>
     34#include <fstream>
     35#include <iostream>
    3636
    3737#include <TVirtualPad.h>  // gPad
     
    4040
    4141ClassImp(MHexagon);
     42
     43using namespace std;
    4244
    4345// ------------------------------------------------------------------------
  • trunk/MagicSoft/Mars/mhist/MBinning.cc

    r2117 r2173  
    3131
    3232#include <ctype.h>      // tolower
    33 #include <fstream.h>
     33#include <fstream>
    3434
    3535#include <TH1.h>        // InheritsFrom
     
    4141
    4242ClassImp(MBinning);
     43
     44using namespace std;
    4345
    4446static const TString gsDefName  = "MBinning";
     
    7577}
    7678
    77 void MBinning::SetEdges(const TH1 &h, const Char_t axis='x')
     79void MBinning::SetEdges(const TH1 &h, const Char_t axis)
    7880{
    7981    TH1 &hist = (TH1&)h; // get rid of const qualifier
  • trunk/MagicSoft/Mars/mhist/MFillH.cc

    r2117 r2173  
    7474#include "MFillH.h"
    7575
    76 #include <fstream.h>
     76#include <fstream>
    7777
    7878#include <TClass.h>
     
    9393
    9494ClassImp(MFillH);
     95
     96using namespace std;
    9597
    9698// --------------------------------------------------------------------------
  • trunk/MagicSoft/Mars/mhist/MH.cc

    r2150 r2173  
    7575ClassImp(MH);
    7676
     77using namespace std;
     78
    7779// --------------------------------------------------------------------------
    7880//
  • trunk/MagicSoft/Mars/mhist/MH3.cc

    r2117 r2173  
    6161
    6262#include <ctype.h>   // tolower
    63 #include <fstream.h>
     63#include <fstream>
    6464
    6565#include <TPad.h>
     
    8080
    8181ClassImp(MH3);
     82
     83using namespace std;
    8284
    8385static const TString gsDefName  = "MH3";
     
    638640}
    639641
    640 TString MH3::GetRule(const Char_t axis='x') const
     642TString MH3::GetRule(const Char_t axis) const
    641643{
    642644    switch (tolower(axis))
  • trunk/MagicSoft/Mars/mhist/MHAlphaEnergyTheta.cc

    r2164 r2173  
    4949
    5050ClassImp(MHAlphaEnergyTheta);
     51
     52using namespace std;
    5153
    5254// --------------------------------------------------------------------------
  • trunk/MagicSoft/Mars/mhist/MHAlphaEnergyTime.cc

    r2043 r2173  
    5050ClassImp(MHAlphaEnergyTime);
    5151
     52using namespace std;
    5253
    5354// --------------------------------------------------------------------------
  • trunk/MagicSoft/Mars/mhist/MHArray.cc

    r2043 r2173  
    8080ClassImp(MHArray);
    8181
     82using namespace std;
     83
    8284//////////////////////////////////////////////////////////////////////////////
    8385//
     
    551553        MH::MakeDefCanvas(this);
    552554
    553     const Stat_t sstyle = gStyle->GetOptStat();
     555    const Int_t sstyle = gStyle->GetOptStat();
    554556    gStyle->SetOptStat(0);
    555557
     
    672674        o.Remove(scalemax, 9);
    673675
    674     const Stat_t sstyle = gStyle->GetOptStat();
     676    const Int_t sstyle = gStyle->GetOptStat();
    675677    gStyle->SetOptStat(0);
    676678
  • trunk/MagicSoft/Mars/mhist/MHBlindPixels.cc

    r2128 r2173  
    4343
    4444ClassImp(MHBlindPixels);
     45
     46using namespace std;
    4547
    4648// -------------------------------------------------------------------------
  • trunk/MagicSoft/Mars/mhist/MHCerPhotEvt.cc

    r2138 r2173  
    4444ClassImp(MHCerPhotEvt);
    4545
     46using namespace std;
     47
    4648// --------------------------------------------------------------------------
    4749//
    4850// Reset all pixels to 0 and reset fEntries to 0.
    4951//
    50 void MHCerPhotEvt::Clear()
     52void MHCerPhotEvt::Clear(const Option_t *)
    5153{
    5254    fSum.Reset();
  • trunk/MagicSoft/Mars/mhist/MHCerPhotEvt.h

    r2161 r2173  
    2626    ~MHCerPhotEvt();
    2727
    28     void Clear();
     28    void Clear(const Option_t *o="");
    2929
    3030    Bool_t SetupFill(const MParList *pList);
  • trunk/MagicSoft/Mars/mhist/MHCompProb.cc

    r2043 r2173  
    5353ClassImp(MHCompProb);
    5454
     55using namespace std;
     56
    5557// --------------------------------------------------------------------------
    5658//
  • trunk/MagicSoft/Mars/mhist/MHCurrents.cc

    r2157 r2173  
    4444ClassImp(MHCurrents);
    4545
     46using namespace std;
     47
    4648// --------------------------------------------------------------------------
    4749//
    4850// Reset all pixels to 0 and reset fEntries to 0.
    4951//
    50 void MHCurrents::Clear()
     52void MHCurrents::Clear(const Option_t *)
    5153{
    5254    // FIXME: Implement a clear function with setmem
  • trunk/MagicSoft/Mars/mhist/MHCurrents.h

    r2157 r2173  
    2727    ~MHCurrents();
    2828
    29     void Clear();
     29    void Clear(const Option_t *o="");
    3030
    3131    Bool_t SetupFill(const MParList *pList);
  • trunk/MagicSoft/Mars/mhist/MHEffOnTime.cc

    r2015 r2173  
    5858ClassImp(MHEffOnTime);
    5959
     60using namespace std;
    6061
    6162// --------------------------------------------------------------------------
  • trunk/MagicSoft/Mars/mhist/MHEnergyTheta.cc

    r2043 r2173  
    4444
    4545ClassImp(MHEnergyTheta);
     46
     47using namespace std;
    4648
    4749// --------------------------------------------------------------------------
  • trunk/MagicSoft/Mars/mhist/MHEnergyTime.cc

    r2043 r2173  
    4545
    4646ClassImp(MHEnergyTime);
     47
     48using namespace std;
    4749
    4850// --------------------------------------------------------------------------
  • trunk/MagicSoft/Mars/mhist/MHFadcCam.cc

    r2043 r2173  
    4141
    4242ClassImp(MHFadcCam);
     43
     44using namespace std;
    4345
    4446// --------------------------------------------------------------------------
     
    130132{
    131133    for (Int_t i=0; i<577; i++)
    132         Reset(i);
     134        ResetEntry(i);
    133135}
    134136
    135 void MHFadcCam::Reset(Int_t i)
     137void MHFadcCam::ResetEntry(Int_t i)
    136138{
    137139    GetHistHi(i)->Reset();
  • trunk/MagicSoft/Mars/mhist/MHFadcCam.h

    r2043 r2173  
    4949
    5050    void ResetHistograms();
    51     void Reset(Int_t i);
     51    void ResetEntry(Int_t i);
    5252
    5353    //
  • trunk/MagicSoft/Mars/mhist/MHFlux.cc

    r2016 r2173  
    5858ClassImp(MHFlux);
    5959
     60using namespace std;
     61
    6062MHFlux::MHFlux(const MHGamma &hist, const TString varname, const TString unit)
    6163    : fHOrig(), fHUnfold(), fHFlux()
  • trunk/MagicSoft/Mars/mhist/MHGamma.cc

    r1992 r2173  
    4848ClassImp(MHGamma);
    4949
     50using namespace std;
    5051
    5152// --------------------------------------------------------------------------
  • trunk/MagicSoft/Mars/mhist/MHHadronness.cc

    r2060 r2173  
    7575
    7676ClassImp(MHHadronness);
     77
     78using namespace std;
    7779
    7880// --------------------------------------------------------------------------
  • trunk/MagicSoft/Mars/mhist/MHMatrix.cc

    r2133 r2173  
    4747#include "MHMatrix.h"
    4848
    49 #include <fstream.h>
     49#include <fstream>
    5050
    5151#include <TList.h>
     
    7070#include "MFilter.h"
    7171
    72 
    7372ClassImp(MHMatrix);
     73
     74using namespace std;
    7475
    7576const TString MHMatrix::gsDefName  = "MHMatrix";
  • trunk/MagicSoft/Mars/mhist/MHSigmaPixel.cc

    r2043 r2173  
    4848
    4949ClassImp(MHSigmaPixel);
     50
     51using namespace std;
    5052
    5153// --------------------------------------------------------------------------
  • trunk/MagicSoft/Mars/mhist/MHSigmaTheta.cc

    r2159 r2173  
    5656#include "MLogManip.h"
    5757
    58 
    5958ClassImp(MHSigmaTheta);
    6059
     60using namespace std;
    6161
    6262// --------------------------------------------------------------------------
  • trunk/MagicSoft/Mars/mhist/MHSigmabarTheta.cc

    r2043 r2173  
    4646
    4747ClassImp(MHSigmabarTheta);
     48
     49using namespace std;
    4850
    4951// --------------------------------------------------------------------------
  • trunk/MagicSoft/Mars/mhist/MHStarMap.cc

    r2060 r2173  
    5050ClassImp(MHStarMap);
    5151
     52using namespace std;
     53
    5254// --------------------------------------------------------------------------
    5355//
  • trunk/MagicSoft/Mars/mhist/MHThetabarTheta.cc

    r2043 r2173  
    4444
    4545ClassImp(MHThetabarTheta);
     46
     47using namespace std;
    4648
    4749// --------------------------------------------------------------------------
  • trunk/MagicSoft/Mars/mhist/MHThetabarTime.cc

    r2043 r2173  
    4646ClassImp(MHThetabarTime);
    4747
     48using namespace std;
    4849
    4950// --------------------------------------------------------------------------
  • trunk/MagicSoft/Mars/mhist/MHTimeDiffTheta.cc

    r2043 r2173  
    4747ClassImp(MHTimeDiffTheta);
    4848
     49using namespace std;
    4950
    5051// --------------------------------------------------------------------------
  • trunk/MagicSoft/Mars/mhist/MHTimeDiffTime.cc

    r2043 r2173  
    4747ClassImp(MHTimeDiffTime);
    4848
     49using namespace std;
    4950
    5051// --------------------------------------------------------------------------
  • trunk/MagicSoft/Mars/mhistmc/MHMcCT1CollectionArea.cc

    r2043 r2173  
    4141#include "MLogManip.h"
    4242
    43 
    4443ClassImp(MHMcCT1CollectionArea);
     44
     45using namespace std;
    4546
    4647// --------------------------------------------------------------------------
  • trunk/MagicSoft/Mars/mhistmc/MHMcCollectionArea.cc

    r2097 r2173  
    4545ClassImp(MHMcCollectionArea);
    4646
     47using namespace std;
     48
    4749// --------------------------------------------------------------------------
    4850//
  • trunk/MagicSoft/Mars/mhistmc/MHMcEnergy.cc

    r2017 r2173  
    3535
    3636#include <stdlib.h>
    37 #include <iostream.h>
     37#include <iostream>
    3838
    3939#include <TH1.h>
     
    4848
    4949ClassImp(MHMcEnergy);
     50
     51using namespace std;
    5052
    5153// -------------------------------------------------------------------------
     
    217219Float_t MHMcEnergy::CalcThresholdErr(TF1 *gauss)
    218220{
    219     const Float_t lg10  = log(10);
     221    const Float_t lg10  = log(10.);
    220222    const Float_t p1    = gauss->GetParameter(1);
    221223    const Float_t p1err = gauss->GetParError(1);
  • trunk/MagicSoft/Mars/mhistmc/MHMcEnergyMigration.cc

    r2111 r2173  
    5050ClassImp(MHMcEnergyMigration);
    5151
     52using namespace std;
    5253
    5354// --------------------------------------------------------------------------
  • trunk/MagicSoft/Mars/mhistmc/MHMcIntRate.cc

    r1974 r2173  
    4444
    4545ClassImp(MHMcIntRate);
     46
     47using namespace std;
    4648
    4749// -------------------------------------------------------------------------
  • trunk/MagicSoft/Mars/mhistmc/MHMcRate.cc

    r2017 r2173  
    4040ClassImp(MHMcRate);
    4141
     42using namespace std;
     43
    4244void MHMcRate::Init(const char *name, const char *title)
    4345{
     
    196198    const Double_t specidx = 1.0-fSpecIndex;
    197199
    198     const Double_t epowmax = pow(fEnergyMax, specidx);
    199     const Double_t epowmin = pow(fEnergyMin, specidx);
     200    const Double_t epowmax = pow((double)fEnergyMax, specidx);
     201    const Double_t epowmin = pow((double)fEnergyMin, specidx);
    200202
    201203    if (fShowerRate <= 0)
  • trunk/MagicSoft/Mars/mhistmc/MHMcTriggerLvl2.cc

    r2043 r2173  
    5151#include "MBinning.h"
    5252
     53using namespace std;
     54
    5355/*
    5456 Please, DON'T USE IFDEFS IN SUCH A CONTEXT, Thomas.
  • trunk/MagicSoft/Mars/mimage/MCameraSmooth.cc

    r1940 r2173  
    4646
    4747ClassImp(MCameraSmooth);
     48
     49using namespace std;
    4850
    4951// --------------------------------------------------------------------------
  • trunk/MagicSoft/Mars/mimage/MHHillas.cc

    r2098 r2173  
    5353ClassImp(MHHillas);
    5454
     55using namespace std;
     56
    5557// --------------------------------------------------------------------------
    5658//
  • trunk/MagicSoft/Mars/mimage/MHHillasExt.cc

    r2084 r2173  
    5252ClassImp(MHHillasExt);
    5353
     54using namespace std;
     55
    5456// --------------------------------------------------------------------------
    5557//
  • trunk/MagicSoft/Mars/mimage/MHHillasSrc.cc

    r2117 r2173  
    5050ClassImp(MHHillasSrc);
    5151
     52using namespace std;
     53
    5254// --------------------------------------------------------------------------
    5355//
  • trunk/MagicSoft/Mars/mimage/MHNewImagePar.cc

    r2142 r2173  
    4848
    4949ClassImp(MHNewImagePar);
     50
     51using namespace std;
    5052
    5153// --------------------------------------------------------------------------
  • trunk/MagicSoft/Mars/mimage/MHillas.cc

    r2026 r2173  
    6060#include "MHillas.h"
    6161
    62 #include <fstream.h>
     62#include <fstream>
    6363
    6464#include <TArrayF.h>
     
    7575
    7676ClassImp(MHillas);
     77
     78using namespace std;
    7779
    7880// --------------------------------------------------------------------------
     
    111113
    112114    fSize   = -1;
    113     fMeanX  = -1;
    114     fMeanY  = -1;
     115    fMeanX  =  0;
     116    fMeanY  =  0;
    115117
    116118    Clear();
  • trunk/MagicSoft/Mars/mimage/MHillasCalc.cc

    r2100 r2173  
    6868
    6969ClassImp(MHillasCalc);
     70
     71using namespace std;
    7072
    7173// --------------------------------------------------------------------------
  • trunk/MagicSoft/Mars/mimage/MHillasExt.cc

    r2092 r2173  
    5959#include "MHillasExt.h"
    6060
    61 #include <fstream.h>
     61#include <fstream>
    6262#include <TArrayF.h>
    6363
     
    7474
    7575ClassImp(MHillasExt);
     76
     77using namespace std;
    7678
    7779// -------------------------------------------------------------------------
  • trunk/MagicSoft/Mars/mimage/MHillasSrc.cc

    r2026 r2173  
    6363#include "MHillasSrc.h"
    6464
    65 #include <fstream.h>
     65#include <fstream>
    6666#include <TArrayF.h>
    6767
     
    7272
    7373ClassImp(MHillasSrc);
     74
     75using namespace std;
    7476
    7577// --------------------------------------------------------------------------
     
    98100Bool_t MHillasSrc::Calc(const MHillas *hillas)
    99101{
    100     const Double_t mx   = hillas->GetMeanX();       // [mm]
    101     const Double_t my   = hillas->GetMeanY();       // [mm]
     102    const Double_t mx = hillas->GetMeanX();     // [mm]
     103    const Double_t my = hillas->GetMeanY();     // [mm]
    102104
    103     const Double_t sx   = mx - fSrcPos->GetX();     // [mm]
    104     const Double_t sy   = my - fSrcPos->GetY();     // [mm]
     105    const Double_t sx = mx - fSrcPos->GetX();   // [mm]
     106    const Double_t sy = my - fSrcPos->GetY();   // [mm]
    105107
    106     const Double_t sd   = hillas->GetSinDelta();    // [1]
    107     const Double_t cd   = hillas->GetCosDelta();    // [1]
     108    const Double_t sd = hillas->GetSinDelta();  // [1]
     109    const Double_t cd = hillas->GetCosDelta();  // [1]
    108110
    109111    //
     
    112114    // The calculation has failed and returnes kFALSE.
    113115    //
    114     const Double_t dist = sqrt(sx*sx + sy*sy);      // [mm]
     116    const Double_t dist = sqrt(sx*sx + sy*sy);  // [mm]
    115117    if (dist==0)
    116118        return kFALSE;
     
    124126    // *OLD* fAlpha = asin(arg)*kRad2Deg;
    125127
    126     const Double_t arg1 = cd*sy-sd*sx;              // [mm]
    127     const Double_t arg2 = cd*sx+sd*sy;              // [mm]
     128    const Double_t arg1 = cd*sy-sd*sx;          // [mm]
     129    const Double_t arg2 = cd*sx+sd*sy;          // [mm]
    128130
    129     fAlpha         = asin(arg1/dist)*kRad2Deg;      // [deg]
    130     fCosDeltaAlpha = arg2/dist;                     // [1]
    131     fDist          = dist;                          // [mm]
     131    fAlpha         = asin(arg1/dist)*kRad2Deg;  // [deg]
     132    fCosDeltaAlpha = arg2/dist;                 // [1]
     133    fDist          = dist;                      // [mm]
    132134
    133135    SetReadyToSave();
  • trunk/MagicSoft/Mars/mimage/MHillasSrcCalc.cc

    r2161 r2173  
    3333#include "MHillasSrcCalc.h"
    3434
    35 #include <fstream.h>
     35#include <fstream>
    3636
    3737#include "MParList.h"
     
    4444
    4545ClassImp(MHillasSrcCalc);
     46
     47using namespace std;
    4648
    4749static const TString gsDefName  = "MHillasSrcCalc";
  • trunk/MagicSoft/Mars/mimage/MImgCleanStd.cc

    r2099 r2173  
    253253
    254254#include <stdlib.h>       // atof                                         
    255 #include <fstream.h>      // ofstream, SavePrimitive
     255#include <fstream      // ofstream, SavePrimitive
    256256
    257257#include <TGFrame.h>      // TGFrame
     
    272272
    273273ClassImp(MImgCleanStd);
     274
     275using namespace std;
    274276
    275277enum {
  • trunk/MagicSoft/Mars/mimage/MNewImagePar.cc

    r2092 r2173  
    3535#include "MNewImagePar.h"
    3636
    37 #include <fstream.h>
     37#include <fstream>
    3838
    3939#include "MLog.h"
     
    4949
    5050ClassImp(MNewImagePar);
     51
     52using namespace std;
    5153
    5254// --------------------------------------------------------------------------
  • trunk/MagicSoft/Mars/mmain/MAnalysis.cc

    r2142 r2173  
    2424#include "MAnalysis.h"
    2525
    26 #include <iostream.h>
     26#include <iostream>
    2727
    2828#include <TGLabel.h>       // TGlabel
     
    3333#include "MImgCleanStd.h"  // MImgCleanStd
    3434
    35 ClassImp(MAnalysis)
     35ClassImp(MAnalysis);
     36
     37using namespace std;
    3638
    3739enum {
  • trunk/MagicSoft/Mars/mmain/MBrowser.cc

    r1668 r2173  
    2626#include "MBrowser.h"
    2727
    28 #include <iostream.h>
     28#include <iostream>
    2929#include <sys/stat.h>       // S_ISDIR
    3030
     
    4545
    4646ClassImp(MBrowser);
     47
     48using namespace std;
    4749
    4850enum {
  • trunk/MagicSoft/Mars/mmain/MMars.cc

    r1668 r2173  
    2626#include "MMars.h"
    2727
    28 #include <iostream.h>
     28#include <iostream>
    2929
    3030#include <TApplication.h>  // gROOT->GetApplication()->...
     
    4444#include "MCameraDisplay.h"
    4545
    46 ClassImp(MMars)
     46ClassImp(MMars);
     47
     48using namespace std;
    4749
    4850enum {
     
    9496        fList->Add(magic);
    9597        magic->Associate(this);
    96         TGLayoutHints *lay1 = new TGLayoutHints(kLHintsLeft,  10., 10., 20., 10.);
     98        TGLayoutHints *lay1 = new TGLayoutHints(kLHintsLeft,  10, 10, 20, 10);
    9799        fList->Add(lay1);
    98100        top->AddFrame(magic, lay1);
     
    105107        fList->Add(mars);
    106108        mars->Associate(this);
    107         TGLayoutHints *lay2 = new TGLayoutHints(kLHintsRight, 10., 10., 10., 10.);
     109        TGLayoutHints *lay2 = new TGLayoutHints(kLHintsRight, 10, 10, 10, 10);
    108110        fList->Add(lay2);
    109111        top->AddFrame(mars,  lay2);
  • trunk/MagicSoft/Mars/mmain/MMonteCarlo.cc

    r1911 r2173  
    2727
    2828#include <stdlib.h>
    29 #include <iostream.h>
     29#include <iostream>
    3030
    3131#include <TGLabel.h>        // TGLabel
     
    3737#include "MGList.h"
    3838
    39 ClassImp(MMonteCarlo)
     39ClassImp(MMonteCarlo);
     40
     41using namespace std;
    4042
    4143enum {
  • trunk/MagicSoft/Mars/mmain/MStatusDisplay.cc

    r2117 r2173  
    6161#include "MStatusDisplay.h"
    6262
    63 #include <fstream.h>              // fstream
     63#include <fstream              // fstream
    6464
    6565#include <TLine.h>                // TLine
     
    9898
    9999ClassImp(MStatusDisplay);
     100
     101using namespace std;
    100102
    101103// ------------ Workaround for a non working TGTextView::Search -------------
     
    13561358    const TString newstr("%%DocumentPaperSizes: a4\n%%Orientation: Landscape");
    13571359
     1360    // gcc 3.2:
     1361    /*
    13581362    fstream f(name, ios::in|ios::out|ios::nocreate);
    13591363
     
    13931397    delete c2;
    13941398    delete c1;
     1399    */
    13951400}
    13961401
     
    17701775    // canculate new size of frame (canvas @ 1:sqrt(2))
    17711776    if (hchanged)
    1772         w = (UInt_t)((h-ch)*sqrt(2)+.5)+cw;
     1777        w = (UInt_t)((h-ch)*sqrt(2.)+.5)+cw;
    17731778    else
    1774         h = (UInt_t)((w-cw)/sqrt(2)+.5)+ch;
     1779        h = (UInt_t)((w-cw)/sqrt(2.)+.5)+ch;
    17751780
    17761781    //cout << "Res: " << w << " " << h << " " << evt->fX << " " << evt->fY << endl;
  • trunk/MagicSoft/Mars/mmontecarlo/MMcCollectionAreaCalc.cc

    r2036 r2173  
    4949
    5050ClassImp(MMcCollectionAreaCalc);
     51
     52using namespace std;
    5153
    5254MMcCollectionAreaCalc::MMcCollectionAreaCalc(const char *input,
  • trunk/MagicSoft/Mars/mmontecarlo/MMcEnergyEst.cc

    r2119 r2173  
    6262#include "MLogManip.h"
    6363
     64ClassImp(MMcEnergyEst);
     65
     66using namespace std;
    6467
    6568//------------------------------------------------------------------------
     
    6770// fcn calculates the function to be minimized (using TMinuit::Migrad)
    6871//
    69 void fcn(Int_t &npar, Double_t *gin, Double_t &f, Double_t *par, Int_t iflag)
     72static void fcn(Int_t &npar, Double_t *gin, Double_t &f, Double_t *par, Int_t iflag)
    7073{
    7174  MEvtLoop *evtloop = (MEvtLoop*)gMinuit->GetObjectFit();
     
    8285  f = eval->GetChisq();
    8386}
    84 
    85 ClassImp(MMcEnergyEst);
    8687
    8788// --------------------------------------------------------------------------
     
    323324// Print current values of parameters
    324325//
    325 void MMcEnergyEst::Print(Option_t *o)
     326void MMcEnergyEst::Print(Option_t *o) const
    326327{
    327328  for (Int_t i = 0; i < fA.GetSize(); i++)
  • trunk/MagicSoft/Mars/mmontecarlo/MMcEnergyEst.h

    r2119 r2173  
    4747
    4848  void FindParams();
    49   void Print(Option_t *o="");
     49  void Print(Option_t *o="") const;
    5050
    5151  ClassDef(MMcEnergyEst, 1) // Class for optimization of Energy estimator
  • trunk/MagicSoft/Mars/mmontecarlo/MMcThresholdCalc.cc

    r1108 r2173  
    5252ClassImp(MMcThresholdCalc);
    5353
    54 const Float_t MMcThresholdCalc::fSqrt2 = sqrt(2);
     54using namespace std;
     55
     56const Float_t MMcThresholdCalc::fSqrt2 = sqrt(2.);
    5557
    5658// --------------------------------------------------------------------------
  • trunk/MagicSoft/Mars/mmontecarlo/MMcTimeGenerate.cc

    r1238 r2173  
    8686    const UInt_t t = fTime->GetTimeLo();
    8787
    88     fTime->SetTime(t+dt*10000, 0); // [0.1ms]
     88    fTime->SetTime((int)(t+dt*10000), 0); // [0.1ms]
    8989
    9090    return kTRUE;
  • trunk/MagicSoft/Mars/mmontecarlo/MMcTriggerRateCalc.cc

    r1893 r2173  
    2929#include "MMcTriggerRateCalc.h"
    3030
     31#include <math.h>
     32
     33#include <TCanvas.h>
     34
    3135#include "MLog.h"
    3236#include "MLogManip.h"
    3337
    3438#include "MParList.h"
    35 #include "MHMcRate.h"
    3639
    3740#include "MMcEvt.hxx"
     
    4245
    4346#include "MH.h"
    44 #include <TCanvas.h>
    45 #include <math.h>
    46 
     47#include "MHMcRate.h"
    4748
    4849ClassImp(MMcTriggerRateCalc);
     50
     51using namespace std;
    4952
    5053void MMcTriggerRateCalc::Init(int dim, float *trigbg, float simbg,
     
    364367// Draw rate as a funtion of discriminator threshold.
    365368//
    366 void MMcTriggerRateCalc::Draw()
     369void MMcTriggerRateCalc::Draw(Option_t *)
    367370{
    368371    /*
  • trunk/MagicSoft/Mars/mmontecarlo/MMcTriggerRateCalc.h

    r1792 r2173  
    6767    TH1F* GetHist(Int_t i) {return fHist[i];}
    6868
    69     void Draw();
     69    void Draw(const Option_t *o="");
    7070
    7171    ClassDef(MMcTriggerRateCalc, 0)     // Task to compute the trigger rate
  • trunk/MagicSoft/Mars/mranforest/MHRanForest.cc

    r2071 r2173  
    5050
    5151ClassImp(MHRanForest);
     52
     53using namespace std;
    5254
    5355// --------------------------------------------------------------------------
  • trunk/MagicSoft/Mars/mranforest/MHRanForestGini.cc

    r2071 r2173  
    4848
    4949ClassImp(MHRanForestGini);
     50
     51using namespace std;
    5052
    5153// --------------------------------------------------------------------------
  • trunk/MagicSoft/Mars/mranforest/MRanForest.cc

    r2114 r2173  
    5353ClassImp(MRanForest);
    5454
     55using namespace std;
     56
    5557// --------------------------------------------------------------------------
    5658//
  • trunk/MagicSoft/Mars/mranforest/MRanForestCalc.cc

    r2115 r2173  
    5050
    5151ClassImp(MRanForestCalc);
     52
     53using namespace std;
    5254
    5355static const TString gsDefName  = "MRanForestCalc";
  • trunk/MagicSoft/Mars/mranforest/MRanForestFill.cc

    r2071 r2173  
    4444
    4545ClassImp(MRanForestFill);
     46
     47using namespace std;
    4648
    4749static const TString gsDefName  = "MRanForestFill";
  • trunk/MagicSoft/Mars/mranforest/MRanForestGrow.cc

    r2071 r2173  
    4343
    4444ClassImp(MRanForestGrow);
     45
     46using namespace std;
    4547
    4648static const TString gsDefName  = "MRanForestGrow";
  • trunk/MagicSoft/Mars/mranforest/MRanTree.cc

    r2114 r2173  
    3333#include "MRanTree.h"
    3434
    35 #include <iostream.h>
     35#include <iostream>
    3636
    3737#include <TVector.h>
     
    4545
    4646ClassImp(MRanTree);
     47
     48using namespace std;
    4749
    4850// --------------------------------------------------------------------------
  • trunk/MagicSoft/Mars/mraw/MRawCrateData.cc

    r1082 r2173  
    3333#include "MRawCrateData.h"
    3434
    35 #include <iostream.h>
    36 #include <iomanip.h>
     35#include <iostream>
     36#include <iomanip>
    3737
    38 #include <fstream.h>
     38#include <fstream>
    3939
    4040#include "MLog.h"
     
    4242
    4343ClassImp(MRawCrateData);
     44
     45using namespace std;
    4446
    4547MRawCrateData::MRawCrateData() : fDAQCrateNumber(0), fFADCEvtNumber(0), fFADCClockTick(0)
     
    5456void MRawCrateData::ReadEvt(istream& fin)
    5557{
    56     fin.read((Byte_t*)&fDAQCrateNumber, 2);
    57     fin.read((Byte_t*)&fFADCEvtNumber,  4);
    58     fin.read((Byte_t*)&fFADCClockTick,  4);
     58    fin.read((char*)&fDAQCrateNumber, 2);
     59    fin.read((char*)&fFADCEvtNumber,  4);
     60    fin.read((char*)&fFADCClockTick,  4);
    5961}
    6062
  • trunk/MagicSoft/Mars/mraw/MRawCrateData.h

    r1031 r2173  
    66#endif
    77
    8 class ifstream;
     8//gcc 3.2
     9//class ifstream;
     10#include <iosfwd>
    911
    1012class MRawCrateData : public MParContainer
  • trunk/MagicSoft/Mars/mraw/MRawEvtData.cc

    r1947 r2173  
    5050#include "MRawEvtData.h"
    5151
    52 #include <fstream.h>
     52#include <fstream>
    5353
    5454#include <TH1.h>
     
    6565
    6666ClassImp(MRawEvtData);
     67
     68using namespace std;
    6769
    6870// --------------------------------------------------------------------------
     
    430432        //
    431433        fHiGainPixId->AddAt(npix, ipos);
    432         fin.read(higainsam, nhi);
     434        fin.read((char*)higainsam, nhi);
    433435        higainsam += nhi;
    434436
     
    437439        //{
    438440        fLoGainPixId->AddAt(npix, ipos);
    439         fin.read(logainsam, nlo);
     441        fin.read((char*)logainsam, nlo);
    440442        logainsam += nlo;
    441443        //}
  • trunk/MagicSoft/Mars/mraw/MRawEvtData.h

    r1045 r2173  
    66#endif
    77
    8 class ifstream;
     8// gcc 3.2
     9//class ifstream;
     10#include <iosfwd>
     11
    912class MRawRunHeader;
    1013
  • trunk/MagicSoft/Mars/mraw/MRawEvtHeader.cc

    r1542 r2173  
    9595#include "MRawEvtHeader.h"
    9696
    97 #include <iomanip.h>
    98 #include <fstream.h>
     97#include <iomanip>
     98#include <fstream>
    9999
    100100#include "MLog.h"
     
    106106
    107107ClassImp(MRawEvtHeader);
     108
     109using namespace std;
    108110
    109111// --------------------------------------------------------------------------
     
    235237int MRawEvtHeader::ReadEvt(istream &fin)
    236238{
    237     fin.read((Byte_t*)&fDAQEvtNumber, 4);
     239    fin.read((char*)&fDAQEvtNumber, 4);
    238240
    239241    UInt_t fAbsTime[2];
    240     fin.read((Byte_t*)fAbsTime,       8);
     242    fin.read((char*)fAbsTime,       8);
    241243
    242244    //
     
    247249    Byte_t dummy[4];
    248250
    249     fin.read((Byte_t*)&fNumTrigLvl1,  4);
    250     fin.read((Byte_t*)&fNumTrigLvl2,  4);
    251     fin.read((Byte_t*)fTrigPattern,   8);
    252     fin.read((Byte_t*)&fTrigType,     2);
    253     fin.read((Byte_t*)dummy,          2); // was fAllLoGainOn
    254     fin.read((Byte_t*)fPixLoGainOn->GetArray(), fPixLoGainOn->GetSize());
     251    fin.read((char*)&fNumTrigLvl1,  4);
     252    fin.read((char*)&fNumTrigLvl2,  4);
     253    fin.read((char*)fTrigPattern,   8);
     254    fin.read((char*)&fTrigType,     2);
     255    fin.read((char*)dummy,          2); // was fAllLoGainOn
     256    fin.read((char*)fPixLoGainOn->GetArray(), fPixLoGainOn->GetSize());
    255257
    256258    fNumLoGainOn = 0;
     
    260262                fNumLoGainOn++;
    261263
    262     fin.read((Byte_t*)&dummy, 4);
     264    fin.read((char*)&dummy, 4);
    263265
    264266    return !fin.eof();
  • trunk/MagicSoft/Mars/mraw/MRawEvtHeader.h

    r1542 r2173  
    66#endif
    77
    8 class ifstream;
     8// gcc 3.2
     9//class ifstream;
     10#include <iosfwd>
     11
    912class MTime;
    1013class MArrayB;
  • trunk/MagicSoft/Mars/mraw/MRawFileRead.cc

    r1082 r2173  
    4141#include "MRawFileRead.h"
    4242
    43 #include <fstream.h>
     43#include <fstream>
    4444
    4545#include "MLog.h"
     
    5656ClassImp(MRawFileRead);
    5757
     58using namespace std;
    5859
    5960/*  ----------- please don't delete and don't care about (Thomas) ------------
  • trunk/MagicSoft/Mars/mraw/MRawFileRead.h

    r1031 r2173  
    66#endif
    77
    8 class ifstream;
     8// gcc 3.2
     9//class ifstream;
     10#include <iosfwd>
    911
    1012class MTime;
  • trunk/MagicSoft/Mars/mraw/MRawFileWrite.cc

    r1108 r2173  
    5454
    5555ClassImp(MRawFileWrite);
     56
     57using namespace std;
    5658
    5759// --------------------------------------------------------------------------
  • trunk/MagicSoft/Mars/mraw/MRawRunHeader.cc

    r1082 r2173  
    3333#include "MRawRunHeader.h"
    3434
    35 #include <fstream.h>
    36 #include <iomanip.h>
     35#include <fstream>
     36#include <iomanip>
    3737
    3838#include "MLog.h"
     
    4242
    4343ClassImp(MRawRunHeader);
     44
     45using namespace std;
    4446
    4547// --------------------------------------------------------------------------
     
    7476    // read one RUN HEADER from the input stream
    7577    //
    76     fin.read((Byte_t*)&fMagicNumber,       2);
     78    fin.read((char*)&fMagicNumber,       2);
    7779
    7880    //
     
    8789    Byte_t dummy[16];
    8890
    89     fin.read((Byte_t*)&fFormatVersion,    2);
    90     fin.read((Byte_t*)&fSoftVersion,      2);
    91     fin.read((Byte_t*)&fRunType,          2);
    92     fin.read((Byte_t*)&fRunNumber,        4);
    93     fin.read((Byte_t*)&fProjectName,     22);
    94     fin.read((Byte_t*)&fSourceName,      12);
    95     fin.read((Byte_t*)dummy,              4); // was RA  (moved to tracking system)
    96     fin.read((Byte_t*)dummy,              4); // was DEC (moved to tracking system)
    97     fin.read((Byte_t*)&fSourceEpochChar,  2);
    98     fin.read((Byte_t*)&fSourceEpochDate,  2);
    99     fin.read((Byte_t*)&fMJD,              4);
    100     fin.read((Byte_t*)&fDateYear,         2);
    101     fin.read((Byte_t*)&fDateMonth,        2);
    102     fin.read((Byte_t*)&fDateDay,          2);
    103     fin.read((Byte_t*)&fNumCrates,        2);
    104     fin.read((Byte_t*)&fNumPixInCrate,    2);
    105     fin.read((Byte_t*)&fNumSamplesLoGain, 2);
    106     fin.read((Byte_t*)&fNumSamplesHiGain, 2);
    107     fin.read((Byte_t*)&fNumEvents,        4);
     91    fin.read((char*)&fFormatVersion,    2);
     92    fin.read((char*)&fSoftVersion,      2);
     93    fin.read((char*)&fRunType,          2);
     94    fin.read((char*)&fRunNumber,        4);
     95    fin.read((char*)&fProjectName,     22);
     96    fin.read((char*)&fSourceName,      12);
     97    fin.read((char*)dummy,              4); // was RA  (moved to tracking system)
     98    fin.read((char*)dummy,              4); // was DEC (moved to tracking system)
     99    fin.read((char*)&fSourceEpochChar,  2);
     100    fin.read((char*)&fSourceEpochDate,  2);
     101    fin.read((char*)&fMJD,              4);
     102    fin.read((char*)&fDateYear,         2);
     103    fin.read((char*)&fDateMonth,        2);
     104    fin.read((char*)&fDateDay,          2);
     105    fin.read((char*)&fNumCrates,        2);
     106    fin.read((char*)&fNumPixInCrate,    2);
     107    fin.read((char*)&fNumSamplesLoGain, 2);
     108    fin.read((char*)&fNumSamplesHiGain, 2);
     109    fin.read((char*)&fNumEvents,        4);
    108110
    109111
     
    114116    fPixAssignment->Set(nPixel);
    115117
    116     fin.read((Byte_t*)fPixAssignment->GetArray(), nPixel*2);
    117     fin.read((Byte_t*)&dummy, 16);
     118    fin.read((char*)fPixAssignment->GetArray(), nPixel*2);
     119    fin.read((char*)&dummy, 16);
    118120}
    119121
  • trunk/MagicSoft/Mars/mraw/MRawRunHeader.h

    r1059 r2173  
    1111#endif
    1212
     13// gcc 3.2
     14//class ifstream;
     15#include <iosfwd>
     16
    1317class TBuffer;
    14 class ifstream;
    1518class MArrayS;
    1619
  • trunk/MagicSoft/Mars/mreflector/MRflEvtData.cc

    r2135 r2173  
    4444ClassImp(MRflEvtData);
    4545
     46using namespace std;
     47
    4648// --------------------------------------------------------------------------
    4749//
     
    5961// Dump informations off all photons
    6062//
    61 void MRflEvtData::Print(Option_t *o="") const
     63void MRflEvtData::Print(Option_t *o) const
    6264{
    6365    *fLog << all << underline << GetDescriptor() << ":" << endl;
  • trunk/MagicSoft/Mars/mreflector/MRflSinglePhoton.cc

    r2135 r2173  
    3737ClassImp(MRflSinglePhoton);
    3838
     39using namespace std;
     40
    3941// --------------------------------------------------------------------------
    4042//
    4143// Dump all photon information
    4244//
    43 void MRflSinglePhoton::Print(Option_t *o="") const
     45void MRflSinglePhoton::Print(Option_t *o) const
    4446{
    4547    *fLog << all << "x=" << fX << " y=" << fY << endl;
  • trunk/MagicSoft/Mars/mtools/MChisqEval.cc

    r1840 r2173  
    2929#include "MChisqEval.h"
    3030
    31 #include <fstream.h>
     31#include <fstream>
    3232
    3333#include "MDataChain.h"
    3434
    3535ClassImp(MChisqEval);
     36
     37using namespace std;
    3638
    3739void MChisqEval::StreamPrimitive(ofstream &out) const
  • trunk/MagicSoft/Mars/mtools/MagicCivilization.cc

    r1439 r2173  
    5757#include "MagicCivilization.h"
    5858
    59 #include <iostream.h>
     59#include <iostream>
    6060
    6161#include <KeySymbols.h>
     
    7272
    7373ClassImp(MagicCivilization);
     74
     75using namespace std;
    7476
    7577void MagicCivilization::Free()
  • trunk/MagicSoft/Mars/mtools/MagicDomino.cc

    r1435 r2173  
    5959#include "MagicDomino.h"
    6060
    61 #include <iostream.h>
     61#include <iostream>
    6262
    6363#include <KeySymbols.h>
     
    7474
    7575ClassImp(MagicDomino);
     76
     77using namespace std;
    7678
    7779// ------------------------------------------------------------------------
  • trunk/MagicSoft/Mars/mtools/MagicReversi.cc

    r1907 r2173  
    5151#include "MagicReversi.h"
    5252
    53 #include <iostream.h>
     53#include <iostream>
    5454
    5555#include <KeySymbols.h>
     
    6969
    7070ClassImp(MagicReversi);
     71
     72using namespace std;
     73
    7174/*
    7275const Int_t MagicReversi::fColorBombs[7] = {
  • trunk/MagicSoft/Mars/mtools/MagicShow.cc

    r1435 r2173  
    5757#include "MagicShow.h"
    5858
    59 #include <iostream.h>
     59#include <iostream>
    6060
    6161#include <KeySymbols.h>
     
    7171
    7272ClassImp(MagicShow);
     73
     74using namespace std;
    7375
    7476// ------------------------------------------------------------------------
  • trunk/MagicSoft/Mars/mtools/MagicSnake.cc

    r1533 r2173  
    5353#include "MagicSnake.h"
    5454
    55 #include <iostream.h>
     55#include <iostream>
    5656
    5757#include <KeySymbols.h>
     
    7070
    7171ClassImp(MagicSnake);
     72
     73using namespace std;
    7274
    7375void MagicSnake::Free()
  • trunk/MagicSoft/Mars/mtools/MineSweeper.cc

    r1435 r2173  
    4848#include "MineSweeper.h"
    4949
    50 #include <iostream.h>
     50#include <iostream>
    5151
    5252#include <TText.h>
     
    6464
    6565ClassImp(MineSweeper);
     66
     67using namespace std;
    6668
    6769const Int_t MineSweeper::fColorBombs[7] = {
  • trunk/MagicSoft/Mars/readraw.cc

    r1914 r2173  
    1919#include "MMcEvt.hxx"
    2020#include "MMcTrig.hxx"
     21
     22using namespace std;
    2123
    2224/////////////////////////////////////////////////////////////////////////////
  • trunk/MagicSoft/include-Classes/MMcFormat/MMcConfigRunHeader.cc

    r1632 r2173  
    3737#include "MMcConfigRunHeader.h"
    3838
    39 #include <fstream.h>
    40 #include <iomanip.h>
     39#include <fstream>
     40#include <iomanip>
    4141
    4242#include <TArrayF.h>
     
    4646
    4747ClassImp(MMcConfigRunHeader);
     48
     49using namespace std;
    4850
    4951// --------------------------------------------------------------------------
  • trunk/MagicSoft/include-Classes/MMcFormat/MMcCorsikaRunHeader.cc

    r1717 r2173  
    3636
    3737ClassImp(MMcCorsikaRunHeader);
     38
     39using namespace std;
    3840
    3941// --------------------------------------------------------------------------
  • trunk/MagicSoft/include-Classes/MMcFormat/MMcEvt.cxx

    r1983 r2173  
    2323ClassImp(MMcEvt);
    2424
     25using namespace std;
    2526
    2627
  • trunk/MagicSoft/include-Classes/MMcFormat/MMcFadcHeader.cxx

    r1032 r2173  
    11#include "MMcFadcHeader.hxx"
    22
    3 #include <iostream.h>
     3#include <iostream>
    44
    55//==========
     
    1515ClassImp(MMcFadcHeader);
    1616
     17using namespace std;
    1718
    1819
  • trunk/MagicSoft/include-Classes/MMcFormat/MMcRunHeader.cxx

    r1983 r2173  
    6969#include "MMcRunHeader.hxx"
    7070
    71 #include <fstream.h>
    72 #include <iomanip.h>
     71#include <fstream>
     72#include <iomanip>
    7373
    7474#include "MLog.h"
    7575
    7676ClassImp(MMcRunHeader);
     77
     78using namespace std;
    7779
    7880// --------------------------------------------------------------------------
  • trunk/MagicSoft/include-Classes/MMcFormat/MMcTrig.cxx

    r1313 r2173  
    11#include "MMcTrig.hxx"
    22
    3 #include <iostream.h>
     3#include <iostream>
    44
    55
     
    2424ClassImp(MMcTrig);
    2525
     26using namespace std;
    2627
    2728
     
    123124  //
    124125
    125   Byte_t ret=0;
    126   Byte_t reminder;
    127   Int_t body;
     126  const Int_t  body=npix/8;
     127  const Byte_t reminder= 1>>(npix%8);
    128128
    129   body=npix/8;
    130   reminder=(Byte_t)(pow(2,npix%8));
    131 
    132   ret=reminder&fPixelsFirst[body][nfirstlevel];
    133   return(ret);
    134 
     129  return reminder&fPixelsFirst[body][nfirstlevel];
    135130}
  • trunk/MagicSoft/include-Classes/MMcFormat/MMcTrigHeader.cxx

    r1314 r2173  
    11#include "MMcTrigHeader.hxx"
    22
    3 #include <iostream.h>
     3#include <iostream>
    44
    55
     
    2828ClassImp(MMcTrigHeader);
    2929
     30using namespace std;
    3031
    3132
Note: See TracChangeset for help on using the changeset viewer.