![]() |
ATLAS Offline Software
|
#include <src/RootDatabase.h>
Public Types | |
| enum | { READ_COUNTER = 0, WRITE_COUNTER = 1, OTHER_COUNTER = 2 } |
Public Member Functions | |
| RootDatabase () | |
| Standard Constructor. More... | |
| virtual | ~RootDatabase () |
| Standard destructor. More... | |
| TFile * | file () |
| Access to the actual implemented file. More... | |
| TTree * | getTree (const std::string &name) |
| Get TTree by name from the TFile. More... | |
| const std::string & | fmtVersion () const |
| Access to the version string. More... | |
| virtual long long int | size () const |
| Access the size of the database: May be undefined for some technologies. More... | |
| void | addByteCount (int which, long long int num_bytes) |
| Do some statistics: add number of bytes read/written/other. More... | |
| long long int | byteCount (int which) const |
| Do some statistics: retrieve number of bytes read/written/other. More... | |
| DbStatus | markBranchContainerForFill (RootTreeContainer *) |
| void | registerBranchContainer (RootTreeContainer *) |
| uint64_t | currentIndexMasterID () const |
| uint64_t | indexSize (TBranch *branch) |
| get index size for indexed containers More... | |
| uint64_t | indexSizeInc (TBranch *branch) |
| increase index size counter for indexed containers (by 1) More... | |
| bool | wasIndexRebuilt (const std::string &treeName) |
| Check if a given TTree had its index rebuilt. More... | |
| void | markIndexRebuilt (const std::string &treeName) |
| Mark that a given TTree had its index rebuilt. More... | |
| std::recursive_mutex & | ioMutex () |
| provide access to the I/O mutex for AuxDynReader and Containers More... | |
| virtual DbStatus | getOption (DbOption &opt) |
| Access options. More... | |
| virtual DbStatus | setOption (const DbOption &opt) |
| Set options. More... | |
| virtual DbStatus | setAutoFlush (const DbOption &opt) |
| implementation of TREE_AUTO_FLUSH option - called from setOption() More... | |
| virtual DbStatus | open (const DbDomain &domH, const std::string &nam, DbAccessMode mode) |
| Open Database object. More... | |
| virtual DbStatus | reopen (DbAccessMode mode) |
| Re-open database with changing access permissions. More... | |
| virtual DbStatus | onOpen (DbDatabase &dbH, DbAccessMode mode) |
| Callback after successful open of a database object. More... | |
| virtual DbStatus | close (DbAccessMode mode) |
| Close database access. More... | |
| virtual DbStatus | transAct (Transaction::Action action) |
| Execute Database Transaction action. More... | |
| ROOT::RNTupleReader * | getNTupleReader (const std::string &ntuple_name) |
| return RNTupleReader for a given ntuple_name More... | |
| uint64_t | indexLookup (ROOT::RNTupleReader *ps, uint64_t idx_val) |
| RootStorageSvc::RNTupleWriterHelper * | getNTupleWriter (const std::string &ntuple_name, bool create=false) |
| Return RNTupleWriterHelper for a given ntuple_name create a new one if needed when create==true. More... | |
Static Public Member Functions | |
| static bool | exists (const std::string &nam) |
| Check for file-existence. More... | |
Protected Member Functions | |
| DbStatus | fillBranchContainerTrees () |
| void | reduceBasketsSize (TTree *tree) |
| void | increaseBasketsSize (TTree *tree) |
| DbStatus | close () |
Private Types | |
| typedef std::set< RootTreeContainer * > | ContainerSet_t |
| using | indexLookup_t = std::unordered_map< uint64_t, uint64_t > |
Private Attributes | |
| DbDatabase | m_dbH |
| Parent Database handle. More... | |
| TFile * | m_file |
| Reference to the actual implemented file. More... | |
| std::string | m_version |
| Persistency format version. More... | |
| long long int | m_counters [3] |
| Counter statistics. More... | |
| int | m_defCompression |
| Default compression level. More... | |
| int | m_defCompressionAlg |
| Default compression algorithm. More... | |
| int | m_defSplitLevel |
| Default split level. More... | |
| int | m_defAutoSave |
| Default Autosave parameter for trees. More... | |
| int | m_defBufferSize |
| Default buffer size parameter for Branches. More... | |
| int | m_maxBufferSize |
| Maximum buffer size parameter for Branches. More... | |
| int | m_minBufferEntries |
| Minimum buffer entries parameter for Branches. More... | |
| int | m_defWritePolicy |
| Default policy mode for keyed objects. More... | |
| int | m_branchOffsetTabLen |
| Offset table length for branches. More... | |
| std::string | m_treeNameWithCache |
| Name of tree with cache. More... | |
| int | m_defTreeCacheLearnEvents |
| Default tree cache learn events. More... | |
| int | m_rntBufferedWriteEnabled |
| Flag to enable/disable buffered RNTuple writing. More... | |
| int | m_rntReaderMetricsEnabled |
| Flag to enable/disable RNTupleReader metrics. More... | |
| int | m_rntWriterMetricsEnabled |
| Flag to enable/disable RNTupleWriter metrics. More... | |
| std::string | m_indexMaster |
| name of the container with master index ('*' means use the biggest) More... | |
| uint64_t | m_indexMasterID |
| nextID of the master index More... | |
| std::map< TBranch *, uint64_t > | m_indexSizeMap |
| Keep index sizes here, because Branches are emptied when fast merged by SharedWriter. More... | |
| std::set< std::string > | m_indexRebuilt |
| marks if the index (for index Containers) was rebuilt for given TTree More... | |
| std::map< std::string, int > | m_autoFlushTrees |
| std::map< TTree *, ContainerSet_t > | m_containersInTree |
| std::map< std::string, int > | m_customSplitLevel |
| SmartIF< IFileMgr > | m_fileMgr |
| std::recursive_mutex | m_iomutex |
| std::map< std::string, std::unique_ptr< RootStorageSvc::RNTupleWriterHelper > > | m_ntupleWriterMap |
| std::map< std::string, std::unique_ptr< ROOT::RNTupleReader > > | m_ntupleReaderMap |
| std::map< void *, indexLookup_t > | m_ntupleIndexMap |
Description: ROOT specific implementation of Database file.
Definition at line 53 of file RootDatabase.h.
|
private |
Definition at line 114 of file RootDatabase.h.
|
private |
Definition at line 127 of file RootDatabase.h.
| anonymous enum |
| pool::RootDatabase::RootDatabase | ( | ) |
Standard Constructor.
|
virtual |
Standard destructor.
| void pool::RootDatabase::addByteCount | ( | int | which, |
| long long int | num_bytes | ||
| ) |
Do some statistics: add number of bytes read/written/other.
| long long int pool::RootDatabase::byteCount | ( | int | which | ) | const |
Do some statistics: retrieve number of bytes read/written/other.
|
protected |
|
virtual |
Close database access.
| mode | [IN] Desired session access mode. |
Implements pool::IDbDatabase.
|
inline |
Definition at line 167 of file RootDatabase.h.
|
static |
Check for file-existence.
| nam | [IN] Name of the database to be checked. |
|
inline |
|
protected |
|
inline |
| ROOT::RNTupleReader* pool::RootDatabase::getNTupleReader | ( | const std::string & | ntuple_name | ) |
return RNTupleReader for a given ntuple_name
| RootStorageSvc::RNTupleWriterHelper* pool::RootDatabase::getNTupleWriter | ( | const std::string & | ntuple_name, |
| bool | create = false |
||
| ) |
Return RNTupleWriterHelper for a given ntuple_name create a new one if needed when create==true.
Access options.
| opt | [IN] Reference to option object. |
Implements pool::IDbDatabase.
| TTree* pool::RootDatabase::getTree | ( | const std::string & | name | ) |
Get TTree by name from the TFile.
|
protected |
| uint64_t pool::RootDatabase::indexLookup | ( | ROOT::RNTupleReader * | ps, |
| uint64_t | idx_val | ||
| ) |
|
inline |
|
inline |
increase index size counter for indexed containers (by 1)
Definition at line 173 of file RootDatabase.h.
|
inline |
provide access to the I/O mutex for AuxDynReader and Containers
Definition at line 182 of file RootDatabase.h.
| DbStatus pool::RootDatabase::markBranchContainerForFill | ( | RootTreeContainer * | ) |
|
inline |
|
virtual |
Callback after successful open of a database object.
| dbH | [IN] Handle to valid database object |
| mode | [IN] Desired session access mode. |
Implements pool::IDbDatabase.
|
virtual |
Open Database object.
| domH | [IN] Handle to valid domain object (validity ensured by upper levels). |
| nam | [IN] Name of the database to be opened. |
| mode | [IN] Desired session access mode. |
Implements pool::IDbDatabase.
|
protected |
| void pool::RootDatabase::registerBranchContainer | ( | RootTreeContainer * | ) |
|
virtual |
Re-open database with changing access permissions.
| mode | [IN] Desired session access mode. |
Implements pool::IDbDatabase.
implementation of TREE_AUTO_FLUSH option - called from setOption()
Set options.
| opt | [IN] Reference to option object. |
Implements pool::IDbDatabase.
|
virtual |
Access the size of the database: May be undefined for some technologies.
Implements pool::IDbDatabase.
|
virtual |
Execute Database Transaction action.
Implements pool::IDbDatabase.
|
inline |
|
private |
Definition at line 111 of file RootDatabase.h.
|
private |
Offset table length for branches.
Definition at line 84 of file RootDatabase.h.
|
private |
Definition at line 115 of file RootDatabase.h.
|
private |
Counter statistics.
Definition at line 66 of file RootDatabase.h.
|
private |
Definition at line 117 of file RootDatabase.h.
|
private |
Parent Database handle.
Definition at line 60 of file RootDatabase.h.
|
private |
Default Autosave parameter for trees.
Definition at line 74 of file RootDatabase.h.
|
private |
Default buffer size parameter for Branches.
Definition at line 76 of file RootDatabase.h.
|
private |
Default compression level.
Definition at line 68 of file RootDatabase.h.
|
private |
Default compression algorithm.
Definition at line 70 of file RootDatabase.h.
|
private |
Default split level.
Definition at line 72 of file RootDatabase.h.
|
private |
Default tree cache learn events.
Definition at line 88 of file RootDatabase.h.
|
private |
Default policy mode for keyed objects.
Definition at line 82 of file RootDatabase.h.
|
private |
Reference to the actual implemented file.
Definition at line 62 of file RootDatabase.h.
|
private |
Definition at line 119 of file RootDatabase.h.
|
private |
name of the container with master index ('*' means use the biggest)
Definition at line 97 of file RootDatabase.h.
|
private |
nextID of the master index
Definition at line 99 of file RootDatabase.h.
|
private |
marks if the index (for index Containers) was rebuilt for given TTree
Definition at line 105 of file RootDatabase.h.
|
private |
Keep index sizes here, because Branches are emptied when fast merged by SharedWriter.
Definition at line 102 of file RootDatabase.h.
|
private |
Definition at line 122 of file RootDatabase.h.
|
private |
Maximum buffer size parameter for Branches.
Definition at line 78 of file RootDatabase.h.
|
private |
Minimum buffer entries parameter for Branches.
Definition at line 80 of file RootDatabase.h.
|
private |
Definition at line 128 of file RootDatabase.h.
|
private |
Definition at line 125 of file RootDatabase.h.
|
private |
Definition at line 124 of file RootDatabase.h.
|
private |
Flag to enable/disable buffered RNTuple writing.
Definition at line 90 of file RootDatabase.h.
|
private |
Flag to enable/disable RNTupleReader metrics.
Definition at line 92 of file RootDatabase.h.
|
private |
Flag to enable/disable RNTupleWriter metrics.
Definition at line 94 of file RootDatabase.h.
|
private |
Name of tree with cache.
Definition at line 86 of file RootDatabase.h.
|
private |
Persistency format version.
Definition at line 64 of file RootDatabase.h.
1.8.18