![]() |
ATLAS Offline Software
|
#include <RNTupleWriterHelper.h>
Public Types | |
| typedef std::tuple< std::string, std::string, void * > | attrDataTuple |
| Add a new field to the RNTuple, collect the data pointer for the commit. | |
Public Member Functions | |
| RNTupleWriterHelper (TFile *file, const std::string &ntupleName, bool enableBufferedWrite, bool enableMetrics) | |
| Constructor. | |
| ~RNTupleWriterHelper ()=default | |
| Default Destructor. | |
| void | makeNewEntry () |
| Create a new empty RNTuple row with the current model (fields). | |
| void | addAttribute (const attrDataTuple &in) |
| void | addField (const std::string &field_name, const std::string &attr_type) |
| Add a new field to the RNTuple. | |
| void | addFieldValue (const std::string &field_name, void *attr_data) |
| Supply data address for a given field. | |
| int | commit () |
| Commit the data. | |
| const std::string & | getName () const |
| Name of the RNTuple. | |
| size_t | size () const |
| Size of the RNTuple. | |
| bool | needsCommit () const |
| Check if any data needs to be committed. | |
| bool | isGrouped () const |
| Is this RNTuple used by more than one APR container? | |
| void | increaseClientCount () |
| Keep track of how many APR containers are writing to this RNTuple. | |
| void | close () |
| Close the writer. | |
| void | setUnsplitFieldsList (std::string_view unsplitFieldsList) |
| Set comma-separated list of field names to unsplit. | |
| bool | msgLvl (const MSG::Level lvl) const |
| Test the output level. | |
| MsgStream & | msg () const |
| The standard message stream. | |
| MsgStream & | msg (const MSG::Level lvl) const |
| The standard message stream. | |
| void | setLevel (MSG::Level lvl) |
| Change the current logging level. | |
Private Member Functions | |
| void | initMessaging () const |
| Initialize our message level and MessageSvc. | |
Private Attributes | |
| std::map< std::string, void * > | m_attrDataMap |
| Store data ptr for the first row, when only creating the model. | |
| std::set< std::string, std::less<> > | m_unsplitFields |
| Set of field names that should be unsplit. | |
| std::unique_ptr< ROOT::RNTupleModel > | m_model |
| Internal cache for the RNTuple model Before first commit the fields are added to the model At the first commit the model passed to the RNTupleWriter which takes its ownership. | |
| std::unique_ptr< ROOT::REntry > | m_entry |
| Internal cache for the RNEntry. | |
| std::unique_ptr< ROOT::RNTupleWriter > | m_ntupleWriter |
| Internal cache for the native RNTupleWriter. | |
| std::string | m_ntupleName |
| TFile * | m_tfile |
| ROOT::RNTupleWriteOptions | m_opts |
| int | m_rowN = 0 |
| int | m_clients = 0 |
| Count how many APR Containers are writing to this RNTuple (more than one makes a Group). | |
| bool | m_needsCommit = false |
| bool | m_collectMetrics |
| Enable/Disable Metric Collection. | |
| std::string | m_nm |
| Message source name. | |
| boost::thread_specific_ptr< MsgStream > | m_msg_tls |
| MsgStream instance (a std::cout like with print-out levels). | |
| std::atomic< IMessageSvc * > | m_imsg { nullptr } |
| MessageSvc pointer. | |
| std::atomic< MSG::Level > | m_lvl { MSG::NIL } |
| Current logging level. | |
| std::atomic_flag m_initialized | ATLAS_THREAD_SAFE = ATOMIC_FLAG_INIT |
| Messaging initialized (initMessaging). | |
Definition at line 27 of file RNTupleWriterHelper.h.
| typedef std::tuple<std::string, std::string, void*> RootStorageSvc::RNTupleWriterHelper::attrDataTuple |
Add a new field to the RNTuple, collect the data pointer for the commit.
Definition at line 41 of file RNTupleWriterHelper.h.
| RootStorageSvc::RNTupleWriterHelper::RNTupleWriterHelper | ( | TFile * | file, |
| const std::string & | ntupleName, | ||
| bool | enableBufferedWrite, | ||
| bool | enableMetrics ) |
Constructor.
|
default |
Default Destructor.
| void RootStorageSvc::RNTupleWriterHelper::addAttribute | ( | const attrDataTuple & | in | ) |
| void RootStorageSvc::RNTupleWriterHelper::addField | ( | const std::string & | field_name, |
| const std::string & | attr_type ) |
Add a new field to the RNTuple.
| void RootStorageSvc::RNTupleWriterHelper::addFieldValue | ( | const std::string & | field_name, |
| void * | attr_data ) |
Supply data address for a given field.
| void RootStorageSvc::RNTupleWriterHelper::close | ( | ) |
Close the writer.
| int RootStorageSvc::RNTupleWriterHelper::commit | ( | ) |
Commit the data.
|
inline |
Name of the RNTuple.
Definition at line 54 of file RNTupleWriterHelper.h.
|
inline |
Keep track of how many APR containers are writing to this RNTuple.
Definition at line 66 of file RNTupleWriterHelper.h.
|
privateinherited |
Initialize our message level and MessageSvc.
This method should only be called once.
Definition at line 39 of file AthMessaging.cxx.
|
inline |
Is this RNTuple used by more than one APR container?
Definition at line 63 of file RNTupleWriterHelper.h.
| void RootStorageSvc::RNTupleWriterHelper::makeNewEntry | ( | ) |
Create a new empty RNTuple row with the current model (fields).
|
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 167 of file AthMessaging.h.
|
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 182 of file AthMessaging.h.
|
inlineinherited |
Test the output level.
| lvl | The message level to test against |
| true | Messages at level "lvl" will be printed |
Definition at line 151 of file AthMessaging.h.
|
inline |
Check if any data needs to be committed.
Definition at line 60 of file RNTupleWriterHelper.h.
|
inherited |
Change the current logging level.
Use this rather than msg().setLevel() for proper operation with MT.
Definition at line 28 of file AthMessaging.cxx.
| void RootStorageSvc::RNTupleWriterHelper::setUnsplitFieldsList | ( | std::string_view | unsplitFieldsList | ) |
Set comma-separated list of field names to unsplit.
|
inline |
|
mutableprivateinherited |
Messaging initialized (initMessaging).
Definition at line 141 of file AthMessaging.h.
|
private |
Store data ptr for the first row, when only creating the model.
Definition at line 76 of file RNTupleWriterHelper.h.
|
private |
Count how many APR Containers are writing to this RNTuple (more than one makes a Group).
Definition at line 100 of file RNTupleWriterHelper.h.
|
private |
Enable/Disable Metric Collection.
Definition at line 104 of file RNTupleWriterHelper.h.
|
private |
Internal cache for the RNEntry.
Definition at line 88 of file RNTupleWriterHelper.h.
|
mutableprivateinherited |
|
mutableprivateinherited |
|
private |
Internal cache for the RNTuple model Before first commit the fields are added to the model At the first commit the model passed to the RNTupleWriter which takes its ownership.
Definition at line 85 of file RNTupleWriterHelper.h.
|
mutableprivateinherited |
MsgStream instance (a std::cout like with print-out levels).
Definition at line 132 of file AthMessaging.h.
|
private |
Definition at line 101 of file RNTupleWriterHelper.h.
|
privateinherited |
Message source name.
Definition at line 129 of file AthMessaging.h.
|
private |
Definition at line 93 of file RNTupleWriterHelper.h.
|
private |
Internal cache for the native RNTupleWriter.
Definition at line 91 of file RNTupleWriterHelper.h.
|
private |
Definition at line 95 of file RNTupleWriterHelper.h.
|
private |
Definition at line 96 of file RNTupleWriterHelper.h.
|
private |
Definition at line 94 of file RNTupleWriterHelper.h.
|
private |
Set of field names that should be unsplit.
Definition at line 79 of file RNTupleWriterHelper.h.