Common Analysis Framework » QFRAMEWORK » TQFolder

class TQFolder: public TFolder, public TQTaggable


 TQFolder:

 The TQFolder class is the basic building block for data modeling within the analysis code.
 It is a subclass of ROOT's TFolder class and thereby serves as a container for any object
 based on the TObject class. Objects are identified by their name (the name returned by
 obj->GetName()). The TQFolder class allows to recursively build up a tree-like folder
 hierarchy by adding instances of TQFolder (simply referred to as 'folder') to existing
 folders. These nested folders can be accessed via a Unix-like path scheme. Instances of
 TQFolder can be browsed using the TBrowser.

 Please note: the TQFolder class imposes quite strict requirements on names used to identify
 folders or objects within folders (only small and capital letters, numerals, underscore, and
 dot are valid characters to compose a valid name).

 Additionally, the TQFolder class inherits from the TQTaggable class which provides features
 to assign tags (key-value-pairs).

 A new instance of TQFolder can be created using the static method TQFolder::newFolder(...):

 TQFolder * f = TQFolder::newFolder("f");

 Objects are added to the folder using TQFolder::addObject(...):

 TH1F * h = new TH1F("h", "h", 10, 0., 1.);
 f->addObject(h);

 [Please note: histograms are special in the sense that they are by default associated to a
 directory (instance of TDirectory). This is no problem unless you want to stream (using
 TObject::Write()) a folder containing histograms to a file. You should remove histograms
 before adding them to a folder from their directory using TH1::SetDirectory(NULL).]

 [Please note: the user is still able to use TFolder::Add(...) to add objects to a folder,
 however, one should never use this method because it might not treat TQFolder specific
 aspects correctly and result in inconsistencies of the data structure.]

 The contents of a folder can be printed using TQFolder::print(...):

 f->print("trd");

 Objects are retrieved from a folder using TQFolder::getObject(...):

 TH1F * h = (TH1F*)f->getObject("h");

 Existing subfolders are retrieved using TQFolder::getFolder(...):

 TQFolder * subf = f->getFolder("subf");

 New subfolders can also be created using TQFolder::getFolder(...):

 TQFolder * subf = f->getFolder("subf+");

 Tags (see also TQTaggable class) are set using e.g. TQFolder::setTagInteger(...)

 f->setTagInteger("number", 6);

 and retrieved using e.g. TQFolder::getTagInteger(...)

 int number = 0;
 f->getTagInteger("number", number);

 Folders can be moved and copied using e.g. TQFolder::moveTo(...) and TQFolder::copyTo(...).
 Folders can be streamed (using TObject::Write()) to ROOT files and retrieved from ROOT files
 using e.g.

 TQFolder * f = TQFolder::loadFolder("filename.root:f");

 The contents (folder hiearchy + tags) of a folder can be exported to human-readable text or
 written directly into a text file:

 TString text = f->exportToText();

 f->exportToTextFile("text.txt");

 The corresponding syntax also allows to import subfolders and tags from a text or a text
 file:

 f->importFromText(text);

 f->importFromTextFile("text.txt");

 The equivalence of two instances of the TQFolder class (including tags) can be assessed:

 f->isEquivalentTo(f2);

 Two instances of the TQFolder class can be compared by identifying and printing non-
 equivalent elements:

 f->printDiff(f2);

 f->printDiff("f1", "f2");


Function Members (Methods)

public:
virtual~TQFolder()
voidTObject::AbstractMethod(const char* method) const
virtual voidTFolder::Add(TObject* obj)
virtual TQFolder*addCopyOfObject(TObject* object, TString destination = "", TClass* folderClass = TQFolder::Class())
TQFolder*addFolder(TQFolder* folder_, TString path_ = "", TClass* tclass = 0)
TFolder*TFolder::AddFolder(const char* name, const char* title, TCollection* collection = 0)
virtual TQFolder*addObject(TObject* object, TString destination = "", TClass* folderClass = TQFolder::Class())
boolTQTaggable::allTagsOfTypeBool()
boolTQTaggable::allTagsOfTypeDouble()
boolTQTaggable::allTagsOfTypeInteger()
boolTQTaggable::allTagsOfTypeString()
boolTQTaggable::allTagsValidBools()
boolTQTaggable::allTagsValidDoubles()
boolTQTaggable::allTagsValidIntegers()
virtual voidTObject::AppendPad(Option_t* option = "")
intareRelated(const TQFolder* other) const
voidautoSetExportName()
voidautoSetExportNames()
virtual voidTFolder::Browse(TBrowser* b)
boolTQTaggable::canSetThisTag(const TString& key, bool& treatAsList)
boolcheckConsistency(bool verbose = false)
ULong_tTObject::CheckedHash()
intTQTaggable::claimTags(const TString& definition, bool printErrMsg = false)
intTQTaggable::claimTags(const TString& definition, TString& message)
intTQTaggable::claimTags(const TString& definition, TString& missing, TString& invalid, TString& unexpected)
static TClass*Class()
virtual const char*TObject::ClassName() const
voidTQTaggable::clear()
virtual voidTFolder::Clear(Option_t* option = "")
intTQTaggable::clearTags()
virtual TObject*TNamed::Clone(const char* newname = "") const
boolcollapse()
virtual intCompare(const TObject* obj) const
static TStringconcatPaths(TString path1, TString path2)
static TStringconcatPaths(const TString& path1, const TString& path2, const TString& path3)
static TStringconcatPaths(const TString& path1, const TString& path2, const TString& path3, const TString& path4)
static TStringconcatPaths(const TString& path1, const TString& path2, const TString& path3, const TString& path4, const TString& path5)
virtual TQFolder*copy(const TString& newName = "")
virtual voidTFolder::Copy(TObject&) const
static TQFolder*copyDirectoryStructure(const TString& basepath, int maxdepth = 999)
static TQFolder*copyDirectoryStructureEOS(const TString& basepath, int maxdepth = 999)
static TQFolder*copyDirectoryStructureLocal(const TString& basepath, int maxdepth = 999)
virtual TQFolder*copyFolder(const TString& source, const TString& dest)
virtual TQFolder*copyTo(TQFolder* dest)
virtual TQFolder*copyTo(const TString& dest)
intTQTaggable::countMatchingTags(const TString& name) const
static intcountPathLevels(TString path, bool checkPathTokens = true)
virtual voidTObject::Delete(Option_t* option = "")MENU
virtual intdeleteAll()
virtual intdeleteObject(TString name, bool removeOnly = false, TClass* tclass = 0)
TQFolder*detachFromBase()
virtual Int_tTObject::DistancetoPrimitive(Int_t px, Int_t py)
virtual voidTObject::Draw(Option_t* option = "")
virtual voidTObject::DrawClass() constMENU
virtual TObject*TObject::DrawClone(Option_t* option = "") constMENU
virtual voidTObject::Dump() constMENU
virtual voidTObject::Error(const char* method, const char* msgfmt,...) const
virtual voidTObject::Execute(const char* method, const char* params, Int_t* error = 0)
virtual voidTObject::Execute(TMethod* method, TObjArray* params, Int_t* error = 0)
boolexecuteCopyCommand(TString object, TString& errMsg, bool moveOnly, const TString& destPrefix = "")
virtual voidTObject::ExecuteEvent(Int_t event, Int_t px, Int_t py)
boolTQTaggable::exportConfigFile(bool writeUnreadKeys = true)
boolTQTaggable::exportConfigFile(const TString& filename, bool writeUnreadKeys = true)
boolTQTaggable::exportConfigFile(const TString& filename, const TString& prefix, bool writeUnreadKeys = true)
intTQTaggable::exportTags(TQTaggable* dest, const TString& subDest = "", const TString& filter = "", bool recursive = false)
TStringTQTaggable::exportTagsAsConfigString(const TString& prefix, const TString& filter = "")
stringTQTaggable::exportTagsAsStandardConfigString(const TString& prefix, const TString& filter = "")
stringTQTaggable::exportTagsAsStandardString(const TString& filter = "", bool xmlStyle = false)
TStringTQTaggable::exportTagsAsString(const TString& filter = "", bool xmlStyle = false)
virtual TList*exportTagsToText(const TString& filter)
virtual boolexportTagsToTextFile(const TString& filename, const TString& filter)
boolexportToHTMLFile(const TString& filename, int expandDepth = 1, bool includeUntextables = true)
virtual TList*exportToText(bool includeUntextables = false, int indent = 0)
virtual boolexportToTextFile(const TString& filename, bool includeUntextables = false)
virtual voidTObject::Fatal(const char* method, const char* msgfmt,...) const
virtual voidTNamed::FillBuffer(char*& buffer)
TQFolder*findCommonBaseFolder(TCollection* fList, bool allowWildcards = true)
virtual const char*TFolder::FindFullPathName(const char* name) const
virtual const char*TFolder::FindFullPathName(const TObject* obj) const
virtual TObject*TFolder::FindObject(const char* name) const
virtual TObject*TFolder::FindObject(const TObject* obj) const
virtual TObject*TFolder::FindObjectAny(const char* name) const
TQFolder*getBase(int depth = 1) const
virtual TQTaggable*getBaseTaggable() const
TObject*getCopyOfObject(const TString& name_, const TString& path_ = "")
intgetDepth()
virtual TList*getDescendantTaggables()
TDirectory*getDirectory()
intgetDistToRoot() const
virtual Option_t*TObject::GetDrawOption() const
static Longptr_tTObject::GetDtorOnly()
const TString&getExportName()
virtual TStringTQTaggable::getFlags()
intTQTaggable::getFlagsSize()
TQFolder*getFolder(const TString& path)
TQFolder*getFolder(const char* path)
TQFolder*getFolder(const TString& path_, TClass* tclass)
vector<TString>getFolderPaths(const TString& path_ = "?", TClass* tClass = TQFolder::Class(), bool toplevelOnly = false)
vector<TString>getFolderPathsWildcarded(const TString& path_ = "?", TClass* tClass = TQFolder::Class(), bool toplevelOnly = false)
vector<TQFolder*>getFoldersWithTagEquivalentTo(const TQValue* tag)
vector<TQFolder*>getFoldersWithTagEquivalentTo(const TQValue& tag)
vector<TQFolder*>getFoldersWithTagsEquivalentTo(const vector<const TQValue*>& tags)
boolTQTaggable::getGlobalIgnoreCase() const
boolTQTaggable::getGlobalOverwrite() const
static shared_ptr<TQTaggable>TQTaggable::getGlobalTaggable(const char* name)
static shared_ptr<TQTaggable>TQTaggable::getGlobalTaggable(const TString& name)
virtual const char*TObject::GetIconName() const
TCollection*TFolder::GetListOfFolders() const
TList*getListOfFolders(const TString& path_ = "?", TClass* tclass = TQFolder::Class(), bool toplevelOnly = false, bool firstMatchOnly = false)
TList*TQTaggable::getListOfKeys(const TString& filter = "")
TList*getListOfObjectNames(TClass* class_ = 0, bool recursive = false, TString path_ = "")
TList*getListOfObjectPaths(TString path_ = "?", TClass* tclass = TObject::Class())
TList*getListOfObjects(TString path_ = "?", TClass* tclass = TObject::Class())
virtual TList*getListOfTaggables(const TString& taggables)
TList*TQTaggable::getListOfTagNames()
virtual TList*TQTaggable::getListOfUnreadKeys(const TString& filter = "")
TStringgetName() const
virtual const char*TNamed::GetName() const
const TString&getNameConst() const
virtual intgetNElements(bool recursive = false, TClass* class_ = 0)
virtual intgetNObjects(const TString& nameFilter = "") const
virtual intgetNObjects(const TString& nameFilter, bool recursive)
intTQTaggable::getNTags() const
TObject*getObject(const TString& name_, const TString& path_ = "")
virtual char*TObject::GetObjectInfo(Int_t px, Int_t py) const
TStringgetObjectPath(TString name_)
TList*getObjectPaths(TString namepattern, TString pathpattern = "./", TClass* objClass = TObject::Class())
static Bool_tTObject::GetObjectStat()
virtual Option_t*TObject::GetOption() const
virtual intgetOwnSize() const
TStringgetPath()
static TStringgetPathHead(TString& path)
static TStringgetPathTail(TString& path)
TStringgetPathWildcarded()
static TStringgetPathWithoutHead(TString path)
static TStringgetPathWithoutTail(TString path)
TQFolder*getRoot()
virtual intgetSize(bool memoryOnly = true)
virtual TStringgetSizeAsString(bool memoryOnly = true)
boolTQTaggable::getTag(const TString& key, double& value)
boolTQTaggable::getTag(const TString& key, int& value)
boolTQTaggable::getTag(const TString& key, bool& value)
boolTQTaggable::getTag(const TString& key, TString& value)
intTQTaggable::getTag(const TString& key, vector<TString>& vec)
intTQTaggable::getTag(const TString& key, vector<int>& vec)
intTQTaggable::getTag(const TString& key, vector<double>& vec)
intTQTaggable::getTag(const TString& key, vector<bool>& vec)
intTQTaggable::getTag(const TString& key, TList* l)
boolTQTaggable::getTag(const TString& key, double& value, bool recursive)
boolTQTaggable::getTag(const TString& key, int& value, bool recursive)
boolTQTaggable::getTag(const TString& key, bool& value, bool recursive)
boolTQTaggable::getTag(const TString& key, TString& value, bool recursive)
boolTQTaggable::getTagAsString(const TString& key, TString& tag)
boolTQTaggable::getTagBool(const TString& key, bool& value)
boolTQTaggable::getTagBool(const TString& key, bool& value, bool recursive)
boolTQTaggable::getTagBoolDefault(const TString& key, bool defaultVal = false)
doubleTQTaggable::getTagDefault(const TString& key, double defaultVal)
intTQTaggable::getTagDefault(const TString& key, int defaultVal)
boolTQTaggable::getTagDefault(const TString& key, bool defaultVal)
TStringTQTaggable::getTagDefault(const TString& key, const TString& defaultVal)
TStringTQTaggable::getTagDefault(const TString& key, const char* defaultVal)
boolTQTaggable::getTagDouble(const TString& key, double& value)
boolTQTaggable::getTagDouble(const TString& key, double& value, bool recursive)
doubleTQTaggable::getTagDoubleDefault(const TString& key, double defaultVal = 0.)
virtual TList*getTaggablesByName(const TString& taggables)
boolTQTaggable::getTagInteger(const TString& key, int& value)
boolTQTaggable::getTagInteger(const TString& key, int& value, bool recursive)
intTQTaggable::getTagIntegerDefault(const TString& key, int defaultVal = 0)
TList*TQTaggable::getTagList(const TString& key)
intTQTaggable::getTagListLength(const TString& key)
intTQTaggable::getTagsSize()
stringTQTaggable::getTagStandardStringDefault(const TString& key, const TString& defaultVal = "")
boolTQTaggable::getTagString(const TString& key, TString& value)
boolTQTaggable::getTagString(const TString& key, TString& value, bool recursive)
TStringTQTaggable::getTagStringDefault(const TString& key, const TString& defaultVal = "")
vector<bool>TQTaggable::getTagVBool(const TString& key)
vector<double>TQTaggable::getTagVDouble(const TString& key)
vector<int>TQTaggable::getTagVInt(const TString& key)
vector<int>TQTaggable::getTagVInteger(const TString& key)
vector<string>TQTaggable::getTagVStandardString(const TString& key)
vector<TString>TQTaggable::getTagVString(const TString& key)
virtual const char*TNamed::GetTitle() const
TList*getTraceToRoot(bool startAtRoot = false)
boolTQTaggable::getTypeOfTagAsString(const TString& key, TString& type)
virtual UInt_tTObject::GetUniqueID() const
static const TString&TQTaggable::getValidKeyCharacters()
static const TString&getValidNameCharacters()
boolTQTaggable::getValueOfTagAsString(const TString& key, TString& value)
TStringTQTaggable::getValuesOfTags(const TString& keys, const TString& sep = ", ")
virtual Bool_tTObject::HandleTimer(TTimer* timer)
boolTQTaggable::hasEquivalentTag(const TQValue* reference, bool recurseUp = true)
boolTQTaggable::hasEquivalentTag(const TQValue& reference, bool recurseUp = true)
boolTQTaggable::hasEquivalentTag(const TString& key, const TString& value)
boolTQTaggable::hasEquivalentTag(const TString& key, const double value)
boolTQTaggable::hasEquivalentTag(const TString& key, const int value)
boolTQTaggable::hasEquivalentTag(const TString& key, const bool value)
static boolTQTaggable::hasGlobalTaggable(const char* name)
static boolTQTaggable::hasGlobalTaggable(const TString& name)
virtual ULong_tTNamed::Hash() const
Bool_tTObject::HasInconsistentHash() const
boolTQTaggable::hasMatchingTag(const TString& name) const
virtual boolhasObject(TString name)
boolTQTaggable::hasTag(const TString& key)
boolTQTaggable::hasTagBool(const TString& key)
boolTQTaggable::hasTagDouble(const TString& key)
boolTQTaggable::hasTagInteger(const TString& key)
boolTQTaggable::hasTagString(const TString& key)
boolTQTaggable::hasTagWithIndex(const TString& key)
boolTQTaggable::hasTagWithoutIndex(const TString& key)
virtual boolTQTaggable::hasUnreadKeys(const TString& filter = "")
virtual boolimportFromText(const TString& input)
virtual boolimportFromText(const TString& input, TString& errorMessage)
virtual boolimportFromTextFile(const TString& filename)
virtual boolimportFromTextFile(const TString& filename, TString& errorMessage)
virtual boolimportFromTextFiles(const TString& filePattern)
virtual boolimportFromTextFiles(const TString& filePattern, TString& errorMessage)
virtual TObject*importObject(TString importPath, bool recurse = true)
intTQTaggable::importTag(TString tag, bool overwrite = true, bool keepStringQuotes = false)
intTQTaggable::importTags(TString tags, bool overwrite = true, bool keepStringQuotes = false)
intTQTaggable::importTags(const TQTaggable* tags, bool overwrite = true, bool recursive = false)
intTQTaggable::importTags(shared_ptr<TQTaggable> tags, bool overwrite = true, bool recursive = false)
intTQTaggable::importTags(const TQTaggable& tags, bool overwrite = true, bool recursive = false)
intTQTaggable::importTagsWithoutPrefix(const TQTaggable* tags, const TString& prefix, bool overwrite = true, bool recursive = false)
intTQTaggable::importTagsWithoutPrefix(const TQTaggable& tags, const TString& prefix, bool overwrite = true, bool recursive = false)
intTQTaggable::importTagsWithPrefix(TString tags, const TString& prefix, bool overwrite = true, bool keepStringQuotes = false, TString fallbackKey = "")
intTQTaggable::importTagsWithPrefix(const TQTaggable* tags, const TString& prefix, bool overwrite = true, bool recursive = false, TString fallbackKey = "")
intTQTaggable::importTagsWithPrefix(const TQTaggable& tags, const TString& prefix, bool overwrite = true, bool recursive = false, TString fallbackKey = "")
intTQTaggable::importTagWithPrefix(const TString& tag, const TString& prefix, bool overwrite = true, TString fallbackKey = "", bool keepStringQuotes = false)
virtual voidTObject::Info(const char* method, const char* msgfmt,...) const
virtual Bool_tTObject::InheritsFrom(const char* classname) const
virtual Bool_tTObject::InheritsFrom(const TClass* cl) const
virtual voidTObject::Inspect() constMENU
voidTObject::InvertBit(UInt_t f)
virtual TClass*IsA() const
boolisBaseOf(TQFolder* folder)
Bool_tTObject::IsDestructed() const
boolisEmpty() const
virtual Bool_tTObject::IsEqual(const TObject* obj) const
virtual boolisEquivalentTo(TQFolder* f, const TString& options = "")
virtual boolisEquivalentTo(TQFolder* f, TQTaggable& options)
virtual Bool_tTFolder::IsFolder() const
boolisLazy()
boolisOnDisk()
boolisOnDisk(TDirectory* dir)
Bool_tTObject::IsOnHeap() const
Bool_tTFolder::IsOwner() const
boolisRoot()
virtual boolIsSortable() const
boolTQTaggable::isTagOverwrittenByDescendants(TString key)
static boolTQTaggable::isValidKey(const TString& key)
static boolisValidName(const TString& name)
static boolisValidPath(TString path, bool allowRelativePaths = true, bool allowWildcards = true, bool allowArithmeticStringExpressions = false)
Bool_tTObject::IsZombie() const
static TQFolder*loadFolder(TString path, bool lazy = false)
static TQFolder*loadFromTextFile(TString filename, bool showErrorMessage = false)
static TQFolder*loadFromTextFile(TString filename, TString& errorMessage)
static TQFolder*loadLazyFolder(TString path)
virtual voidTFolder::ls(Option_t* option = "") constMENU
static TStringmakeExportName(TString exportName)
static TList*TQTaggable::makeListOfTags(TList* unTags)
static TStringmakeValidIdentifier(TString identifier, TString replacement = "")
static TStringmakeValidPath(TString path, TString replacement = "", bool allowRelativePaths = true, bool allowWildcards = true)
voidTObject::MayNotUse(const char* method) const
boolmerge(TQFolder* other, bool sumElements = false)
boolmergeTags(TQFolder* other)
virtual boolmoveFolder(const TString& source, const TString& dest)
virtual boolmoveTo(const TString& dest)
virtual boolmoveTo(TQFolder* dest, const TString& newName = "")
static TQFolder*newFolder(TString name)
virtual TQFolder*newInstance(const TString& name)
virtual Bool_tTObject::Notify()
voidTObject::Obsolete(const char* method, const char* asOfVers, const char* removedFromVers) const
virtual Int_tTFolder::Occurence(const TObject* obj) const
virtual voidTQTaggable::onAccess(TQValue* tag)
virtual voidTQTaggable::onRead(TQValue* tag)
virtual voidTQTaggable::onWrite(TQValue* tag)
static TFile*openFile(TString& importPath, const TString& opt = "READ")
voidTObject::operator delete(void* ptr)
voidTObject::operator delete(void* ptr, void* vp)
voidTObject::operator delete[](void* ptr)
voidTObject::operator delete[](void* ptr, void* vp)
void*TObject::operator new(size_t sz)
void*TObject::operator new(size_t sz, void* vp)
void*TObject::operator new[](size_t sz)
void*TObject::operator new[](size_t sz, void* vp)
TNamed&TNamed::operator=(const TNamed& rhs)
virtual voidTObject::Paint(Option_t* option = "")
static boolparseDestination(TString dest, TString& path, TString& newName)
static TQTaggable*TQTaggable::parseFlags(const TString& flags)
boolTQTaggable::parseKey(TString key, TString& bareKey, int& opUp, int& opDown)
static boolparseLocation(TString importpath, TString& filename, TString& objname)
static TQTaggable*TQTaggable::parseParameterList(const TString& parameter, const TString& sep = ",", bool trim = true, const TString& blocks = "", const TString& quotes = "")
virtual voidTObject::Pop()
voidprint(const TString& options = "")
virtual voidTNamed::Print(Option_t* option = "") const
intTQTaggable::printClaim(const TString& definition)
voidprintContents(const TString& options = "")
boolprintDiff(TQFolder* f, const TString& options = "")
boolprintDiff(const TString& path1, const TString& path2, const TString& options = "")
boolTQTaggable::printDiffOfTags(TQTaggable* tags, const TString& options = "")
boolTQTaggable::printDiffOfTags(TQTaggable* tags, TQTaggable& options)
voidTQTaggable::printTags(TString options = "r")
virtual Int_tTObject::Read(const char* name)
virtual voidTFolder::RecursiveRemove(TObject* obj)
virtual voidTFolder::Remove(TObject* obj)
static boolTQTaggable::removeGlobalTaggable(const char* name)
static boolTQTaggable::removeGlobalTaggable(const TString& name)
virtual boolremoveObject(const TString& name)
intTQTaggable::removeTag(const TString& key)
intTQTaggable::removeTags(const TString& key)
boolTQTaggable::renameTag(const TString& oldKey, const TString& newKey)
intTQTaggable::renameTags(const TString& oldPrefix, const TString& newPrefix)
intreplaceInFolderTags(TQTaggable& params, const TString& path, const TString& tagFilter = "*", TClass* typeFilter = TQFolder::Class())
stringTQTaggable::replaceInStandardString(const TString& in, bool keepQuotes = false)
stringTQTaggable::replaceInStandardString(const TString& in, const char* prefix, bool keepQuotes = false)
stringTQTaggable::replaceInStandardString(const TString& in, const TString& prefix, bool keepQuotes = false)
stringTQTaggable::replaceInStandardStringRecursive(TString in, const TString& prefix = "", bool keepQuotes = false)
intTQTaggable::replaceInTags(TQTaggable& params, const TString& tagFilter = "*")
TStringTQTaggable::replaceInText(const TString& in, bool keepQuotes = false)
TStringTQTaggable::replaceInText(const TString& in, const char* prefix, bool keepQuotes = false)
TStringTQTaggable::replaceInText(const TString& in, const TString& prefix, bool keepQuotes = false)
TStringTQTaggable::replaceInText(const TString& in, int& nReplaced, int& nFailed, bool keepQuotes = false)
TStringTQTaggable::replaceInText(TString in, int& nReplaced, int& nFailed, const TString& prefix, bool keepQuotes = false)
TStringTQTaggable::replaceInTextRecursive(TString in, const TString& prefix = "", bool keepQuotes = false)
voidTObject::ResetBit(UInt_t f)
virtual voidTQTaggable::resetReadFlags()
TObject*resolveImportLink(const TString& linkName, bool recurse = true)
TObject*resolveImportLink(const TString& linkName, TDirectory* dir, bool recurse = true)
intresolveImportLinks(bool recurse = true)
intresolveImportLinks(TDirectory* dir, bool recurse = true)
virtual voidTFolder::SaveAs(const char* filename = "", Option_t* option = "") constMENU
virtual voidTObject::SavePrimitive(ostream& out, Option_t* option = "")
voidTObject::SetBit(UInt_t f)
voidTObject::SetBit(UInt_t f, Bool_t set)
intsetDirectory(TDirectory* dir = (ROOT::Internal::TDirectoryAtomicAdapter(TDirectory::CurrentDirectory())), bool own = false)
virtual voidTObject::SetDrawOption(Option_t* option = "")MENU
static voidTObject::SetDtorOnly(void* obj)
voidsetExportName(const TString& name)
voidTQTaggable::setGlobalIgnoreCase(bool globalIgnoreCase = true)
voidTQTaggable::setGlobalOverwrite(bool globalOverwrite = true)
voidsetInfoTags()
voidsetName(const TString& newName)
virtual voidTNamed::SetName(const char* name)MENU
virtual voidTNamed::SetNameTitle(const char* name, const char* title)
static voidTObject::SetObjectStat(Bool_t stat)
virtual voidTFolder::SetOwner(Bool_t owner = kTRUE)
intTQTaggable::setTag(const TString& key, double value, const TString& destination = "")
intTQTaggable::setTag(const TString& key, int value, const TString& destination = "")
intTQTaggable::setTag(const TString& key, bool value, const TString& destination = "")
intTQTaggable::setTag(const TString& key, const TString& value, const TString& destination = "")
intTQTaggable::setTag(const TString& key, const char* value, const TString& destination = "")
intTQTaggable::setTag(const char* key, double value, const TString& destination = "")
intTQTaggable::setTag(const char* key, int value, const TString& destination = "")
intTQTaggable::setTag(const char* key, bool value, const TString& destination = "")
intTQTaggable::setTag(const char* key, const TString& value, const TString& destination = "")
intTQTaggable::setTag(const char* key, const char* value, const TString& destination = "")
intTQTaggable::setTagAuto(const TString& key, TString value, const TString& destination = "")
intTQTaggable::setTagBool(TString key, bool value, const TString& destination = "")
intTQTaggable::setTagDouble(TString key, double value, const TString& destination = "")
intTQTaggable::setTagInteger(TString key, int value, const TString& destination = "")
intTQTaggable::setTagList(const TString& key, TString value, const TString& destination = "")
intTQTaggable::setTagString(TString key, const TString& value, const TString& destination = "")
virtual voidTNamed::SetTitle(const char* title = "")MENU
virtual voidTObject::SetUniqueID(UInt_t uid)
virtual voidShowMembers(TMemberInspector& insp) const
virtual Int_tTNamed::Sizeof() const
virtual intsortByName()
virtual voidsortByNameRecursive()
virtual voidStreamer(TBuffer&)
voidStreamerNVirtual(TBuffer& ClassDef_StreamerNVirtual_b)
virtual voidTObject::SysError(const char* method, const char* msgfmt,...) const
boolTQTaggable::tagIsOfTypeBool(const TString& key)
boolTQTaggable::tagIsOfTypeDouble(const TString& key)
boolTQTaggable::tagIsOfTypeInteger(const TString& key)
boolTQTaggable::tagIsOfTypeString(const TString& key)
boolTQTaggable::tagsAreEquivalentTo(TQTaggable* tags, const TString& filter = "")
Bool_tTObject::TestBit(UInt_t f) const
Int_tTObject::TestBits(UInt_t f) const
TQFolder()
TQFolder(const TString& name)
virtual voidTObject::UseCurrentStyle()
virtual voidTObject::Warning(const char* method, const char* msgfmt,...) const
virtual Int_tTObject::Write(const char* name = 0, Int_t option = 0, Int_t bufsize = 0)
virtual Int_tTObject::Write(const char* name = 0, Int_t option = 0, Int_t bufsize = 0) const
virtual boolwriteDirectory(TDirectory* baseDir)
virtual boolwriteFolder(TDirectory* dir, int depth = -1, bool keepInMemory = true)
virtual boolwriteFolder(TDirectory* dir, TString name, int depth = -1, bool keepInMemory = true)
virtual boolwriteFolderMaxSize(TDirectory* dir, int maxSizeInMB = 10, bool keepInMemory = true)
virtual boolwriteFolderMaxSize(TDirectory* dir, TString name, int maxSizeInMB = 10, bool keepInMemory = true)
virtual intwriteToFile(const TString& filename, bool overwrite = 0, int depth = -1, bool keepInMemory = true)
virtual boolwriteUpdate(int depth = -1, bool keepInMemory = true)
protected:
voidclearDirectoryInternal()
intTQTaggable::countTagDown(const TString& key)
intTQTaggable::countTagUp(const TString& key)
virtual voidTObject::DoError(int level, const char* location, const char* fmt, va_list va) const
TQValue*TQTaggable::findTag(TString name)
voidgetFoldersWithTagEquivalentToInternal(const TQValue* tag, vector<TQFolder*>& matches)
TList*TQTaggable::getListOfTags()
boolTQTaggable::getOp(const TString& op, int& opCode)
boolTQTaggable::getTag(const TString& key, TQValue*& tag)
virtual boolimportFromTextFilePrivate(const TString& filename_, int& nNewlines, TString& errFile, TString& errMsg)
virtual boolimportFromTextPrivate(TString input, int& nNewlines, TString& errFile, TString& errMsg)
virtual TObject*importObjectFromDirectory(TDirectory* dir, TString importPath, bool recurse = true, TClass* expectedClass = __null)
voidTObject::MakeZombie()
boolmergeAsFolder(TQFolder* other, TQFolder::MergeMode mode)
voidmergeObjects(TQFolder* other, TQFolder::MergeMode mode)
boolprintDiff(TQFolder* f, TQTaggable& options, int indent)
voidprintInternal(TString options, int indent, bool resolve = true)
voidsetBase(TQFolder* base_)
voidsetDirectoryInternal(TDirectory* dir)
intTQTaggable::setTag(TQValue* tag, const TString& destination = "")
intTQTaggable::setTag(TQValue* tag, const TString& destination, bool overwrite)
virtual boolsplit(TDirectory* dir, int depth)
boolwriteContentsToHTML(ostream& out, int expandDepth, bool includeUntextables)
virtual boolwriteFolderHook(TDirectory* dir, const TString& exportName, int depth, bool keepInMemory)
boolwriteFolderInternal(TDirectory* dir, const TString& exportName, int depth, bool keepInMemory)
private:
virtual Bool_tCheckTObjectHashConsistency() const

Data Members

public:
static TObject::(anonymous)TObject::kBitMask
static TObject::EStatusBitsTObject::kCanDelete
static TObject::EStatusBitsTObject::kCannotPick
static TObject::EStatusBitsTObject::kHasUUID
static TObject::(anonymous)TObject::kInconsistent
static TObject::EStatusBitsTObject::kInvalidObject
static TObject::(anonymous)TObject::kIsOnHeap
static TObject::EStatusBitsTObject::kIsReferenced
static TObject::EStatusBitsTObject::kMustCleanup
static TObject::EStatusBitsTObject::kNoContextMenu
static TObject::(anonymous)TObject::kNotDeleted
static TObject::EDeprecatedStatusBitsTObject::kObjInCanvas
static TObject::(anonymous)TObject::kOverwrite
static TObject::(anonymous)TObject::kSingleKey
static TObject::(anonymous)TObject::kWriteDelete
static TObject::(anonymous)TObject::kZombie
protected:
static TQFolder::MergeModePreferOther
static TQFolder::MergeModePreferThis
static TQFolder::MergeModeSumElements
TQFolder*fBase
TStringfExportName!
TCollection*TFolder::fFolderspointer to the list of folders
boolTQTaggable::fGlobalIgnoreCase!
boolTQTaggable::fGlobalOverwrite!
boolfIsEquivalentToSnapshot!
Bool_tTFolder::fIsOwnertrue if folder own its contained objects
TDirectory*fMyDir!
TStringTNamed::fNameobject identifier
boolfOwnMyDir!
TList*TQTaggable::fReadFlags!
TList*TQTaggable::fTags
TStringTNamed::fTitleobject title
boolisFullyResolved!
static TObject::(anonymous)TObject::kOnlyPrepStep
static TQTaggable::(anonymous)TQTaggable::kOpADD
static TQTaggable::(anonymous)TQTaggable::kOpAND
static TQTaggable::(anonymous)TQTaggable::kOpCNT
static TQTaggable::(anonymous)TQTaggable::kOpMULT
static TQTaggable::(anonymous)TQTaggable::kOpNone
static TQTaggable::(anonymous)TQTaggable::kOpOR
static TQTaggable::(anonymous)TQTaggable::kOpRec
static map<TString,shared_ptr<TQTaggable> >TQTaggable::sGlobalTaggables

Class Charts

Inheritance Chart:
TObject
TNamed
TFolder
TQTaggable
TQFolder
TQSampleFolder
TQSample
TQSystematicsHandler

Function documentation

TQFolder()
 Default constructor of TQFolder class: a new and empty instance of TQFolder is
 created and initialized. Its name will be set to "unkown". Please note: users
 should not use this constructor but the static factory method
 TQFolder::newFolder(...). This default constructor has to be present to allow
 ROOT's CINT to stream instances of TQFolder.
TQFolder(const TString& name)
 Constructor of TQFolder class: a new and empty instance of TQFolder is created
 and initialized. Its name will be set to the value of the parameter "name_" if
 it is a valid name and "invalid_name" otherwise. Please refer to the
 documentation of the static method TQFolder::isValidName(...) for details on
 valid folder names. Please note: users should not use this constructor but the
 static factory method TQFolder::newFolder(...).
bool IsSortable() const
 This method is a reimplementation of ROOT's TObject::IsSortable() and will
 return true indicating that instances of the TQFolder class can be sorted
 reasonably.
int Compare(const TObject* obj) const
 This method is a reimplementation of ROOT's TObject::Compare(...) and allows
 to compare an instance of TObject to this instance of TQFolder. It will
 return 0 if an instance of TQFolder with the same name as this instance is
 passed as an argument and +1 (-1) if the name of this instance is
 alphabetically classified after (before) the name of the instance passed as an
 argument. In case of passing an instance that is not a valid sub-class of
 TQFolder -1 is returned.
TQFolder * newFolder(TString name)
 Returns a new and empty instance of the TQFolder class with name <name>
bool isLazy()
 return true if this folder is 'lazy'.
 lazy folders are not fully resolved, i.e. components of the folder
 structure still reside on disk and have not been loaded into memory.
TQFolder * newInstance(const TString& name)
 Returns a new and empty instance of the TQFolder class with name <name> if
 <name> is a valid name and a null pointer otherwise. Please note: this method
 does exactly the same as TQFolder::newFolder(...) but may be overwritten by
 sub-classes of TQFolder.
bool parseDestination(TString dest, TString& path, TString& newName)
 parse a destination string, i.e. 'path::newname'
 if the pattern was recognized, path and newName will be set accordingly.
 else, the entire intput will be used as path and newName will be empty
 this function will return true in either case and only return false if
 something about the input string was horribly wrong, e.g. if the newName
 component has length zero
bool parseLocation(TString importpath, TString& filename, TString& objname)
 parse a "location string", i.e. 'filename:objname'
 if the pattern was recognized, filename and objname will be set accordingly.
 else, the entire input will be used as filename, and objname will be empty.
 this function shoudl return true in any case.
TFile* openFile(TString& importPath, const TString& opt = "READ")
 open a file for retrieval of a TQFolder instance. the importPath can be
 given as 'filename:objname' for details on the parsing, see
 TQFolder::parseLocation. the opt string can be used to specify the opening
 mode (like in TFile::Open). the importPath argument will be stripped of
 the filename component and the separating colon by this function. this
 function will not take ownage of the file pointer, and it's the users
 responsibility to close and delete it.
TObject * importObject(TString importPath, bool recurse = true)
 import an object from the given path, to be given in the typical
 'filename:objname' notation. if the filename component is left empty, the
 current gDirectory will be used.
const TString& getValidNameCharacters()
 Returns a string containing all valid characters that can be used to build
 valid names of instances of TQFolder or TObjects stored inside an instance of
 TQFolder.
bool isValidName(const TString& name)
 Checks whether the name <name> passed as an argument is a valid name for an
 instance of TQFolder and return true if <name> is valid and false otherwise.
 Valid names may consist of letters a..z, A..Z, numerals 0..9, underscores "_"
 and dots ".". Please note: names only consisting of dots (e.g. "." or "..")
 are not considered as valid names as these have special meanings.
bool isValidPath(TString path, bool allowRelativePaths = true, bool allowWildcards = true, bool allowArithmeticStringExpressions = false)
 Checks whether <path> is a valid path name. A path is considered as valid if
 all its path tokens (components between slashes "/") are valid names for
 instances of TQFolder or TObjects stored inside an instance of TQFolder (please
 refer to the documentation of the static method TQFolder::isValidName(...)
 for details on valid folder names). If <allowRelativePaths> is true (true by
 default) relative references like "." or ".." are also considered as valid path
 tokens. If <allowWildcards> is true (true by default) wildcards like "?" or "*"
 are also considered as valid path tokens.
TString makeValidIdentifier(TString identifier, TString replacement = "")
 Makes the name <identifier> a valid name of instances of TQFolder or TObjects
 stored inside an instance of TQFolder (please refer to the documentation of the
 static method TQFolder::isValidName(...) for details on valid folder names).
 Invalid name characters in <identifier> are replaced by <replacement> (default
 is an empty string effectively removing such characters). If <replacement>
 itself does not contain invalid name characters the string returned is guaranteed
 to be a valid name of instances of TQFolder or TObjects stored inside an instance
 of TQFolder.
TString makeValidPath(TString path, TString replacement = "", bool allowRelativePaths = true, bool allowWildcards = true)
 Make the path <path> a valid path (please refer to the static method
 TQFolder::isValidPath(...) for details on valid paths). Invalid name characters
 in <path> are replaced by <replacement> (default is an empty string effectively
 removing such characters). If <replacement> itself does not contain invalid name
 characters the string returned is guaranteed to be a valid path.
 If <allowRelativePaths> is true (true by default) relative references like "."
 or ".." are kept and if <allowWildcards> is true (true by default) wildcards like
 "?" or "*" are also kept.
 keep track of leading and trailing slahes "/" since these will undesirably be
 removed by TQFolder::getPathHead(...) in the following and thus need to be added
 later again
TString getPathHead(TString& path)
 Removes the first path token (head) of <path> and returns it. (content of <path>
 will be changed). Examples:

 - TString path = "hello";
 getPathTail(path) returns "hello" and <path> becomes an empty string.
 - TString path = "hello/world";
 getPathTail(path) returns "hello" and <path> becomes "world".
 - TString path = "hello/world/test";
 getPathTail(path) returns "hello" and <path> becomes "world/test".
TString getPathTail(TString& path)
 Removes the last path token (tail) of <path> and returns it (content of <path>
 will be changed). Examples:

 - TString path = "hello";
 getPathTail(path) returns "hello" and <path> becomes an empty string.
 - TString path = "hello/world";
 getPathTail(path) returns "world" and <path> becomes "hello".
 - TString path = "hello/world/test";
 getPathTail(path) returns "test" and <path> becomes "hello/world".
TString getPathWithoutHead(TString path)
 Returns <path> without the first path token (head). Examples:

 getPathWithoutHead("hello") returns an empty string
 getPathWithoutHead("hello/world") returns "world"
 getPathWithoutHead("hello/world/test") returns "world/test"
TString getPathWithoutTail(TString path)
 Returns <path> without the last path token (tail). Examples:

 getPathWithoutTail("hello") returns an empty string
 getPathWithoutTail("hello/world") returns "hello"
 getPathWithoutTail("hello/world/test") returns "hello/world"
TString concatPaths(TString path1, TString path2)
 Concatenates the two paths <path1> and <path2> ensuring exactly one intermediate
 slash "/" between the two in the resulting path. In case one path is an empty
 string the respective other one is returned. Examples:

 - concatPaths("a", "b") returns "a/b".
 - concatPaths("a/", "/b") returns "a/b".
 - concatPaths("a/", "b") returns "a/b".
 - concatPaths("a/b", "c") returns "a/b/c".
TString concatPaths(const TString& path1, const TString& path2, const TString& path3)
 Concatenates the three paths <path1>, <path2>, and <path3> ensuring exactly one
 intermediate slash "/" between each of them in the resulting path. In case one
 path is an empty string it is ignored. Examples:

 - concatPaths("a", "b", "c") returns "a/b/c".
 - concatPaths("a/", "b", "/c") returns "a/b/c".
 - concatPaths("a/", "", "/c") returns "a/c".
TString concatPaths(const TString& path1, const TString& path2, const TString& path3, const TString& path4)
 Concatenates the four paths <path1>, <path2>, <path3>, and <path4> ensuring
 exactly one intermediate slash "/" between each of them in the resulting path.
 In case one path is an empty string it is ignored. Examples:

 - concatPaths("a", "b", "c", "d") returns "a/b/c/d".
TString concatPaths(const TString& path1, const TString& path2, const TString& path3, const TString& path4, const TString& path5)
 Concatenates the four paths <path1>, <path2>, <path3>, <path4>, and <path5> ensuring
 exactly one intermediate slash "/" between each of them in the resulting path.
 In case one path is an empty string it is ignored. Examples:

 - concatPaths("a", "b", "c", "d", "e") returns "a/b/c/d/e".
int countPathLevels(TString path, bool checkPathTokens = true)
 Counts the number of path levels (valid names for instances of TQFolder separated
 by slashes "/") in input path <path>. If <path> is not a valid path -1 is returned
 (relative paths, e.g. "..", and wildcards, e.g. "?", are not considered as valid
 and will result in -1 as return value). Examples:

 - countPathLevels("") returns 0.
 - countPathLevels("hello") returns 1.
 - countPathLevels("hello/world") returns 2.
 - countPathLevels("hello/?") returns -1.
bool isEquivalentTo(TQFolder* f, const TString& options = "")
 returns true if the folder is equivalent to another one, e.g. if all
 elements present in one have a corresponding element of the same name
 present in the other as well.
bool isEquivalentTo(TQFolder* f, TQTaggable& options)
 returns true if the folder is equivalent to another one, e.g. if all
 elements present in one have a corresponding element of the same name
 present in the other as well.
bool printDiff(const TString& path1, const TString& path2, const TString& options = "")
 print the difference between two folders, comparing them recursively
bool printDiff(TQFolder* f, const TString& options = "")
 print the difference between two folders, comparing them recursively
bool printDiff(TQFolder* f, TQTaggable& options, int indent)
 print the difference between two folders, comparing them recursively
void printContents(const TString& options = "")
 this is an alias for the 'print' function
void print(const TString& options = "")
 Prints the contents of this instance of TQFolder via std::cout. The following options
 may be specified:

 - "r" recursively print contents of subfolders
 - "r<N>" (<N> replaced by a positive integer number) like "r" but
 does not go deeper than <N> levels
 - "d" prints an additional column summarizing details of the
 corresponding objects
 - "h" do not print contents of folders starting with a dot (".")
 recursively (if used with option "r")
 - "H" like "h" but do not even list folders starting with a dot (".")
 - "c" count and display the number of elements in each sub-folder
 - "C" like "c" but count the number of elements recursively
 - "l" additionally shows indentation lines
 - "f[<filter>]" only shows elements whose names match <filter> (allows use
 of wildcards "*" and "?" in the usual "ls-like" way)
 - "t" additionally prints tags associated to instances of TQFolder
 - "t[<filter>]" like "t" but only prints tags whose keys match <filter>

 The print command can be redirected to another folder by prepending the
 corresponding path followed by a colon to the list of options, e.g.
 "hello/world:trd". If wildcards are used in this path the print command will
 be redirected to the first match only.
void printInternal(TString options, int indent, bool resolve = true)
 internal pretty-print function
 for documentation, please refer to the public variant
bool checkConsistency(bool verbose = false)
 Checks the consistency of system of bidirectional pointers between instances of
 TQFolder and their base folders and returns true if all references are consistent
 and false otherwise. It prints an error message in case <verbose> is true and
 an inconsistency is found.
bool isBaseOf(TQFolder* folder)
 Returns true if this instance of TQFolder is a (not necessarily direct) base
 folder of <folder> and false otherwise.
bool removeObject(const TString& name)
 Removes the reference of the object referred to by <path> from the corresponding
 instance of TQFolder and returns true if has been removed successfully. The
 object itself is not affected. [Please note: this method is a wrapper to
 TQFolder::deleteObject(name, true).]
int deleteObject(TString name, bool removeOnly = false, TClass* tclass = 0)
 Deletes/removes the object referred to by <path> from the corresponding
 instance of TQFolder and return the number of deleted/removed objects. If
 <removeOnly> is false (this is the default) the corresponding objected is deleted
 and its memory is freed. If <removeOnly> is true only the object's reference is
 removed. If a dash "-" is appended to the object's reference the containing
 instances of TQFolder are deleted/removed recursively as well if and only if by
 the operation an instance of TQFolder has become empty. [Please note: if
 <removeOnly> is true the corresponding instances of TQFolder won't be deleted but
 only detached from its base folders. One should take care in this case to not
 loose the pointers to these folders since the inter-reference between them is
 lost.] If an exclamation mark "!" is appended to the object's reference this
 method can be used to delete non-empty instances of TQFolder including its
 content. Please note: if "-" and "!" are combined one needs to append "!-"
 (and NOT "-!").

int deleteAll()
 Deletes all elements of this folder. This will also delete subfolders including
 their elements recursively. Returns the total number of deleted objects.
 Remark: If the folder contains TQImportLinks, only the links will be deleted.
 The corresponding content that still resides on disk will not be touched
 and can still be accessed via TQFolder::loadFolder()
void sortByNameRecursive()
 Sorts the elements of this folder and all its subfolders by
 ascending alphabetical order. This does not affect the objects
 itself but only the order of references (pointers to these
 objects) kept by this instance of TQFolder.
int sortByName()
 Sorts the elements of this folder by ascending alphabetical order and returns
 the number of elements processed. This does not affect the objects itself but
 only the order of references (pointers to these objects) kept by this instance
 of TQFolder.
TQFolder * detachFromBase()
 Detaches this instance of TQFolder from its base folder and returns a pointer
 to this folder (which became the root of this tree of folders by this operation).
 This method ensures that the bidirectional reference between base folder and
 this folder are updated properly.
bool moveTo(TQFolder* dest, const TString& newName = "")
 Moves this instance of TQFolder to the folder <dest> and returns true in case
 of success and false otherwise. The operation is not performed in case this
 instance of TQFolder is a base folder of the destination folder. Optionally, a
 new name <newName> of this instance of TQFolder can be specified to be applied
 upon successfully having moved it to the destination folder. This method ensures
 that the bidirectional reference between base folder and this folder are updated
 properly.
bool moveTo(const TString& dest)
 Moves this instance of TQFolder to the one referred to by <dest> and returns
 true in case of success and false otherwise. The operation is not performed in
 case this instance of TQFolder is a base folder of the destination folder.
 Optionally, the folder can be renamed upon successfully moving it to its new
 location by appending "::" followed by the new name to <dest>. This method
 ensures that the bidirectional reference between base folder and this folder
 are updated properly. Examples:

 - moveTo("/hello") moves this folder to "/hello"
 - moveTo("/hello :: myNewName") moves this folder to "/hello" and renames it
 to "myNewName".

 [Please note: this is a wrapper to TQFolder::moveTo(TQFolder * dest, ...).]
bool moveFolder(const TString& source, const TString& dest)
 Moves the instance of TQFolder referred to by <source> to the one referred to
 by <dest> and returns true in case of success and false otherwise. The operation
 is not performed in case the source instance of TQFolder is a base folder of
 the destination folder. Optionally, the folder can be renamed upon successfully
 moving it to its new location by appending "::" followed by the new name to <dest>.
 This method ensures that the bidirectional reference between base folder and this
 folder are updated properly. Please note that this method does NOT behave
 exactly as the shell command "mv" does. Examples:

 - moveFolder("/hello", "/world") moves the folder "/hello" to "/world" (resulting
 in its new path "/world/hello")
 - moveFolder("/hello", "/world ::myNewName") moves the folder "/hello" to "/world"
 and renames it to "myNewName" (resulting in its new path "/world/myNewName")

 [Please note: this is a wrapper to TQFolder::moveTo(TQFolder * dest, ...).]
TQFolder * copy(const TString& newName = "")
 Creates an independent copy of this instance of TQFolder including all its
 sub-elements and return a pointer to it. Optionally, a new name <newName> can
 be assigned to the copy.
TQFolder * copyTo(TQFolder* dest)
 Creates an independet copy of this instance of TQFolder (including all its
 sub-elements), adds it to <dest>, and returns a pointer to the copy in case of
 success and a NULL pointer otherwise.
TQFolder * copyTo(const TString& dest)
 Creates an independet copy of this instance of TQFolder (including all its
 sub-elements), adds it to the instance of TQFolder referred to by <dest>, and
 returns a pointer to the copy in case of success and a NULL pointer otherwise.

 [Please note: this is a wrapper to TQFolder::copyTo(TQFolder * dest).]
TQFolder * copyFolder(const TString& source, const TString& dest)
 Creates an independet copy of this instance of the TQFolder at the path
 <source> (including all its sub-elements), adds it to the instance of
 TQFolder referred to by <dest>, and returns a pointer to the copy in case
 of success and a NULL pointer otherwise.

 [Please note: this is a wrapper to TQFolder::copyTo(TQFolder * dest).]
int getNElements(bool recursive = false, TClass* class_ = 0)
 Returns the number of elements (objects and subfolders) in this folder. If
 recursive = true, the number of elements in subfolders is added recursively.
 If a class is specified, elements are only counted if they inherit from that
 class
int getNObjects(const TString& nameFilter = "") const
int getNObjects(const TString& nameFilter, bool recursive)
 return the number of objects matching the given name filter
bool isEmpty() const
 Returns true if this instance of TQFolder does not contain any element and
 false otherwise.
int getOwnSize() const
int getSize(bool memoryOnly = true)
 Returns an estimated size (in bytes) of this instance of TQFolder including
 its sub-elemets in memory. The number returned is mainly calculated from the
 estimated size of histograms stored within the folder hierarchy (using the
 method TQHistogramUtils::estimateSize(...)) and a contribution for any other
 type of object obtained from the C++ function sizeof(...). Please note that
 this does determine the size of the pointer rather than the size of the object
 itself. Thus, TQFolder::getSize() does only provide reasonable results if most
 elements within the folder hierarchy are histograms (instances of TH1).
TString getSizeAsString(bool memoryOnly = true)
 TODO: move this to TQStringUtils
void setBase(TQFolder* base_)
 set the base folder
TQTaggable * getBaseTaggable() const
 retrieve the base folder as TQTaggable
TList * getDescendantTaggables()
TList * getListOfTaggables(const TString& taggables)
 retrieve list of subfolders
TList * getTaggablesByName(const TString& taggables)
 retrieve list of subfolders
TList * getListOfFolders(const TString& path_ = "?", TClass* tclass = TQFolder::Class(), bool toplevelOnly = false, bool firstMatchOnly = false)
 retrieve a list of folders under the given path matching the class
 TODO: handle tag requirements
void getFoldersWithTagEquivalentToInternal(const TQValue* tag, vector<TQFolder*>& matches)
std::vector<TQFolder*> getFoldersWithTagEquivalentTo(const TQValue* tag)
 determines a set of (sub) folders which have a tag equivalent to the one
 provided. Tags on containing folders are
 considered as well (i.e., tags are being searched for
 towards the root node of the folder structure)
 note that once a folder matches its sub folders are no longer considered
 even if the relevant tag might change when retrieving it from a sub folder
 of the one in the returned set
std::vector<TQFolder*> getFoldersWithTagEquivalentTo(const TQValue& tag)
std::vector<TQFolder*> getFoldersWithTagsEquivalentTo(const vector<const TQValue*>& tags)
 determines a set of (sub) folders which have tags equivalent to those provided
 (applying a logical "AND" on requirements). Tags on containing folders are
 considered as well (i.e., tags are being searched for
 towards the root node of the folder structure)
std::vector<TString> getFolderPaths(const TString& path_ = "?", TClass* tClass = TQFolder::Class(), bool toplevelOnly = false)
 returns a std::vector<TString> containing the full paths of folders matching
 the given requirements.
std::vector<TString> getFolderPathsWildcarded(const TString& path_ = "?", TClass* tClass = TQFolder::Class(), bool toplevelOnly = false)
 returns a std::vector<TString> containing the full paths of folders matching
 the given requirements. This variant returns the paths in their wildcarded
 representation (using the "wildcarded" tag on the respective folders). If
 multiple folders matching the requirements with the same wildcarded path are
 found, the path is added to the vector only once.
TList * getListOfObjects(TString path_ = "?", TClass* tclass = TObject::Class())
 retrieve a list of objects matching the given path
TList * getListOfObjectPaths(TString path_ = "?", TClass* tclass = TObject::Class())
 retrieve a list of objects matching the given path
TObject * getCopyOfObject(const TString& name_, const TString& path_ = "")
TObject * getObject(const TString& name_, const TString& path_ = "")
 retrieve an object with the given name from a path
TString getObjectPath(TString name_)
 expand and return the path of some object
TList* getObjectPaths(TString namepattern, TString pathpattern = "./", TClass* objClass = TObject::Class())
 return the paths of all objects matching the pattern
 The ownership of the list elements is with the returned list itself.
TString getName() const
 retrieve the name of this object
void setName(const TString& newName)
 set the name of this object
const TString& getNameConst() const
 retrieve a const reference to the name of this object
TQFolder * getFolder(const TString& path)
 wrapper to help resolve ambiguous calls
TQFolder * getFolder(const char* path)
 wrapper to help resolve ambiguous calls
TQFolder * getFolder(const TString& path_, TClass* tclass)
 Returns the folder (instance of TQFolder) that matches the path pattern <path_>
 and a NULL pointer in case no match can be found. If more than one folder matches
 <path_> (because wildcards are used) the first match is returned. Additionally,
 a new instance of TQFolder is created as requested if it does not already
 exist and a "+" has been appended to <path_>. The path <path_> may be built
 up from any number of path levels in either case and an arbitrary number of
 nested folders may be created by appending one "+" to the full path.

 Examples:

 - getFolder("subfolder") returns a pointer to the instance of TQFolder named
 "subfolder" within this instance of TQFolder if it does exist.
 - getFolder("subfolder+") returns a pointer to the instance of TQFolder named
 "subfolder" within this instance of TQFolder and does create it if it does
 not exist
 - getFolder("subfolder/fol2+") returns a pointer to the instance of TQFolder
 named "fol2" within "subfolder" (in turn within this instance of TQFolder)
 and does create it if it does not exist

TQFolder * addFolder(TQFolder* folder_, TString path_ = "", TClass* tclass = 0)
 add a folder at the given path
TList * getListOfObjectNames(TClass* class_ = 0, bool recursive = false, TString path_ = "")
 Return the list of names of objects in a folder
TString getPath()
 Returns the full path of this instance of TQFolder in the hierarchy. For the
 root folder "/." is returned.
TString getPathWildcarded()
 Returns the full path of this instance of TQFolder in the hierarchy. For the
 root folder "/" is returned.
 this version of getPath replaces the names of folders that have the tag
 wildcarded=true
 set with a wildcard ('?')
TQFolder * getBase(int depth = 1) const
 Returns a pointer to the base folder of this instance of TQFolder and a NULL
 pointer in case it is the root folder of the folder hierarchy. In general, if
 <depth> is larger than 1 (it is 1 by default) a pointer to the instance of
 TQFolder <depth> levels up the hierarchy is returned and a NULL pointer if the
 root folder is traversed before. If <depth> is zero a pointer to this instance
 of TQFolder is returned.
int areRelated(const TQFolder* other) const
 checks if this folder or the other folder are subfolders of the respective
 other. Returns +1*nSteps if 'other' is a subfolder of 'this', -1*nSteps in the inverse case
 and 0 otherwise. nSteps is the distance between the two folders starting at 1
 if the two folders are equal. Example: If 'this' is a direct subfolder of
 'other' then -2 is returned
TQFolder * getRoot()
 Returns the a pointer to the instance of TQFolder which is the root of this
 folder hierarchy.
bool isRoot()
 Returns true if this instance of TQFolder is the root of the folder hierarchy
 (there is no base folder) and false otherwise.
int getDistToRoot() const
 Returns the number of hierarchy levels to be traversed up to the root folder
 of this hierarchy.
int getDepth()
 Returns the number of levels to be traversed down to the deepest element. For
 an instance of TQFolder that does not contain "sub-instances" of TQFolder the
 return value is 1.
TList * getTraceToRoot(bool startAtRoot = false)
 retrieve a list of folders containing all hierarchy levels up to the root
 folder
TQFolder * loadLazyFolder(TString path)
 this function works exactly as TQFolder::loadFolder, with the exception that
 all folder branches that have been externalized/splitted when writing the file
 will remain in collapsed state until they are accessed.
 for large files with an excessive use of externalization/splitting, this will
 significantly speed up accessing the data, since the branches are only expanded
 on-demand.

 please note, however, that you will only experience a total speed gain if you
 only access small fractions of your data. if you plan to read most of the file's data
 at some point, requiring the expansion of all branches, this 'lazy' feature
 will only postpone the work of loading the data into RAM to the point where it is accessed
 bringing no total speed gain.
TQFolder * loadFolder(TString path, bool lazy = false)
 Loads an instance of TQFolder from an external ROOT file and returns a pointer
 to it and a NULL pointer in case of failure. The ROOT file and the key within
 the key within the ROOT file to be read is identified by <path> which has to
 have the form "filename:keyname", e.g. "file.root:folder".
 If the folder to load is stored within a structre of TDirectory in the file
 it can be accessed by prepending the corresponding path to the folder name,
 e.g. "file.root:dir1/dir2/folder". To load only a subfolder of an instance of
 TQFolder from the ROOT file one can append the corresponding path to the folder
 name, e.g. "file.root:folder/subfolder". In this case a pointer to "subfolder"
 is returned which is made the root folder before
 the 'lazy' flag will trigger lazy loading, please refer to TQFolder::loadLazyFolder
 for documentation of this feature.
TQFolder * loadFromTextFile(TString filename, bool showErrorMessage = false)
 Creates a new instance of TQFolder, performs an import from an external text
 file <filename> on it, and returns a pointer to it in case of success and a
 NULL pointer in case of failure. If <showErrorMessage> is true and an error
 occurs during the import process the corresponding error message is displayed
 via std::cout. If the name of the instance returned is set to the filename of the
 text file with invalid characters replaced by "_".

 [Please note: this is a wrapper to TQFolder::loadFromTextFile(TString filename,
 TString &errorMessage).]
TQFolder * loadFromTextFile(TString filename, TString& errorMessage)
 Creates a new instance of TQFolder, performs an import from an external text
 file <filename> on it, and returns a pointer to it in case of success and a
 NULL pointer in case of failure.
 error messages will be fed into the string given as second argument
TQFolder * addObject(TObject* object, TString destination = "", TClass* folderClass = TQFolder::Class())
 Adds the object <object> to this instance of TQFolder or to the one referred to
 by <destination> and returns a pointer to the destination folder in case of
 success or a NULL pointer in case of failure. If destination ends on "!" an
 existing object with the same name will be replaced by the new one. Default is
 to keep the old object and return 0 if one exists already.
TDirectory * getDirectory()
 retrieve the directory wherein this folder resides
int setDirectory(TDirectory* dir = (ROOT::Internal::TDirectoryAtomicAdapter(TDirectory::CurrentDirectory())), bool own = false)
 set the directory of this folder
 will migrate all data to the new directory, might be slow
 second argument decides whether the folder owns the directory handed
void clearDirectoryInternal()
 clear and delete the directory associated to this folder if owned
void setDirectoryInternal(TDirectory* dir)
 set the directory of this folder
 internal variant, will not migrate any data
 DO NOT USE, UNLESS YOU KNOW WHAT YOU ARE DOING
TQFolder * addCopyOfObject(TObject* object, TString destination = "", TClass* folderClass = TQFolder::Class())
 Adds an independent copy of the object <object> to this the instance of
 TQFolder or to the one referred to by <destination> and returns a pointer to
 the destination folder in case of success or a NULL pointer in case of failure.
bool hasObject(TString name)
 return true if the folder has an object of the given name/path in its
 folder structure
int resolveImportLinks(bool recurse = true)
 resolve all import links and load all missing components from disk to
 memory, converting a "lazy" sample folder into a fully expanded one
int resolveImportLinks(TDirectory* dir, bool recurse = true)
 resolve all import links and load all missing components the given
 directory to memory, converting a "lazy" sample folder into a fully
 expanded one
TObject * resolveImportLink(const TString& linkName, bool recurse = true)
 resolve one specific import link given by name
TObject * resolveImportLink(const TString& linkName, TDirectory* dir, bool recurse = true)
 resolve one specific import link given by name from a given TDirectory
void autoSetExportName()
 automatically generate an export name for this folder the export name is
 required in order to allow writing this folder to disk with a non-zero
 split value. however, the user should NEVER need to call this function, as
 this should be handled automatically
void autoSetExportNames()
 automatically generate an export names for this folder and all its subfolders
 for further details, refer to TQFolder::autoSetExportName
void setExportName(const TString& name)
 set a specific export name for this folder and auto-generate ones for all
 its subfolders
 for further details, refer to TQFolder::autoSetExportName
TObject * importObjectFromDirectory(TDirectory* dir, TString importPath, bool recurse = true, TClass* expectedClass = __null)
 import an object from a TDirectory and deploy it at the given importPath
bool writeFolder(TDirectory* dir, TString name, int depth = -1, bool keepInMemory = true)
 writes a TQFolder to a given directory
 the precise functionality of this function can be customized using optional parameters
 in the default settings,
 - dir is the directory to which the folder will be written
 - exportName is the key under which the folder will be deployed in the directory

 after this function has been successfully executed, the the given directory will be associated
 to this folder. further writes via writeFolder or writeUpdate will use this directory
 if no other (new) directory is given

 also, all currently collapsed branches of the folder hierarchy will be expanded and rewritten
 to the new directory.

 since ROOT has problems with too large TObjects, the optional depth argument allows automatic splitting
 of a large folder hierarchy into parts. this splitting will on the top level and on each succeeding
 level of the folder hierarchy, until the depth exceeds the optional depth parameter.

 the keepInMemory=false flag can be used to automatically remove all folders from memory
 that have been linked/externalized with the depth-splitting procedure
 this causes the corresponding branhces of the folder hierarchy to be collapsed
 these branches are expanded (and the contents are then automatically reloaded from disk)
 when they are accessed
 with keepInMemory=false, reading/writing folder contents will take significantly longer
 however, lots of RAM space will be freed whenever writeFolder or writeUpdate are called
 with keepInMemory=false

bool writeFolderMaxSize(TDirectory* dir, TString name, int maxSizeInMB = 10, bool keepInMemory = true)
 this function is still under developement, please use the usual TQFolder::writeFolder function instead
bool writeFolder(TDirectory* dir, int depth = -1, bool keepInMemory = true)
 as opposed to TQFolder::writeFolder(TDirectory*dir,TString name, int depth, bool keepInMemory)
 this function does not take the 'name' argument and automatically used the folder name instead
 for further documentation on the functionality, please refer to the aforementioned function
bool writeFolderMaxSize(TDirectory* dir, int maxSizeInMB = 10, bool keepInMemory = true)
 this function is still under developement, please use the usual TQFolder::writeFolder function instead
TString makeExportName(TString exportName)
 this function will transform the given string into a valid export name
 for further information, please refer to TQFolder::writeFolder
 THIS FUNCTION IS FOR INTERNAL USE ONLY
const TString& getExportName()
 return the currently set export name of this folder
 for further information, please refer to TQFolder::writeFolder
bool split(TDirectory* dir, int depth)
bool writeFolderHook(TDirectory* dir, const TString& exportName, int depth, bool keepInMemory)
 wrapper function to allow subclasses to easily hook into the writing procedure
bool writeFolderInternal(TDirectory* dir, const TString& exportName, int depth, bool keepInMemory)
 this private function implements the TQFolder::writeFolder functionality
 other flavours of this function merely use the functionality of this one
 however, for documentation, please refer to the public variants
bool isOnDisk()
 check if the TQFolder has a valid directory set
 and is available to be re-read from this directory
bool isOnDisk(TDirectory* dir)
 check if the TQFolder is available from the given directory
bool collapse()
 collapse the folder down to its TQImportLinks
 this is useful in cases where you read a large TQFolder structure
 only accessing a tiny proportion of the entire structure at a time
 and only reading (not writing) any data
 in this case, occasional calles of TQFolder::collapse()
 will free the memory space used by the TQFolder branch in question
 and resinsert a TQImportLink at the corresponding points
 to allow re-reading the folder contents if need be
 ideally, this will drastically reduce the memory usage of your applicaton
 however, any modification made to the folder structure will be lost!
bool writeUpdate(int depth = -1, bool keepInMemory = true)
 this function, just like TQFolder::writeFolder, will write the folder contents to disk
 as opposed to the aforementioned function, this will only write an incremental update
 of the folder, that is, only write those chunks of data that have been accessed since
 the last write has been performed

 to determine this, writeUpdate will check for expanded branches of the folder hierarchy
 and will save them into an external object in the current directory
 this directory will be either of the following (with descending priority)
 - the directory to which the folder has been written at the last call of writeFolder
 - the directory from which the folder has been retrieved originally, if writeable
 - the current working directory

 please note that the inremential nature of the updates is only achieved if
 - previous calls of writeUpdate and/or writeFolder have used the keepInMemory=false flag, and
 - the depth argument for previous writeFolder and/or writeUpdate calls has been >0
 since this is the only case in which there will be collapsed branches in the folder hierarchy
 alternatively, incremental updates will also work if the folder is opened in lazy mode, see
 TQFolder::loadLazyFolder

bool writeDirectory(TDirectory* baseDir)
 write this TQFolder >>as a TDirectory<< to the given base directory this
 function is intended to allow easy export of TQFolders to co-workers which
 are not using this framework
bool importFromTextFiles(const TString& filePattern)
 applies the textual definitions from one or more text files to this instance
 for details, please refer to TQFolder::loadFromTextFile
bool importFromTextFiles(const TString& filePattern, TString& errorMessage)
 applies the textual definitions from one or more text files to this instance
 for details, please refer to TQFolder::loadFromTextFile
 error messages will be fed into the string given as second argument
bool importFromTextFile(const TString& filename)
 applies the textual definitions from exaclty one text file to this instance
 for details, please refer to TQFolder::loadFromTextFile
bool importFromTextFile(const TString& filename, TString& errorMessage)
 applies the textual definitions from exaclty one text file to this instance
 for details, please refer to TQFolder::loadFromTextFile
 error messages will be fed into the string given as second argument
bool importFromTextFilePrivate(const TString& filename_, int& nNewlines, TString& errFile, TString& errMsg)
 import a text file
TList * exportToText(bool includeUntextables = false, int indent = 0)
 export this instance of TQFolder to a list of strings
 the result can be used to create a new instance of TQFolder via
 TQFolder::loadFolderFromText or to patch an existing folder by calling
 TQFolder::importFromText
bool writeContentsToHTML(ostream& out, int expandDepth, bool includeUntextables)
 creat an HTML-view of this TQFolder instance
 please be aware that the result can be unmanagably large for large folder hierarchies
bool exportToHTMLFile(const TString& filename, int expandDepth = 1, bool includeUntextables = true)
 creat an HTML-view of this TQFolder instance and write it to a file
 please be aware that the result can be unmanagably large for large folder hierarchies
bool exportToTextFile(const TString& filename, bool includeUntextables = false)
 export this instance of TQFolder to a text file
 the result can be used to create a new instance of TQFolder via
 TQFolder::loadFolderFromTextFile or to patch an existing folder by calling
 TQFolder::importFromTextFile
bool importFromText(const TString& input)
 Import folders and tags from text. The syntax is built from three basic elements:

 1) creating new folders (instances of TQFolder),
 2) setting tags on folders,
 3) executing commands.

 Lines starting with "#" will be considered a comment and will be ignored. In
 the following the syntax is explain my means of an example text:

 # Create a new sub-folder ("mySubfolder"):
 +mySubfolder;

 # Create a new sub-folder ("mySubfolder") and import recursively:
 +mySubfolder {

 }

 # Please note: If a recursive import block is opened "{...}" no
 # terminating ";" is needed.

 # Create new nested sub-folders ("mySubfolder/anotherSubFolder"):
 +mySubfolder/anotherSubFolder;

 # This one does also work with recursive import:
 +mySubfolder/anotherSubFolder {

 }

 # Set a tag ("myTag") with some value (myValue) on this folder:
 <myTag = myValue>

 # Set more than one tag:
 <myTag = myValue, anotherTag = false, hello = "world">

 # Set a tag ("myTag") with some value (myValue) on a sub-folder ("mySubfolder"):
 <myTag = myValue> @ mySubfolder;

 # Include text to import from an external text file ("myImportText.txt"):
 $include("myImportText.txt");

 # Delete a folder ("mySubfolder"):
 $delete("mySubfolder");

 # (this one simply calls TQFolder::deleteObject(...)).

 # Ignore text inside a block:
 $ignore() {

 }

 # Please note: the text to be ignored should be a valid text block to import.

 # Copy a folder ("mySubfolder") and rename the new instance (to "mySubfolder2")
 $copy("mySubfolder >>:: mySubfolder2");
bool importFromText(const TString& input, TString& errorMessage)
 Import folders and tags from text.
 for details, please refer to the wrapper function of the same name
 occurring errors will be fed into the string given as second argument
bool executeCopyCommand(TString object, TString& errMsg, bool moveOnly, const TString& destPrefix = "")
 read object source
bool importFromTextPrivate(TString input, int& nNewlines, TString& errFile, TString& errMsg)
 worker function to import a TQFolder from a text file
~TQFolder()
 Deletes this instance of TQFolder and all its objects and sub-folders recursively
TQFolder* copyDirectoryStructure(const TString& basepath, int maxdepth = 999)
 return a full TQFolder copy of some actual file system structure
TQFolder* copyDirectoryStructureLocal(const TString& basepath, int maxdepth = 999)
 traverse a folder structure of the local physical file system and create a TQFolder-image thereof
TQFolder* copyDirectoryStructureEOS(const TString& basepath, int maxdepth = 999)
 traverse a folder structure of the some EOS file system and create a TQFolder-image thereof
int writeToFile(const TString& filename, bool overwrite = 0, int depth = -1, bool keepInMemory = true)
 write this folder to a file of the given name, splitting at the given depth value
 the name of the folder will be used as a key
void setInfoTags()
 deposit a couple of tags with timestamp and meta-information about software versions
TQFolder* findCommonBaseFolder(TCollection* fList, bool allowWildcards = true)
 find a common base folder of some list
TList* exportTagsToText(const TString& filter)
 create a TList with strings for all tags matching the filter in this folder structure
 the result can be applied to some folder via TQFolder::importFromTextFile
bool exportTagsToTextFile(const TString& filename, const TString& filter)
 write to a file the strings for all tags matching the filter in this folder structure
 the result can be applied to some folder via TQFolder::importFromTextFile
bool merge(TQFolder* other, bool sumElements = false)
 merge another instance of TQFolder into this one. this function will
 traverse the folder structure recursively and collect all existing
 subfolders from both instances and merge them into one. in the case of a
 conflict, it will always use the subfolder with the more recent time stamp
bool mergeAsFolder(TQFolder* other, TQFolder::MergeMode mode)
 simply merge to folders, merging all objects, taggs and subfolders
bool mergeTags(TQFolder* other)
 merge (copy) the tags from another folder to this one
void mergeObjects(TQFolder* other, TQFolder::MergeMode mode)
 merge (move) the objects from another folder to this one
int replaceInFolderTags(TQTaggable& params, const TString& path, const TString& tagFilter = "*", TClass* typeFilter = TQFolder::Class())