Ignore:
Timestamp:
04/23/01 14:16:02 (24 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars/mbase
Files:
2 edited

Legend:

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

    r757 r760  
    5555
    5656// --------------------------------------------------------------------------
     57//
     58//  Default constructor. It creates an TChain instance which represents the
     59//  the Tree you want to read and adds the given file (if you gave one).
     60//  More files can be added using MReadTree::AddFile.
     61//  Also an empty veto list is created. This list is used if you want to
     62//  veto (disable or "don't enable") a branch in the tree.
     63//
    5764MReadTree::MReadTree(const char *tname, const char *fname,
    5865                     const char *name, const char *title)
     
    7279
    7380// --------------------------------------------------------------------------
     81//
     82// Destructor. It deletes the TChain and veto list object
     83//
    7484MReadTree::~MReadTree()
    7585{
     
    7989
    8090// --------------------------------------------------------------------------
     91//
     92//  If you want to read the given tree over several files you must add
     93//  the files here before PreProcess is called. Be carfull: This does
     94//  only work if the trees in the files containing the same branches yet.
     95//
    8196/*Int_t*/ void MReadTree::AddFile(const char *fname)
    8297{
     
    92107// --------------------------------------------------------------------------
    93108//
    94 // open file and check if file is really open
     109//  The PreProcess loops (till now) over the branches in the given tree.
     110//  It checks if the corresponding containers (containers with the same
     111//  name than the branch name) are existing in the Parameter Container List.
     112//  If not, a container of objec type 'branch-name' is created (everything
     113//  after the last semicolon in the branch name is stripped). Only
     114//  branches which don't have a veto (see VetoBranch) are enabled If the
     115//  object isn't found in the root dictionary (a list of classes known by the
     116//  root environment) the branch is skipped and an error message is printed
     117//  out.
    95118//
    96119Bool_t MReadTree::PreProcess (MParList *pList)
     
    167190
    168191// --------------------------------------------------------------------------
     192//
     193//  The Process-function reads one event from the tree (this contains all
     194//  enabled branches) and increases the position in the file by one event.
     195//  (Remark: The position can also be set by some member functions
     196//  If the end of the file is reached the Eventloop is stopped.
    169197Bool_t MReadTree::Process()
    170198{
     
    178206    // get entry
    179207    //
    180     fChain->GetEntry(fNumEntry );
    181 
    182     fNumEntry ++ ;
    183 
    184     return kTRUE;
    185 }
    186 
    187 // --------------------------------------------------------------------------
    188 //
    189 // Close File
    190 //
    191 Bool_t MReadTree::PostProcess()
    192 {
    193     //fFile->Close();
     208    fChain->GetEntry(fNumEntry);
     209
     210    fNumEntry++;
    194211
    195212    return kTRUE;
  • trunk/MagicSoft/Mars/mbase/MReadTree.h

    r757 r760  
    2929    Bool_t PreProcess(MParList *pList);
    3030    Bool_t Process();
    31     Bool_t PostProcess();
    3231
    3332    void AddFile(const char *fname);
Note: See TracChangeset for help on using the changeset viewer.