Changeset 1080


Ignore:
Timestamp:
11/15/01 11:07:21 (23 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars/mbase
Files:
25 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/mbase/MArray.cc

    r858 r1080  
    1616!
    1717!
    18 !   Author(s): Thomas Bretz  12/2000 (tbretz@uni-sw.gwdg.de)
     18!   Author(s): Thomas Bretz  12/2000 <mailto:tbretz@uni-sw.gwdg.de>
    1919!
    2020!   Copyright: MAGIC Software Development, 2000-2001
  • trunk/MagicSoft/Mars/mbase/MArrayB.cc

    r858 r1080  
    11/* ======================================================================== *\
     2!
     3! *
     4! * This file is part of MARS, the MAGIC Analysis and Reconstruction
     5! * Software. It is distributed to you in the hope that it can be a useful
     6! * and timesaving tool in analysing Data of imaging Cerenkov telescopes.
     7! * It is distributed WITHOUT ANY WARRANTY.
     8! *
     9! * Permission to use, copy, modify and distribute this software and its
     10! * documentation for any purpose is hereby granted without fee,
     11! * provided that the above copyright notice appear in all copies and
     12! * that both that copyright notice and this permission notice appear
     13! * in supporting documentation. It is provided "as is" without express
     14! * or implied warranty.
     15! *
    216!
    317!   Author(s): Thomas Bretz  12/2000 (tbretz@uni-sw.gwdg.de)
  • trunk/MagicSoft/Mars/mbase/MArrayS.cc

    r858 r1080  
    1616!
    1717!
    18 !   Author(s): Thomas Bretz  12/2000 (tbretz@uni-sw.gwdg.de)
     18!   Author(s): Thomas Bretz  12/2000 <mailto:tbretz@uni-sw.gwdg.de>
    1919!
    2020!   Copyright: MAGIC Software Development, 2000-2001
  • trunk/MagicSoft/Mars/mbase/MClone.cc

    r1003 r1080  
    1616!
    1717!
    18 !   Author(s): Thomas Bretz  07/2001 (tbretz@uni-sw.gwdg.de)
     18!   Author(s): Thomas Bretz  07/2001 <mailto:tbretz@uni-sw.gwdg.de>
    1919!
    2020!   Copyright: MAGIC Software Development, 2000-2001
     
    9292    Init(name, title);
    9393
    94     fObject = obj;
     94    fObject  = obj;
     95    fObjName = obj->GetName();
    9596}
    9697
     
    127128    // If it couldn't get found stop Eventloop
    128129    //
    129     *fLog << dbginf << fObjName << " not found... aborting." << endl;
     130    *fLog << err << dbginf << fObjName << " not found... aborting." << endl;
    130131    return kFALSE;
    131132}
  • trunk/MagicSoft/Mars/mbase/MEvtLoop.cc

    r1048 r1080  
    1616!
    1717!
    18 !   Author(s): Thomas Bretz  12/2000 (tbretz@uni-sw.gwdg.de)
     18!   Author(s): Thomas Bretz  12/2000 <mailto:tbretz@uni-sw.gwdg.de>
    1919!
    2020!   Copyright: MAGIC Software Development, 2000-2001
     
    114114    if (!fParList)
    115115    {
    116         *fLog << dbginf << "Parlist not initialized." << endl;
     116        *fLog << err << dbginf << "Parlist not initialized." << endl;
    117117        return kFALSE;
    118118    }
     
    125125    if (!fTaskList)
    126126    {
    127         *fLog << dbginf << "Cannot find tasklist '" << tlist << "' in parameter list." << endl;
     127        *fLog << err << dbginf << "Cannot find tasklist '" << tlist << "' in parameter list." << endl;
    128128        return kFALSE;
    129129    }
     
    139139    if (!fTaskList->PreProcess(fParList))
    140140    {
    141         *fLog << "Error detected while PreProcessing" << endl;
     141        *fLog << err << "Error detected while PreProcessing" << endl;
    142142        return kFALSE;
    143143    }
     
    159159    //   each event
    160160    //
    161     *fLog << "Eventloop running (";
     161    *fLog << all <<"Eventloop running (";
    162162
    163163    if (maxcnt<0)
     
    201201                fProgress->SetPosition(maxcnt - dummy);
    202202                gSystem->ProcessEvents();
     203
     204                // gClient->ProcessEventsFor(fProgress);
     205                //
     206                // root 3.02:
     207                //  * gui/: inc/TGClient.h, src/TGClient.cxx:
     208                //        new method ProcessEventsFor(TGWindow *w). Use this method to instead
     209                //        of TSystem::ProcessEvents() in case you want to allow on events for
     210                //        the specified TGWindow to be processed (like when this is a progress
     211                //        meter dialog).
    203212            }
    204213        else
     
    210219    clock.Stop();
    211220
    212     *fLog << "Ready!" << endl << endl;
     221    *fLog << all << "Ready!" << endl << endl;
    213222
    214223    clock.Print();
  • trunk/MagicSoft/Mars/mbase/MFilter.cc

    r961 r1080  
    1616!
    1717!
    18 !   Author(s): Thomas Bretz  07/2001 (tbretz@uni-sw.gwdg.de)
     18!   Author(s): Thomas Bretz  07/2001 <mailto:tbretz@uni-sw.gwdg.de>
    1919!
    2020!   Copyright: MAGIC Software Development, 2000-2001
  • trunk/MagicSoft/Mars/mbase/MFilterList.cc

    r986 r1080  
    1616!
    1717!
    18 !   Author(s): Thomas Bretz  07/2001 (tbretz@uni-sw.gwdg.de)
     18!   Author(s): Thomas Bretz  07/2001 <mailto:tbretz@uni-sw.gwdg.de>
    1919!
    2020!   Copyright: MAGIC Software Development, 2000-2001
     
    147147    if (fFilters.FindObject(filter))
    148148    {
    149         *fLog << dbginf << "Filter already existing." << endl;
     149        *fLog << warn << dbginf << "Filter already existing... skipped." << endl;
    150150        return kTRUE;
    151151    }
     
    153153    if (fFilters.FindObject(name))
    154154    {
    155         *fLog << dbginf << "'" << name << "' exists in List already." << endl;
    156         return kTRUE;
    157     }
    158 
    159     *fLog << "Adding " << name << " to " << GetName() << "... " << flush;
     155        *fLog << warn << dbginf << "'" << name << "' exists in List already... skipped." << endl;
     156        return kTRUE;
     157    }
     158
     159    *fLog << inf << "Adding " << name << " to " << GetName() << "... " << flush;
    160160
    161161    fFilters.Add(filter);
     
    237237    const Bool_t verbose = str.Contains("V", TString::kIgnoreCase);
    238238
    239     *fLog << "(";
     239    *fLog << all << "(";
    240240
    241241    TIter Next(&fFilters);
  • trunk/MagicSoft/Mars/mbase/MGGroupFrame.cc

    r1076 r1080  
    1616!
    1717!
    18 !   Author(s): Thomas Bretz  11/2001 (tbretz@uni-sw.gwdg.de)
     18!   Author(s): Thomas Bretz  11/2001 <mailto:tbretz@uni-sw.gwdg.de>
    1919!
    2020!   Copyright: MAGIC Software Development, 2000-2001
  • trunk/MagicSoft/Mars/mbase/MGList.cc

    r1076 r1080  
    1616!
    1717!
    18 !   Author(s): Thomas Bretz  11/2001 (tbretz@uni-sw.gwdg.de)
     18!   Author(s): Thomas Bretz  11/2001 <mailto:tbretz@uni-sw.gwdg.de>
    1919!
    2020!   Copyright: MAGIC Software Development, 2000-2001
  • trunk/MagicSoft/Mars/mbase/MGTask.cc

    r1076 r1080  
    1616!
    1717!
    18 !   Author(s): Thomas Bretz  11/2001 (tbretz@uni-sw.gwdg.de)
     18!   Author(s): Thomas Bretz  11/2001 <mailto:tbretz@uni-sw.gwdg.de>
    1919!
    2020!   Copyright: MAGIC Software Development, 2000-2001
     
    3636
    3737#include "MLog.h"
     38#include "MLogManip.h"
     39
    3840#include "MGGroupFrame.h"
    3941
     
    104106{
    105107    fLog->setf(ios::showbase);
    106     *fLog << "Task " << GetDescriptor() << " received gui msg " << hex;
     108    *fLog << all << "Task " << GetDescriptor() << " received gui msg " << hex;
    107109    *fLog << msg << " " << submsg << " " << param1 << " " << param2 << endl;
    108110    return kTRUE;
     
    144146    if (fFrame)
    145147    {
    146         *fLog << GetDescriptor() << ": Gui already created... skipped." << endl;
     148        *fLog << warn << GetDescriptor() << " Gui already created... skipped." << endl;
    147149        return;
    148150    }
     
    162164    if (method->GetClass() == MGTask::Class())
    163165    {
    164         *fLog << "Sorry, " << GetDescriptor();
     166        *fLog << warn << "Sorry, " << GetDescriptor();
    165167        *fLog << " doesn't override CreateGuiElements." << endl;
    166168        return;
  • trunk/MagicSoft/Mars/mbase/MGTask.h

    r1076 r1080  
    4343    virtual Bool_t ProcessMessage(Int_t msg, Int_t submsg, Long_t param1, Long_t param2);
    4444
    45     void CreateGui(TGCompositeFrame *f, TGLayoutHints *layout);
     45    void CreateGui(TGCompositeFrame *f, TGLayoutHints *layout=NULL);
    4646
    4747    ClassDef(MGTask, 0)         //Abstract base class for a task
  • trunk/MagicSoft/Mars/mbase/MInputStreamID.cc

    r1076 r1080  
    1616!
    1717!
    18 !   Author(s): Thomas Bretz  12/2000 (tbretz@uni-sw.gwdg.de)
     18!   Author(s): Thomas Bretz  12/2000 <mailto:tbretz@uni-sw.gwdg.de>
    1919!
    2020!   Copyright: MAGIC Software Development, 2000-2001
  • trunk/MagicSoft/Mars/mbase/MLog.cc

    r998 r1080  
    1616!
    1717!
    18 !   Author(s): Thomas Bretz  12/2000 (tbretz@uni-sw.gwdg.de)
     18!   Author(s): Thomas Bretz  12/2000 <mailto:tbretz@uni-sw.gwdg.de>
    1919!
    2020!   Copyright: MAGIC Software Development, 2000-2001
     
    188188int MLog::overflow(int i) // i=EOF means not a real overflow
    189189{
    190     if (fOutputLevel >= fDebugLevel)
     190    //
     191    // no output if
     192    //
     193    if (fOutputLevel > fDebugLevel)
    191194        return 0;
    192195
  • trunk/MagicSoft/Mars/mbase/MLogManip.cc

    r749 r1080  
    1616!
    1717!
    18 !   Author(s): Thomas Bretz  12/2000 (tbretz@uni-sw.gwdg.de)
     18!   Author(s): Thomas Bretz  12/2000 <mailto:tbretz@uni-sw.gwdg.de>
    1919!
    2020!   Copyright: MAGIC Software Development, 2000-2001
  • trunk/MagicSoft/Mars/mbase/MLogManip.h

    r1020 r1080  
    5454#ifndef __CINT__
    5555#define dbginf      __FILE__ << " l." << dec << __LINE__ << ": "
     56#define all    debug(0)
     57#define err    debug(1)
     58#define warn   debug(2)
     59#define inf    debug(3)
    5660#endif
    5761//
  • trunk/MagicSoft/Mars/mbase/MParContainer.cc

    r1076 r1080  
    1616!
    1717!
    18 !   Author(s): Thomas Bretz  12/2000 (tbretz@uni-sw.gwdg.de)
     18!   Author(s): Thomas Bretz  12/2000 <mailto:tbretz@uni-sw.gwdg.de>
    1919!
    2020!   Copyright: MAGIC Software Development, 2000-2001
     
    4242
    4343#include "MLog.h"
     44#include "MLogManip.h"
    4445
    4546ClassImp(MParContainer);
     
    137138{
    138139    TROOT::IndentLevel();
    139     *fLog <<"OBJ: " << GetDescriptor() << ": " << GetTitle() << ", "
    140         << Int_t(TestBit(kCanDelete)) << endl;
     140    *fLog << all << GetDescriptor() << " " << GetTitle() << ": kCanDelete=";
     141    *fLog << Int_t(TestBit(kCanDelete)) << endl;
    141142}
    142143
     
    147148void MParContainer::Print(Option_t *) const
    148149{
    149     *fLog <<"OBJ: " << GetDescriptor() << ": " << GetTitle() << endl;
     150    *fLog << all << GetDescriptor() << " " << GetTitle() << endl;
    150151}
    151152
     
    196197}
    197198
     199// --------------------------------------------------------------------------
     200//
     201//  If you want to use Ascii-Input/-Output (eg. MWriteAsciiFile) of a
     202//  container, overload this function.
     203//
    198204void MParContainer::AsciiRead(ifstream &fin)
    199205{
    200     *fLog << "To use the the ascii input of " << GetName();
     206    *fLog << warn << "To use the the ascii input of " << GetName();
    201207    *fLog << " you have to overload " << ClassName() << "::AsciiRead." << endl;
    202208}
    203209
     210// --------------------------------------------------------------------------
     211//
     212//  If you want to use Ascii-Input/-Output (eg. MWriteAsciiFile) of a
     213//  container, overload this function.
     214//
    204215void MParContainer::AsciiWrite(ofstream &fout) const
    205216{
    206     *fLog << "To use the the ascii output of " << GetName();
     217    *fLog << warn << "To use the the ascii output of " << GetName();
    207218    *fLog << " you have to overload " << ClassName() << "::AsciiWrite." << endl;
    208219}
  • trunk/MagicSoft/Mars/mbase/MParList.cc

    r1076 r1080  
    1616!
    1717!
    18 !   Author(s): Thomas Bretz  12/2000 (tbretz@uni-sw.gwdg.de)
     18!   Author(s): Thomas Bretz  12/2000 <mailto:tbretz@uni-sw.gwdg.de>
    1919!
    2020!   Copyright: MAGIC Software Development, 2000-2001
     
    160160        if (objt || objn==cont)
    161161        {
    162             *fLog << dbginf << "Warning: Container '" << cont->GetName() << ", 0x" << (void*)cont;
     162            *fLog << warn << dbginf << "Warning: Container '" << cont->GetName() << ", 0x" << (void*)cont;
    163163            *fLog << "' already existing in '" << GetName() << "'... ignoring." << endl;
    164164            return kTRUE;
     
    168168        // Otherwise add it to the list, but print a warning message
    169169        //
    170         *fLog << dbginf << "Warning: Container with the same name '" << cont->GetName();
     170        *fLog << warn << dbginf << "Warning: Container with the same name '" << cont->GetName();
    171171        *fLog << "' already existing in '" << GetName() << "'." << endl;
    172172        *fLog << "You may not be able to get a pointer to container task by name." << endl;
     
    186186    }
    187187
    188     *fLog << "Adding " << name << " to " << GetName() << "... " << flush;
     188    *fLog << inf << "Adding " << name << " to " << GetName() << "... " << flush;
    189189
    190190    fContainer->Add(cont);
     
    328328    // if object is not existing in the list try to create one
    329329    //
    330     *fLog << "Object '" << oname << "' [" << cname << "] not yet in " << GetName() << "... creating." << endl;
     330    *fLog << inf << "Object '" << oname << "' [" << cname << "] not yet in " << GetName() << "... creating." << endl;
    331331
    332332    //
     
    340340        // if class is not existing in the root environment
    341341        //
    342         *fLog << dbginf << "Class '" << cname << "' not existing in dictionary." << endl;
     342        *fLog << err << dbginf << "Class '" << cname << "' not existing in dictionary." << endl;
    343343        return NULL;
    344344    }
     
    378378void MParList::Print(Option_t *t) const
    379379{
    380     *fLog << dbginf << "ParList: " << GetName() << " <" << GetTitle() << ">" << endl;
     380    *fLog << all << GetDescriptor() << endl;
     381    *fLog << setfill('-') << setw(strlen(GetDescriptor())+2) << "" << endl;
     382    MParContainer *obj = NULL;
     383    TIter Next(fContainer);
     384    while ((obj=(MParContainer*)Next()))
     385        *fLog << " " << obj->GetDescriptor() << endl;
    381386    *fLog << endl;
    382387}
     
    416421    if (first>0 && last<first)
    417422    {
    418         *fLog << dbginf << "Cannot create entries backwards (last<first)...skipped." << endl;
     423        *fLog << err << dbginf << "Cannot create entries backwards (last<first)...skipped." << endl;
    419424        return list;
    420425    }
     
    462467    if (first>0 && last<first)
    463468    {
    464         *fLog << dbginf << "Cannot create entries backwards (last<first)...skipped." << endl;
     469        *fLog << err << dbginf << "Cannot create entries backwards (last<first)...skipped." << endl;
    465470        return list;
    466471    }
     
    513518    if (first>0 && last<first)
    514519    {
    515         gLog << dbginf << "Cannot create entries backwards (last<first)...skipped." << endl;
     520        gLog << err << dbginf << "Cannot create entries backwards (last<first)...skipped." << endl;
    516521        return list;
    517522    }
  • trunk/MagicSoft/Mars/mbase/MPrint.cc

    r1003 r1080  
    1616!
    1717!
    18 !   Author(s): Thomas Bretz  10/2001 (tbretz@uni-sw.gwdg.de)
     18!   Author(s): Thomas Bretz  10/2001 <mailto:tbretz@uni-sw.gwdg.de>
    1919!
    2020!   Copyright: MAGIC Software Development, 2000-2001
     
    9191    SetOption(option);
    9292
    93     fObject = obj;
     93    fObject  = obj;
     94    fObjName = obj->GetName();
    9495}
    9596
     
    117118    // If it couldn't get found stop Eventloop
    118119    //
    119     *fLog << dbginf << fObjName << " not found... aborting." << endl;
     120    *fLog << err << dbginf << fObjName << " not found... aborting." << endl;
    120121    return kFALSE;
    121122}
  • trunk/MagicSoft/Mars/mbase/MReadMarsFile.cc

    r1036 r1080  
    1616!
    1717!
    18 !   Author(s): Thomas Bretz  12/2000 (tbretz@uni-sw.gwdg.de)
     18!   Author(s): Thomas Bretz  12/2000 <mailto:tbretz@uni-sw.gwdg.de>
    1919!
    2020!   Copyright: MAGIC Software Development, 2000-2001
     
    3737
    3838#include "MLog.h"
     39#include "MLogManip.h"
    3940
    4041ClassImp(MReadMarsFile);
     
    101102        return kTRUE;
    102103
    103     *fLog << "MReadMarsFile: Switching to next file '" << GetFileName() << "' ";
     104    *fLog << inf << "MReadMarsFile: Switching to next file '" << GetFileName() << "' ";
    104105    *fLog << "(before Event #" << GetEventNum()-1 << ")" << endl;
    105106    fRun->Process();
  • trunk/MagicSoft/Mars/mbase/MReadTree.cc

    r1051 r1080  
    1616!
    1717!
    18 !   Author(s): Thomas Bretz  12/2000 (tbretz@uni-sw.gwdg.de)
     18!   Author(s): Thomas Bretz  12/2000 <mailto:tbretz@uni-sw.gwdg.de>
    1919!
    2020!   Copyright: MAGIC Software Development, 2000-2001
     
    6363
    6464#include "MTime.h"
     65#include "MFilter.h"
    6566#include "MParList.h"
    6667#include "MTaskList.h"
     
    8687    fTitle = title ? title : "Task to loop over all events in one single tree";
    8788
    88     fVetoList = new TOrdCollection;
     89    fVetoList = new TList;
    8990    fVetoList->SetOwner();
    9091
    91     fNotify = new TOrdCollection;
     92    fNotify = new TList;
    9293
    9394    //
     
    9697    fChain = new TChain(tname);
    9798    fChain->SetNotify(this);
     99
     100    // root 3.02:
     101    // In TChain::Addfile remove the limitation that the file name must contain
     102    // the string ".root". ".root" is necessary only in case one wants to specify
     103    // a Tree in a subdirectory of a Root file with eg, the format:
    98104
    99105    if (fname)
     
    183189        return;
    184190
    185     *fLog << "Branch choosing method enabled (only enabled branches are read)." << endl;
     191    *fLog << inf << "Branch choosing method enabled (only enabled branches are read)." << endl;
    186192    fChain->SetBranchStatus("*", kFALSE);
    187193    fBranchChoosing = kTRUE;
     
    223229    //
    224230    fChain->SetBranchStatus(name, status);
    225     *fLog << (status ? "Enabled" : "Disabled");
     231    *fLog << inf << (status ? "Enabled" : "Disabled");
    226232    *fLog << " subbranch '" << name << "'." << endl;
    227233}
     
    231237// Set the status of all branches in the list to status.
    232238//
    233 void MReadTree::SetBranchStatus(const TOrdCollection *list, Bool_t status)
     239void MReadTree::SetBranchStatus(const TList *list, Bool_t status)
    234240{
    235241    //
     
    247253//  This is the implementation of the Auto Enabling Scheme.
    248254//  For more information see MTask::AddBranchToList.
    249 //  This function loops over all tasks in the tasklist and enables
    250 //  all branches which are requested by the tasks.
    251 //
    252 //  To enable 'unknown' branches which are not in the Branchlist of
     255//  This function loops over all tasks and its filters in the tasklist
     256//  and enables all branches which are requested by the tasks and its
     257//  filters.
     258//
     259//  To enable 'unknown' branches which are not in the branchlist of
    253260//  the tasks you can call EnableBranch
    254261//
     
    267274    if (!tlist)
    268275    {
    269         *fLog << "Cannot use auto enabeling scheme for branches. 'MTaskList' not found." << endl;
     276        *fLog << warn << "Cannot use auto enabeling scheme for branches. 'MTaskList' not found." << endl;
    270277        return;
    271278    }
    272279
    273280    //
    274     // Loop over all tasks in the task list.
     281    // Loop over all tasks iand its filters n the task list.
    275282    //
    276283    MTask *task;
    277284    TIter NextTask(tlist->GetList());
    278285    while ((task=(MTask*)NextTask()))
     286    {
    279287        SetBranchStatus(task->GetListOfBranches(), kTRUE);
     288        const MFilter *filter = task->GetFilter();
     289
     290        if (filter)
     291            SetBranchStatus(filter->GetListOfBranches(), kTRUE);
     292
     293    }
    280294}
    281295
     
    317331    if (!fNumEntries)
    318332    {
    319         *fLog << dbginf << "No entries found in file(s)." << endl;
     333        *fLog << warn << dbginf << "No entries found in file(s)." << endl;
    320334        return kFALSE;
    321335    }
     
    324338    // output logging information
    325339    //
    326     *fLog << fNumEntries << " entries found in file(s)." << endl;
     340    *fLog << inf << fNumEntries << " entries found in file(s)." << endl;
    327341
    328342    //
     
    354368        if (fVetoList->FindObject(oname))
    355369        {
    356             *fLog << "Master branch " << bname << " has veto... skipped." << endl;
     370            *fLog << inf << "Master branch " << bname << " has veto... skipped." << endl;
    357371            DisableSubBranches(branch);
    358372            continue;
     
    377391            // we cannot proceed reading this branch
    378392            //
    379             *fLog << dbginf << "Warning: Class '" << oname << "' not existing in dictionary. Branch skipped." << endl;
     393            *fLog << warn << dbginf << "Warning: Class '" << oname << "' not existing in dictionary. Branch skipped." << endl;
    380394            DisableSubBranches(branch);
    381395            continue;
     
    387401        //
    388402        fChain->SetBranchAddress(bname, pcont);
    389         *fLog << "Master branch address " << bname << " setup for reading." << endl;
     403        *fLog << inf << "Master branch address " << bname << " setup for reading." << endl;
    390404
    391405        //*fLog << "Branch " << bname << " autodel: " << (int)branch->IsAutoDelete() << endl;
     
    395409    }
    396410
    397     *fLog << "MReadTree setup " << num << " master branches addresses." << endl;
     411    *fLog << inf << "MReadTree setup " << num << " master branches addresses." << endl;
    398412
    399413    //
     
    410424
    411425    return kTRUE;
     426}
     427
     428// --------------------------------------------------------------------------
     429//
     430//  Set the ready to save flag of all containers which branchaddresses are
     431//  set for. This is necessary to copy data.
     432//
     433void MReadTree::SetReadyToSave(Bool_t flag)
     434{
     435    TIter Next(fChain->GetStatus());
     436
     437    TChainElement *element = NULL;
     438    while ((element=(TChainElement*)Next()))
     439    {
     440        //
     441        // Check whether the branch is enabled
     442        //
     443        if (!element->GetStatus())
     444            continue;
     445
     446        //
     447        // Get the pointer to the pointer of the corresponding container
     448        //
     449        MParContainer **pcont = (MParContainer**)element->GetBaddress();
     450
     451        //
     452        // Check whether the pointer is not NULL
     453        //
     454        if (!pcont || !*pcont)
     455            continue;
     456
     457        //
     458        // Set the ready to save status of the container.
     459        //
     460        (*pcont)->SetReadyToSave(flag);
     461    }
     462
     463    //
     464    // Set the ready to save status of this task (used?), too
     465    //
     466    MTask::SetReadyToSave(flag);
    412467}
    413468
     
    421476Bool_t MReadTree::Process()
    422477{
     478    SetReadyToSave();
    423479    return fChain->GetEntry(fNumEntry++) != 0;
    424480}
     
    430486Bool_t MReadTree::GetEvent()
    431487{
     488    SetReadyToSave();
    432489    return fChain->GetEntry(fNumEntry) != 0;
    433490}
     
    442499    if (fNumEntry-dec >= fNumEntries)
    443500    {
    444         *fLog << "MReadTree::DecEventNum: WARNING - Event " << fNumEntry << "-";
     501        *fLog << warn << "MReadTree::DecEventNum: WARNING - Event " << fNumEntry << "-";
    445502        *fLog << dec << "=" << (Int_t)fNumEntry-dec << " out of Range." << endl;
    446503        return kFALSE;
     
    460517    if (fNumEntry+inc >= fNumEntries)
    461518    {
    462         *fLog << "MReadTree::IncEventNum: WARNING - Event " << fNumEntry << "+";
     519        *fLog << warn << "MReadTree::IncEventNum: WARNING - Event " << fNumEntry << "+";
    463520        *fLog << inc << "=" << (Int_t)fNumEntry+inc << " out of Range." << endl;
    464521        return kFALSE;
     
    480537    if (nr >= fNumEntries)
    481538    {
    482         *fLog << "MReadTree::SetEventNum: WARNING - " << nr << " out of Range." << endl;
     539        *fLog << warn << "MReadTree::SetEventNum: WARNING - " << nr << " out of Range." << endl;
    483540        return kFALSE;
    484541    }
     
    522579    fNotify->Add(obj);
    523580}
     581
     582void MReadTree::Print(Option_t *o) const
     583{
     584    *fLog << all << GetDescriptor() << dec << endl;
     585    *fLog << setfill('-') << setw(strlen(GetDescriptor())) << "" << endl;
     586    *fLog << " Files:" << endl;
     587
     588    int i = 0;
     589    TIter Next(fChain->GetListOfFiles());
     590    TObject *obj = NULL;
     591    while ((obj=Next()))
     592        *fLog << " " << i++ << ") " << obj->GetName() << endl;
     593
     594    *fLog << " Entries: " << fNumEntries << endl;
     595    *fLog << " Next Entry: " << fNumEntry << endl;
     596}
  • trunk/MagicSoft/Mars/mbase/MTaskList.cc

    r1076 r1080  
    1616!
    1717!
    18 !   Author(s): Thomas Bretz  12/2000 (tbretz@uni-sw.gwdg.de)
     18!   Author(s): Thomas Bretz  12/2000 <mailto:tbretz@uni-sw.gwdg.de>
    1919!
    2020!   Copyright: MAGIC Software Development, 2000-2001
     
    4343// from the list.                                                          //
    4444//                                                                         //
     45// Warning:                                                                //
     46//  Be carefull if you are writing your tasklist                           //
     47//  (eg. MWriteRootFile("file.root", "MTaskList")) to a file. You may      //
     48//  not be able to initialize a new working tasklist from a file if        //
     49//   a) Two Paramerer containers with the same names are existing in the   //
     50//      MParList.                                                          //
     51//   b) You used a container somewhere which is not part of MParList.      //
     52//      (eg. You specified a pointer to a MH container in MFillH which is  //
     53//      not added to the parameter list.                                   //
     54//                                                                         //
    4555/////////////////////////////////////////////////////////////////////////////
    4656
     
    6878    fTitle = title ? title : "A list for tasks to be executed";
    6979
    70     fTasks = new TOrdCollection;
     80    fTasks = new TList; //OrdCollection;
    7181}
    7282
     
    151161        if (objt || objn==task)
    152162        {
    153             *fLog << dbginf << "Warning: Task '" << task->GetName() << ", 0x" << (void*)task;
     163            *fLog << warn << dbginf << "Warning: Task '" << task->GetName() << ", 0x" << (void*)task;
    154164            *fLog << "' already existing in '" << GetName() << "'... ignoring." << endl;
    155165            return kTRUE;
     
    159169        // Otherwise add it to the list, but print a warning message
    160170        //
    161         *fLog << dbginf << "Warning: Task '" << task->GetName();
     171        *fLog << warn << dbginf << "Warning: Task '" << task->GetName();
    162172        *fLog << "' already existing in '" << GetName() << "'." << endl;
    163173        *fLog << "You may not be able to get a pointer to this task by name." << endl;
     
    168178        if (!fTasks->FindObject(where))
    169179        {
    170             *fLog << dbginf << "Error: Cannot find task after which the new task should be scheduled!" << endl;
     180            *fLog << err << dbginf << "Error: Cannot find task after which the new task should be scheduled!" << endl;
    171181            return kFALSE;
    172182        }
    173183    }
    174184
    175     *fLog << "Adding " << name << " to " << GetName() << " for " << type << "... " << flush;
     185    *fLog << inf << "Adding " << name << " to " << GetName() << " for " << type << "... " << flush;
    176186
    177187    task->SetStreamId(type);
     
    208218Bool_t MTaskList::PreProcess(MParList *pList)
    209219{
    210     *fLog << "Preprocessing... " << flush;
     220    *fLog << all << "Preprocessing... " << flush;
    211221
    212222    fParList = pList;
     
    224234    while ((task=(MTask*)Next()))
    225235    {
    226         *fLog << task->GetName() << "... " << flush;
     236        *fLog << all << task->GetName() << "... " << flush;
    227237
    228238        if (!task->CallPreProcess(fParList))
     
    297307
    298308        default:
    299             *fLog << "MTaskList::Process: Unknown return value from MTask::Process()... ignored." << endl;
     309            *fLog << warn << "MTaskList::Process: Unknown return value from MTask::Process()... ignored." << endl;
    300310        }
    301311    }
     
    310320Bool_t MTaskList::PostProcess()
    311321{
    312     *fLog << "Postprocessing... " << flush;
     322    *fLog << all << "Postprocessing... " << flush;
    313323
    314324    //
     
    338348            return kFALSE;
    339349
    340         *fLog << task->GetName() << "... " << flush;
    341     }
    342 
    343     *fLog << endl;
     350        *fLog << all << task->GetName() << "... " << flush;
     351    }
     352
     353    *fLog << all << endl;
    344354
    345355    return kTRUE;
     
    357367    if (lvl==0)
    358368    {
    359         *fLog << endl;
     369        *fLog << all << endl;
    360370        *fLog << "Execution Statistics: " << endl;
    361371        *fLog << "---------------------" << endl;
     
    379389void MTaskList::Print(Option_t *t) const
    380390{
    381     *fLog << GetDescriptor() << " <" << GetTitle() << ">" << endl;
     391    *fLog << all << endl;
     392    *fLog << GetDescriptor() << endl;
     393    *fLog << setfill('-') << setw(strlen(GetDescriptor())) << "" << endl;
    382394
    383395    fTasks->Print();
  • trunk/MagicSoft/Mars/mbase/MTime.cc

    r1076 r1080  
    1616!
    1717!
    18 !   Author(s): Thomas Bretz  12/2000 (tbretz@uni-sw.gwdg.de)
     18!   Author(s): Thomas Bretz  12/2000 <mailto:tbretz@uni-sw.gwdg.de>
    1919!
    2020!   Copyright: MAGIC Software Development, 2000-2001
  • trunk/MagicSoft/Mars/mbase/MWriteAsciiFile.cc

    r1050 r1080  
    1616!
    1717!
    18 !   Author(s): Thomas Bretz  06/2001 (tbretz@uni-sw.gwdg.de)
     18!   Author(s): Thomas Bretz  06/2001 <mailto:tbretz@uni-sw.gwdg.de>
    1919!
    2020!   Copyright: MAGIC Software Development, 2000-2001
     
    142142        return kTRUE;
    143143
    144     *fLog << dbginf << "Cannot find parameter container '" << fContainer << "'." << endl;
     144    *fLog << err << dbginf << "Cannot find parameter container '" << fContainer << "'." << endl;
    145145    return kFALSE;
    146146}
  • trunk/MagicSoft/Mars/mbase/MWriteFile.cc

    r858 r1080  
    1616!
    1717!
    18 !   Author(s): Thomas Bretz  06/2001 (tbretz@uni-sw.gwdg.de)
     18!   Author(s): Thomas Bretz  06/2001 <mailto:tbretz@uni-sw.gwdg.de>
    1919!
    2020!   Copyright: MAGIC Software Development, 2000-2001
     
    6262    if (!IsFileOpen())
    6363    {
    64         *fLog << dbginf << "Cannot open file '" << GetFileName() << "'" << endl;
     64        *fLog << err << dbginf << "Cannot open file '" << GetFileName() << "'" << endl;
    6565        return kFALSE;
    6666    }
    6767
    68     *fLog << "File '" << GetFileName() << "' open for writing." << endl;
     68    *fLog << inf << "File '" << GetFileName() << "' open for writing." << endl;
    6969
    7070    //
  • trunk/MagicSoft/Mars/mbase/MWriteRootFile.cc

    r1076 r1080  
    1616!
    1717!
    18 !   Author(s): Thomas Bretz  06/2001 (tbretz@uni-sw.gwdg.de)
     18!   Author(s): Thomas Bretz  06/2001 <mailto:tbretz@uni-sw.gwdg.de>
    1919!
    2020!   Copyright: MAGIC Software Development, 2000-2001
     
    3131// To understand how it works, see base class MWriteFile                   //
    3232//                                                                         //
     33// Warning: Checkout the Warning in MTaskList.                             //
     34//                                                                         //
    3335/////////////////////////////////////////////////////////////////////////////
    3436
     
    116118void MWriteRootFile::Print(Option_t *) const
    117119{
    118     cout << "File: " << GetFileName() << dec << endl;
    119     cout << "--------------------------------------------------" << endl;
     120    cout << all << " File: " << GetFileName() << endl;
     121    cout << setfill('-') << setw(strlen(GetFileName())+8) << "" << endl;
    120122
    121123    TTree *t;
Note: See TracChangeset for help on using the changeset viewer.