Skip to content
Snippets Groups Projects
Commit fefe3a4c authored by Edward Moyse's avatar Edward Moyse
Browse files

Merge branch 'AthenaIO_SharedWriter_MinFlush' into 'master'

Add new property for ROOT SharedWriter to allow setting of min number of events per write

See merge request !37157
parents a4bfccf5 4fc22104
No related branches found
No related tags found
No related merge requests found
......@@ -340,8 +340,22 @@ StatusCode AthenaPoolCnvSvc::connectOutput(const std::string& outputConnectionSp
const std::string& opt = (*iter)[0];
std::string data = (*iter)[1];
const std::string& file = (*iter)[2];
if (opt == "TREE_AUTO_FLUSH" && data != "int" && data != "DbLonglong" && data != "double" && data != "string") {
m_fileFlushSetting[file] = atoi(data.c_str());
const std::string& cont = (*iter)[3];
std::size_t colon = m_containerPrefixProp.value().find(":");
if (colon == std::string::npos) colon = 0; // Used to remove leading technology
else colon++;
std::size_t equal = cont.find("="); // Used to remove leading "TTree="
if (equal == std::string::npos) equal = 0;
else equal++;
if (opt == "TREE_AUTO_FLUSH" && cont.substr(equal) == m_containerPrefixProp.value().substr(colon) && data != "int" && data != "DbLonglong" && data != "double" && data != "string") {
int flush = atoi(data.c_str());
if (flush < m_numberEventsPerWrite.value()) {
flush = flush * (int((m_numberEventsPerWrite.value() - 1) / flush) + 1);
}
if (flush > 0) {
ATH_MSG_DEBUG("connectOutput setting auto write for: " << file << " to " << flush << " events");
m_fileFlushSetting[file] = flush;
}
}
}
}
......
......@@ -192,8 +192,6 @@ private: // data
ToolHandleArray<IAthenaIPCTool> m_outputStreamingTool;
//The following doesn't work because of Gaudi issue #122
//ToolHandleArray<IAthenaIPCTool> m_outputStreamingTool{this,"OutputStreamingTool", {} };
IntegerProperty m_makeStreamingToolClient{this,"MakeStreamingToolClient",0};
BooleanProperty m_streamMetaDataOnly{this,"StreamMetaDataOnly",false};
std::size_t m_streamServer=0;
int m_metadataClient=0;
......@@ -246,8 +244,15 @@ private: // properties
/// bool to activate the chrono stats, depending on the m_skipFirstChronoCommit data member
bool m_doChronoStat=true;
/// For SharedWriter to use MetadataSvc to merge data placed in a certain container
/// For SharedWriter:
/// To use MetadataSvc to merge data placed in a certain container
StringProperty m_metadataContainerProp{this,"OutputMetadataContainer",""};
/// Make this instance a Streaming Client during first connect/write automatically
IntegerProperty m_makeStreamingToolClient{this,"MakeStreamingToolClient",0};
/// Use Athena Object sharing for metadata only, event data is collected and send via ROOT TMemFile
BooleanProperty m_streamMetaDataOnly{this,"StreamMetaDataOnly",false};
/// When using TMemFile call Write on number of Events, respecting CollectionTree auto_flush
IntegerProperty m_numberEventsPerWrite{this,"NumberEventsPerWrite",10};
};
#endif
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment