#include <RNTupleAuxDynReader.h>
|
| void | initMessaging () const |
| | Initialize our message level and MessageSvc.
|
|
| 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 22 of file RNTupleAuxDynReader.h.
◆ RNTupleAuxDynReader()
| RootAuxDynIO::RNTupleAuxDynReader::RNTupleAuxDynReader |
( |
const std::string & | field_name, |
|
|
const std::string & | field_type, |
|
|
ROOT::RNTupleReader * | reader ) |
create Reader for Aux attributes of an AuxContainer object stored in a given field
Definition at line 152 of file RNTupleAuxDynReader.cxx.
155 :
AthMessaging( std::string(
"RNTupleAuxDynReader[")+field_name+
"]" ),
158 {
159 const std::string field_prefix = field_type + "_";
162 }
165 }
167 TClass *
tc = TClass::GetClass( field_type.c_str() );
169 TClass *storeTC =
tc->GetBaseClass(
"SG::IAuxStoreHolder");
170 if( storeTC ) {
172 } else {
173 throw std::runtime_error(
string(
"Class ") +
tc->GetName() +
" does not implement SG::IAuxStoreHolder");
174 }
175 } else {
176 throw std::runtime_error(string("Class ") + field_type +" could not be found");
177 }
178 }
#define ATH_MSG_VERBOSE(x)
AthMessaging()
Default constructor:
std::string m_storeFieldName
ROOT::RNTupleReader * m_ntupleReader
◆ ~RNTupleAuxDynReader()
| virtual RootAuxDynIO::RNTupleAuxDynReader::~RNTupleAuxDynReader |
( |
| ) |
|
|
virtualdefault |
◆ addAuxID()
| bool RootAuxDynReader::addAuxID |
( |
const SG::auxid_t & | id | ) |
|
|
inlineinherited |
Definition at line 60 of file RootAuxDynReader.h.
60 {
63 return true;
64 }
65 return false;
66}
static const auxid_t null_auxid
To signal no aux data item.
◆ addBytes()
| void RootAuxDynReader::addBytes |
( |
size_t | bytes | ) |
|
|
inlineinherited |
◆ addReaderToObject()
| void RootAuxDynIO::RNTupleAuxDynReader::addReaderToObject |
( |
void * | object, |
|
|
size_t | row, |
|
|
std::recursive_mutex * | iomtx = nullptr ) |
|
finaloverridevirtual |
attach RNTupleAuxStore to the current Aux container @object
Implements RootAuxDynIO::IRootAuxDynReader.
Definition at line 285 of file RNTupleAuxDynReader.cxx.
286 {
287 auto store_holder =
reinterpret_cast<SG::IAuxStoreHolder*
>((
char*)
object +
m_storeHolderOffset);
291 store_holder->setStore( new RNTupleAuxDynStore(*this, row, standalone, iomtx) );
292 }
void init(bool standalone)
initialize once the mode of the Aux store is known
@ AST_ObjectStore
The store describes a single object.
◆ auxIDs()
Aux IDs of all the Aux attributes belonging to the Aux container being read.
Definition at line 55 of file RootAuxDynReader.h.
◆ getBytesRead()
| size_t RootAuxDynReader::getBytesRead |
( |
| ) |
const |
|
inlinevirtualinherited |
◆ getFieldInfo()
get field informatino for auxid
Definition at line 220 of file RNTupleAuxDynReader.cxx.
221 {
224 {
226 fieldInfo.auxid = auxid;
227 fieldInfo.attribName =
reg.getName(auxid);
228
229
230
231
232
233
234
235
236
237 if(
reg.inputRename(
m_key, fieldInfo.attribName) != fieldInfo.attribName ) {
239 return fieldInfo;
240 }
241
242 if( fieldInfo.fieldName.empty() ) {
243
245 return fieldInfo;
246 }
247
248 if( !
store.standalone() and fieldInfo.fieldName.rfind(
"SG::PackedContainer<", 0) == 0 )
249 fieldInfo.isPackedContainer = true;
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
280 }
281 return fieldInfo;
282 }
std::map< SG::auxid_t, FieldInfo > m_fieldInfos
static AuxTypeRegistry & instance()
Return the singleton registry instance.
◆ getNativeReader()
| ROOT::RNTupleReader * RootAuxDynIO::RNTupleAuxDynReader::getNativeReader |
( |
| ) |
|
|
inline |
◆ init()
| void RootAuxDynIO::RNTupleAuxDynReader::init |
( |
bool | standalone | ) |
|
initialize once the mode of the Aux store is known
Definition at line 183 of file RNTupleAuxDynReader.cxx.
184 {
186
190 for(
const auto &f :
desc.GetTopLevelFields() ) {
191 const string field_name =
f.GetFieldName();
192 if( field_name.starts_with(field_prefix) ) {
193 const string attr_infile = field_name.substr(field_prefix.size());
194 const string attr_name =
reg.inputRename(
m_key, attr_infile);
195 const string field_type =
f.GetTypeName();
196
197 SG::auxid_t auxid = getAuxIdForAttribute(reg, desc, field_prefix,
198 attr_name, field_type, standalone);
199
200
204
205 const std::string& tiname = (
standalone and !
reg.isLinked(auxid))?
reg.getTypeName(auxid) :
reg.getVecTypeName(auxid);
207 } else {
208 errorcheck::ReportMessage
msg (MSG::WARNING,
ERRORCHECK_ARGS,
"RNTupleAuxDynReader::init");
209 msg <<
"Could not find auxid for " << attr_infile <<
" type: " << field_type
211 }
212 }
213 }
215 }
MsgStream & msg() const
The standard message stream.
bool addAuxID(const SG::auxid_t &id)
std::string auxFieldName(const std::string &attr_name, const std::string &baseName)
Construct field name for a given dynamic attribute.
size_t auxid_t
Identifier for a particular aux data item.
◆ 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.
40{
42
43 if (
m_lvl == MSG::NIL) {
47 }
48}
std::string m_nm
Message source name.
std::atomic< IMessageSvc * > m_imsg
MessageSvc pointer.
std::atomic< MSG::Level > m_lvl
Current logging level.
IMessageSvc * getMessageSvc(bool quiet=false)
◆ 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 163 of file AthMessaging.h.
164{
166 if (!ms) {
170 }
171
174}
boost::thread_specific_ptr< MsgStream > m_msg_tls
MsgStream instance (a std::cout like with print-out levels)
void initMessaging() const
Initialize our message level and MessageSvc.
◆ 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 178 of file AthMessaging.h.
179{
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.
152{
155 return true;
156 } else {
157 return false;
158 }
159}
◆ resetBytesRead()
| void RootAuxDynReader::resetBytesRead |
( |
| ) |
|
|
inlinevirtualinherited |
◆ setLevel()
| void AthMessaging::setLevel |
( |
MSG::Level | lvl | ) |
|
|
inherited |
◆ ATLAS_THREAD_SAFE
| std::atomic_flag m_initialized AthMessaging::ATLAS_THREAD_SAFE = ATOMIC_FLAG_INIT |
|
mutableprivateinherited |
◆ m_auxids
◆ m_bytesRead
| size_t RootAuxDynReader::m_bytesRead = 0 |
|
protectedinherited |
◆ m_fieldInfos
◆ m_imsg
| std::atomic<IMessageSvc*> AthMessaging::m_imsg { nullptr } |
|
mutableprivateinherited |
◆ m_initialized
| bool RootAuxDynIO::RNTupleAuxDynReader::m_initialized = false |
|
protected |
◆ m_key
| std::string RootAuxDynIO::RNTupleAuxDynReader::m_key |
|
protected |
◆ m_lvl
| std::atomic<MSG::Level> AthMessaging::m_lvl { MSG::NIL } |
|
mutableprivateinherited |
◆ 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_nm
| std::string AthMessaging::m_nm |
|
privateinherited |
◆ m_ntupleReader
| ROOT::RNTupleReader* RootAuxDynIO::RNTupleAuxDynReader::m_ntupleReader |
|
protected |
◆ m_storeFieldName
| std::string RootAuxDynIO::RNTupleAuxDynReader::m_storeFieldName |
|
protected |
◆ m_storeHolderOffset
| int RootAuxDynIO::RNTupleAuxDynReader::m_storeHolderOffset = -1 |
|
protected |
The documentation for this class was generated from the following files: