Collection (and CollectionProxy) implementation based on ROOT trees.
More...
#include <RootCollection.h>
Collection (and CollectionProxy) implementation based on ROOT trees.
Implementation details:
- Token and meta data attributes are stored in a simple TTree
- Tokens are stored as (compressed) C-string
- Each attribute is written to a separate branch of the TTree
- You can "play" with the collection tree in an interactive ROOT session
- The TTree is stored to the ROOT file: collectionName.root
- Pool FileCatalog can be utilized to locate/register the collection files (see: RootCollection::RootCollection)
- Selection is performed using TTreePlayer
- Description of query syntax can be found at http://root.cern.ch/root/htmldoc/TTree.html#TTree:Draw
- It is possible to read only subsets of the AttributeList
- This feature is controlled via the "option" parameter of the RootCollection::select method
- e.g. RootCollection::select( primaryQuery, secondaryQuery ,"ATTRIBUTE_LIST attribute23 attribute42")
- Support for remote collection access via rootd
- (experimental)
- Support for a simple server side selection
- (experimental)
ROOT documentation can be found at http://root.cern.ch/
Definition at line 60 of file RootCollection.h.
◆ Factory
◆ OpenMode
Enumeration of the possible open modes of the collection.
Enumerator |
---|
CREATE | |
CREATE_AND_OVERWRITE | |
UPDATE | |
READ | |
Definition at line 26 of file ICollection.h.
◆ RootCollection() [1/2]
Constructor.
- Parameters
-
session | If you want to access the referenced objects you have to provide an ISession |
connection | The location of the collection file is uniquely defined by the parameters name and connection |
name | The location of the collection file is uniquely defined by the parameters name and connection |
mode | The open mode of the collection |
- Without use of FileCatalog:
- The path to the collection file is simply created by the following concatenation:
connection+name+".root"
- name: Name of the collection file
- connection:
- It can be a relative or absolute path
- In case of an empty connection string it is assumed that the file is located in the current directory
- Remote access via rootd: e.g. "root://pcepsft02.cern.ch:9090//localdisk/
Further documentation can be found in the class description of TNetFile (http://root.cern.ch/root/html/TNetFile.html)
- Utilization of FileCatalog:
- This mode is triggered if the name parameter starts with one of the following prefixes "PFN:", "FID:" or "LFN:".
- According to the prefix the name is interpreted as Physical File Name, unique File ID or Logical File Name
- The connection string is interpreted as URI of the FileCatalog. The collection retrieves the FileCatalog defined by the given URI from FileCatalogMap. A default file catalog (empty connection string) can be defined there.
- This mode works also in the context of MultiCollection. If a collection created by a MultiCollection iterator is a RootCollection using FileCatalog, it will use the same catalog as its multi collection parent. On the other side the connection string defining the FileCatalog of a RootCollection is ignored when a RootCollection using FileCatalogs is added to a MultiCollection
◆ ~RootCollection()
pool::RootCollection::RootCollection::~RootCollection |
( |
| ) |
|
◆ RootCollection() [2/2]
copying unimplemented in this class.
◆ addTreeBranch()
virtual void pool::RootCollection::RootCollection::addTreeBranch |
( |
const std::string & |
name, |
|
|
const std::string & |
type_name |
|
) |
| |
|
virtual |
◆ cleanup()
void pool::RootCollection::RootCollection::cleanup |
( |
| ) |
|
|
private |
◆ close()
virtual void pool::RootCollection::RootCollection::close |
( |
| ) |
|
|
finaloverridevirtual |
◆ commit()
virtual void pool::RootCollection::RootCollection::commit |
( |
bool |
restartTransaction = false | ) |
|
|
finaloverridevirtual |
◆ delayedFileOpen()
void pool::RootCollection::RootCollection::delayedFileOpen |
( |
const std::string & |
method | ) |
|
|
private |
◆ description()
Returns an object used to describe the collection properties.
Implements pool::ICollection.
◆ fileCatalogRequired()
bool pool::RootCollection::RootCollection::fileCatalogRequired |
( |
| ) |
const |
|
private |
◆ getCollectionTree()
TTree* pool::RootCollection::RootCollection::getCollectionTree |
( |
| ) |
|
|
private |
◆ initNewRow()
Initialize a new RowBuffer by adding all Attributes adn Tokens of this collection to it.
◆ insertRow()
◆ isOpen()
virtual bool pool::RootCollection::RootCollection::isOpen |
( |
| ) |
const |
|
finaloverridevirtual |
◆ newQuery()
◆ open()
virtual void pool::RootCollection::RootCollection::open |
( |
| ) |
|
|
finaloverridevirtual |
Explicitly re-opens the collection after it has been closed.
Implements pool::ICollection.
◆ openMode()
◆ operator=()
copying unimplemented in this class.
◆ readAttributeListSpecification()
void pool::RootCollection::RootCollection::readAttributeListSpecification |
( |
| ) |
const |
|
private |
◆ retrieveBestPFN()
◆ retrieveFID()
std::string pool::RootCollection::RootCollection::retrieveFID |
( |
| ) |
|
|
private |
◆ retrieveFileCatalog()
void pool::RootCollection::RootCollection::retrieveFileCatalog |
( |
| ) |
const |
|
private |
◆ retrievePFN()
std::string pool::RootCollection::RootCollection::retrievePFN |
( |
| ) |
const |
|
private |
◆ retrieveUniquePFN()
◆ setupTree()
void pool::RootCollection::RootCollection::setupTree |
( |
| ) |
const |
|
private |
◆ writeAttributeListSpecification()
void pool::RootCollection::RootCollection::writeAttributeListSpecification |
( |
| ) |
|
|
private |
◆ c_attributeListLayoutName
const char* const pool::RootCollection::RootCollection::c_attributeListLayoutName |
|
static |
◆ c_maxLengthOfStrings
const unsigned int pool::RootCollection::RootCollection::c_maxLengthOfStrings = 5000 |
|
static |
◆ c_tokenBranchName
const char* const pool::RootCollection::RootCollection::c_tokenBranchName |
|
static |
◆ m_description
◆ m_file
TFile* pool::RootCollection::RootCollection::m_file |
|
private |
◆ m_fileCatalog
◆ m_fileMgr
SmartIF<IFileMgr> pool::RootCollection::RootCollection::m_fileMgr |
|
private |
◆ m_fileName
std::string pool::RootCollection::RootCollection::m_fileName |
|
private |
◆ m_mode
◆ m_name
std::string pool::RootCollection::RootCollection::m_name |
|
private |
◆ m_open
bool pool::RootCollection::RootCollection::m_open |
|
private |
◆ m_poolOut
coral::MessageStream pool::RootCollection::RootCollection::m_poolOut |
|
private |
◆ m_readOnly
bool pool::RootCollection::RootCollection::m_readOnly |
|
private |
◆ m_schemaWritten
bool pool::RootCollection::RootCollection::m_schemaWritten |
|
private |
◆ m_session
ISession* pool::RootCollection::RootCollection::m_session |
|
private |
◆ m_tree
TTree* pool::RootCollection::RootCollection::m_tree |
|
private |
◆ poolOptToFileMgrOpt
const Io::IoFlags pool::RootCollection::RootCollection::poolOptToFileMgrOpt[] |
|
static |
◆ poolOptToRootOpt
const char* const pool::RootCollection::RootCollection::poolOptToRootOpt[] |
|
static |
The documentation for this class was generated from the following file: