The Gaudi Framework
master (bdbe7744)
Toggle main menu visibility
Loading...
Searching...
No Matches
HistoStrings.h
Go to the documentation of this file.
1
/***********************************************************************************\
2
* (c) Copyright 1998-2025 CERN for the benefit of the LHCb and ATLAS collaborations *
3
* *
4
* This software is distributed under the terms of the Apache version 2 licence, *
5
* copied verbatim in the file "LICENSE". *
6
* *
7
* In applying this licence, CERN does not waive the privileges and immunities *
8
* granted to it by virtue of its status as an Intergovernmental Organization *
9
* or submit itself to any jurisdiction. *
10
\***********************************************************************************/
11
#pragma once
12
// ============================================================================
13
// Include files
14
// ============================================================================
15
// STD & STL
16
// ============================================================================
17
#include <iosfwd>
18
#include <string>
19
// ============================================================================
20
// GaudiKernel
21
// ============================================================================
22
#include <
GaudiKernel/StatusCode.h
>
23
// ============================================================================
24
// forward declarations
25
// ============================================================================
26
// Forward declarations
27
// ============================================================================
28
// AIDA
29
// ============================================================================
30
namespace
AIDA
{
31
class
IHistogram1D;
32
class
IHistogram2D;
33
class
IHistogram3D;
34
class
IProfile1D;
35
class
IProfile2D;
36
}
// namespace AIDA
37
// ============================================================================
38
// ROOT
39
// ============================================================================
40
class
TH1D;
// ROOT
41
class
TH2D;
// ROOT
42
class
TH3D;
// ROOT
43
class
TProfile;
// ROOT
44
class
TProfile2D;
// ROOT
45
// ============================================================================
46
namespace
Gaudi
{
47
// ==========================================================================
48
namespace
Utils
{
49
// ========================================================================
50
namespace
Histos
{
51
// ======================================================================
57
class
GAUDI_API
HistoStrings
{
58
// ====================================================================
59
public
:
60
// ====================================================================
68
static
std::string
toString
(
const
TH1D& histo,
const
bool
asXML =
false
);
69
// ====================================================================
77
static
std::string
toString
(
const
TH2D& histo,
const
bool
asXML =
false
);
78
// ====================================================================
86
static
std::string
toString
(
const
AIDA::IHistogram1D& histo,
const
bool
asXML =
false
);
87
// ====================================================================
95
static
std::string
toString
(
const
AIDA::IHistogram2D& histo,
const
bool
asXML =
false
);
96
// ====================================================================
102
static
StatusCode
fromString
( TH1D& result,
const
std::string& input );
103
// ====================================================================
109
static
StatusCode
fromString
( AIDA::IHistogram1D& result,
const
std::string& input );
110
// ====================================================================
116
static
StatusCode
fromString
( TH2D& result,
const
std::string& input );
117
// ====================================================================
123
static
StatusCode
fromString
( AIDA::IHistogram2D& result,
const
std::string& input );
124
// ====================================================================
125
static
std::string
toXml
(
const
TH1D& histo );
126
static
std::string
toXml
(
const
TH2D& histo );
127
static
std::string
toXml
(
const
TH3D& histo );
128
static
std::string
toXml
(
const
TProfile& histo );
129
static
std::string
toXml
(
const
TProfile2D& histo );
130
// ====================================================================
131
static
std::string
toXml
(
const
AIDA::IHistogram1D& histo );
132
static
std::string
toXml
(
const
AIDA::IHistogram2D& histo );
133
static
std::string
toXml
(
const
AIDA::IHistogram3D& histo );
134
static
std::string
toXml
(
const
AIDA::IProfile1D& histo );
135
static
std::string
toXml
(
const
AIDA::IProfile2D& histo );
136
// ====================================================================
137
static
StatusCode
fromXml
( TH1D& result,
const
std::string& input );
138
static
StatusCode
fromXml
( TH2D& result,
const
std::string& input );
139
static
StatusCode
fromXml
( TH3D& result,
const
std::string& input );
140
static
StatusCode
fromXml
( TProfile& result,
const
std::string& input );
141
static
StatusCode
fromXml
( TProfile2D& result,
const
std::string& input );
142
// ====================================================================
143
static
StatusCode
fromXml
( AIDA::IHistogram1D& result,
const
std::string& input );
144
static
StatusCode
fromXml
( AIDA::IHistogram2D& result,
const
std::string& input );
145
static
StatusCode
fromXml
( AIDA::IHistogram3D& result,
const
std::string& input );
146
static
StatusCode
fromXml
( AIDA::IProfile1D& result,
const
std::string& input );
147
static
StatusCode
fromXml
( AIDA::IProfile2D& result,
const
std::string& input );
148
// ====================================================================
149
};
150
// ======================================================================
151
}
// namespace Histos
152
// ========================================================================
153
}
// namespace Utils
154
// ==========================================================================
155
}
// end of namespace Gaudi
156
// ============================================================================
157
// The END
158
// ============================================================================
GAUDI_API
#define GAUDI_API
Definition
Kernel.h:49
StatusCode.h
Gaudi::Utils::Histos::HistoStrings
Helper class to produce "good" dictionaries.
Definition
HistoStrings.h:57
Gaudi::Utils::Histos::HistoStrings::fromString
static StatusCode fromString(TH1D &result, const std::string &input)
parse the histogram from string
Definition
HistoStrings.cpp:85
Gaudi::Utils::Histos::HistoStrings::toString
static std::string toString(const TH1D &histo, const bool asXML=false)
convert the histogram into the string
Definition
HistoStrings.cpp:39
Gaudi::Utils::Histos::HistoStrings::fromXml
static StatusCode fromXml(TH1D &result, const std::string &input)
Definition
HistoStrings.cpp:147
Gaudi::Utils::Histos::HistoStrings::toXml
static std::string toXml(const TH1D &histo)
Definition
HistoStrings.cpp:135
StatusCode
This class is used for returning status codes from appropriate routines.
Definition
StatusCode.h:64
AIDA
Definition
Annotation.h:21
Gaudi::Utils::Histos
Collection of useful utilities for manipulations with AIDA hisgograms.
Definition
HistoDump.h:27
Gaudi::Utils
Definition
Property.h:693
Gaudi
This file provides a Grammar for the type Gaudi::Accumulators::Axis It allows to use that type from p...
Definition
__init__.py:1
GaudiUtils
include
GaudiUtils
HistoStrings.h
Generated on
for The Gaudi Framework by
1.17.0