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
StringHandler.h
1
/**************************************************************************
2
* BASF2 (Belle Analysis Framework 2) *
3
* Copyright(C) 2010-2011 Belle II Collaboration *
4
* *
5
* Author: The Belle II Collaboration *
6
* Contributors: Martin Ritter *
7
* *
8
* This software is provided "as is" without any warranty. *
9
**************************************************************************/
10
11
#pragma once
12
13
#include <framework/gearbox/InputHandler.h>
14
#include <sstream>
15
16
namespace
Belle2
{
21
namespace
gearbox {
23
class
StringContext:
public
InputContext {
24
public
:
26
explicit
StringContext
(
const
std::string& data):
m_stream
(data) {};
28
virtual
int
readXmlData
(
char
* buffer,
int
buffsize)
override
29
{
30
m_stream
.read(buffer, buffsize);
31
return
m_stream
.gcount();
32
}
33
protected
:
35
std::istringstream
m_stream
;
36
};
37
44
class
StringHandler
:
public
InputHandler
{
45
public
:
47
explicit
StringHandler
(
const
std::string& uri):
InputHandler
(uri) {}
49
virtual
~StringHandler
() {}
51
virtual
InputContext*
open
(
const
std::string& path)
override
;
52
};
53
}
55
}
Belle2::gearbox::StringContext::readXmlData
virtual int readXmlData(char *buffer, int buffsize) override
Return a block of the data.
Definition:
StringHandler.h:36
Belle2::gearbox::StringContext::StringContext
StringContext(const std::string &data)
Take an XML fragment as parameter and create a context for it.
Definition:
StringHandler.h:34
Belle2::gearbox::StringHandler::~StringHandler
virtual ~StringHandler()
empty, virtual destructor
Definition:
StringHandler.h:57
Belle2::gearbox::InputHandler::InputHandler
InputHandler(const std::string &uri)
Constructor accepting the uri for the InputHandler.
Definition:
InputHandler.h:73
Belle2::gearbox::StringHandler
InputHandler which just takes the uri as XML data.
Definition:
StringHandler.h:52
Belle2
Abstract base class for different kinds of events.
Definition:
MillepedeAlgorithm.h:19
Belle2::gearbox::StringHandler::StringHandler
StringHandler(const std::string &uri)
Create a new InputHandler which always returns uri as XML content.
Definition:
StringHandler.h:55
Belle2::gearbox::StringHandler::open
virtual InputContext * open(const std::string &path) override
Create a new context, path will be ignored.
Definition:
StringHandler.cc:19
Belle2::gearbox::StringContext::m_stream
std::istringstream m_stream
Assigned data string.
Definition:
StringHandler.h:43
Belle2::gearbox::InputHandler
Class to provide an InputContext for a given XML resource name.
Definition:
InputHandler.h:57
framework
gearbox
include
StringHandler.h
Generated on Tue Jan 4 2022 02:56:43 for Belle II Software by
1.8.17