LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
SaveImageH5_module.cc
Go to the documentation of this file.
1 // Class: SaveImageH5
3 // Plugin Type: analyzer (Unknown Unknown)
4 // File: SaveImageH5_module.cc
5 //
6 // Generated at Thu Feb 9 17:15:36 2023 by Tingjun Yang using cetskelgen
7 // from version .
9 
18 #include "fhiclcpp/ParameterSet.h"
20 
21 #include "ImageMaker.h"
22 
23 namespace dnn {
24  class SaveImageH5;
25 }
26 
28 public:
29  explicit SaveImageH5(fhicl::ParameterSet const& p);
30 
31  SaveImageH5(SaveImageH5 const&) = delete;
32  SaveImageH5(SaveImageH5&&) = delete;
33  SaveImageH5& operator=(SaveImageH5 const&) = delete;
34  SaveImageH5& operator=(SaveImageH5&&) = delete;
35 
36  void analyze(art::Event const& e) override;
37  virtual ~SaveImageH5() noexcept;
38 
39  void beginJob() override;
40 
41 private:
43  std::unique_ptr<dnn::ImageMaker> saveImage_;
44  std::string fHDF5FileName;
45 };
46 
48  : EDAnalyzer{p}
49  , saveImage_{art::make_tool<dnn::ImageMaker>(p.get<fhicl::ParameterSet>("imageMaker"))}
50  , fHDF5FileName(p.get<std::string>("HDF5NAME"))
51 {}
52 
54 
56 {
57  saveImage_->saveImage(e, hdffile);
58 }
59 
61 {
62  hdffile = hep_hpc::hdf5::File(fHDF5FileName, H5F_ACC_TRUNC);
63 }
64 
void beginJob() override
EDAnalyzer(fhicl::ParameterSet const &pset)
Definition: EDAnalyzer.cc:6
std::string fHDF5FileName
std::unique_ptr< dnn::ImageMaker > saveImage_
SaveImageH5 & operator=(SaveImageH5 const &)=delete
#define DEFINE_ART_MODULE(klass)
Definition: ModuleMacros.h:65
hep_hpc::hdf5::File hdffile
void analyze(art::Event const &e) override
Definition: ImageMaker.h:4
SaveImageH5(fhicl::ParameterSet const &p)
Float_t e
Definition: plot.C:35
virtual ~SaveImageH5() noexcept