Belle II Software
release-05-02-19
Main Page
Modules
Namespaces
Namespace List
Namespace Members
All
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Functions
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
w
x
z
Variables
a
b
c
d
e
f
g
h
i
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Typedefs
a
b
c
d
e
h
i
l
m
n
p
r
s
t
v
w
Enumerations
Enumerator
c
d
f
p
t
u
v
w
Classes
Class List
Class Hierarchy
Class Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
Enumerations
a
b
c
d
e
f
g
h
i
l
m
o
p
r
s
t
u
v
Enumerator
a
b
c
d
e
f
g
h
k
l
m
n
o
p
r
s
t
u
v
w
z
Related Functions
b
c
d
g
i
o
r
s
t
Files
File List
File Members
All
Functions
MetadataService.h
1
/**************************************************************************
2
* BASF2 (Belle Analysis Framework 2) *
3
* Copyright(C) 2019 Belle II Collaboration *
4
* *
5
* Author: The Belle II Collaboration *
6
* Contributors: Thomas Kuhr *
7
* *
8
* This software is provided "as is" without any warranty. *
9
**************************************************************************/
10
11
#pragma once
12
13
#include <string>
14
#include <nlohmann/json.hpp>
15
16
17
namespace
Belle2
{
23
class
FileMetaData;
24
29
class
MetadataService {
30
31
public
:
32
38
static
MetadataService
&
Instance
();
39
45
void
setJsonFileName
(
const
std::string& fileName) {
m_fileName
= fileName;
writeJson
();};
46
50
void
addRootOutputFile
(
const
std::string& fileName,
const
FileMetaData* metaData =
nullptr
);
51
55
void
addRootNtupleFile
(
const
std::string& fileName);
56
60
void
addBasf2Status
(
const
std::string& message =
""
);
61
65
void
addModuleCallsCount
();
66
70
void
finishBasf2
(
bool
success =
true
);
71
72
private
:
73
74
std::string
m_fileName
;
75
nlohmann::json
m_json
;
76
double
m_basf2StartTime
;
81
MetadataService
();
82
86
MetadataService
(
const
MetadataService
&) =
delete
;
87
91
MetadataService
&
operator=
(
const
MetadataService
&) =
delete
;
92
96
void
writeJson
();
97
98
};
99
101
}
//end of namespace Belle2
Belle2::MetadataService::m_basf2StartTime
double m_basf2StartTime
the start time of basf2
Definition:
MetadataService.h:84
Belle2::MetadataService::m_fileName
std::string m_fileName
The name of the json file.
Definition:
MetadataService.h:82
Belle2::MetadataService::addModuleCallsCount
void addModuleCallsCount()
Add the metadata of number of calls of all modules.
Definition:
MetadataService.cc:101
Belle2::MetadataService::setJsonFileName
void setJsonFileName(const std::string &fileName)
Set the name of the json metadata file.
Definition:
MetadataService.h:53
Belle2::MetadataService::addRootNtupleFile
void addRootNtupleFile(const std::string &fileName)
Add the metadata of a root ntuple file.
Definition:
MetadataService.cc:59
Belle2::MetadataService::addBasf2Status
void addBasf2Status(const std::string &message="")
Add metadata of basf2 status.
Definition:
MetadataService.cc:77
Belle2::MetadataService::addRootOutputFile
void addRootOutputFile(const std::string &fileName, const FileMetaData *metaData=nullptr)
Add the metadata of a root output file.
Definition:
MetadataService.cc:34
Belle2::MetadataService::finishBasf2
void finishBasf2(bool success=true)
Add metadata for basf2 completion.
Definition:
MetadataService.cc:120
Belle2
Abstract base class for different kinds of events.
Definition:
MillepedeAlgorithm.h:19
Belle2::MetadataService::m_json
nlohmann::json m_json
The json object.
Definition:
MetadataService.h:83
Belle2::MetadataService::writeJson
void writeJson()
Serialize the current json content to the json file.
Definition:
MetadataService.cc:128
Belle2::MetadataService::operator=
MetadataService & operator=(const MetadataService &)=delete
Disable/Hide the copy assignment operator.
Belle2::MetadataService
This class provides a service for writing metadata about the basf2 execution and about output files t...
Definition:
MetadataService.h:37
Belle2::MetadataService::Instance
static MetadataService & Instance()
Static method to get a reference to the MetadataService instance.
Definition:
MetadataService.cc:28
Belle2::MetadataService::MetadataService
MetadataService()
Constructor.
Definition:
MetadataService.cc:23
framework
core
include
MetadataService.h
Generated on Tue Jan 4 2022 02:56:14 for Belle II Software by
1.8.17