19 #include "art_root_io/TFileDirectory.h" 20 #include "art_root_io/TFileService.h" 62 ,
fCVNType(pset.get<std::string>(
"CVNType"))
77 std::unique_ptr<std::vector<Result>> resultCol(
new std::vector<Result>);
80 std::vector<art::Ptr<lcvn::PixelMap>> pixelmaplist;
82 auto pixelmapListHandle = evt.
getHandle<std::vector<lcvn::PixelMap>>(itag1);
88 if (pixelmaplist.size() > 0) {
90 std::vector<std::vector<float>> networkOutput =
fTFHandler->Predict(*pixelmaplist[0]);
92 resultCol->emplace_back(networkOutput);
96 for (
unsigned int p = 1; p < pixelmaplist.size(); ++p) {
97 std::vector<std::vector<float>> output =
fTFHandler->Predict(*pixelmaplist[p]);
98 resultCol->emplace_back(output);
105 <<
"CVN Type not in the allowed list: Tensorflow" << std::endl;
106 mf::LogError(
"LArCVNEvaluator::produce") <<
"Exiting without processing events" << std::endl;
void produce(art::Event &evt)
EDProducer(fhicl::ParameterSet const &pset)
LArCVNEvaluator(fhicl::ParameterSet const &pset)
std::string fPixelMapInput
Module label for input pixel maps.
Utility class for truth labels.
MaybeLogger_< ELseverityLevel::ELsev_error, false > LogError
PutHandle< PROD > put(std::unique_ptr< PROD > &&edp, std::string const &instance={})
#define DEFINE_ART_MODULE(klass)
std::string fCVNType
Can use Caffe or Tensorflow.
bool fMultiplePMs
Number of outputs fron neural net.
Handle< PROD > getHandle(SelectorBase const &) const
std::unique_ptr< lcvn::ITFNetHandler > fTFHandler
void fill_ptr_vector(std::vector< Ptr< T >> &ptrs, H const &h)