HRootSource
class description - source file - inheritance tree (.pdf)
protected:
Bool_t fileExists(const TString& name)
virtual TFile* getFile(TString name)
virtual TString getFileName(Text_t* file)
public:
HRootSource(Bool_t fPersistent = kTRUE, Bool_t fMerge = kFALSE)
HRootSource(const HRootSource&)
~HRootSource()
Bool_t addFile(Text_t* file)
static TClass* Class()
void Clear()
void deactivateBranch(Text_t* branchName)
Bool_t disableCategory(Cat_t aCat)
Bool_t disablePartialEvent(Cat_t aCat)
virtual Bool_t finalize()
virtual const Text_t* getCurrentFileName() const
virtual Int_t getCurrentRefId()
virtual Int_t getCurrentRunId()
Bool_t getEvent(Int_t eventN)
Int_t getGlobalRefId()
virtual EDsState getNextEvent(Bool_t doUnpack = kTRUE)
Int_t getSplitLevel()
TTree* getTree()
virtual Bool_t init()
virtual TClass* IsA() const
HRootSource& operator=(const HRootSource&)
void Print()
virtual Bool_t reinit()
void replaceHeaderVersion(Int_t vers, Bool_t replace = kTRUE)
virtual Bool_t rewind()
void setDirectory(Text_t* dirName)
void setEventList(TEventList* el)
void setGlobalRefId(Int_t refId)
Bool_t setInput(Text_t* fileName, Text_t* treeName)
void setRefId(Int_t runId, Int_t refId)
virtual void ShowMembers(TMemberInspector& insp, char* parent)
virtual EDsState skipEvents(Int_t nEv)
virtual void Streamer(TBuffer& b)
void StreamerNVirtual(TBuffer& b)
protected:
TChain* fInput TTree to be read.
TString fDirectory
Stat_t fEntries
Bool_t fPersistency
Bool_t fMerge
Int_t fCursor Number of next event.
Int_t fSplitLevel Split level of input tree
Int_t fCurrentRunId
Int_t fCurrentRefId
Int_t fGlobalRefId
map<Int_t,Int_t> fRefIds !
HEvent* fEventInFile ! Pointer to the event structure in file
TEventList* fEventList
Int_t fLastRunId ! last run number (needed to detect switch to new run)
Bool_t overwriteVersion ! flag for modifying version
Int_t replaceVersion ! value for replacing version is overwriteVersion=kTRUE
HRootSource
This data source can read data from a ROOT file generated by
HYDRA, this includes both the reconstruction and simulation software.
The data source takes care of instantiating the appropriate classes even
if they are non-standard. That is, if you have an input file with
HMdcHitSim instead of HMdcHit; HRootSource will take care of using
HMdcHitSim during the analysis.
HRootSource(Bool_t fPers, Bool_t fMerg)
for fPers==kFALSE, input cats are suppressed in output
for fMerg==kTRUE, partial events in input tree are merged into current
event, if it exists already at init().
~HRootSource(void)
Class destructor, it clears the data source.
Bool_t init(void)
Initializes the data source connecting the parts of the input tree in
the input ROOT file to the event structure used for the analysis. If
no event structure has been set by the user, HRootSource::init() will
set one read from the input file. If it exists, it will be used as such
(fMerge==kFALSE) or merged with the one in the input file (fMerge==kTRUE).
EDsState getNextEvent(Bool_t doUnpack)
Retrieves next event in the input file.
Bool_t getEvent(Int_t eventN)
Retrieves event in position eventN in the input file, copying the
information to the event structure.
void Clear(void)
Closes the input file.
void setDirectory(Text_t dirName[])
Sets the directory where to read files from.
Bool_t fileExists(const TString &name)
Checks for the existence on one file.
TString getFileName(Text_t *file)
Bool_t addFile(Text_t *file)
Bool_t setInput(Text_t *fileName,Text_t *treeName)
Sets the input file and tree. Opening the corresponding files, it also
loads in memory the input event description so the disableCategory()
method can be used.
Bool_t disableCategory(Cat_t aCat)
Disables the category aCat so it is not read even if it is stored in
the input file. This method shouldn't be called after init()
Returns kTRUE if the aCat was stored in the input file and has succesfully
been disabled, otherwise the return value is kFALSE.
Bool_t disablePartialEvent(Cat_t aCat)
Int_t getSplitLevel(void)
Returns the split level of the input tree.
void deactivateBranch(Text_t *branchName)
Deactivates a branch so it is not read.
This method is deprecated, use disableCategory() instead.
TTree* getTree(void)
Returns the input tree.
EDsState skipEvents(Int_t nEv)
TFile* getFile(TString name)
Inline Functions
void setEventList(TEventList* el)
Bool_t rewind()
Bool_t reinit()
Bool_t finalize()
Int_t getCurrentRunId()
Int_t getCurrentRefId()
Int_t getGlobalRefId()
void setRefId(Int_t runId, Int_t refId)
void setGlobalRefId(Int_t refId)
const Text_t* getCurrentFileName() const
void Print()
void replaceHeaderVersion(Int_t vers, Bool_t replace = kTRUE)
TClass* Class()
TClass* IsA() const
void ShowMembers(TMemberInspector& insp, char* parent)
void Streamer(TBuffer& b)
void StreamerNVirtual(TBuffer& b)
HRootSource HRootSource(const HRootSource&)
HRootSource& operator=(const HRootSource&)
Author: Manuel Sanchez
Last update: 08/10/2003 by Romain Holzmann
Copyright GENP (Univ. Santiago de Compostela)
ROOT page - Class index - Class Hierarchy - Top of the page
This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.