seed::TSeedList
class description - source file - inheritance tree
private:
Bool_t FillNextSeed()
Bool_t FillSeed(list<seed::TSeedABC*>& callStack)
protected:
seed::TSeedList TSeedList()
public:
seed::TSeedList TSeedList(const seed::TSeedList& slp)
virtual void ~TSeedList()
void Add(seed::TSeedABC* Seed)
static TClass* Class()
Bool_t CreateAllBranches(seed::TEventSample* pES, TTree* pTree)
void EnableAllSeeds(const Bool_t bEnable = kTRUE)
Bool_t EnableSeed(const Char_t* strLabel, const Bool_t bEnable = kTRUE)
Bool_t EndFillPhase()
Bool_t FillSeeds(const Int_t iEventNo)
static seed::TSeedList* GetInstance()
void GetNumberOfFilledObjects()
seed::TSeedABC* GetSeed(const Char_t* strLabel)
virtual TClass* IsA() const
Bool_t IsSeedEnabled(const Char_t* strLabel)
virtual Bool_t Notify()
seed::TSeedABC* SeedRequestsSeedData(list<seed::TSeedABC*>& callStack, const char* cRequest)
virtual void ShowMembers(TMemberInspector& insp, char* parent)
Bool_t StartFillPhase(seed::TEventSample* pES, seed::TSingleEntryTree* ntuple, TTree* pTargetTree)
virtual void Streamer(TBuffer& b)
void StreamerNVirtual(TBuffer& b)
private:
static seed::TSeedList* fInstance holds a pointer to the one and only instance of type TSeedList, accessible and initialized by getInstance()
map<std::string,seed::TSeedABC*> fMapLabelSeed stores the TSeed-s, accessible by their labels
set<seed::TSeedABC*> fSeedsToFill holds pointer to seeds whose FillSeedData is still to be called during the current entry
seed::TEventSample* fEventSample currently filled TEventSample
seed::TSingleEntryTree* fNtuple ntuple currently read out
TTree* fSeedTree tree to be filled
Int_t fEventNo number of the curretly filled entry
This class serves as a database for all available seed::TSeedABC derived
classes. It is implemented as a singleton.
A TSeedABC derived class TMySeed is made available by calling its default
constructor, which is usually done by creating a global static object of
type TMySeed in TMySeed's header:
namespace { static TMySeed globalstaticMySeed; }
Upon program start all linked seeds will register (via initialization of this
global object) with the seed::TSeedList.
The seed::TEventSample can enable / disable seeds. If a seed is disables its
branch will not be filled during seed::TEventSample::Create calls and its
data will not be read during seed::TEventSample::SetEvent calls (the seed
will not be able to access any data). Not writing and / or reading data
increases the bandwidth.
TSeedList():
fEventSample(0), fNtuple(0), fSeedTree(0), fEventNo(-1)
std constructor, called only by the static method seed::TSeedList::GetInstance,
thus private.
~TSeedList()
std destructor. Only called at program end.
TSeedList(const TSeedList & slp)
this is a singleton, thus the copy constructor should throw an exception.
Has to be public as Cint needs it.
seed::TSeedList* GetInstance()
returns the address of the one and only instantiated seed::TSeedList. If no
instatiation exists yet a new object will be created. This is the public access to
the singleton seed::TSeedList.
void Add(seed::TSeedABC * Seed)
Add a seed to the list of seeds. Called by the static global seed init objects
defined by the macro CREATE_SEED (see seed::TSeedABC).
Parameters
Seed: pointer to the seed to add
Bool_t FillSeeds(const Int_t iEventNo)
Initializes the production of the Seeds' data. If successful
(i.e. if there is a first entry) it returns true.
Bool_t FillNextSeed()
Continues calling the enabled seed's PreFillSeedData by iterating through the
map. As long as this method returns true the calls were successful, otherwise
there was no further entry (the iteration reached the end of the map) or the
current map entry's PreFillSeedData() returned false.
CreateFirstObjList has to be called first
Bool_t FillSeed(std::list< seed::TSeedABC* >& callStack)
calls PreFillSeedData for the last element in the callStack
seed::TSeedABC* GetSeed(const Char_t *strLabel)
returns a seed given its label
Bool_t EnableSeed(const Char_t *strLabel, const Bool_t bEnable)
this Seed is to be used
Bool_t IsSeedEnabled(const Char_t *strLabel)
checks whether a seed is enabled
void EnableAllSeeds(const Bool_t bEnable)
enables all seeds
Bool_t CreateAllBranches(seed::TEventSample * pES,
TTree * pTree)
calls seed::TSeedABC::CreateBranch() for all enabled seeds
Bool_t Notify()
called by TEventSample's ntuple TChain if a new file is opened
to notify of new leaf pointers. Updates the transfer tables by
resetting them and (re-)running all seeds' Init methods
void GetNumberOfFilledObjects()
couts the number of objects filled by all enabled seeds
seed::TSeedABC* SeedRequestsSeedData(std::list< seed::TSeedABC* >& callStack,
const char* cRequest)
return the SeedData of the seed with the name cRequest.
if this data is not yet generated for the current ntuple entry
if will be generated now. This method checks for circular dependencies
using its call stack.
Arguments:
callStack: Seeds that have caused this call to be generated
cRequest: name of the seed of which data is requested
Bool_t StartFillPhase(
seed::TEventSample * pES,
seed::TSingleEntryTree* ntuple,
TTree* pTargetTree)
called to signal the begin of ownership by a seed::TEventSample
Bool_t EndFillPhase()
called to free TSeedList from ownership of one TEvenTSample (see StartFillPhase)
Inline Functions
TClass* Class()
TClass* IsA() const
void ShowMembers(TMemberInspector& insp, char* parent)
void Streamer(TBuffer& b)
void StreamerNVirtual(TBuffer& b)
Last update: Tue Feb 25 11:33:32 2003
ROOT page - Class index - 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.