Changeset 991 for trunk/MagicSoft/Mars


Ignore:
Timestamp:
10/26/01 10:11:30 (23 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
2 added
19 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/Changelog

    r990 r991  
    11                                                                  -*-*- END -*-*-
     2
     3 2001/10/26: Thomas Bretz
     4
     5   * Makefile.rules:
     6     - changed output
     7
     8   * readraw.cc:
     9     - changed name and description in TROOT
     10     - removed argument in MMcEvt::Print()
     11
     12   * manalysis/MCerPhotEvt.[h,cc], manalysis/MCerPhotPix.[h,cc],
     13     manalysis/MHillas.[h,cc], mmc/MMcEvt.[hxx,cxx],
     14     mmc/MMcFadcHeader.[hxx,cxx], mmc/MMcTrig.[hxx,cxx],
     15     mmc/MMcTrigHeader.[hxx,cxx]:
     16     - according to root 3.01 made Print const
     17
     18   * mbase/BaseLinkDef.h:
     19     - added MPrint
     20
     21   * mbase/MPrint.[h,cc]:
     22     - added
     23
     24   * mbase/MClone.[h,cc]:
     25     - changed MParContainer to a more general TObject
     26
     27   * mbase/Makefile:
     28     - MPrint.cc added
     29
     30   * meventdisp/MGCamDisplay.[h,cc], meventdisp/MGEvtDisplay.[h,cc],
     31     meventdisp/MGFadcDisp.[h,cc]:
     32     - introduced fInitOk for the case PreProcessing failed
     33
     34   * mmain/MMonteCarlo.cc:
     35     - added correction for use of several trigger conditions
     36     - speedup threshold calc by usage of UseLeaf
     37
     38
    239
    340 2001/10/23: Thomas Bretz
  • trunk/MagicSoft/Mars/Makefile.rules

    r654 r991  
    99
    1010$(CINT)Cint.cc: $(HEADERS)
    11         @echo
    1211        @echo " - Generating dictionary $(CINT)Cint.cc ..."
    1312
     
    1615
    1716.cxx.o:
    18         @echo "Compiling " $<
     17        @echo " - Compiling " $<
    1918        $(CXX) $(CXXFLAGS) -c $< -o $@
    2019
    2120.cc.o: 
    22         @echo "Compiling " $<
     21        @echo " - Compiling " $<
    2322        $(CXX) $(CXXFLAGS) -c $< -o $@
    2423
    2524.c.o:   
    26         @echo "Compiling " $<
     25        @echo " - Compiling " $<
    2726        $(CC) $(CFLAGS) -c $< -o $@
    2827#
  • trunk/MagicSoft/Mars/manalysis/MCerPhotEvt.cc

    r959 r991  
    8282{
    8383    // TClonesArray -> 'operator new with placement' should be used
    84     new ((*fPixels)[fNumPixels++]) MCerPhotPix( id, nph, err);
     84    new ((*fPixels)[fNumPixels++]) MCerPhotPix(id, nph, err);
    8585}
    8686
     
    9191void MCerPhotEvt::Clear(Option_t *)
    9292{
    93     fNumPixels = 0 ;
    94     fPixels->Clear() ;
     93    fNumPixels = 0;
     94    fPixels->Clear();
    9595}
    9696
     
    9999//  Dump the cerenkov photon event to *fLog
    100100//
    101 void MCerPhotEvt::Print(Option_t *)
     101void MCerPhotEvt::Print(Option_t *) const
    102102{
    103103    const Int_t entries = fPixels->GetEntries();
  • trunk/MagicSoft/Mars/manalysis/MCerPhotEvt.h

    r959 r991  
    3131
    3232    void Clear(Option_t *opt=NULL);
    33     void Print(Option_t *opt=NULL);
     33    void Print(Option_t *opt=NULL) const;
    3434
    3535    Bool_t  IsPixelExisting(Int_t id) const;
  • trunk/MagicSoft/Mars/manalysis/MCerPhotPix.cc

    r857 r991  
    5656//  Print information to gLog.
    5757//
    58 void MCerPhotPix::Print(Option_t *)
     58void MCerPhotPix::Print(Option_t *) const
    5959{
    6060    gLog << "MCerPhotPix: Pixel: "<< fPixId ;
  • trunk/MagicSoft/Mars/manalysis/MCerPhotPix.h

    r967 r991  
    2424    MCerPhotPix(Int_t pix = -1, Float_t phot=0., Float_t errphot=0.);
    2525
    26     void Print(Option_t *opt = NULL) ;
     26    void Print(Option_t *opt = NULL) const;
    2727
    2828    Int_t   GetPixId() const      { return fPixId;   }
  • trunk/MagicSoft/Mars/manalysis/MHillas.cc

    r977 r991  
    9292// Print the hillas Parameters to *fLog
    9393//
    94 void MHillas::Print(Option_t *)
     94void MHillas::Print(Option_t *) const
    9595{
    9696    *fLog << "Hillas Parameter:" << endl;
  • trunk/MagicSoft/Mars/manalysis/MHillas.h

    r857 r991  
    3131    Bool_t Calc(const MGeomCam &geom, const MCerPhotEvt &pix);
    3232
    33     void Print(Option_t *opt=NULL);
     33    void Print(Option_t *opt=NULL) const;
    3434    void Draw(Option_t *opt=NULL);
    3535    void Paint(Option_t *opt=NULL);
  • trunk/MagicSoft/Mars/mbase/BaseLinkDef.h

    r967 r991  
    3232
    3333#pragma link C++ class MClone;
     34#pragma link C++ class MPrint;
    3435
    3536#pragma link C++ class MReadTree;
  • trunk/MagicSoft/Mars/mbase/MClone.cc

    r967 r991  
    6969    *fTitle = title ? title : "Task to clone a parameter container for later usage";
    7070
    71     fClone        = NULL;
    72     fParContainer = NULL;
     71    fClone  = NULL;
     72    fObject = NULL;
    7373}
    7474
     
    7777//  Constructor. Remembers the name to search for in the parameter list.
    7878//
    79 MClone::MClone(const char *par, const char *name, const char *title)
     79MClone::MClone(const char *obj, const char *name, const char *title)
    8080{
    8181    Init(name, title);
    8282
    83     fParContainerName = par;
     83    fObjName = obj;
    8484}
    8585
     
    8888//  Constructor. Remember the pointer of the object which has to be cloned.
    8989//
    90 MClone::MClone(const MParContainer *par, const char *name, const char *title)
     90MClone::MClone(const TObject *obj, const char *name, const char *title)
    9191{
    9292    Init(name, title);
    9393
    94     fParContainer = par;
     94    fObject = obj;
    9595}
    9696
     
    114114    // The pointer is already given by the user.
    115115    //
    116     if (fParContainer)
     116    if (fObject)
    117117        return kTRUE;
    118118
     
    120120    // Try to find the parameter container with the given name in the list
    121121    //
    122     fParContainer = (MParContainer*)pList->FindObject(fParContainerName);
    123     if (fParContainer)
     122    fObject = pList->FindObject(fObjName);
     123    if (fObject)
    124124        return kTRUE;
    125125
     
    127127    // If it couldn't get found stop Eventloop
    128128    //
    129     *fLog << dbginf << fParContainerName << " not found... aborting." << endl;
     129    *fLog << dbginf << fObjName << " not found... aborting." << endl;
    130130    return kFALSE;
    131131}
     
    165165    // Clone the given parameter container
    166166    //
    167     fClone = fParContainer->Clone();
     167    fClone = fObject->Clone();
    168168
    169169    return kTRUE;
  • trunk/MagicSoft/Mars/mbase/MClone.h

    r961 r991  
    1515{
    1616private:
    17     const MParContainer *fParContainer; // pointer to container which has to be cloned
    18     TString fParContainerName;          // given name to search for in the parameterlist
     17    const TObject *fObject; // pointer to container which has to be cloned
     18    TString fObjName;       // given name to search for in the parameterlist
    1919
    20     TObject* fClone;                    // pointer to the cloned object. deletion is handled by MClone
     20    TObject* fClone;        // pointer to the cloned object. deletion is handled by MClone
    2121
    2222    void Init(const char *name, const char *title);
    2323
    2424public:
    25     MClone(const char *par,          const char *name=NULL, const char *title=NULL);
    26     MClone(const MParContainer *par, const char *name=NULL, const char *title=NULL);
     25    MClone(const char *obj,    const char *name=NULL, const char *title=NULL);
     26    MClone(const TObject *obj, const char *name=NULL, const char *title=NULL);
    2727    ~MClone();
    2828
  • trunk/MagicSoft/Mars/mbase/MReadTree.cc

    r988 r991  
    8383
    8484    fVetoList = new TArrayC;
     85
    8586    //
    8687    // open the input stream
  • trunk/MagicSoft/Mars/mbase/Makefile

    r959 r991  
    4747           MArrayS.cc \
    4848           MTime.cc \
    49            MLog.cc \
    5049           MHtml.cc \
    5150           MClone.cc \
     51           MPrint.cc \
     52           MLog.cc \
    5253           MLogManip.cc
    5354
  • trunk/MagicSoft/Mars/meventdisp/MGCamDisplay.cc

    r961 r991  
    117117    plist->AddToList(pedest);
    118118
    119     fEvtLoop->PreProcess();
    120     GetTaskList()->Process();
     119    fInitOk = fEvtLoop->PreProcess();
     120
     121    if (fInitOk)
     122        GetTaskList()->Process();
    121123
    122124    return geom;
     
    177179void MGCamDisplay::UpdateDisplay()
    178180{
    179     if (!fDisplay)
     181    if (!fInitOk)
    180182        return;
    181183
  • trunk/MagicSoft/Mars/meventdisp/MGEvtDisplay.cc

    r961 r991  
    333333                           const TGWindow *p, const TGWindow *main,
    334334                           UInt_t w, UInt_t h)
    335     : TGTransientFrame(p, main, w, h)
     335    : TGTransientFrame(p, main, w, h), fInitOk(kFALSE)
    336336{
    337337    //
     
    398398void MGEvtDisplay::ReadinEvent(UInt_t iEvt)
    399399{
     400    if (!fInitOk)
     401        return;
     402
    400403    Int_t buttons = 4;
    401404    Int_t retval  = 0;
  • trunk/MagicSoft/Mars/meventdisp/MGEvtDisplay.h

    r961 r991  
    5151    TGVerticalFrame  *fMidFrame;
    5252
     53    Bool_t fInitOk;
     54
    5355    MParList  *GetParList() const;
    5456    MTaskList *GetTaskList() const;
  • trunk/MagicSoft/Mars/meventdisp/MGFadcDisp.cc

    r961 r991  
    125125    // preprocess eventloop and read in first event (process)
    126126    //
    127     fEvtLoop->PreProcess();
    128     GetTaskList()->Process();
     127    fInitOk = fEvtLoop->PreProcess();
     128
     129    if (fInitOk)
     130        GetTaskList()->Process();
    129131
    130132    //
     
    168170{
    169171    MRawEvtData *data = GetEvent();
     172
     173    if (!data)
     174        return;
    170175
    171176    MRawEvtPixelIter pixel(data);
     
    215220void MGFadcDisp::UpdateDisplay()
    216221{
     222    if (!fInitOk)
     223        return;
     224
    217225    const Int_t lastsel = fPixelList->GetSelected();
    218226
  • trunk/MagicSoft/Mars/mmain/MMonteCarlo.cc

    r989 r991  
    290290    // macro yet)
    291291    //
    292     TObjArray hists(MParList::CreateObjList("MHMcRate", dim));
     292    const UInt_t from = dim>0 ?   1 : -dim;
     293    const UInt_t to   = dim>0 ? dim : -dim;
     294    const Int_t  num  = to-from+1;
     295
     296    TObjArray hists(MParList::CreateObjList("MHMcRate", from, to));
    293297    hists.SetOwner();
    294298
     
    296300    // Check if the list really contains the right number of histograms
    297301    //
    298     if (hists.GetEntriesFast() != dim && dim)
     302    if (hists.GetEntriesFast() != num)
    299303        return;
    300304
     
    367371    // and store the histograms in an TObjArray
    368372    //
    369     TObjArray hists(MParList::CreateObjList("MHMcEnergy", dim));
     373    const UInt_t from = dim>0 ?   1 : -dim;
     374    const UInt_t to   = dim>0 ? dim : -dim;
     375    const Int_t  num  = to-from+1;
     376
     377    TObjArray hists(MParList::CreateObjList("MHMcEnergy", from, to));
    370378    hists.SetOwner();
    371379
     
    373381    // Check if the list really contains the right number of histograms
    374382    //
    375     if (hists.GetEntriesFast() != dim)
     383    if (hists.GetEntriesFast() != num)
    376384        return;
    377385
     
    391399    //
    392400    MReadTree read("Events", fInputFile);
    393     read.VetoBranch("MRawEvtData");
    394     read.VetoBranch("MRawEvtHeader");
     401    read.UseLeaf("fEnergy");
     402    read.UseLeaf("fNumFirstLevel");
    395403
    396404    MMcThresholdCalc calc(dim);
  • trunk/MagicSoft/Mars/readraw.cc

    r654 r991  
    4848    //     initialize ROOT  (this is obligatory here)
    4949    //
    50     TROOT simple("Readraw","Mars - Merging and Preprocessing Program");
     50    TROOT simple("readraw","Mars - Read and print raw data file");
    5151
    5252    //
     
    152152        evttree->GetEvent(i);
    153153
    154         evtmc->Print("") ;
     154        evtmc->Print();
    155155       
    156156        evtheader->Print();
Note: See TracChangeset for help on using the changeset viewer.