Changeset 9041 for trunk/MagicSoft


Ignore:
Timestamp:
07/25/08 15:17:20 (16 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/Changelog

    r9039 r9041  
    1919                                                 -*-*- END OF LINE -*-*-
    2020
     21 2008/07/25 Thomas Bretz
     22
     23   * mbase/MStatusDisplay.cc:
     24     - expand path name for csv files
     25
     26   * mfileio/MReadFiles.cc:
     27     - print a warning if no file was added
     28
     29   * mfileio/MReadTree.cc:
     30     - updated warning if no file was added
     31     
     32   * mfileio/MReadScanFile.[h,cc]:
     33     - for safety add a postprocessing removing the contents
     34       from the list
     35     - also removing the contents from the list before filling
     36
     37   * mhbase/MH3.cc:
     38     - fixed an output
     39
     40   * mtools/MTFillMatrix.[h,cc]:
     41     - added a maximum number the eventloop is running over
     42
     43
     44
    2145 2008/07/23 Thomas Bretz
    2246
     
    5175     - added a second InsertUpdate
    5276     - added ExistRow
     77
     78   * datacenter/scripts/runcallisto:
     79     - adapted to all other changes
     80     - removed merpping of caco-files
    5381
    5482
  • trunk/MagicSoft/Mars/mbase/MStatusDisplay.cc

    r9039 r9041  
    29502950        return kFALSE;
    29512951
     2952    gSystem->ExpandPathName(name);
     2953
    29522954    ofstream fout(name);
    29532955    if (!fout)
  • trunk/MagicSoft/Mars/mfileio/MReadFiles.cc

    r9032 r9041  
    260260        *fLog << inf2 << num << " files added to list." << endl;
    261261
     262    if (num==0)
     263        *fLog << warn << "WARNING - No files found at " << txt << endl;
     264
    262265    return num;
    263266}
  • trunk/MagicSoft/Mars/mfileio/MReadScanFile.cc

    r9029 r9041  
    177177Bool_t MReadScanFile::AnalyzeHeader(MParList &plist)
    178178{
     179    fList.Clear("nodelete");
     180
    179181    fLength = -1;
    180182    if (!ReadDelimiter())
     
    191193    }
    192194 */
     195 
    193196    TObjArray *arr = line.Tokenize('*');
    194197
     
    215218}
    216219
     220Int_t MReadScanFile::PostProcess()
     221{
     222    fList.Clear("nodelete");
     223    return kTRUE;
     224}
     225
    217226UInt_t MReadScanFile::GetEntries()
    218227{
  • trunk/MagicSoft/Mars/mfileio/MReadScanFile.h

    r9029 r9041  
    2121    Bool_t ReadHeader();
    2222    Int_t  ReadEvent();
     23    Int_t  PostProcess();
    2324
    2425public:
  • trunk/MagicSoft/Mars/mfileio/MReadTree.cc

    r9036 r9041  
    295295Bool_t MReadTree::Notify()
    296296{
     297    cout << "--notify1--" << endl;
     298
    297299    //
    298300    // Do a consistency check for all branches
     
    300302    if (!CheckBranchSize())
    301303        return kFALSE;
     304
     305    cout << "--notify2--" << endl;
    302306
    303307    *fLog << inf << GetDescriptor() << ": Next file #" << GetFileIndex();
     
    342346        }
    343347
     348    cout << "--done--" << endl;
     349
    344350    return kTRUE;
    345351}
     
    390396    }
    391397    else
    392         *fLog << warn << "WARNING: '" << newname << "' not added to " << GetDescriptor() << endl;
     398        *fLog << warn << GetDescriptor() << ": WARNING - No files found at " << newname << endl;
    393399
    394400    return numfiles;
     
    9941000
    9951001    if (fChain)
     1002    {
     1003//        cout << "LE: " << (int)fChain->GetLastError() << endl;
     1004
    9961005        switch (fChain->GetLastError())
    9971006        {
    9981007        case MChain::kFatalError:
    9991008            *fLog << err << GetDescriptor() << " - ERROR: Notify() failed." << endl;
    1000             return kERROR;
     1009            return kTRUE;
    10011010        case MChain::kCannotAccessFile:
    10021011            *fLog << err << GetDescriptor() << " - ERROR: TChain::LoadTree is unable to access requested file." << endl;
     
    10101019            return kTRUE;
    10111020        }
     1021    }
    10121022
    10131023    return rc;
     
    11801190// --------------------------------------------------------------------------
    11811191//
    1182 //  This schedules a TObject which Notify(9 function is called in case
     1192//  This schedules a TObject which Notify() function is called in case
    11831193//  of MReadTree (TChain) switches from one file in the chain to another
    11841194//  one.
  • trunk/MagicSoft/Mars/mhbase/MH3.cc

    r8936 r9041  
    580580                if (!binsx)
    581581                {
    582                     *fLog << err << dbginf << "Neither '" << bx << "' nor '" << binsx << fName << "' found... aborting." << endl;
     582                    *fLog << err << dbginf << "Neither '" << bx << "' nor '" << fName << "' found... aborting." << endl;
    583583                    return kFALSE;
    584584                }
  • trunk/MagicSoft/Mars/mtools/MTFillMatrix.cc

    r8907 r9041  
    7676// fill.WriteMatrices("myfile.root");
    7777//
     78//
     79// Task List execution
     80// ----------------------------------------------
     81//
     82// The tasklist is excuted in the follwowing order:
     83//   - fReader      set by SetReader
     84//   - fPreTasks    in the order as set with the SetPreTask functions
     85//   - fPreCuts     in the order as set with the SetPreCut  functions
     86//   - Selection    the event selection
     87//   - fPostTasks   in the order as set with the SetPostTask functions
     88//   - Fill Matrix
     89//   - Write output
     90//
    7891/////////////////////////////////////////////////////////////////////////////
    7992#include "MTFillMatrix.h"
     
    163176MTFillMatrix::MTFillMatrix(const char *name, const char *title)
    164177: fReference(0), fReader(0), fDestMatrix1(0), fDestMatrix2(0),
    165   fNumDestEvents1(0), fNumDestEvents2(0), fWriteFile1(0), fWriteFile2(0)
     178  fNumDestEvents1(0), fNumDestEvents2(0), fNumMaxEvents(0),
     179  fWriteFile1(0), fWriteFile2(0)
    166180{
    167181    Init(name, title);
     
    180194MTFillMatrix::MTFillMatrix(const MH3 *ref, const char *name, const char *title)
    181195: fReference(0), fReader(0), fDestMatrix1(0), fDestMatrix2(0),
    182   fNumDestEvents1(0), fNumDestEvents2(0), fWriteFile1(0), fWriteFile2(0)
     196  fNumDestEvents1(0), fNumDestEvents2(0), fNumMaxEvents(0),
     197  fWriteFile1(0), fWriteFile2(0)
    183198{
    184199    Init(name, title);
     
    413428    evtloop.SetLogStream(fLog);
    414429
    415     const Bool_t rc = evtloop.Eventloop();
     430    const Bool_t rc = evtloop.Eventloop(fNumMaxEvents);
    416431
    417432    if (selector)
  • trunk/MagicSoft/Mars/mtools/MTFillMatrix.h

    r8644 r9041  
    2727    Int_t     fNumDestEvents2;
    2828
     29    Int_t     fNumMaxEvents;
     30
    2931    MTask    *fWriteFile1;
    3032    MTask    *fWriteFile2;
     
    5254        fDestMatrix1 = matrix;
    5355        if (num>0)
    54             fNumDestEvents1 = num;
     56            SetNumDestEvents1(num);
    5557    }
    5658    void SetWriteFile1(MTask *write, UInt_t num=0)
     
    5860        fWriteFile1 = write;
    5961        if (num>0)
    60             fNumDestEvents1 = num;
    61     }
    62     void SetNumDestEvents1(UInt_t num)
    63     {
    64         fNumDestEvents1 = num;
     62            SetNumDestEvents1(num);
    6563    }
    6664    void SetDestMatrix2(MHMatrix *matrix, UInt_t num=0)
     
    6866        fDestMatrix2 = matrix;
    6967        if (num>0)
    70             fNumDestEvents2 = num;
     68            SetNumDestEvents2(num);
    7169    }
    7270    void SetWriteFile2(MTask *write, UInt_t num=0)
     
    7472        fWriteFile2 = write;
    7573        if (num>0)
    76             fNumDestEvents2 = num;
     74            SetNumDestEvents2(num);
    7775    }
    78     void SetNumDestEvents2(UInt_t num)
    79     {
    80         fNumDestEvents2 = num;
    81     }
     76    void SetNumDestEvents1(UInt_t num) { fNumDestEvents1 = num; }
     77    void SetNumDestEvents2(UInt_t num) { fNumDestEvents2 = num; }
     78    void SetMaxEvents(UInt_t num)      { fNumMaxEvents = num; }
    8279
    8380    void SetReader(MRead *task) { fReader = task; }
Note: See TracChangeset for help on using the changeset viewer.