|
virtual | ~ITreeROOT () |
| Destructor.
|
|
| ITreeROOT (const std::string &storeName, const std::string &storeType="", bool readOnly=false, bool createNew=false, const std::string &options="") |
| Creates a new tree and associates it with a store. More...
|
|
virtual std::string | storeName () const |
| Get the name of the store. More...
|
|
virtual bool | cd (const std::string &path) |
| Get the IManagedObject at a given path in the ITree. More...
|
|
virtual std::string | pwd () const |
| Get the path of the current working directory. More...
|
|
virtual bool | ls (const std::string &path=".", bool recursive=false, std::ostream &os=std::cout) const |
| List, into a given output stream, all the IManagedObjects, including directories (but not "." and ".."), in a given path. More...
|
|
virtual bool | mkdir (const std::string &path) |
| Get the list of names of the IManagedObjects under a given path, including directories (but not "." and ".."). More...
|
|
virtual bool | commit () |
| Create a directory recursively. More...
|
|
virtual bool | close () |
| Set the strategy of what should happen if two objects have the same path. More...
|
|
virtual | ~ITree () |
| Destructor.
|
|
class IManagedObject;
User level interface to a Tree.
All paths follow unix convention .., ., /, backslash is the escape character. Relative paths are allowed.
NOTE: - this tree keeps a current position(pwd) within the tree. This may be implemented on a per-thread basis.
- Author
- T. Kraemer, DESY
- Version
- Id:
- ITreeROOT.h,v 1.5 2008-01-30 17:42:20 killenberg Exp
bool ITreeROOT::ls |
( |
const std::string & |
path = "." , |
|
|
bool |
recursive = false , |
|
|
std::ostream & |
os = std::cout |
|
) |
| const |
|
virtual |
List, into a given output stream, all the IManagedObjects, including directories (but not "." and ".."), in a given path.
Directories end with "/". The list can be recursive.
- Parameters
-
path | The path where the list has to be performed (by default the current directory "."). |
recursive | If true the list is extended recursively in all the directories under path (the default is false . |
os | The output stream into which the list is dumped (by default the standard output). |
- Returns
- false If the path does not exist.
Implements AIDA::ITree.
References cd(), and pwd().
bool ITreeROOT::mkdir |
( |
const std::string & |
path | ) |
|
|
virtual |
Get the list of names of the IManagedObjects under a given path, including directories (but not "." and "..").
Directories end with "/". The returned names are appended to the given path unless the latter is ".".
- Parameters
-
path | The path where the list has to be performed (by default the current directory "."). |
recursive | If true the list is extended recursively in all the directories under path (the default is false .virtual std::vector<std::string> listObjectNames(const std::string & path = ".", bool recursive = false) const; Get the list of types of the IManagedObjects under a given path. The types are the leaf class of the Interface, e.g. "IHistogram1D", "ITuple", etc. Directories are marked with "dir". The order of the types is the same as the order for the listObjectNames() method to achieve a one-to-one correspondance between object names and types. |
path | The path where the list has to be performed (by default the current directory "."). |
recursive | If true the list is extended recursively in all the directories under path (the default is false .virtual std::vector<std::string> listObjectTypes(const std::string & path = ".", bool recursive = false) const; Create a new directory. Given a path only the last directory in it is created if all the intermediate subdirectories already exist. |
path | The absolute or relative path of the new directory. |
- Returns
- false If a subdirectory within the path does not exist or it is not a directory. Also if the directory already exists.
Implements AIDA::ITree.
References cd(), and pwd().