ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
PhysicsAnalysis
AnalysisCommon
AnalysisUtils
AnalysisUtils
AANTTreeMap.h
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#ifndef ANALYSISUTILS_AANTTREEMAP_H
6
#define ANALYSISUTILS_AANTTREEMAP_H
7
8
#include <map>
9
#include <string>
10
#include <mutex>
11
12
#include "TTree.h"
13
#include "
CxxUtils/checker_macros.h
"
14
15
class
AANTTreeMap
16
{
17
public
:
18
static
void
setTree
(
const
std::string &stream, TTree *
tree
)
19
{
20
std::scoped_lock
lock
(
s_mutex
);
21
s_treeMap[stream] =
tree
;
22
}
23
static
TTree *
getTree
(
const
std::string &stream)
24
{
25
std::scoped_lock
lock
(
s_mutex
);
26
return
s_treeMap[stream];
27
}
28
29
private
:
31
static
std::mutex
s_mutex
;
32
static
std::map<std::string,TTree*> s_treeMap
ATLAS_THREAD_SAFE
;
33
};
34
35
#endif
lock
virtual void lock()=0
Interface to allow an object to lock itself when made const in SG.
checker_macros.h
Define macros for attributes used to control the static checker.
AANTTreeMap
Definition
AANTTreeMap.h:16
AANTTreeMap::s_mutex
static std::mutex s_mutex
tree map
Definition
AANTTreeMap.h:31
AANTTreeMap::setTree
static void setTree(const std::string &stream, TTree *tree)
Definition
AANTTreeMap.h:18
AANTTreeMap::getTree
static TTree * getTree(const std::string &stream)
Definition
AANTTreeMap.h:23
AANTTreeMap::ATLAS_THREAD_SAFE
static std::map< std::string, TTree * > s_treeMap ATLAS_THREAD_SAFE
Definition
AANTTreeMap.h:32
tree
TChain * tree
Definition
tile_monitor.h:30
Generated on
for ATLAS Offline Software by
1.17.0