ATLAS Offline Software
Loading...
Searching...
No Matches
PhysicsAnalysis
D3PDTools
RootCoreUtils
Root
RootUtils.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3
*/
4
6
7
//
8
// includes
9
//
10
11
#include <
RootCoreUtils/RootUtils.h
>
12
13
#include <TDirectory.h>
14
#include <TEfficiency.h>
15
#include <TH1.h>
16
#include <TTree.h>
17
#include <
RootCoreUtils/Assert.h
>
18
19
//
20
// method implementations
21
//
22
23
namespace
RCU
24
{
25
bool
SetDirectory
(TObject *
object
, TDirectory *directory)
26
{
27
RCU_ASSERT
(
object
!= 0);
28
29
TH1 *
const
hist =
dynamic_cast<
TH1*
>
(object);
30
if
(hist)
31
{
32
hist->SetDirectory (directory);
33
return
true
;
34
}
35
36
TEfficiency *
const
efficiency
=
dynamic_cast<
TEfficiency*
>
(object);
37
if
(
efficiency
)
38
{
39
efficiency
->SetDirectory (directory);
40
return
true
;
41
}
42
43
TTree *
const
tree
=
dynamic_cast<
TTree*
>
(object);
44
if
(
tree
)
45
{
46
tree
->SetDirectory (directory);
47
return
true
;
48
}
49
50
return
false
;
51
}
52
}
Assert.h
RCU_ASSERT
#define RCU_ASSERT(x)
Definition
Assert.h:217
RootUtils.h
efficiency
void efficiency(std::vector< double > &bins, std::vector< double > &values, const std::vector< std::string > &files, const std::string &histname, const std::string &tplotname, const std::string &label="")
Definition
dependence.cxx:128
RCU
This module defines a variety of assert style macros.
Definition
Assert.cxx:23
RCU::SetDirectory
bool SetDirectory(TObject *object, TDirectory *directory)
effects: set the directory this object is associated with returns: whether the object type actively k...
Definition
RootUtils.cxx:25
tree
TChain * tree
Definition
tile_monitor.h:30
Generated on
for ATLAS Offline Software by
1.16.1