16 #include "art_root_io/TFileDirectory.h" 17 #include "art_root_io/TFileService.h" 138 std::unique_ptr< std::vector<Result> >
139 resultCol(
new std::vector<Result>);
142 std::vector< art::Ptr< cvn::PixelMap > > pixelmaplist;
144 auto pixelmapListHandle = evt.
getHandle< std::vector< cvn::PixelMap > >(itag1);
145 if (pixelmapListHandle)
162 if(pixelmaplist.size() > 0){
164 std::vector< std::vector<float> > networkOutput =
fTFHandler.
Predict(*pixelmaplist[0]);
166 resultCol->emplace_back(networkOutput);
209 for(
unsigned int p = 1;
p < pixelmaplist.size(); ++
p){
211 resultCol->emplace_back(output);
218 mf::LogError(
"CVNEvaluator::produce") <<
"CVN Type not in the allowed list: Tensorflow" <<
std::endl;
std::vector< std::vector< float > > Predict(const PixelMap &pm)
Return prediction arrays for PixelMap.
bool fMultiplePMs
Number of outputs fron neural net.
CVNEvaluator(fhicl::ParameterSet const &pset)
Handle< PROD > getHandle(SelectorBase const &) const
Wrapper for caffe::Net which handles construction and prediction.
EDProducer(fhicl::ParameterSet const &pset)
MaybeLogger_< ELseverityLevel::ELsev_error, false > LogError
Utility class for truth labels.
std::vector< unsigned int > fSelNumuBins
std::string fCVNType
Can use Caffe or Tensorflow.
std::vector< unsigned int > fTotNueBins
unsigned int fFullyCorrect
#define DEFINE_ART_MODULE(klass)
ProductID put(std::unique_ptr< PROD > &&edp, std::string const &instance={})
std::vector< unsigned int > fTotNumuBins
void produce(art::Event &evt)
cvn::TFNetHandler fTFHandler
std::string fPixelMapInput
Module label for input pixel maps.
std::vector< unsigned int > fSelNueBins
void fill_ptr_vector(std::vector< Ptr< T >> &ptrs, H const &h)
QTextStream & endl(QTextStream &s)