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 61 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 |
◆ initMessaging()
| void AthMessaging::initMessaging |
( |
| ) |
const |
|
privateinherited |
Initialize our message level and MessageSvc.
This method should only be called once.
Definition at line 39 of file AthMessaging.cxx.
◆ 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 |
◆ msg() [1/2]
| MsgStream & AthMessaging::msg |
( |
| ) |
const |
|
inlineinherited |
The standard message stream.
Returns a reference to the default message stream May not be invoked before sysInitialize() has been invoked.
Definition at line 164 of file AthMessaging.h.
◆ msg() [2/2]
| MsgStream & AthMessaging::msg |
( |
const MSG::Level |
lvl | ) |
const |
|
inlineinherited |
The standard message stream.
Returns a reference to the default message stream May not be invoked before sysInitialize() has been invoked.
Definition at line 179 of file AthMessaging.h.
180 {
return msg() << lvl; }
◆ msgLvl()
| bool AthMessaging::msgLvl |
( |
const MSG::Level |
lvl | ) |
const |
|
inlineinherited |
Test the output level.
- Parameters
-
| lvl | The message level to test against |
- Returns
- boolean Indicating if messages at given level will be printed
- Return values
-
| true | Messages at level "lvl" will be printed |
Definition at line 151 of file AthMessaging.h.
◆ 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()
◆ setLevel()
| void AthMessaging::setLevel |
( |
MSG::Level |
lvl | ) |
|
|
inherited |
◆ setupTree()
| void pool::RootCollection::RootCollection::setupTree |
( |
| ) |
const |
|
private |
◆ writeAttributeListSpecification()
| void pool::RootCollection::RootCollection::writeAttributeListSpecification |
( |
| ) |
|
|
private |
◆ ATLAS_THREAD_SAFE
| std::atomic_flag m_initialized AthMessaging::ATLAS_THREAD_SAFE = ATOMIC_FLAG_INIT |
|
mutableprivateinherited |
◆ 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_imsg
| std::atomic<IMessageSvc*> AthMessaging::m_imsg { nullptr } |
|
mutableprivateinherited |
◆ m_lvl
| std::atomic<MSG::Level> AthMessaging::m_lvl { MSG::NIL } |
|
mutableprivateinherited |
◆ m_mode
◆ m_msg_tls
| boost::thread_specific_ptr<MsgStream> AthMessaging::m_msg_tls |
|
mutableprivateinherited |
MsgStream instance (a std::cout like with print-out levels)
Definition at line 132 of file AthMessaging.h.
◆ m_name
| std::string pool::RootCollection::RootCollection::m_name |
|
private |
◆ m_nm
| std::string AthMessaging::m_nm |
|
privateinherited |
◆ m_open
| bool pool::RootCollection::RootCollection::m_open |
|
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: