Implementation of IHistogramProvider for offline histograms.
More...
#include <OfflineHistogramProvider.h>
◆ OfflineHistogramProvider()
Constructor.
- Parameters
-
gmTool | Source of the lumi block info |
factory | ROOT object factory |
def | General definition of a histogram |
Definition at line 38 of file OfflineHistogramProvider.h.
41 : IHistogramProvider()
45 , m_objcache({0, 0,
nullptr})
◆ ~OfflineHistogramProvider()
virtual Monitored::OfflineHistogramProvider::~OfflineHistogramProvider |
( |
| ) |
|
|
inlineoverridevirtual |
◆ histogram()
TNamed* Monitored::OfflineHistogramProvider::histogram |
( |
| ) |
|
|
inlineoverridevirtual |
Getter of ROOT object.
Each time the method is called, factory produces ROOT object based on the current lumi block. Note: ROOT objects are cached at the factory. Nevertheless, it is recommended to call this method as rarely as possible.
- Returns
- ROOT object
Implements Monitored::IHistogramProvider.
Definition at line 60 of file OfflineHistogramProvider.h.
66 objcache& objcacheref = m_objcache;
69 && objcacheref.object) {
70 return objcacheref.object;
92 return objcacheref.object;
◆ storeMetadata()
void Monitored::OfflineHistogramProvider::storeMetadata |
( |
| ) |
const |
|
inlineprivate |
Store metadata trees.
Offline ROOT output should have "metadata" TTrees; this function makes them
Definition at line 116 of file OfflineHistogramProvider.h.
117 std::scoped_lock<std::mutex> metadataLock(s_metadataMutex);
120 size_t pos =
path.find_last_of(
'/');
121 auto splitPath = std::make_pair(
path.substr(0,
pos),
path.substr(
pos + 1));
122 std::string treePath = splitPath.first +
"/metadata";
125 char triggerData[] =
"<none>";
126 const std::string mergeDataStr =
m_histDef->merge ==
"" ?
"<default>" :
m_histDef->merge;
127 std::vector<char> mergeData{mergeDataStr.begin(), mergeDataStr.end()};
128 mergeData.push_back(
'\0');
138 if (!
histSvc->existsTree(treePath)) {
139 auto tree = std::make_unique<TTree>(
"metadata",
"Monitoring Metadata");
141 tree->Branch(
"Name", &(splitPath.second[0]),
"Name/C");
143 tree->Branch(
"TriggerChain", triggerData,
"TriggerChain/C");
144 tree->Branch(
"MergeMethod", mergeData.data(),
"MergeMethod/C");
147 if (!
histSvc->regTree(treePath, std::move(
tree))) {
150 <<
"Failed to register DQ metadata TTree " << treePath <<
endmsg;
153 TTree *
tree{
nullptr};
154 if (
histSvc->getTree(treePath,
tree).isSuccess()) {
155 tree->SetBranchAddress(
"Name", &(splitPath.second[0]));
157 tree->SetBranchAddress(
"TriggerChain", triggerData);
158 tree->SetBranchAddress(
"MergeMethod", mergeData.data());
163 <<
"Failed to retrieve DQ metadata TTree " << treePath <<
" which is reported to exist" <<
endmsg;
◆ ATLAS_THREAD_SAFE
Gaudi::Hive::ContextSpecificData<objcache> m_objcache Monitored::OfflineHistogramProvider::ATLAS_THREAD_SAFE |
|
mutableprivate |
◆ m_cacheMutex
std::mutex Monitored::OfflineHistogramProvider::m_cacheMutex |
|
private |
◆ m_factory
std::shared_ptr<HistogramFactory> Monitored::OfflineHistogramProvider::m_factory |
|
private |
◆ m_gmTool
◆ m_histDef
std::shared_ptr<HistogramDef> Monitored::OfflineHistogramProvider::m_histDef |
|
private |
◆ m_storedPaths
std::vector<std::string> Monitored::OfflineHistogramProvider::m_storedPaths |
|
private |
The documentation for this class was generated from the following file: