#include <TBranchAuxDynWriter.h>
|
std::string | m_nm |
| Message source name. More...
|
|
boost::thread_specific_ptr< MsgStream > | m_msg_tls |
| MsgStream instance (a std::cout like with print-out levels) More...
|
|
std::atomic< IMessageSvc * > | m_imsg { nullptr } |
| MessageSvc pointer. More...
|
|
std::atomic< MSG::Level > | m_lvl { MSG::NIL } |
| Current logging level. More...
|
|
std::atomic_flag m_initialized | ATLAS_THREAD_SAFE = ATOMIC_FLAG_INIT |
| Messaging initialized (initMessaging) More...
|
|
Definition at line 50 of file TBranchAuxDynWriter.h.
◆ TBranchAuxDynWriter()
RootAuxDynIO::TBranchAuxDynWriter::TBranchAuxDynWriter |
( |
TTree * |
tree, |
|
|
int |
bufferSize, |
|
|
int |
splitLevel, |
|
|
int |
offsettab_len, |
|
|
bool |
branch_fill |
|
) |
| |
◆ ~TBranchAuxDynWriter()
virtual RootAuxDynIO::TBranchAuxDynWriter::~TBranchAuxDynWriter |
( |
| ) |
|
|
inlinevirtual |
◆ commit()
int RootAuxDynIO::TBranchAuxDynWriter::commit |
( |
| ) |
|
|
finaloverridevirtual |
◆ createAuxBranch()
void RootAuxDynIO::TBranchAuxDynWriter::createAuxBranch |
( |
AuxInfo & |
info | ) |
|
Definition at line 67 of file TBranchAuxDynWriter.cxx.
68 std::string error_type(
"is unknown");
69 const std::type_info& ti = *
info.typeinfo;
71 auto createBasicAuxBranch = [&](
const char* typeopt) {
72 info.is_basic_type =
true;
76 if ( ti ==
typeid(UInt_t) ) createBasicAuxBranch(
"/i");
77 else if( ti ==
typeid(Int_t) ) createBasicAuxBranch(
"/I");
78 else if( ti ==
typeid(Double_t) ) createBasicAuxBranch(
"/D");
79 else if( ti ==
typeid(Float_t) ) createBasicAuxBranch(
"/F");
80 else if( ti ==
typeid(Long64_t) or ti ==
typeid(std::int64_t) ) createBasicAuxBranch(
"/L");
81 else if( ti ==
typeid(ULong64_t) or ti ==
typeid(
std::uint64_t) ) createBasicAuxBranch(
"/l");
82 else if( ti ==
typeid(Short_t) ) createBasicAuxBranch(
"/S");
83 else if( ti ==
typeid(UShort_t) ) createBasicAuxBranch(
"/s");
84 else if( ti ==
typeid(Char_t) ) createBasicAuxBranch(
"/B");
85 else if( ti ==
typeid(UChar_t) ) createBasicAuxBranch(
"/b");
86 else if( ti ==
typeid(
bool) ) createBasicAuxBranch(
"/O");
87 else if( ti ==
typeid(
char*) || ti ==
typeid(
unsigned char*) ) createBasicAuxBranch(
"/C");
89 TClass*
cl = TClass::GetClass(
info.type_name.c_str());
91 error_type =
" has no TClass";
92 }
else if( !
cl->GetStreamerInfo() ) {
93 error_type =
" has no streamer";
94 }
else if( !
cl->HasDictionary() ) {
95 error_type =
" has no dictionary";
108 error_type += std::string(
" Exception msg: ") +
e.what();
111 error_type +=
" Unknown exception.";
115 throw std::runtime_error( std::string(
"Failed to create Auxiliary branch '") +
info.branch_name
116 +
"'. Class: " +
info.type_name + error_type );
119 info.branch->SetAutoDelete(kFALSE);
◆ 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.
◆ 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.
◆ needsCommit()
virtual bool RootAuxDynIO::TBranchAuxDynWriter::needsCommit |
( |
| ) |
|
|
inlinefinaloverridevirtual |
◆ setBranchFillMode()
virtual void RootAuxDynIO::TBranchAuxDynWriter::setBranchFillMode |
( |
bool |
mode | ) |
|
|
inlinefinaloverridevirtual |
◆ setBranchOffsetTabLen()
void RootAuxDynIO::TBranchAuxDynWriter::setBranchOffsetTabLen |
( |
TBranch * |
b, |
|
|
int |
offsettab_len |
|
) |
| |
Definition at line 53 of file TBranchAuxDynWriter.cxx.
54 if( offsettab_len > 0 ) {
55 if(
b->GetEntryOffsetLen() > 0 )
56 b->SetEntryOffsetLen( offsettab_len );
57 TIter biter(
b->GetListOfBranches() );
58 TBranch* subbranch(
nullptr);
59 while( (subbranch = (TBranch*)biter.Next()) ) {
◆ setLevel()
void AthMessaging::setLevel |
( |
MSG::Level |
lvl | ) |
|
|
inherited |
◆ writeAuxAttributes()
int RootAuxDynIO::TBranchAuxDynWriter::writeAuxAttributes |
( |
const std::string & |
base_branchname, |
|
|
SG::IAuxStoreIO * |
store, |
|
|
size_t |
backfill_nrows |
|
) |
| |
|
finaloverridevirtual |
handle writing of dynamic xAOD attributes of an object called from RootTreeContainer::writeObject()
handle writing of dynamic xAOD attributes of an object - called from RootTreeContainer::writeObject()
Implements RootAuxDynIO::IRootAuxDynWriter.
Definition at line 127 of file TBranchAuxDynWriter.cxx.
131 int bytes_written = 0;
136 for(
auto& aux_info_entry :
m_auxInfoMap ) aux_info_entry.second.written =
false;
141 if( !attrInfo.branch ) {
143 attrInfo.typeinfo =
store->getIOType(
id);
158 ATH_MSG_DEBUG(
"Creating branch for new dynamic attribute, Id=" <<
id <<
": type=" << attrInfo.type_name <<
", branch=" << attrInfo.branch_name );
161 if( backfill_nrows ) {
163 ATH_MSG_DEBUG(
" Backfilling " << backfill_nrows <<
" entries for " << attrInfo.name);
167 attrInfo.setDummyAddr();
168 for(
size_t r=0;
r<backfill_nrows; ++
r ) {
169 bytes_written += attrInfo.branch->BackFill();
171 " Tree size=" <<
m_ttree->GetEntries()
172 <<
" branch size:" << attrInfo.branch->GetEntries() );
177 attrInfo.object =
obj;
178 attrInfo.branch->SetAddress( attrInfo.objectAddr() );
179 attrInfo.written =
true;
183 AuxInfo& attrInfo = aux_info_entry.second;
186 if( !attrInfo.written ) {
187 attrInfo.setDummyAddr();
188 ATH_MSG_DEBUG(
"Default object added to branch: " << attrInfo.branch_name);
194 bytes_written += attrInfo.branch->Fill();
199 return bytes_written;
◆ ATLAS_THREAD_SAFE
std::atomic_flag m_initialized AthMessaging::ATLAS_THREAD_SAFE = ATOMIC_FLAG_INIT |
|
mutableprivateinherited |
◆ m_auxInfoMap
◆ m_branchFillMode
bool RootAuxDynIO::TBranchAuxDynWriter::m_branchFillMode = false |
|
protected |
◆ m_branchOffsetTabLen
int RootAuxDynIO::TBranchAuxDynWriter::m_branchOffsetTabLen = 0 |
|
protected |
◆ m_bufferSize
int RootAuxDynIO::TBranchAuxDynWriter::m_bufferSize = 8192 |
|
protected |
◆ m_imsg
std::atomic<IMessageSvc*> AthMessaging::m_imsg { nullptr } |
|
mutableprivateinherited |
◆ 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_needsFill
bool RootAuxDynIO::TBranchAuxDynWriter::m_needsFill = false |
|
protected |
◆ m_nm
std::string AthMessaging::m_nm |
|
privateinherited |
◆ m_splitLevel
int RootAuxDynIO::TBranchAuxDynWriter::m_splitLevel = 1 |
|
protected |
◆ m_tfile
TFile* RootAuxDynIO::TBranchAuxDynWriter::m_tfile = nullptr |
|
protected |
◆ m_ttree
TTree* RootAuxDynIO::TBranchAuxDynWriter::m_ttree = nullptr |
|
protected |
The documentation for this class was generated from the following files: