bes  Updated for version 3.17.4
BESCatalogList Class Reference

List of all registered catalogs. More...

#include <BESCatalogList.h>

Inheritance diagram for BESCatalogList:
Inheritance graph

Public Types

typedef map< string, BESCatalog * >::const_iterator catalog_citer
 
typedef map< string, BESCatalog * >::iterator catalog_iter
 

Public Member Functions

virtual bool add_catalog (BESCatalog *catalog)
 adds the speciifed catalog to the list More...
 
virtual string default_catalog ()
 
virtual bool deref_catalog (const string &catalog_name)
 de-reference the specified catalog and remove from list if no longer referenced More...
 
virtual void dump (ostream &strm) const
 dumps information about this object More...
 
virtual catalog_iter end_catalog ()
 
virtual BESCatalogfind_catalog (const string &catalog_name)
 find the catalog in the list with the specified name More...
 
virtual catalog_iter first_catalog ()
 
virtual int num_catalogs ()
 
virtual bool ref_catalog (const string &catalog_name)
 reference the specified catalog More...
 
virtual BESCatalogEntryshow_catalogs (BESDataHandlerInterface &dhi, BESCatalogEntry *entry, bool show_default=true)
 show the list of catalogs More...
 

Static Public Member Functions

static BESCatalogListTheCatalogList ()
 returns the singleton BESCatalogList instance. The pthreads library insures that only one instance can be made in a process lifetime.
 

Protected Member Functions

 BESCatalogList ()
 construct a catalog list More...
 

Friends

class BESCatalogListUnitTest
 

Detailed Description

BESCatalog objecgts can be registered with this list. The BES allows for multiple catalogs. Most installations will have a single catalog registered.

Catalogs have a uniq name

If there is only one catalog then the display of the root will be the display of that catalogs root.

If there are more than one catalogs registered then the view of the root will display the list of catalogs registered. To view the contents of a specific catalog begin each container name with the name of the catalog followed by a colon.

show catalog for "cedar_catalog:/instrument/5340/year/2004/";

See also
BESCatalog

Definition at line 70 of file BESCatalogList.h.

Constructor & Destructor Documentation

◆ BESCatalogList()

BESCatalogList::BESCatalogList ( )
protected
See also
BESCatalog

Definition at line 90 of file BESCatalogList.cc.

References BESKeys::get_value(), and TheBESKeys::TheKeys().

Member Function Documentation

◆ add_catalog()

bool BESCatalogList::add_catalog ( BESCatalog catalog)
virtual
Parameters
catalognew catalog to add to the list
Returns
false if a catalog with the given catalog's name already exists. Returns true otherwise.
See also
BESCatalog

Definition at line 124 of file BESCatalogList.cc.

References find_catalog().

◆ deref_catalog()

bool BESCatalogList::deref_catalog ( const string &  catalog_name)
virtual

Search the list for the catalog with the given name. If the catalog exists, de-reference it. If there are no more references then remove the catalog from the list and delete it.

Parameters
catalog_namename of the catalog to de-reference
Returns
true if successfully de-referenced, false otherwise
See also
BESCatalog

Definition at line 176 of file BESCatalogList.cc.

◆ dump()

void BESCatalogList::dump ( ostream &  strm) const
virtual

Displays the pointer value of this instance along with the catalogs registered in this list.

Parameters
strmC++ i/o stream to dump the information to

Implements BESObj.

Definition at line 249 of file BESCatalogList.cc.

◆ find_catalog()

BESCatalog * BESCatalogList::find_catalog ( const string &  catalog_name)
virtual
Parameters
catalog_namename of the catalog to find
Returns
a BESCatalog with the given name if found, 0 otherwise
See also
BESCatalog

Definition at line 199 of file BESCatalogList.cc.

◆ ref_catalog()

bool BESCatalogList::ref_catalog ( const string &  catalog_name)
virtual

Search the list for the catalog with the given name. If the catalog exists, reference it and return true. If not found then return false.

Parameters
catalog_namename of the catalog to reference
Returns
true if successfully found and referenced, false otherwise
See also
BESCatalog

Definition at line 152 of file BESCatalogList.cc.

◆ show_catalogs()

BESCatalogEntry * BESCatalogList::show_catalogs ( BESDataHandlerInterface dhi,
BESCatalogEntry entry,
bool  show_default = true 
)
virtual

This method adds information about the list of catalogs that exist

If there is a problem accessing the requested node then the reason for the problem must be included in the informational response, not an exception thrown. This method will not throw an exception.

Parameters
coiis the request to include collections or just the specified container
infoinformational object to add information to

Definition at line 222 of file BESCatalogList.cc.


The documentation for this class was generated from the following files: