Changeset 5832 for trunk


Ignore:
Timestamp:
01/14/05 10:23:13 (20 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
21 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/Changelog

    r5831 r5832  
    2222
    2323
     24 2005/01/14 Thomas Bretz
     25 
     26   * callisto.cc:
     27     - fixed a typo in output
     28
     29   * manalysis/MGeomApply.cc:
     30     - removed some old code already in comments
     31
     32   * manalysis/MMultiDimDistCalc.cc, mhbase/MHMatrix.[h,cc],
     33     mranforest/MRanForestCalc.cc, mtools/MHSimulatedAnnealing.[h,cc],
     34     mtools/MSimulatedAnnealing.h:
     35     - added include of TVector because in newer root version it is
     36       not included from TMatrix anymore
     37
     38   * mbase/BaseLinkDef.h, mbase/MMath.[h,cc]:
     39     - to stick to the convention of TMath in newer root versions MMath
     40       changed from a class to a namespace
     41
     42   * mbase/MEvtLoop.[h,cc]:
     43     - to support newer root version added a second Write-function
     44       with a const qualifier.
     45
     46   * mdata/MDataChain.cc:
     47     - changed access to TMath for newer root versions
     48
     49   * mfileio/MChain.[h,cc]:
     50     - implemented a workaround for teh changed LoadTree definition
     51       in newer root-versions
     52
     53   * mfileio/MReadTree.cc:
     54     - fixed a bug in CheckBranchSize caused some warning to be
     55       displayed
     56
     57   * mhflux/MHAlpha.cc:
     58     - removed check for fResult in PostProcess (it is always there)
     59
     60
     61
    2462 2005/01/14 Abelardo Moralejo
    2563
     
    2866
    2967
     68
    3069 2005/01/14 Daniela Dorner
    3170
    3271   * macros/sql/filldotrun.C
    3372     - added new arehucas-verions and changed code accordingly
     73
    3474
    3575
  • trunk/MagicSoft/Mars/callisto.cc

    r5803 r5832  
    397397        if (!job1.ProcessFile())
    398398        {
    399             gLog << err << "Calculation of fundamentan pedestal failed." << endl << endl;
     399            gLog << err << "Calculation of fundamental pedestal failed." << endl << endl;
    400400            return -1;
    401401        }
  • trunk/MagicSoft/Mars/manalysis/MGeomApply.cc

    r4577 r5832  
    139139            cam->Init(*geom);
    140140    }
    141 /*
    142     MPedestalCam *ped = (MPedestalCam*)pList->FindObject(AddSerialNumber("MPedestalCam"));
    143     if (ped)
    144         ped->Init(*geom);
    145 
    146     MCalibrationCam *cal = (MCalibrationCam*)pList->FindObject(AddSerialNumber("MCalibrationChargeCam"));
    147     if (cal)
    148         cal->Init(*geom);
    149 
    150     MCalibrationCam *cat = (MCalibrationCam*)pList->FindObject(AddSerialNumber("MCalibrationRelTimeCam"));
    151     if (cat)
    152         cat->Init(*geom);
    153 
    154     MCalibrationCam *qe = (MCalibrationCam*)pList->FindObject(AddSerialNumber("MCalibrationQECam"));
    155     if (qe)
    156         qe->Init(*geom);
    157 
    158     MCalibrationCam *pcam = (MCalibrationCam*)pList->FindObject(AddSerialNumber("MCalibrationPedCam"));
    159     if (pcam)
    160         pcam->Init(*geom);
    161 
    162     MPedPhotCam *pedphot = (MPedPhotCam*)pList->FindObject(AddSerialNumber("MPedPhotCam"));
    163     if (pedphot)
    164         pedphot->Init(*geom);
    165 
    166     MExtractedSignalCam *ext = (MExtractedSignalCam*)pList->FindObject(AddSerialNumber("MExtractedSignalCam"));
    167     if (ext)
    168         ext->Init(*cam);
    169 
    170     MArrivalTimeCam *tme = (MArrivalTimeCam*)pList->FindObject(AddSerialNumber("MArrivalTimeCam"));
    171     if (tme)
    172       tme->InitSize(cam->GetNumPixels());
    173 
    174     MArrivalTime    *atm = (MArrivalTime*)pList->FindObject(AddSerialNumber("MArrivalTime"));
    175     if (atm)
    176       atm->InitSize(cam->GetNumPixels());
    177 
    178     MBadPixelsCam *bad = (MBadPixelsCam*)pList->FindObject(AddSerialNumber("MBadPixelsCam"));
    179     if (bad)
    180         bad->InitSize(cam->GetNumPixels());
    181     */
    182141
    183142    return kTRUE;
  • trunk/MagicSoft/Mars/manalysis/MMultiDimDistCalc.cc

    r2206 r5832  
    4747#include <fstream>
    4848
     49#include <TVector.h>
     50
    4951#include "MHMatrix.h" // must be before MLogManip.h
    5052
  • trunk/MagicSoft/Mars/mbase/BaseLinkDef.h

    r4964 r5832  
    2020
    2121// Basic Tools
    22 #pragma link C++ class MMath+;
     22#pragma link C++ namespace MMath;
    2323#pragma link C++ class MString+;
    2424#pragma link C++ class MIter+;
  • trunk/MagicSoft/Mars/mbase/MEvtLoop.cc

    r5807 r5832  
    883883//        file.Close();
    884884//
    885 Int_t MEvtLoop::Write(const char *name, Int_t option, Int_t bufsize)
     885Int_t MEvtLoop::Write(const char *name, Int_t option, Int_t bufsize) const
    886886{
    887887    if (!gFile)
  • trunk/MagicSoft/Mars/mbase/MEvtLoop.h

    r5809 r5832  
    7474
    7575    Int_t Read(const char *name="Evtloop");
    76     Int_t Write(const char *name="Evtloop", Int_t option=0, Int_t bufsize=0);
     76    Int_t Write(const char *name="Evtloop", Int_t option=0, Int_t bufsize=0) const;
     77    Int_t Write(const char *name="Evtloop", Int_t option=0, Int_t bufsize=0)
     78    {
     79        return const_cast<MEvtLoop*>(this)->Write(name, option, bufsize);
     80    }
    7781
    7882    void Print(Option_t *opt="") const;
  • trunk/MagicSoft/Mars/mbase/MMath.cc

    r4982 r5832  
    3030#include "MMath.h"
    3131
    32 ClassImp(MMath);
    33 
    34 using namespace std;
     32using namespace TMath;
    3533
    3634// --------------------------------------------------------------------------
  • trunk/MagicSoft/Mars/mbase/MMath.h

    r4966 r5832  
    99#endif
    1010
    11 class MMath : public TMath
     11namespace MMath
    1212{
    13 public:
    14     static Double_t GaussProb(Double_t x, Double_t sigma, Double_t mean=0);
     13    Double_t GaussProb(Double_t x, Double_t sigma, Double_t mean=0);
    1514
    16     static Double_t Significance(Double_t s, Double_t b);
    17     static Double_t SignificanceSym(Double_t s, Double_t b);
    18     static Double_t SignificanceLiMa(Double_t s, Double_t b, Double_t alpha=1);
    19     static Double_t SignificanceLiMaSigned(Double_t s, Double_t b, Double_t alpha=1);
     15    Double_t Significance(Double_t s, Double_t b);
     16    Double_t SignificanceSym(Double_t s, Double_t b);
     17    Double_t SignificanceLiMa(Double_t s, Double_t b, Double_t alpha=1);
     18    Double_t SignificanceLiMaSigned(Double_t s, Double_t b, Double_t alpha=1);
    2019
    21     static TVector3 GetParab(const TVector3 &x, const TVector3 &y);
    22     static Double_t InterpolParabLin(const TVector3 &vx, const TVector3 &vy, Double_t x);
    23     static Double_t InterpolParabLog(const TVector3 &vx, const TVector3 &vy, Double_t x);
    24     static Double_t InterpolParabCos(const TVector3 &vx, const TVector3 &vy, Double_t x);
    25 
    26     ClassDef(MMath, 0)
    27 };
     20    TVector3 GetParab(const TVector3 &x, const TVector3 &y);
     21    Double_t InterpolParabLin(const TVector3 &vx, const TVector3 &vy, Double_t x);
     22    Double_t InterpolParabLog(const TVector3 &vx, const TVector3 &vy, Double_t x);
     23    Double_t InterpolParabCos(const TVector3 &vx, const TVector3 &vy, Double_t x);
     24}
    2825
    2926#endif
  • trunk/MagicSoft/Mars/mdata/MDataChain.cc

    r5692 r5832  
    347347
    348348    const TString name = txt(1, txt.Length());
     349#if ROOT_VERSION_CODE < ROOT_VERSION(4,02,00)
    349350    TMethodCall call(TMath::Class(), name, "");
     351#else
     352    static TClass *const tmath = TClass::GetClass("TMath");
     353    TMethodCall call(tmath, name, "");
     354#endif
     355
    350356    switch (call.ReturnType())
    351357    {
  • trunk/MagicSoft/Mars/mfileio/MChain.cc

    r4756 r5832  
    3636using namespace std;
    3737
    38 Int_t MChain::LoadTree(Int_t entry)
     38//#if ROOT_VERSION_CODE < ROOT_VERSION(4,02,00)
     39//Int_t MChain::LoadTree(Int_t entry)
     40//#else
     41Long64_t MChain::LoadTree(Long64_t entry)
     42//#endif
    3943{
    4044    //
     
    5054    SetNotify(this);
    5155
    52     Int_t rc = TChain::LoadTree(entry);
     56//#if ROOT_VERSION_CODE < ROOT_VERSION(4,02,00)
     57//    Int_t
     58//#else
     59    Long64_t
     60//#endif
     61        rc = TChain::LoadTree(entry);
    5362
    5463    if (rc >= 0 && fNotified && notify)
  • trunk/MagicSoft/Mars/mfileio/MChain.h

    r2173 r5832  
    2020    virtual void   SetNotify(TObject *obj) { fNotify = obj; fNotified = kFALSE; }
    2121
    22     Int_t LoadTree(Int_t entry);
     22//#if ROOT_VERSION_CODE < ROOT_VERSION(4,02,00)
     23    Int_t LoadTree(Int_t entry) { return (Int_t)LoadTree((Long64_t)entry); }
     24//#else
     25    Long64_t LoadTree(Long64_t entry);
     26//#endif
    2327
    2428    ClassDef(MChain, 1) // Class derived from TChain to give access to Notify-return value
  • trunk/MagicSoft/Mars/mfileio/MReadTree.cc

    r5715 r5832  
    217217Bool_t MReadTree::CheckBranchSize()
    218218{
    219     //if (!fChain) // >FIXME: fTree!=0
    220     //    return kTRUE;
    221 
    222     TArrayI entries(fChain ? fChain->GetStatus()->GetSize() : fTree->GetListOfBranches()->GetSize());
     219    TArrayI entries(fTree->GetListOfBranches()->GetSize());
    223220    Int_t num=0;
    224221
    225     // Loop over all branches which have a corresponding container
    226     /*
    227     if (fChain)
    228     {
    229         TIter Next(fChain->GetStatus());
    230 
    231         TChainElement *element = NULL;
    232         while ((element=(TChainElement*)Next()))
    233         {
    234             // Get branch name and find pointer to corresponding branch
    235             const TString name = element->GetName();
    236             const TBranch *b = fChain->FindBranch(name);
    237 
    238             // Skip element without corresponding branches (like "*")
    239             if (!b)
    240                 continue;
    241 
    242             entries[num++] = (Int_t)b->GetEntries();
    243         }
    244     }
    245     else */
    246     {
    247         TIter Next(fTree->GetListOfBranches());
    248 
    249         TBranch *element = NULL;
    250         while ((element=(TBranch*)Next()))
    251             entries[num++] = (Int_t)element->GetEntries();
    252     }
     222    TIter Next(fTree->GetListOfBranches());
     223
     224    TBranch *element = NULL;
     225    while ((element=(TBranch*)Next()))
     226        entries[num++] = (Int_t)element->GetEntries();
    253227
    254228    // Check the number of entries of the branches pair-wise
  • trunk/MagicSoft/Mars/mhbase/MHMatrix.cc

    r5692 r5832  
    5353#include <TArrayD.h>
    5454#include <TArrayI.h>
     55#include <TVector.h>
    5556
    5657#include <TH1.h>
  • trunk/MagicSoft/Mars/mhbase/MHMatrix.h

    r5692 r5832  
    1515class TArrayI;
    1616class TArrayF;
     17class TVector;
     18class TH1F;
    1719
    18 class TH1F;
    1920class MTask;
    2021class MParList;
  • trunk/MagicSoft/Mars/mhflux/MHAlpha.cc

    r5807 r5832  
    823823    fFit.Print("result");
    824824
    825     if (fResult)
    826         fResult->SetVal(-fFit.GetSignificance());
     825    fResult->SetVal(-fFit.GetSignificance());
    827826
    828827    if (!fSkipHistEnergy)
  • trunk/MagicSoft/Mars/mpedestal/MExtractPedestal.cc

    r5828 r5832  
    664664        *fLog << (fRandomCalculation?"":"non-") << "random)" << endl;
    665665    }
    666 
    667 }
     666}
  • trunk/MagicSoft/Mars/mpedestal/MPedCalcPedRun.cc

    r5829 r5832  
    437437      : fExtractWinLast;
    438438
    439     *fLog << "ExtractWindow from slice " << fExtractWinFirst << " to " << last << " incl." << endl;
    440 
     439    *fLog << "ExtractWindow from slice      " << fExtractWinFirst << " to " << last << " incl." << endl;
    441440    *fLog << "Num overlap lo-gain slices:   " << fOverlap << endl;
    442441    *fLog << "First pedrun out of sequence: " << (fIsFirstPedRun?"yes":"no") << endl;
  • trunk/MagicSoft/Mars/mranforest/MRanForestCalc.cc

    r5690 r5832  
    3636#include "MRanForestCalc.h"
    3737
     38#include <TVector.h>
     39
    3840#include "MHMatrix.h" // must be before MLogManip.h
    3941#include "MDataArray.h"
  • trunk/MagicSoft/Mars/mtools/MHSimulatedAnnealing.cc

    r2817 r5832  
    3333#include "MHSimulatedAnnealing.h"
    3434
     35#include <TVector.h>
    3536#include <TMatrix.h>
    3637#include <TObjArray.h>
  • trunk/MagicSoft/Mars/mtools/MSimulatedAnnealing.h

    r2817 r5832  
    88#ifndef ROOT_TMatrix
    99#include <TMatrix.h>
     10#endif
     11
     12#ifndef ROOT_TVector
     13#include <TVector.h>
    1014#endif
    1115
Note: See TracChangeset for help on using the changeset viewer.