Diana Software
Public Member Functions | Private Attributes | Friends | List of all members
MRootFileReader Class Reference

Reader for diana and apollo root files. More...

Inheritance diagram for MRootFileReader:
QRootFileReaderBase

Public Member Functions

virtual void Init (Diana::QEventAssembler &eva)
 Init method is called before event loop. More...
 
virtual bool Do (Diana::QEventAssembler &eva)
 Do method is called for each event. More...
 
virtual void Done ()
 Done method is called after event loop. More...
 
const QErrorJumpToEvent (Long64_t event)
 Jump to particular event in the loop. More...
 
- Public Member Functions inherited from QRootFileReaderBase
virtual ~QRootFileReaderBase ()
 
virtual void SetBranches (Diana::QEventAssembler &eva)
 Set the branch caches. More...
 

Private Attributes

TFile * fRootInput
 Pointer to the currently open ROOT file. More...
 
TEntryList * fEntryList
 ??? More...
 
Long64_t fEntryListEntry
 Entry in the loop if a Cut is specified. More...
 
Long64_t fFileCounter
 Variable for storing file counter in order to check if file changes. More...
 

Friends

class MLightRootFileReader
 

Additional Inherited Members

- Protected Member Functions inherited from QRootFileReaderBase
virtual void LoadQChain ()
 Build a QChain. More...
 
virtual void AddToEvent (const char *brname, Diana::QObject **evData, Diana::QEventAssembler &eva)
 Add an object from a branch to the event. More...
 
virtual std::vector< TBranch * > GetBranches (QChain *chain, Diana::QEventAssembler &eva)
 Get a list of the branches needed by the event. More...
 
- Protected Attributes inherited from QRootFileReaderBase
QChainfChain
 Pointer to the QChain built by LoadQChain() More...
 
Long64_t fEvents
 Total number of events in fChain. More...
 
Long64_t fEventNumber
 Current event number in the loop. More...
 
bool fDeleteInput
 Flag to delete the input files. More...
 
bool fInclusive
 Flag to automatically include ALL branches. More...
 
std::map< std::string, Diana::QObject ** > fObjectList
 ??? More...
 

Detailed Description

Reader for diana and apollo root files.

Author
Marco Vignati

Reads single or multiple ROOT data files containing QTrees.

Definition at line 84 of file MRootFileReader.hh.

Member Function Documentation

◆ Do()

bool MRootFileReader::Do ( Diana::QEventAssembler &  eva)
virtual

Do method is called for each event.

Loads the next entry in the loop. Checks to see if a new file has been opened, and if so calls OpenNewFile().

Definition at line 88 of file MRootFileReader.cc.

◆ Done()

void MRootFileReader::Done ( )
virtual

Done method is called after event loop.

Delete the chain, delete the input if requested.

Definition at line 123 of file MRootFileReader.cc.

◆ Init()

void MRootFileReader::Init ( Diana::QEventAssembler &  eva)
virtual

Init method is called before event loop.

Reads the config parameters, calls LoadQChain(). Calls SetBranches(). And then loads the aliases.

Definition at line 25 of file MRootFileReader.cc.

References QAliases::Add(), and QEventAssembler::GetAliases().

◆ JumpToEvent()

const QError & MRootFileReader::JumpToEvent ( Long64_t  event)
virtual

Jump to particular event in the loop.

Reimplemented from QRootFileReaderBase.

Definition at line 139 of file MRootFileReader.cc.

References QRootFileReaderBase::JumpToEvent(), and QERR_NOT_IMPLEMENTED.

Friends And Related Function Documentation

◆ MLightRootFileReader

friend class MLightRootFileReader
friend

Definition at line 125 of file MRootFileReader.hh.

Member Data Documentation

◆ fEntryList

TEntryList* MRootFileReader::fEntryList
private

???

Entry list if a custom Cut is specified

Definition at line 119 of file MRootFileReader.hh.

◆ fEntryListEntry

Long64_t MRootFileReader::fEntryListEntry
private

Entry in the loop if a Cut is specified.

Definition at line 121 of file MRootFileReader.hh.

◆ fFileCounter

Long64_t MRootFileReader::fFileCounter
private

Variable for storing file counter in order to check if file changes.

Definition at line 123 of file MRootFileReader.hh.

◆ fRootInput

TFile* MRootFileReader::fRootInput
private

Pointer to the currently open ROOT file.

Definition at line 115 of file MRootFileReader.hh.


The documentation for this class was generated from the following files: