Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
messagefacility
messagefacility
plugins
file_mfPlugin.cc
Go to the documentation of this file.
1
// vim: set sw=2 expandtab :
2
3
#include "
private/FileConfig.h
"
4
5
#include "
messagefacility/plugins/mfPlugin.h
"
6
7
#include "
cetlib/ostream_handle.h
"
8
#include "
fhiclcpp/ParameterSet.h
"
9
#include "
fhiclcpp/types/AllowedConfigurationMacro.h
"
10
#include "
fhiclcpp/types/ConfigurationTable.h
"
11
#include "
fhiclcpp/types/TableFragment.h
"
12
13
#include <fstream>
14
#include <memory>
15
16
using namespace
std
;
17
using
cet::ostream_handle
;
18
using namespace
mf::service
;
19
20
namespace
mf
{
21
22
struct
file_mfPluginConfig
{
23
struct
Config
{
24
fhicl::TableFragment<ELostreamOutput::Config>
ostream_dest
;
25
fhicl::TableFragment<priv::FileConfig>
file_config
;
26
};
27
28
using
Parameters
=
fhicl::WrappedTable<Config>
;
29
};
30
31
}
// namespace mf
32
33
namespace
{
34
35
auto
36
makePlugin_(
mf::file_mfPluginConfig::Parameters
const
&
ps
)
37
{
38
ostream_handle
osh{
ps
().file_config().filename(),
39
ps
().file_config().append() ? ios::app : ios::trunc};
40
return
make_unique<ELostreamOutput>(
ps
().ostream_dest(),
move
(osh));
41
}
42
43
}
// unnamed namespace
44
45
MAKE_MFPLUGIN_START
(, pset)
46
{
47
return
makePlugin_(pset);
48
}
49
MAKE_PLUGIN_END
50
51
FHICL_PROVIDE_ALLOWED_CONFIGURATION
(
mf::file_mfPluginConfig
)
ostream_handle.h
AllowedConfigurationMacro.h
mf::file_mfPluginConfig
Definition:
file_mfPlugin.cc:22
mf
Definition:
MessageLogger.cc:42
std
STL namespace.
ParameterSet.h
mf::file_mfPluginConfig::Config::file_config
fhicl::TableFragment< priv::FileConfig > file_config
Definition:
file_mfPlugin.cc:25
wirecell.gen.depos.move
def move(depos, offset)
Definition:
depos.py:107
fhicl::WrappedTable
Definition:
ConfigurationTable.h:30
TableFragment.h
MAKE_PLUGIN_END
#define MAKE_PLUGIN_END
Definition:
ProvideMakePluginMacros.h:8
mf::file_mfPluginConfig::Config
Definition:
file_mfPlugin.cc:23
genie::units::ps
static constexpr double ps
Definition:
Units.h:99
MAKE_MFPLUGIN_START
MAKE_MFPLUGIN_START(, pset)
Definition:
file_mfPlugin.cc:45
FileConfig.h
mf::file_mfPluginConfig::Config::ostream_dest
fhicl::TableFragment< ELostreamOutput::Config > ostream_dest
Definition:
file_mfPlugin.cc:24
ConfigurationTable.h
fhicl::TableFragment
Definition:
type_traits.h:35
mf::service
Definition:
ELdestination.cc:34
mfPlugin.h
FHICL_PROVIDE_ALLOWED_CONFIGURATION
#define FHICL_PROVIDE_ALLOWED_CONFIGURATION(klass)
Definition:
AllowedConfigurationMacro.h:43
cet::ostream_handle
Definition:
ostream_handle.h:37
Generated by
1.8.11