v2.10-0 (21000JUN2005)

Go4Analysis
Class TGo4AnalysisObjectManager


class TGo4AnalysisObjectManager
derived from TNamed

This object is responsible for the
organisation of analysis objects. Keeps Folder structures and lists. Aggregate of TGo4Analysis.

Author:
J. Adamczewski
Since: 07-May-2002

Field Summary
 private Bool_tfbCreatedinMake
          Boolean flag indicates, if object was created
in last calls of one of Make* functions
 private Bool_tfbSuppressLoadHistograms
          If this is set to true, any found histogram
will not be loaded from the file current TDirectory.
 const static const Text_t[]fgcANALYSISFOLDER
          top analysis objects reference folder name
 const static const Text_t[]fgcCANVFOLDER
          TCanvas folder name
 const static const Text_t[]fgcCONDFOLDER
          Analysis conditions folder name
 const static const Text_t[]fgcDYNFOLDER
          Dynamic lists folder name
 const static const Text_t[]fgcEVENTFOLDER
          Event references folder name
 const static const Text_t[]fgcHISTFOLDER
          Histograms folder name
 const static const Text_t[]fgcPARAFOLDER
          Analysis user parameters folder name
 const static const Text_t[]fgcPICTFOLDER
          Picture objects folder name
 const static const Text_t[]fgcPROCFOLDER
          Event processor reference folder name
 const static const Text_t[]fgcSRCFOLDER
          Event source reference folder name
 const static const Text_t[]fgcSTOREFOLDER
          Event store reference folder name
 const static const Text_t[]fgcTMPFOLDER
          Temporary dummy folder name
 const static const Text_t[]fgcTOPDYNAMICLIST
          Default name of the default (toplevel) dynamic list
 const static const Text_t[]fgcTOPFOLDER
          Top level folder name
 const static const Text_t[]fgcTREEFOLDER
          Tree reference folder name
 const static const Text_t[]fgcUSRFOLDER
          User objects folder name
 const static const UInt_tfguSUBFOLDERMAXLEN
          Maximum length of subfolder name.
 private Int_tfiDynListCount
          Event counter for dynamic list processing.
 private Int_tfiDynListInterval
          Interval for dynamic list processing
 private TFolder*fxAnalysisDir
          Top Directory for all references to event classes.
 private TFolder*fxCanvasDir
          Directory containing TCanvases.
 private TFolder*fxConditionDir
          Directory containing all condition objects to be used by dynamic list
and by user analysis.
 private TMutex*fxDirMutex
          Mutex protecting the object directories.
 private TGo4DynamicList*fxDynamicList
          The current dynamic list which is processed
by the analysis
 private TFolder*fxDynListDir
          Directory containing all action objects to be used by dynamic list
and by user analysis.
 private TFolder*fxEventDir
          Directory containing references to event structures.
 private TFolder*fxGo4Dir
          Top level Go4 Directory (root folder)
 private TFolder*fxHistogramDir
          Directory containing all histogram objects to be used by dynamic list
and user analysis.
 private TIterator*fxMatchIterator
          Iterator for list of matching objects.
 private TList*fxMatchList
          List of matching objects for name expression.
 private TFolder*fxParameterDir
          Directory containing user parameter objects
 private TFolder*fxPictureDir
          Directory containing the pictures.
 private TFolder*fxProcessorDir
          Directory containing references to event processors.
 private TFolder*fxSourceDir
          Directory containing references to event sources.
 private TFolder*fxStoreDir
          Directory containing references to event stores.
 private TFolder*fxTempFolder
          Temporary folder for nameslist objects.
 private TFolder*fxTreeDir
          Directory containing references to trees.
 private TFolder*fxUserDir
          Directory containing all user objects.

Fields inherited from class TNamed
fName, fTitle

Constructor Summary
TGo4AnalysisObjectManager()
           
TGo4AnalysisObjectManager(const Text_t* name)
           

Destructor Summary
~TGo4AnalysisObjectManager()
           

Method Summary
 Bool_tAddAnalysisCondition(TGo4Condition* con, const Text_t* subfolder)
          Puts a new analysis condition object in corresponding list.
 Bool_tAddCanvas(TCanvas* can, const Text_t* subfolder)
          Puts a new TCanvas in corresponding folder.
 Bool_tAddDynamicHistogram(const Text_t* name, const Text_t* histo, const Text_t* hevx, const Text_t* hmemx, const Text_t* hevy, const Text_t* hmemy, const Text_t* hevz, const Text_t* hmemz, const Text_t* condition, const Text_t* cevx, const Text_t* cmemx, const Text_t* cevy, const Text_t* cmemy)
          Add (create) new dynamic histogram entry which connects an existing
histogram with existing condition and data.
 Bool_tAddDynamicHistogram(TGo4HistogramEntryStatus* settings)
           
 Bool_tAddDynamicList(TGo4DynamicList* list)
          Adds reference to dynamic list object in dynamic list folder
 Bool_tAddEventProcessor(TGo4EventProcessor* pro)
          Add reference to event processor object to Go4 Folder structure.
 Bool_tAddEventSource(TGo4EventSource* source)
          Add reference to event source object to Go4 Folder structure.
 Bool_tAddEventStore(TGo4EventStore* store)
          Add reference to event store object to Go4 Folder structure.
 Bool_tAddEventStructure(TGo4EventElement* ev)
          Add reference to event structure object to Go4 Folder structure.
 Bool_tAddHistogram(TH1* his, const Text_t* subfolder, Bool_t replace)
          Add external histogram to go4 histogram directory.
 Bool_tAddObject(TNamed* anything, const Text_t* subfolder, Bool_t replace)
          Add any external object to the user object folder.
 private Bool_tAddObjectToFolder(TObject* ob, TFolder* fold, const Text_t* subfolder, Bool_t replace, Bool_t uniquename, Bool_t resetbits)
          Add any named object to a folder.
 Bool_tAddParameter(TGo4Parameter* par, const Text_t* subfolder)
          Puts a new parameter object in corresponding folder.
 Bool_tAddPicture(TGo4Picture* pic, const Text_t* subfolder)
          Puts a new picture object in corresponding folder.
 Bool_tAddTree(TTree* tree, const Text_t* subfolder)
          Add reference to a tree in the go4 folder structure.
 Bool_tAddTreeHistogram(const Text_t* hisname, const Text_t* treename, const Text_t* varexp, TCut selection)
          Add Histogram into the dynamic list wich is linked to a tree.
 private voidAppendToDir(TObject* ob, TDirectory* dir)
          Append object ob to directory dir.
 Bool_tCheckDynListInterval()
           
 private voidCleanupDynamicLists(TObject* oldobject)
          Remove reference to object from all dynamic lists.Object type is noticed automatically.
 private Bool_tClearFolder(TFolder* fold)
          Clear (reset) all objects in folder fold, e.g. zero the histograms.
 private Bool_tClearObject(TObject* ob)
          Clear (reset) the specified object.
 Bool_tClearObjects(const Text_t* name)
          Clear (reset) the specified objects.
 voidCloseAnalysis()
          Cleanups required when analysis is closed.
 TFolder*CreateBranchFolder(TObjArray* branchlist, const Text_t* name, const Text_t* Title, Bool_t istopbranch)
          Create a folder with subfolders from a list of TBranchElements.
 TFolder*CreateCompositeBranchFolder(TObjArray* branchlist, TGo4CompositeEvent* compevent, Int_t startindex, Int_t* skip, const Text_t* name, const Text_t* Title)
          Create a folder with subfolders from a list of TBranchElements
that belongs to a TGo4CompositeEvent.
 const Bool_tCreatedInMake()
           
 TFolder*CreateNamesFolder(TFolder* objectfolder)
          Conversion of the TFolder of objects into a TFolder containing
the object names as TObjectStrings.
 TGo4AnalysisObjectNames*CreateNamesList()
          Creates a list of names (keys) of all objects in analysis
directories.
 private TList*CreateObjectList(const Text_t* expr, const Text_t* folder)
          Create a list of objects which names are matching expression expr.
optionally, the search can be limited to given subfolder of
Go4.
 private TList*CreateObjectList(const Text_t* expr, TFolder* fold)
          For recursive search for objects in folder fold that match expression.
 TGo4ObjectStatus*CreateObjectStatus(const Text_t* name, const Text_t* folder)
          Find Object of name in the folder structure and create a complete status object of it.
 TGo4ObjectStatus*CreateObjectStatus(TObject* ob, Bool_t fullinfo)
          Create status object for object ob.
 TGo4TreeStructure*CreateTreeStructure(TTree* thetree)
          Create a tree structure
object that maps the TBranchelements into a TFolder hierarchy
 TGo4TreeStructure*CreateTreeStructure(const Text_t* treename)
          Create a tree structure for a certain tree by name
 private Bool_tDeleteFolder(TFolder* fold)
          Delete all objects in folder fold only if the kGo4CanDelete bit
is set.
 private Bool_tDeleteObject(TObject* ob)
          Delete the specified object if the kGo4CanDelete bit
is set.
 Bool_tDeleteObjects(const Text_t* name)
          Delete object of name, or all objects in folder name, respectively.
 private TObject*FindObjectInFolder(TFolder* folder, const Text_t* fullname)
          Serachs in folder for object with specified name
Uses fxDirMutex until search is working
 TFolder*FindSubFolder(TFolder* parent, const Text_t* subfolder, Bool_t create)
          Get pointer to subfolder of parent specified by name.
 TGo4Condition*GetAnalysisCondition(const Text_t* name)
          Retrieves an analysis condition from list by name.
 TCanvas*GetCanvas(const Text_t* name)
          Retrieves a TCanvas by name from the Canvases folder.
 TGo4DynamicList*GetCurrentDynList()
          Get the currently active dynamic list.
 TGo4DynamicList*GetDynamicList(const Text_t* name)
          Retrieves an dynamic list object from folder by name.
 Int_tGetDynListInterval()
           
 TGo4EventElement*GetEventStructure(const Text_t* name)
          Search reference to event stucture in folder.
 TH1*GetHistogram(const Text_t* name)
          Search histogram in histogram list (directory).
 TNamed*GetObject(const Text_t* name, const Text_t* folder)
          Searches for object by name in all go4 folders.
 TFolder*GetObjectFolder()
          Access to top folder of all objects.
 TGo4Parameter*GetParameter(const Text_t* name)
          Retrieves a parameter object by name from the object folder.
 TGo4Picture*GetPicture(const Text_t* name)
          Retrieves a picture object by name from the object folder.
 TTree*GetTree(const Text_t* name)
          Search tree in tree folder.
 private voidInitPictures(TFolder* fold)
          Initialize histogram references of pictures after reload.
 private Bool_tIsMatching(const Text_t* string, const Text_t* expression)
          Finds out if string is matching the expression
 private Bool_tLoadFolder(TFolder* source, TFolder* destination, Bool_t replace)
          Update folder destination with the content of the folder source.
 private Bool_tLoadFolder(TDirectory* source, TFolder* destination, Bool_t replace)
          Update folder destination with the content of the directory source.
 Bool_tLoadObjects(TFile* statusfile)
          Load objects from file.
 TH1*MakeH1(const Text_t* histotype, const Text_t* foldername, const Text_t* histoname, Int_t nbinsx, Axis_t xlow, Axis_t xup, const Text_t* title, const Text_t* xtitle, const Text_t* ytitle)
          Create 1-dim histogram in histogram folder.
 TH2*MakeH2(const Text_t* histotype, const Text_t* foldername, const Text_t* histoname, Int_t nbinsx, Axis_t xlow, Axis_t xup, Int_t nbinsy, Axis_t ylow, Axis_t yup, const Text_t* title, const Text_t* xtitle, const Text_t* ytitle)
          Create 2-dim histogram in histogram folder.
 TGo4PolyCond*MakePolyCond(const Text_t* foldername, const Text_t* conditionname, Int_t size, Float_t[2] points, const Text_t* bindhistogram, Bool_t invert)
          Create polygon 2-dim condition in conditions folder.
 TGo4WinCond*MakeWindowCond(const Text_t* foldername, const Text_t* conditionname, Double_t xlow, Double_t xup, const Text_t* bindhistogram, Bool_t invert)
          Create 1-dim window condition in conditions folder.
 TGo4WinCond*MakeWindowCond(const Text_t* foldername, const Text_t* conditionname, Double_t xlow, Double_t xup, Double_t ylow, Double_t yup, const Text_t* bindhistogram, Bool_t invert)
          Create 2-dim window condition in conditions folder.
 TObject*NextMatchingObject(const Text_t* expr, const Text_t* folder, Bool_t reset)
          Delivers pointer to next object of the Go4 folder structure
with a name matching the expression expr.
 voidPrintConditions(const Text_t* expression)
          Print all condition counters to the terminal.
 voidPrintDynamicList()
          Print entries of current dynamic list.
 private Int_tPrintFolder(TFolder* fold, Option_t* opt, const Text_t* expression)
          Printout all objects in folder fold on the terminal.
 voidPrintHistograms(const Text_t* expression)
          Printout of all histogram statistic counters on the terminal.
 Int_tProcessDynamicList()
          Loop over the dynamic list and process the actions
linked to the entries.
 private Bool_tProtectFolder(TFolder* fold, const Option_t* flags)
          Change protection properties of all objects in this folder as specified.
 private Bool_tProtectObject(TObject* ob, const Option_t* flags)
          Change protection properties of object name as specified.
 Bool_tProtectObjects(const Text_t* name, const Option_t* flags)
          Change protection properties of object name as specified.
 private Bool_tPutToFolder(TObject* ob, TFolder* destination, Bool_t replace)
          Method used by both LoadFolder variants to assign object ob into destination
folder by object type.
 Bool_tRemoveAnalysisCondition(const Text_t* name)
          Removes analysis condition from list by name.
 Bool_tRemoveCanvas(const Text_t* name)
          Removes TCanvas by name.
 Bool_tRemoveDynamicEntry(const Text_t* entryname, const Text_t* listname)
          Remove entry of that name from dynamic list of listname.
 Bool_tRemoveDynamicList(const Text_t* name)
          Remove reference to dynamic list of name from go4 folder structure.
 voidRemoveDynamicList(TGo4DynamicList* list)
          Remove reference to dynamic list from go4 folder structure.
 Bool_tRemoveEventProcessor(TGo4EventProcessor* pro)
          Remove reference to event processor from go4 folder structure.
 Bool_tRemoveEventSource(TGo4EventSource* source)
          Remove reference to event source from go4 folder structure.
 Bool_tRemoveEventStore(TGo4EventStore* store)
          Remove reference to event store from go4 folder structure.
 Bool_tRemoveEventStructure(TGo4EventElement* ev)
          Remove reference to event structure from go4 folder structure.
 private voidRemoveFromDir(TFolder* fold, TDirectory* dir)
          Remove all objects in folder fold from directory dir, recursively.
 Bool_tRemoveHistogram(const Text_t* name, Bool_t del)
          Removes histogram from histogram dir by name.
 Bool_tRemoveObject(const Text_t* name, Bool_t del)
          Removes object from user object folder by name.
 private Bool_tRemoveObjectFromFolder(const Text_t* fullname, TFolder* fold, Bool_t isDel)
          Remove object specified by full name ("subfolder/subssubfolder/name") from folder fold.
 Bool_tRemoveParameter(const Text_t* name)
          Removes parameter by name.
 Bool_tRemovePicture(const Text_t* name)
          Removes picture by name.
 Bool_tRemoveTree(TTree* tree, const Text_t* stepname)
          Remove reference to a tree in the go4 folder structure.
 Bool_tResetBackStores()
          Reset all registered backstore instances.Called by dynamic list processing.
 voidResetCurrentDynList()
          Reset the current dynamic list.
 private Bool_tSaveFolder(TFolder* source)
          Save this folder as a new subdirectory (TDirectory) of the current directory
i.e. the currently open file.
 voidSaveObjects(TFile* file)
          Save folder structure to given file.
 Bool_tSetAnalysisCondition(const Text_t* name, TGo4Condition* con, Bool_t counter, TFolder* parent)
          Set existing analysis condition of name to the values
of external condition object con.
 Bool_tSetCanvas(const Text_t* name, TGo4CanvasStatus* stat, TFolder* parent)
          Set existing picture of name to the values
of external CanvasStatus object.
 voidSetCurrentDynList(TGo4DynamicList* list)
          Set the given dynamic list as current. i.e. this list is
used for processing in the analysis.
 Bool_tSetDynamicEntryStatus(const Text_t* name, TGo4DynamicEntryStatus* state, const Text_t* listname)
          Set dynamic entry of name "name" to the values specified by external
dynamic entry status "state".
 voidSetDynListInterval(Int_t val)
           
 Bool_tSetParameter(const Text_t* name, TGo4Parameter* par, TFolder* parent)
          Set existing parameter of name to the values
of external parameter object par.
 Bool_tSetPicture(const Text_t* name, TGo4Picture* pic, TFolder* parent)
          Set existing picture of name to the values
of external picture object pic.
 private TObject*TestObject(TFolder* folder, const Text_t* & pathname, const Text_t* objectname, const TClass* cl)
          Test, if object exists in provided folder.

Methods inherited from class TNamed
operator=, Clear, Clone, Compare, Copy, FillBuffer, GetName, GetTitle, Hash, IsSortable, SetName, SetNameTitle, SetTitle, ls, Print, Sizeof, Class, Class_Name, Class_Version, Dictionary, IsA, ShowMembers, Streamer, StreamerNVirtual, DeclFileName, ImplFileLine, ImplFileName, DeclFileLine

Field Detail

fbCreatedinMake

private Bool_t fbCreatedinMake
Boolean flag indicates, if object was created
in last calls of one of Make* functions

fbSuppressLoadHistograms

private Bool_t fbSuppressLoadHistograms
If this is set to true, any found histogram
will not be loaded from the file current TDirectory.
To be used to avoid Picture referenced Histograms to
appear in the Pictures folder

fgcANALYSISFOLDER

public const static const Text_t[] fgcANALYSISFOLDER
top analysis objects reference folder name

fgcCANVFOLDER

public const static const Text_t[] fgcCANVFOLDER
TCanvas folder name

fgcCONDFOLDER

public const static const Text_t[] fgcCONDFOLDER
Analysis conditions folder name

fgcDYNFOLDER

public const static const Text_t[] fgcDYNFOLDER
Dynamic lists folder name

fgcEVENTFOLDER

public const static const Text_t[] fgcEVENTFOLDER
Event references folder name

fgcHISTFOLDER

public const static const Text_t[] fgcHISTFOLDER
Histograms folder name

fgcPARAFOLDER

public const static const Text_t[] fgcPARAFOLDER
Analysis user parameters folder name

fgcPICTFOLDER

public const static const Text_t[] fgcPICTFOLDER
Picture objects folder name

fgcPROCFOLDER

public const static const Text_t[] fgcPROCFOLDER
Event processor reference folder name

fgcSRCFOLDER

public const static const Text_t[] fgcSRCFOLDER
Event source reference folder name

fgcSTOREFOLDER

public const static const Text_t[] fgcSTOREFOLDER
Event store reference folder name

fgcTMPFOLDER

public const static const Text_t[] fgcTMPFOLDER
Temporary dummy folder name

fgcTOPDYNAMICLIST

public const static const Text_t[] fgcTOPDYNAMICLIST
Default name of the default (toplevel) dynamic list

fgcTOPFOLDER

public const static const Text_t[] fgcTOPFOLDER
Top level folder name

fgcTREEFOLDER

public const static const Text_t[] fgcTREEFOLDER
Tree reference folder name

fgcUSRFOLDER

public const static const Text_t[] fgcUSRFOLDER
User objects folder name

fguSUBFOLDERMAXLEN

public const static const UInt_t fguSUBFOLDERMAXLEN
Maximum length of subfolder name.

fiDynListCount

private Int_t fiDynListCount
Event counter for dynamic list processing.
After each fgiDYNLISTINTERVAL counts the entries in the dynamic list
are updated with the previous events (e.g. loop over a tree for this range)

fiDynListInterval

private Int_t fiDynListInterval
Interval for dynamic list processing

fxAnalysisDir

private TFolder* fxAnalysisDir
Top Directory for all references to event classes.

fxCanvasDir

private TFolder* fxCanvasDir
Directory containing TCanvases.

fxConditionDir

private TFolder* fxConditionDir
Directory containing all condition objects to be used by dynamic list
and by user analysis.

fxDirMutex

private TMutex* fxDirMutex
Mutex protecting the object directories.

fxDynamicList

private TGo4DynamicList* fxDynamicList
The current dynamic list which is processed
by the analysis
supplierCardinality 1
link aggregationByValue

fxDynListDir

private TFolder* fxDynListDir
Directory containing all action objects to be used by dynamic list
and by user analysis.

fxEventDir

private TFolder* fxEventDir
Directory containing references to event structures.

fxGo4Dir

private TFolder* fxGo4Dir
Top level Go4 Directory (root folder)

fxHistogramDir

private TFolder* fxHistogramDir
Directory containing all histogram objects to be used by dynamic list
and user analysis.

fxMatchIterator

private TIterator* fxMatchIterator
Iterator for list of matching objects.

fxMatchList

private TList* fxMatchList
List of matching objects for name expression.

fxParameterDir

private TFolder* fxParameterDir
Directory containing user parameter objects

fxPictureDir

private TFolder* fxPictureDir
Directory containing the pictures.

fxProcessorDir

private TFolder* fxProcessorDir
Directory containing references to event processors.

fxSourceDir

private TFolder* fxSourceDir
Directory containing references to event sources.

fxStoreDir

private TFolder* fxStoreDir
Directory containing references to event stores.

fxTempFolder

private TFolder* fxTempFolder
Temporary folder for nameslist objects.

fxTreeDir

private TFolder* fxTreeDir
Directory containing references to trees.

fxUserDir

private TFolder* fxUserDir
Directory containing all user objects.
Constructor Detail

TGo4AnalysisObjectManager

public TGo4AnalysisObjectManager()

TGo4AnalysisObjectManager

public TGo4AnalysisObjectManager(const Text_t* name)
Method Detail

~TGo4AnalysisObjectManager

public synchronized ~TGo4AnalysisObjectManager()
Method Detail

AddAnalysisCondition

public Bool_t AddAnalysisCondition(TGo4Condition* con, const Text_t* subfolder)
Puts a new analysis condition object in corresponding list.
Object is owned by list afterwards. Returns false if object
of that name already exists in list.

AddCanvas

public Bool_t AddCanvas(TCanvas* can, const Text_t* subfolder)
Puts a new TCanvas in corresponding folder.
Object is owned by folder afterwards. Returns false if object
of that name already exists in list.

AddDynamicHistogram

public Bool_t AddDynamicHistogram(const Text_t* name, const Text_t* histo, const Text_t* hevx, const Text_t* hmemx, const Text_t* hevy, const Text_t* hmemy, const Text_t* hevz, const Text_t* hmemz, const Text_t* condition, const Text_t* cevx, const Text_t* cmemx, const Text_t* cevy, const Text_t* cmemy)
Add (create) new dynamic histogram entry which connects an existing
histogram with existing condition and data.
Dynamic entry is specified by name. Histogram histo will be searched in
registered histograms folder, condition in conditions folder. If
condition is true or not existing (condition=0), histogram will be filled
from the values that are found in registered eventstructure classes of
names hevx, hevy, hevz at the data members of names hmemx, hmemy, hmemz,
for the three coordinate axes, respectively. Histogram dimension is
checked against given values. Condition is tested regarding the
events cevx, cevy with members cmemx, cmemy

AddDynamicHistogram

public Bool_t AddDynamicHistogram(TGo4HistogramEntryStatus* settings)

AddDynamicList

public Bool_t AddDynamicList(TGo4DynamicList* list)
Adds reference to dynamic list object in dynamic list folder

AddEventProcessor

public Bool_t AddEventProcessor(TGo4EventProcessor* pro)
Add reference to event processor object to Go4 Folder structure. To be used by framework only!

AddEventSource

public Bool_t AddEventSource(TGo4EventSource* source)
Add reference to event source object to Go4 Folder structure. To be used by framework only!

AddEventStore

public Bool_t AddEventStore(TGo4EventStore* store)
Add reference to event store object to Go4 Folder structure. To be used by framework only!

AddEventStructure

public Bool_t AddEventStructure(TGo4EventElement* ev)
Add reference to event structure object to Go4 Folder structure. To be used by framework only!

AddHistogram

public Bool_t AddHistogram(TH1* his, const Text_t* subfolder, Bool_t replace)
Add external histogram to go4 histogram directory. Histogram will be owned
and streamed by go4 histogram list afterwards.

AddObject

public Bool_t AddObject(TNamed* anything, const Text_t* subfolder, Bool_t replace)
Add any external object to the user object folder.
Object is owned by go4 aferwards and will be saved automatically.
Object is accessible by name from the go4 display and from the
analysis itself. Subfolder of UserObjects may be specified.
If replace is true, old object of same name will be deleted and
replaced by the added one.

AddObjectToFolder

private Bool_t AddObjectToFolder(TObject* ob, TFolder* fold, const Text_t* subfolder, Bool_t replace, Bool_t uniquename, Bool_t resetbits)
Add any named object to a folder. Used by AddHistogram, AddParameter etc. methods.
If replace is true, old object of same name will be removed first.
If uniquename is true, there are no two objects of same name allowed even
in different subfolders (important for histograms registered to gROOT).
if resetbits is true, go4 deletion and reset protection bits are set to defaults.
Otherwise, object bits of ob are not touched.

AddParameter

public Bool_t AddParameter(TGo4Parameter* par, const Text_t* subfolder)
Puts a new parameter object in corresponding folder.
Object is owned by folder afterwards. Returns false if object
of that name already exists in list.

AddPicture

public Bool_t AddPicture(TGo4Picture* pic, const Text_t* subfolder)
Puts a new picture object in corresponding folder.
Object is owned by folder afterwards. Returns false if object
of that name already exists in list.

AddTree

public Bool_t AddTree(TTree* tree, const Text_t* subfolder)
Add reference to a tree in the go4 folder structure.
If name of subfolder is given, tree will be assigned
to subfolder, e.g. dedicated to analysis step. If subfolder is zero,
the tree will be put into general tree folder.

AddTreeHistogram

public Bool_t AddTreeHistogram(const Text_t* hisname, const Text_t* treename, const Text_t* varexp, TCut selection)
Add Histogram into the dynamic list wich is linked to a tree.
If Histogram of hisname already exists, this histogram will taken.
if not, the histogram will be created on first TTree::Draw.
Strings varexp and selection are used for applying cuts and variables
to plot.

AppendToDir

private void AppendToDir(TObject* ob, TDirectory* dir)
Append object ob to directory dir. If object of same name
already existed there, it is replaced.

CheckDynListInterval

public Bool_t CheckDynListInterval()

CleanupDynamicLists

private void CleanupDynamicLists(TObject* oldobject)
Remove reference to object from all dynamic lists.Object type is noticed automatically.

ClearFolder

private Bool_t ClearFolder(TFolder* fold)
Clear (reset) all objects in folder fold, e.g. zero the histograms.
Objects are not deleted!

ClearObject

private Bool_t ClearObject(TObject* ob)
Clear (reset) the specified object. Depending on
type, different actions may happen (clear histo, zero graph)

ClearObjects

public Bool_t ClearObjects(const Text_t* name)
Clear (reset) the specified objects. Method will first
clear all objects in any folder if it is matching the namestring.
If no such folder exists, object of name is searched and cleared.
Returns kFALSE in case of not found objects.

CloseAnalysis

public void CloseAnalysis()
Cleanups required when analysis is closed.

CreateBranchFolder

public TFolder* CreateBranchFolder(TObjArray* branchlist, const Text_t* name, const Text_t* Title, Bool_t istopbranch)
Create a folder with subfolders from a list of TBranchElements. For each
subbranch a subfolder will be created, until a TBranchElement
without subbranches occur. The latter will be put into a
TGo4ObjectStatus class.
Flag istopbranch is used to indicate top level call for composite event.

CreateCompositeBranchFolder

public TFolder* CreateCompositeBranchFolder(TObjArray* branchlist, TGo4CompositeEvent* compevent, Int_t startindex, Int_t* skip, const Text_t* name, const Text_t* Title)
Create a folder with subfolders from a list of TBranchElements
that belongs to a TGo4CompositeEvent. For each
subbranch a subfolder will be created, until a TBranchElement
without subbranches occur. The latter will be put into a
TGo4ObjectStatus class.

CreatedInMake

public const Bool_t CreatedInMake()

CreateNamesFolder

public TFolder* CreateNamesFolder(TFolder* objectfolder)
Conversion of the TFolder of objects into a TFolder containing
the object names as TObjectStrings. Subfolders are translated to
subfolders containing subfolder names.

CreateNamesList

public TGo4AnalysisObjectNames* CreateNamesList()
Creates a list of names (keys) of all objects in analysis
directories.

CreateObjectList

private TList* CreateObjectList(const Text_t* expr, const Text_t* folder)
Create a list of objects which names are matching expression expr.
optionally, the search can be limited to given subfolder of
Go4. By default, all registered objects are compared.

CreateObjectList

private TList* CreateObjectList(const Text_t* expr, TFolder* fold)
For recursive search for objects in folder fold that match expression.

CreateObjectStatus

public TGo4ObjectStatus* CreateObjectStatus(const Text_t* name, const Text_t* folder)
Find Object of name in the folder structure and create a complete status object of it. Used by GUI command to get updated information on certain object.
Optionally, name of search folder may be given.

CreateObjectStatus

public TGo4ObjectStatus* CreateObjectStatus(TObject* ob, Bool_t fullinfo)
Create status object for object ob. If fullinfo flag is false,
skip time consuming parts of the status (case of nameslist)

CreateTreeStructure

public TGo4TreeStructure* CreateTreeStructure(TTree* thetree)
Create a tree structure
object that maps the TBranchelements into a TFolder hierarchy

CreateTreeStructure

public TGo4TreeStructure* CreateTreeStructure(const Text_t* treename)
Create a tree structure for a certain tree by name

DeleteFolder

private Bool_t DeleteFolder(TFolder* fold)
Delete all objects in folder fold only if the kGo4CanDelete bit
is set. Usually, only objects created from the gui may be deleted.

DeleteObject

private Bool_t DeleteObject(TObject* ob)
Delete the specified object if the kGo4CanDelete bit
is set. Usually, only objects created from the gui may be deleted.

DeleteObjects

public Bool_t DeleteObjects(const Text_t* name)
Delete object of name, or all objects in folder name, respectively.
Objects are only deleted if delete protection is false. Usuallay,
Objects registered from user code are delete protected by default.
Objects created dynamically from gui are not delete protected.

FindObjectInFolder

private TObject* FindObjectInFolder(TFolder* folder, const Text_t* fullname)
Serachs in folder for object with specified name
Uses fxDirMutex until search is working

FindSubFolder

public TFolder* FindSubFolder(TFolder* parent, const Text_t* subfolder, Bool_t create)
Get pointer to subfolder of parent specified by name. If create is true, create it

GetAnalysisCondition

public TGo4Condition* GetAnalysisCondition(const Text_t* name)
Retrieves an analysis condition from list by name. Returns 0 if no
such condtion.

GetCanvas

public TCanvas* GetCanvas(const Text_t* name)
Retrieves a TCanvas by name from the Canvases folder. Returns 0 if no
such object.

GetCurrentDynList

public TGo4DynamicList* GetCurrentDynList()
Get the currently active dynamic list.

GetDynamicList

public TGo4DynamicList* GetDynamicList(const Text_t* name)
Retrieves an dynamic list object from folder by name.

GetDynListInterval

public Int_t GetDynListInterval()

GetEventStructure

public TGo4EventElement* GetEventStructure(const Text_t* name)
Search reference to event stucture in folder.

GetHistogram

public TH1* GetHistogram(const Text_t* name)
Search histogram in histogram list (directory).

GetObject

public TNamed* GetObject(const Text_t* name, const Text_t* folder)
Searches for object by name in all go4 folders. Returns
pointer to object. If
object of that name does not exist, null is returned
Optionally, name of folder may be specified; object is
only searched within that folder then. D

GetObjectFolder

public TFolder* GetObjectFolder()
Access to top folder of all objects.

GetParameter

public TGo4Parameter* GetParameter(const Text_t* name)
Retrieves a parameter object by name from the object folder. Returns 0 if no
such paramter.

GetPicture

public TGo4Picture* GetPicture(const Text_t* name)
Retrieves a picture object by name from the object folder. Returns 0 if no
such picture.

GetTree

public TTree* GetTree(const Text_t* name)
Search tree in tree folder.

InitPictures

private void InitPictures(TFolder* fold)
Initialize histogram references of pictures after reload.

IsMatching

private Bool_t IsMatching(const Text_t* string, const Text_t* expression)
Finds out if string is matching the expression

LoadFolder

private Bool_t LoadFolder(TFolder* source, TFolder* destination, Bool_t replace)
Update folder destination with the content of the folder source. Subfolder
structure of source is recreated in destination, but existing objects are not
replaced/deleted unless replace==kTRUE

LoadFolder

private Bool_t LoadFolder(TDirectory* source, TFolder* destination, Bool_t replace)
Update folder destination with the content of the directory source. Subdirectory
structure of source is converted into subfolder of destination, but existing objects are not
replaced/deleted unless replace==kTRUE

LoadObjects

public Bool_t LoadObjects(TFile* statusfile)
Load objects from file. File should be opened and closed by the
caller.

MakeH1

public TH1* MakeH1(const Text_t* histotype, const Text_t* foldername, const Text_t* histoname, Int_t nbinsx, Axis_t xlow, Axis_t xup, const Text_t* title, const Text_t* xtitle, const Text_t* ytitle)
Create 1-dim histogram in histogram folder.
If histogram exists in autosave file, it will be taken from autosavefile.
If type of existing histogram does not match with provided, old histogram
will be removed and new proper will be created.
Parameters are:
histotype = "C", "D", "F", "I", "S" corresonds to different TH1* types
folderame - name of folder, where histogram should be created
histoname - name of histogram
nbinsx - number of histogram bins
xlow - histogram lower limit
xup - histogram upper limit
title - histogram tille [optional]
xtitle - title on x axis [optional]
ytitle - title on y axis [optional]

MakeH2

public TH2* MakeH2(const Text_t* histotype, const Text_t* foldername, const Text_t* histoname, Int_t nbinsx, Axis_t xlow, Axis_t xup, Int_t nbinsy, Axis_t ylow, Axis_t yup, const Text_t* title, const Text_t* xtitle, const Text_t* ytitle)
Create 2-dim histogram in histogram folder.
If histogram exists in autosave file, it will be taken from autosavefile.
If type of existing histogram does not match with provided, old histogram
will be removed and new proper will be created.
Parameters are:
histotype = "C", "D", "F", "I", "S" corresonds to different TH1* types
folderame - name of folder, where histogram should be created
histoname - name of histogram
nbinsx - number of bins on x axis
xlow - lower limit on x axis
xup - upper limit on x axis
nbinsy - number of bins on y axis
ylow - lower limit on y axis
yup - upper limit on y axis
title - histogram tille [optional]
xtitle - title on x axis [optional]
ytitle - title on y axis [optional]

MakePolyCond

public TGo4PolyCond* MakePolyCond(const Text_t* foldername, const Text_t* conditionname, Int_t size, Float_t[2] points, const Text_t* bindhistogram, Bool_t invert)
Create polygon 2-dim condition in conditions folder.
If conditions exists in autosave file, it will be taken from autosave file.
If type of existing condition does not match, condition
will be removed and new will be created.
Points of polygon are taken from two dimentional array,
which can be declared in program like:
Float_t points[4][2] =
{{ 0., 0.},
{ 0., 4000.},
{40000., 4000.},
{40000., 0.}};
If first and last points will be connected, if they didnot match each other

Parameters are:
folderame - name of folder, where condition should be created
conditionsname - name of condition
size - number of points in polygon
points - array of (x,y) coordinate of polygon
bindhistogram - name of histogram, connected to condition [optional]
invert - invert condition

MakeWindowCond

public TGo4WinCond* MakeWindowCond(const Text_t* foldername, const Text_t* conditionname, Double_t xlow, Double_t xup, const Text_t* bindhistogram, Bool_t invert)
Create 1-dim window condition in conditions folder.
If conditions exists in autosave file, it will be taken from autosave file.
If type of existing condition does not match, condition
will be removed and new will be created.
Parameters are:
folderame - name of folder, where condition should be created
conditionsname - name of condition
xlow - lower limit of condition
xup - upper limit on condition
bindhistogram - name of histogram, connected to condition [optional]
invert - invert condition

MakeWindowCond

public TGo4WinCond* MakeWindowCond(const Text_t* foldername, const Text_t* conditionname, Double_t xlow, Double_t xup, Double_t ylow, Double_t yup, const Text_t* bindhistogram, Bool_t invert)
Create 2-dim window condition in conditions folder.
If conditions exists in autosave file, it will be taken from autosave file.
If type of existing condition does not match, condition
will be removed and new will be created.
Parameters are:
folderame - name of folder, where condition should be created
conditionsname - name of condition
xlow - lower limit on x axis
xup - upper limit on x axis
ylow - lower limit on y axis
yup - upper limit on y axis
bindhistogram - name of histogram, connected to condition [optional]
invert - invert condition

NextMatchingObject

public TObject* NextMatchingObject(const Text_t* expr, const Text_t* folder, Bool_t reset)
Delivers pointer to next object of the Go4 folder structure
with a name matching the expression expr. If reset is true,
The list of matchint objects will be created anew by comparing
all names with expr. If reset is false, the next object of a
previously created matching list is returned. Optionally the
search can be limited to a given folder.

PrintConditions

public void PrintConditions(const Text_t* expression)
Print all condition counters to the terminal.
Expression may filter only objects with names matching.

PrintDynamicList

public void PrintDynamicList()
Print entries of current dynamic list.

PrintFolder

private Int_t PrintFolder(TFolder* fold, Option_t* opt, const Text_t* expression)
Printout all objects in folder fold on the terminal. Option for root Print can be specified.
Optionally, a filtering expression can be defined. Return value
gives total size of all printed objects in bytes (including subfolders).

PrintHistograms

public void PrintHistograms(const Text_t* expression)
Printout of all histogram statistic counters on the terminal.
Expression may filter only objects with names matching.

ProcessDynamicList

public Int_t ProcessDynamicList()
Loop over the dynamic list and process the actions
linked to the entries.

ProtectFolder

private Bool_t ProtectFolder(TFolder* fold, const Option_t* flags)
Change protection properties of all objects in this folder as specified.
Flags may contain key letters like:
"+C"/"-C" to enable/disable protection against Clear()(histogram zeroing etc).
"+D"/"-D" to enable/disable protection against object deletion
For example flags="+C-D", "+C+D", "-D-C"
Properties not appearing in flags are not changed.

ProtectObject

private Bool_t ProtectObject(TObject* ob, const Option_t* flags)
Change protection properties of object name as specified.
Flags may contain key letters like:
"+C"/"-C" to enable/disable protection against Clear()(histogram zeroing etc).
"+D"/"-D" to enable/disable protection against object deletion
For example flags="+C-D", "+C+D", "-D-C"
Properties not appearing in flags are not changed.

ProtectObjects

public Bool_t ProtectObjects(const Text_t* name, const Option_t* flags)
Change protection properties of object name as specified.
Flags may contain key letters like:
"+C"/"-C" to enable/disable protection against Clear()(histogram zeroing etc).
"+D"/"-D" to enable/disable protection against object deletion
For example flags="+C-D", "+C+D", "-D-C"
Properties not appearing in flags are not changed.

PutToFolder

private Bool_t PutToFolder(TObject* ob, TFolder* destination, Bool_t replace)
Method used by both LoadFolder variants to assign object ob into destination
folder by object type. If replace is kTRUE, previous objects of same name
are replaced by ob.

RemoveAnalysisCondition

public Bool_t RemoveAnalysisCondition(const Text_t* name)
Removes analysis condition from list by name. Returns 0 if no
such condition. Condition object is deleted on heap.

RemoveCanvas

public Bool_t RemoveCanvas(const Text_t* name)
Removes TCanvas by name. Returns 0 if no
such canvas. TCanvas object is deleted on heap.

RemoveDynamicEntry

public Bool_t RemoveDynamicEntry(const Text_t* entryname, const Text_t* listname)
Remove entry of that name from dynamic list of listname.
The referred objects (histograms, conditions..) are still on heap, since
they are owned by their special folders. If listname is not given, the current
dynamic list is used.

RemoveDynamicList

public Bool_t RemoveDynamicList(const Text_t* name)
Remove reference to dynamic list of name from go4 folder structure.

RemoveDynamicList

public void RemoveDynamicList(TGo4DynamicList* list)
Remove reference to dynamic list from go4 folder structure.

RemoveEventProcessor

public Bool_t RemoveEventProcessor(TGo4EventProcessor* pro)
Remove reference to event processor from go4 folder structure.

RemoveEventSource

public Bool_t RemoveEventSource(TGo4EventSource* source)
Remove reference to event source from go4 folder structure.

RemoveEventStore

public Bool_t RemoveEventStore(TGo4EventStore* store)
Remove reference to event store from go4 folder structure.

RemoveEventStructure

public Bool_t RemoveEventStructure(TGo4EventElement* ev)
Remove reference to event structure from go4 folder structure.

RemoveFromDir

private void RemoveFromDir(TFolder* fold, TDirectory* dir)
Remove all objects in folder fold from directory dir, recursively.
Prevents the deletion of all objects in memory folders after SaveFolder,
when dir is closed.

RemoveHistogram

public Bool_t RemoveHistogram(const Text_t* name, Bool_t del)
Removes histogram from histogram dir by name. Returns kFALSE if no
such histogram. Histogram object is deleted on heap only if del is true.
Otherwise, user owns the histogram afterwords.
Dynamic list entry for that histogram object is also removed.

RemoveObject

public Bool_t RemoveObject(const Text_t* name, Bool_t del)
Removes object from user object folder by name. Returns kFALSE if no
such histogram. Object is deleted on heap only if del is true.
Otherwise, user owns the object afterwords.

RemoveObjectFromFolder

private Bool_t RemoveObjectFromFolder(const Text_t* fullname, TFolder* fold, Bool_t isDel)
Remove object specified by full name ("subfolder/subssubfolder/name") from folder fold.
If isDel flag is kTRUE, object will be deleted.
Return kTRUE if object was found and removed, otherwise kFALSE.
Used by RemoveHistogram etc. methods.

RemoveParameter

public Bool_t RemoveParameter(const Text_t* name)
Removes parameter by name. Returns 0 if no
such parameter. Parameter object is deleted on heap.

RemovePicture

public Bool_t RemovePicture(const Text_t* name)
Removes picture by name. Returns 0 if no
such picture. Picture object is deleted on heap.

RemoveTree

public Bool_t RemoveTree(TTree* tree, const Text_t* stepname)
Remove reference to a tree in the go4 folder structure.
If name of analysis step is given, tree will be assigned
to folder dedicated to that step. In stepname is zero,
the tree will be put into general tree folder.

ResetBackStores

public Bool_t ResetBackStores()
Reset all registered backstore instances.Called by dynamic list processing.

ResetCurrentDynList

public void ResetCurrentDynList()
Reset the current dynamic list.

SaveFolder

private Bool_t SaveFolder(TFolder* source)
Save this folder as a new subdirectory (TDirectory) of the current directory
i.e. the currently open file.
This is most likely more performant than streaming top folder completely into file

SaveObjects

public void SaveObjects(TFile* file)
Save folder structure to given file.

SetAnalysisCondition

public Bool_t SetAnalysisCondition(const Text_t* name, TGo4Condition* con, Bool_t counter, TFolder* parent)
Set existing analysis condition of name to the values
of external condition object con. Used to set condition by command
from gui, or to update the precompiled condition from the values
that were saved to the autosave file. optional parent folder can be
specified. By default, condition is searched relative to Conditions folder.

SetCanvas

public Bool_t SetCanvas(const Text_t* name, TGo4CanvasStatus* stat, TFolder* parent)
Set existing picture of name to the values
of external CanvasStatus object. Used to set TCanvas by command
from gui. Optional parent folder can be specified.
by default, TCanvas is searched relative to Canvases folder.

SetCurrentDynList

public void SetCurrentDynList(TGo4DynamicList* list)
Set the given dynamic list as current. i.e. this list is
used for processing in the analysis.

SetDynamicEntryStatus

public Bool_t SetDynamicEntryStatus(const Text_t* name, TGo4DynamicEntryStatus* state, const Text_t* listname)
Set dynamic entry of name "name" to the values specified by external
dynamic entry status "state". If no dynamic entry of that name exists, a
new entry is created with the properties of the state, and
added to the dynamic list. If listname is not given, the current
dynamic list is used.

SetDynListInterval

public void SetDynListInterval(Int_t val)

SetParameter

public Bool_t SetParameter(const Text_t* name, TGo4Parameter* par, TFolder* parent)
Set existing parameter of name to the values
of external parameter object par. Used to set parameter by command
from gui, or to update the precompiled parameter from the values
that were saved to the autosave file. Optional parent folder can be specified.
by default, parameter is searched relative to Parameters folder.

SetPicture

public Bool_t SetPicture(const Text_t* name, TGo4Picture* pic, TFolder* parent)
Set existing picture of name to the values
of external picture object pic. Used to set picture by command
from gui, or to update the precompiled picture from the values
that were saved to the autosave file. Optional parent folder can be specified.
by default, picture is searched relative to Pictures folder.

TestObject

private TObject* TestObject(TFolder* folder, const Text_t* & pathname, const Text_t* objectname, const TClass* cl)
Test, if object exists in provided folder.
If object exists and corresponds to provided class,
it will be returned, otherwise it will be destroyed
Used by different Make* functions

Association Links

to Class TFolder

Top level Go4 Directory (root folder)

to Class TFolder

Directory containing all histogram objects to be used by dynamic list
and user analysis.

to Class TFolder

Directory containing all condition objects to be used by dynamic list
and by user analysis.

to Class TFolder

Directory containing user parameter objects

to Class TFolder

Directory containing all action objects to be used by dynamic list
and by user analysis.

to Class TFolder

Directory containing all user objects.

to Class TFolder

Directory containing references to trees.

to Class TFolder

Directory containing the pictures.

to Class TFolder

Directory containing TCanvases.

to Class TFolder

Directory containing references to event stores.

to Class TFolder

Directory containing references to event sources.

to Class TFolder

Directory containing references to event processors.

to Class TFolder

Directory containing references to event structures.

to Class TFolder

Top Directory for all references to event classes.

to Class TFolder

Temporary folder for nameslist objects.

to Class TMutex

Mutex protecting the object directories.

to Class TList

List of matching objects for name expression.

to Class TIterator

Iterator for list of matching objects.

to Class TGo4DynamicList

The current dynamic list which is processed
by the analysis

Supplier Cardinality 1
Type aggregationByValue

J.Adamczewski, M.Al-Turany, D.Bertini, H.G.Essel, S.Linev

30-06-2005