ATLAS Offline Software
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
AANTTreeMap::s_mutex
static std::mutex s_mutex
tree map
Definition:
AANTTreeMap.h:31
BeamSpot::mutex
std::mutex mutex
Definition:
InDetBeamSpotVertex.cxx:18
tree
TChain * tree
Definition:
tile_monitor.h:30
AthenaPoolTestWrite.stream
string stream
Definition:
AthenaPoolTestWrite.py:12
AANTTreeMap
Definition:
AANTTreeMap.h:16
AANTTreeMap::ATLAS_THREAD_SAFE
static std::map< std::string, TTree * > s_treeMap ATLAS_THREAD_SAFE
Definition:
AANTTreeMap.h:32
AANTTreeMap::getTree
static TTree * getTree(const std::string &stream)
Definition:
AANTTreeMap.h:23
checker_macros.h
Define macros for attributes used to control the static checker.
AANTTreeMap::setTree
static void setTree(const std::string &stream, TTree *tree)
Definition:
AANTTreeMap.h:18
Generated on Sun Dec 22 2024 21:06:35 for ATLAS Offline Software by
1.8.18