LArSoft  v06_85_00
Liquid Argon Software toolkit - http://larsoft.org/
file_mfStatsPlugin.cc
Go to the documentation of this file.
1 // vim: set sw=2 expandtab :
2 
3 #include "cetlib/PluginTypeDeducer.h"
4 #include "cetlib/ProvideFilePathMacro.h"
5 #include "cetlib/ProvideMakePluginMacros.h"
6 #include "cetlib/ostream_handle.h"
14 
15 #include <fstream>
16 #include <iostream>
17 #include <memory>
18 #include <string>
19 #include <utility>
20 
21 using namespace std;
22 using namespace mf::service;
23 
24 namespace mf {
25 
27 
28  struct Config {
29 
32  };
33 
35  };
36 
37 } // namespace mf
38 
39 namespace {
40 
41  auto
42  makePlugin_(mf::file_mfStatsPluginConfig::Parameters const& ps)
43  {
44  cet::ostream_handle osh{ps().file_config().filename(),
45  ps().file_config().append() ? ios::app :
46  ios::trunc};
47  return make_unique<ELstatistics>(ps().stats_dest(), move(osh));
48  }
49 
50 } // unnamed namespace
51 
52 MAKE_PLUGIN_START(auto, string const&, fhicl::ParameterSet const& pset)
53 {
54  return makePlugin_(pset);
55 }
56 MAKE_PLUGIN_END
57 
58 CET_PROVIDE_FILE_PATH()
59 DEFINE_BASIC_PLUGINTYPE_FUNC(ELdestination)
fhicl::TableFragment< mfplugins::FileConfig > file_config
STL namespace.
MAKE_PLUGIN_START(auto, string const &, fhicl::ParameterSet const &pset)
fhicl::TableFragment< ELstatistics::Config > stats_dest
#define FHICL_PROVIDE_ALLOWED_CONFIGURATION(klass)