Ignore:
Timestamp:
07/29/03 13:18:57 (21 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars/mfileio
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/mfileio/MCT1ReadPreProc.cc

    r2247 r2296  
    125125// Add this file as the last entry in the chain
    126126//
    127 void MCT1ReadPreProc::AddFile(const char *txt)
     127Int_t MCT1ReadPreProc::AddFile(const char *txt, int)
    128128{
    129129    const char *name = gSystem->ExpandPathName(txt);
     
    135135    {
    136136        *fLog << warn << "WARNING - Problem reading header... ignored." << endl;
    137         return;
     137        return 0;
    138138    }
    139139
     
    142142    {
    143143        *fLog << warn << "WARNING - File contains no data... ignored." << endl;
    144         return;
     144        return 0;
    145145    }
    146146
     
    150150
    151151    fFileNames->AddLast(new TNamed(txt, ""));
     152    return 1;
    152153}
    153154
  • trunk/MagicSoft/Mars/mfileio/MCT1ReadPreProc.h

    r2206 r2296  
    9292    ~MCT1ReadPreProc();
    9393
    94     void AddFile(const char *fname);
     94    Int_t AddFile(const char *fname, int i=0);
    9595
    9696    UInt_t GetEntries() { return fEntries; }
  • trunk/MagicSoft/Mars/mfileio/MRead.cc

    r2173 r2296  
    3939#include "MLog.h"
    4040#include "MLogManip.h"
     41
     42#include "MDirIter.h"
    4143
    4244ClassImp(MRead);
     
    98100    return i!=0;
    99101}
     102
     103Int_t MRead::AddFiles(MDirIter &next)
     104{
     105    Int_t rc=0;
     106    TString n;
     107    while (!(n=next()).IsNull())
     108    {
     109        const Int_t num = AddFile(n);
     110        if (num>0)
     111            rc += num;
     112    }
     113    return rc;
     114}
     115
  • trunk/MagicSoft/Mars/mfileio/MRead.h

    r2117 r2296  
    77
    88class MFilter;
     9class MDirIter;
    910
    1011class MRead : public MTask
     
    2223    MFilter *GetSelector() { return fSelector; }
    2324
    24     Int_t AddFile(const char *fname, Int_t entries=-1) { return -1; }
     25    virtual Int_t AddFile(const char *fname, Int_t entries=-1) { return -1; }
     26    Int_t AddFiles(MDirIter &next);
    2527
    2628    Bool_t ReadEnv(const TEnv &env, TString prefix, Bool_t print);
  • trunk/MagicSoft/Mars/mfileio/MReadRflFile.cc

    r2206 r2296  
    399399// Add this file as the last entry in the chain
    400400//
    401 void MReadRflFile::AddFile(const char *txt)
     401Int_t MReadRflFile::AddFile(const char *txt, int)
    402402{
    403403    const char *name = gSystem->ExpandPathName(txt);
     
    424424*/
    425425    fFileNames->AddLast(new TNamed(txt, ""));
     426    return 1;
    426427}
    427428
  • trunk/MagicSoft/Mars/mfileio/MReadRflFile.h

    r2206 r2296  
    4848    ~MReadRflFile();
    4949
    50     void AddFile(const char *fname);
     50    Int_t AddFile(const char *fname, int i=0);
    5151
    5252    Bool_t Rewind() { fNumFile=0; return kTRUE; }
  • trunk/MagicSoft/Mars/mfileio/MReadTree.cc

    r2206 r2296  
    121121
    122122    if (fname)
    123         if (fChain->Add(fname)>0)
    124             SetBit(kChainWasChanged);
     123        AddFile(fname);
     124//        if (fChain->Add(fname)>0)
     125//            SetBit(kChainWasChanged);
    125126}
    126127
     
    586587    if (!GetEntries())
    587588    {
    588         *fLog << warn << dbginf << "No entries found in file(s)" << endl;
     589        *fLog << warn << GetDescriptor() << ": No entries found in file(s)" << endl;
    589590        return kFALSE;
    590591    }
Note: See TracChangeset for help on using the changeset viewer.