LArSoft
v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
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(),
42
std::move(osh));
43
}
44
45
}
// unnamed namespace
46
47
MAKE_MFSTATSPLUGIN_START
(, pset)
48
{
49
return
makePlugin_(pset);
50
}
51
MAKE_PLUGIN_END
52
53
FHICL_PROVIDE_ALLOWED_CONFIGURATION
(
mf::file_mfStatsPluginConfig
)
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:47
fhicl::WrappedTable
Definition:
ConfigurationTable.h:30
TableFragment.h
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:35
FHICL_PROVIDE_ALLOWED_CONFIGURATION
#define FHICL_PROVIDE_ALLOWED_CONFIGURATION(klass)
Definition:
AllowedConfigurationMacro.h:43
mf::file_mfStatsPluginConfig::Config
Definition:
file_mfStatsPlugin.cc:24
messagefacility
plugins
file_mfStatsPlugin.cc
Generated on Thu May 2 2024 20:59:52 for LArSoft by
1.8.11