Changeset 8315 for trunk


Ignore:
Timestamp:
02/13/07 11:15:29 (18 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft
Files:
3 added
11 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/callisto_Dec04Jan05.rc

    r8304 r8315  
    218218# Use this if you want to change the higain-vs. logain intercalibration
    219219# -------------------------------------------------------------------------
    220 MJCalibration.HiLoCalibFile:    mjobs/hilocalib_sp1.root
     220MJCalibration.HiLoCalibFile:    resources/hilocalib_sp1.rc
    221221#MJCalibration.HiLoCalibration:  yes
    222222
     
    334334# -------------------------------------------------------------------------
    335335#MJPedestalY2.PulsePosCheck: yes
    336 #MJPedestalY2.ExtractWinLeft:  0.0
     336#MJPedestalY2.ExtractWinLeft:  0.0 
    337337#MJPedestalY2.ExtractWinRight: 0.0
    338338
  • trunk/MagicSoft/Mars/manalysis/MParameterCalc.cc

    r8073 r8315  
    200200    fData = f;
    201201
    202     if (!fData->IsValid())
     202    if (!f->HasValidRule())
    203203    {
    204204        *fLog << err << "MParameterCalc::ReadEnv - ERROR: Inavlid rule from resource file." << endl;
  • trunk/MagicSoft/Mars/mbase/MLog.h

    r8103 r8315  
    11/* ======================================================================== *\
    2 !  $Name: not supported by cvs2svn $:$Id: MLog.h,v 1.36 2006-10-17 14:11:36 tbretz Exp $
     2!  $Name: not supported by cvs2svn $:$Id: MLog.h,v 1.37 2007-02-13 11:06:53 tbretz Exp $
    33\* ======================================================================== */
    44#ifndef MARS_MLog
     
    220220            const Int_t l = (78-str.Length())/2-3;
    221221            str.Prepend("={ ");
    222             str.Prepend('-', l);
     222            str.Prepend('-', l<1?1:l);
    223223            str.Append(" }=");
    224             str.Append('-', l);
     224            str.Append('-', l<1?1:l);
    225225        }
    226226        if (str.Length()<78)
  • trunk/MagicSoft/Mars/mdata/MDataPhrase.h

    r8077 r8315  
    4545    // MData
    4646    Bool_t   IsValid() const;
     47    Bool_t   HasValidRule() const { return fFormula ? kTRUE : kFALSE; }
    4748    Double_t GetValue() const;
    4849    TString  GetRule() const;
  • trunk/MagicSoft/Mars/mfileio/MReadRflFile.cc

    r7430 r8315  
    3333
    3434#include <errno.h>
    35 #include <fstream>
    3635
    3736#include <TSystem.h>
     
    3938#include "structures_rfl.h"
    4039
     40#include "MLog.h"
     41#include "MLogManip.h"
     42
     43#include "MZlib.h"
     44
    4145#include "MParList.h"
     46
    4247#include "MRflEvtData.h"
    4348#include "MRflEvtHeader.h"
     
    4550#include "MRflSinglePhoton.h"
    4651
    47 #include "MLog.h"
    48 #include "MLogManip.h"
    4952
    5053ClassImp(MReadRflFile);
     
    185188                *fLog << inf << "FIXME: Call ReInit" << endl;
    186189
     190                // FIXME: fRunHeader->Read(fIn);
     191                //        fRunHeader->Print();
     192
    187193                fRunHeader->SetRunNumber((int)rrunh.RunNumber);
    188194                *fLog << underline << "RunHeader:" << endl;
    189                 *fLog << " Run Number:   " << rrunh.RunNumber << endl;
    190                 *fLog << " Date:         " << rrunh.date << endl;
    191                 *fLog << " Corsika Ver.: " << rrunh.Corsika_version << endl;
    192 
     195                *fLog << " Run Number:    " << rrunh.RunNumber << endl;
     196                *fLog << " Date:          " << rrunh.date << endl;
     197                *fLog << " Corsika Ver.:  " << rrunh.Corsika_version << endl;
     198                *fLog << " Energy Range:  " << rrunh.ELowLim << "GeV to " << rrunh.EUppLim << "GeV" << endl;
     199                *fLog << " Energy Slope:  " << rrunh.SlopeSpec << endl;
     200                *fLog << " Wobble Mode:   " << rrunh.wobble_mode << endl;
     201                *fLog << " Atm. Model:    " << rrunh.atmospheric_model << endl;
     202                // *fLog << " Theta Range:   " << rrunh.ThetaMin << "deg to " << rrunh.ThetaMax << "deg" << endl;
     203                // *fLog << " Phi Range:     " << rrunh.PhiMin << "deg to " << rrunh.PhiMax << "deg" << endl;
     204                // *fLog << " View Cone Rad: " << rrunh.ViewconeRadius << "deg" << endl;
    193205                break;
    194206            }
     
    196208            *fLog << err << "Error! found end of file... But no EOF flag. Exiting." << endl;
    197209            return kError;
    198         }
     210        }/*
     211        else
     212        {
     213            *fLog << err << "ERROR - Reflector versions <= 0.5 are not supported!" << endl;
     214            return kError;
     215        }*/
    199216        return kUndefined;
    200217
     
    299316    //
    300317    fFileName = file->GetName();
    301     const TString expname = fFileName;
     318    TString expname = fFileName;
    302319    gSystem->ExpandPathName(expname);
    303320
     
    309326    *fLog << inf << "Open file: '" << fFileName << "'" << endl;
    310327
    311     fIn = new ifstream(expname);
     328    fIn = new MZlib(expname);
    312329    if (!*fIn)
    313330    {
  • trunk/MagicSoft/Mars/mfileio/MReadRflFile.h

    r7430 r8315  
    1010#endif
    1111
     12class MZlib;
    1213class TList;
    1314class MRflEvtData;
     
    2829    };
    2930
    30     ifstream *fIn;              // the inputfile
    31     TList    *fFileNames;       // Array which stores the \0-terminated filenames
     31    MZlib *fIn;              // the inputfile
     32    TList *fFileNames;       // Array which stores the \0-terminated filenames
    3233
    3334    MRflEvtData   *fEvtData;    //!
  • trunk/MagicSoft/Mars/mjobs/MJPedestal.cc

    r8304 r8315  
    10501050    plist.AddToList(&fBadPixels);
    10511051   
    1052     //
    1053     // Read bad pixels from outside
    1054     //
    1055     if (!fBadPixelsFile.IsNull())
    1056     {
    1057         *fLog << inf << "Excluding: " << fBadPixelsFile << endl;
    1058         ifstream fin(fBadPixelsFile);
    1059         fBadPixels.AsciiRead(fin);
    1060     }
    1061 
    10621052    MGeomApply geomapl;
    10631053    MBadPixelsMerge merge(&fBadPixels);
     
    10941084        fExtractor->Print();
    10951085        *fLog << endl;
     1086    }
     1087
     1088    //
     1089    // Read bad pixels from outside
     1090    //
     1091    if (!fBadPixelsFile.IsNull())
     1092    {
     1093        *fLog << inf << "Excluding: " << fBadPixelsFile << endl;
     1094        ifstream fin(fBadPixelsFile);
     1095        fBadPixels.AsciiRead(fin);
    10961096    }
    10971097
  • trunk/MagicSoft/Mars/mpointing/MPointingDevCalc.h

    r7744 r8315  
    5252
    5353public:
    54     MPointingDevCalc() : fReport(0), fDeviation(0), fSkip(6), fNumMinStars(8),
     54    MPointingDevCalc() : fReport(0), fDeviation(0), fSkip(7), fNumMinStars(8),
    5555        fNsbLevel(3), fNsbMin(30), fNsbMax(60), fMaxAbsDev(15), fMaxAge(1), fDx(-7), fDy(16)
    5656    {
  • trunk/MagicSoft/Mars/mreflector/Makefile

    r3927 r8315  
    1919#  connect the include files defined in the config.mk file
    2020#
    21 INCLUDES = -I. -I../mbase -I../mgui -I../mgeom
     21INCLUDES = -I. -I../mbase -I../mgui -I../mgeom -I../mhbase
    2222
    2323SRCFILES = MRflEvtData.cc \
    2424           MRflEvtHeader.cc \
    2525           MRflRunHeader.cc \
    26            MRflSinglePhoton.cc
     26           MRflSinglePhoton.cc \
     27           MHReflector.cc
    2728
    2829############################################################
  • trunk/MagicSoft/Mars/mreflector/ReflectorLinkDef.h

    r2136 r8315  
    1010#pragma link C++ class MRflSinglePhoton+;
    1111
     12#pragma link C++ class MHReflector+;
     13
    1214#endif
  • trunk/MagicSoft/include-Classes/MMcFormat/MMcEvtBasic.h

    r7880 r8315  
    9191  }
    9292
     93  static TString GetEnergyStr(Float_t e)
     94  {
     95      if (e>=1000)
     96          return Form("%.1fTeV", e/1000);
     97
     98      if (e>=10)
     99          return Form("%dGeV", (Int_t)(e+.5));
     100
     101      if (e>=1)
     102          return Form("%.1fGeV", e);
     103
     104      return Form("%dMeV", (Int_t)(e*1000+.5));
     105  }
     106
    93107  TString GetEnergyStr() const
    94108  {
    95       if (fEnergy>1000)
    96           return Form("%.1fTeV", fEnergy/1000);
    97 
    98       if (fEnergy>10)
    99           return Form("%dGeV", (Int_t)(fEnergy+.5));
    100 
    101       if (fEnergy>1)
    102           return Form("%.1fGeV", fEnergy);
    103 
    104       return Form("%dMeV", (Int_t)(fEnergy*1000+.5));
     109      return GetEnergyStr(fEnergy);
    105110  }
    106 
    107111
    108112  // Setter
Note: See TracChangeset for help on using the changeset viewer.