Changeset 887 for trunk/MagicSoft


Ignore:
Timestamp:
07/19/01 16:46:47 (23 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
4 added
13 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/Changelog

    r882 r887  
    11                                                                  -*-*- END -*-*-
     2 2001/07/19: Thomas Bretz
     3 
     4   * mbase/MEvtLoop.cc:
     5     - added comments
     6     
     7   * mbase/MTaskList.cc:
     8     - changed the wrong 'break' for kCONTINUE into 'return kTRUE'
     9     
     10   * mhist/HistLinkDef.h:
     11     - added MH
     12     - added MFillH
     13     
     14   * mhist/MFillHFadc.cc:
     15     - moved source for filling to corresponding histogram class
     16     
     17   * mhist/MFillHHillas.cc:
     18     - included MHillas.h
     19     
     20   * mhist/MHFadcCam.[cc, h]:
     21     - added Fill
     22     - made FillHi, FillLo private
     23     
     24   * mhist/MHHillas.[cc, h], mhist/MHStarMap.[h,cc]:
     25     - changed Fill function to new style
     26     - derived class from MH
     27
     28   * mhist/Makefile:
     29     - added MH.cc
     30     - added MFillH.cc
     31
     32
     33
    234 2001/07/18: Oscar Blanch
    3 
     35 
    436   * macros/getRate.C:
    537     - Macro to compute the trigger rate from a MonteCarlo file
     
    1143   * mmontecarlo/MMcTriggerRateCalc.[h,cc]:
    1244     - Task to compute trigger rate
     45
     46
    1347
    1448 2001/07/13: Thomas Bretz
  • trunk/MagicSoft/Mars/mbase/MEvtLoop.cc

    r867 r887  
    6161ClassImp(MEvtLoop);
    6262
     63
     64//!
     65//! Maybe we can add a static parameter list to MEvtLoop
     66//! Also we can derive MEvtLoop from MTaskList to have a static tasklist, too
     67//!
     68
    6369// --------------------------------------------------------------------------
    6470//
  • trunk/MagicSoft/Mars/mbase/MTaskList.cc

    r867 r887  
    270270            // something occured: skip the rest of the tasks for this event
    271271            //
    272             break;
     272            return kTRUE;
    273273        }
    274274    }
  • trunk/MagicSoft/Mars/mhist/HistLinkDef.h

    r876 r887  
    55#pragma link off all functions;
    66
     7#pragma link C++ class MH;
    78#pragma link C++ class MHFadcCam;
    89#pragma link C++ class MHFadcPix;
     
    1415#pragma link C++ class MHMcRate;
    1516
     17#pragma link C++ class MFillH;
    1618#pragma link C++ class MFillHFadc;
    1719#pragma link C++ class MFillHHillas;
  • trunk/MagicSoft/Mars/mhist/MFillHFadc.cc

    r859 r887  
    9393{
    9494    //  loop over the pixels and fill the values in the histograms
    95  
    96     MRawEvtPixelIter pixel(fRawEvtData);
    97 
    98     const Int_t nhisamples = fRawEvtData->GetNumHiGainSamples() ;
    99     const Int_t nlosamples = fRawEvtData->GetNumLoGainSamples() ;
    100 
    101     while ( pixel.Next() )
    102     {
    103         const UInt_t id = pixel.GetPixelId();
    104 
    105         for (Int_t i=0;  i<nhisamples; i++)
    106             fHistos->FillHi(id, pixel.GetHiGainFadcSamples()[i]);
    107 
    108         if (!pixel.HasLoGain())
    109             continue;
    110 
    111         for (Int_t i=0; i<nlosamples; i++)
    112             fHistos->FillLo(id, pixel.GetLoGainFadcSamples()[i]);
    113     }
    114 
     95    fHistos->Fill(fRawEvtData);
    11596    return kTRUE;
    11697}
  • trunk/MagicSoft/Mars/mhist/MFillHHillas.cc

    r859 r887  
    4242#include "MLog.h"
    4343#include "MLogManip.h"
     44
     45#include "MHillas.h"
    4446#include "MHHillas.h"
    4547#include "MParList.h"
  • trunk/MagicSoft/Mars/mhist/MHFadcCam.cc

    r859 r887  
    3636#include <TH1.h>
    3737
     38#include "MRawEvtData.h"
     39#include "MRawEvtPixelIter.h"
     40
    3841ClassImp(MHFadcCam);
    3942
     
    6972}
    7073
     74void MHFadcCam::Fill(const MParContainer *par)
     75{
     76    MRawEvtData *evt = (MRawEvtData*)par;
     77
     78    MRawEvtPixelIter pixel(evt);
     79
     80    const Int_t nhisamples = evt->GetNumHiGainSamples();
     81    const Int_t nlosamples = evt->GetNumLoGainSamples();
     82
     83    while (pixel.Next())
     84    {
     85        const UInt_t id = pixel.GetPixelId();
     86
     87        for (Int_t i=0;  i<nhisamples; i++)
     88            FillHi(id, pixel.GetHiGainFadcSamples()[i]);
     89
     90        if (!pixel.HasLoGain())
     91            continue;
     92
     93        for (Int_t i=0; i<nlosamples; i++)
     94            FillLo(id, pixel.GetLoGainFadcSamples()[i]);
     95    }
     96
     97}
    7198/*void MHFadcCam::SaveHist(char *name)
    7299{
  • trunk/MagicSoft/Mars/mhist/MHFadcCam.h

    r713 r887  
    1010#endif
    1111
    12 #ifndef MPARCONTAINER_H
    13 #include "MParContainer.h"
     12#ifndef MH_H
     13#include "MH.h"
    1414#endif
    1515#ifndef MHFADCPIX_H
     
    1919class TH1F;
    2020
    21 class MHFadcCam : public MParContainer
     21class MHFadcCam : public MH
    2222{
    2323private:
    2424    TObjArray *fArray;  // List of Lo/Hi gain Histograms
    2525
     26    void FillHi(UInt_t ipix, Byte_t data) { (*this)[ipix]->FillHi(data); }
     27    void FillLo(UInt_t ipix, Byte_t data) { (*this)[ipix]->FillLo(data); }
     28
    2629public:
    2730     MHFadcCam(const char *name=NULL, const char *title=NULL);
    2831    ~MHFadcCam();
    29 
    30     void FillHi(UInt_t ipix, Byte_t data) { (*this)[ipix]->FillHi(data); }
    31     void FillLo(UInt_t ipix, Byte_t data) { (*this)[ipix]->FillLo(data); }
    3232
    3333    //    void SaveHist(char *name);
     
    3737    TH1F *GetHistHi(UInt_t i)  { return (*this)[i]->GetHistHi(); }
    3838    TH1F *GetHistLo(UInt_t i)  { return (*this)[i]->GetHistLo(); }
     39
     40    void Fill(const MParContainer *par);
    3941
    4042    //
  • trunk/MagicSoft/Mars/mhist/MHHillas.cc

    r859 r887  
    5555}
    5656
    57 void MHHillas::Fill(const MHillas *par)
     57void MHHillas::Fill(const MParContainer *par)
    5858{
    59     fAlpha ->Fill(fabs(par->GetAlpha()));
    60     fWidth ->Fill(par->GetWidth());
    61     fLength->Fill(par->GetLength());
    62     fDist  ->Fill(par->GetDist());
     59    MHillas &h = *(MHillas*)par;
     60
     61    fAlpha ->Fill(fabs(h.GetAlpha()));
     62    fWidth ->Fill(h.GetWidth());
     63    fLength->Fill(h.GetLength());
     64    fDist  ->Fill(h.GetDist());
    6365}
    6466
  • trunk/MagicSoft/Mars/mhist/MHHillas.h

    r859 r887  
    66#endif
    77
    8 #ifndef MPARCONTAINER_H
    9 #include "MParContainer.h"
     8#ifndef MH_H
     9#include "MH.h"
    1010#endif
    1111
     
    1313class MHillas;
    1414
    15 class MHHillas : public MParContainer
     15class MHHillas : public MH
    1616{
    1717private:
     
    2525    ~MHHillas();
    2626
    27     void Fill(const MHillas *par);
     27    void Fill(const MParContainer *par);
    2828
    2929    TH1F *GetHistAlpha()  { return fAlpha; }
  • trunk/MagicSoft/Mars/mhist/MHStarMap.cc

    r859 r887  
    133133}
    134134
    135 void MHStarMap::Fill(const MHillas *par)
     135void MHStarMap::Fill(const MParContainer *par)
    136136{
    137     const float dist  = par->GetDist();
    138     const float theta = par->GetTheta();
    139     const float alpha = par->GetAlpha()/kRad2Deg;
     137    const MHillas &h = *(MHillas*)par;
     138
     139    const float dist  = h.GetDist();
     140    const float theta = h.GetTheta();
     141    const float alpha = h.GetAlpha()/kRad2Deg;
    140142
    141143    const float m = tan(theta+alpha-kPI);
  • trunk/MagicSoft/Mars/mhist/MHStarMap.h

    r859 r887  
    66#endif
    77
    8 #ifndef MPARCONTAINER_H
    9 #include "MParContainer.h"
     8#ifndef MH_H
     9#include "MH.h"
    1010#endif
    1111
     
    1818class MHillas;
    1919
    20 class MHStarMap : public MParContainer
     20class MHStarMap : public MH
    2121{
    2222private:
     
    2727    ~MHStarMap();
    2828
    29     void Fill(const MHillas *par);
     29    void Fill(const MParContainer *par);
    3030
    3131    TH2F *GetHist()               { return fStarMap; }
  • trunk/MagicSoft/Mars/mhist/Makefile

    r875 r887  
    2828.SUFFIXES: .c .cc .cxx .h .hxx .o
    2929
    30 SRCFILES = MFillHFadc.cc \
     30SRCFILES = MFillH.cc \
     31           MFillHFadc.cc \
    3132           MFillHHillas.cc \
    3233           MFillHStarMap.cc \
     34           MH.cc \
    3335           MHFadcPix.cc \
    3436           MHFadcCam.cc \
Note: See TracChangeset for help on using the changeset viewer.