Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
messagefacility
messagefacility
plugins
file_mfStatsPlugin.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/mfStatsPlugin.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
#include <utility>
16
17
using
cet::ostream_handle
;
18
using namespace
std
;
19
using namespace
mf::service
;
20
21
namespace
mf
{
22
23
struct
file_mfStatsPluginConfig
{
24
struct
Config
{
25
fhicl::TableFragment<ELstatistics::Config>
stats_dest
;
26
fhicl::TableFragment<mf::priv::FileConfig>
file_config
;
27
};
28
29
using
Parameters
=
fhicl::WrappedTable<Config>
;
30
};
31
32
}
// namespace mf
33
34
namespace
{
35
36
auto
37
makePlugin_(
mf::file_mfStatsPluginConfig::Parameters
const
&
ps
)
38
{
39
ostream_handle
osh{
ps
().file_config().filename(),
40
ps
().file_config().append() ? ios::app : ios::trunc};
41
return
make_unique<MFSTATSPLUGIN_RESULT_BASE>(
ps
().stats_dest(),
move
(osh));
42
}
43
44
}
// unnamed namespace
45
46
MAKE_MFSTATSPLUGIN_START
(, pset)
47
{
48
return
makePlugin_(pset);
49
}
50
MAKE_PLUGIN_END
51
52
FHICL_PROVIDE_ALLOWED_CONFIGURATION
(
mf::file_mfStatsPluginConfig
)
ostream_handle.h
AllowedConfigurationMacro.h
mf::file_mfStatsPluginConfig::Config::file_config
fhicl::TableFragment< mf::priv::FileConfig > file_config
Definition:
file_mfStatsPlugin.cc:26
mf::file_mfStatsPluginConfig
Definition:
file_mfStatsPlugin.cc:23
mf
Definition:
MessageLogger.cc:42
std
STL namespace.
ParameterSet.h
MAKE_MFSTATSPLUGIN_START
MAKE_MFSTATSPLUGIN_START(, pset)
Definition:
file_mfStatsPlugin.cc:46
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
genie::units::ps
static constexpr double ps
Definition:
Units.h:99
FileConfig.h
ConfigurationTable.h
mfStatsPlugin.h
fhicl::TableFragment
Definition:
type_traits.h:35
mf::file_mfStatsPluginConfig::Config::stats_dest
fhicl::TableFragment< ELstatistics::Config > stats_dest
Definition:
file_mfStatsPlugin.cc:25
mf::service
Definition:
ELdestination.cc:34
FHICL_PROVIDE_ALLOWED_CONFIGURATION
#define FHICL_PROVIDE_ALLOWED_CONFIGURATION(klass)
Definition:
AllowedConfigurationMacro.h:43
mf::file_mfStatsPluginConfig::Config
Definition:
file_mfStatsPlugin.cc:24
cet::ostream_handle
Definition:
ostream_handle.h:37
Generated by
1.8.11