Skip to content

Commit 0aaeca7

Browse files
authored
Merge pull request #2 from carriganm95/update_hitTuning
address PR comments round 1
2 parents 5977b29 + c03a60b commit 0aaeca7

2 files changed

Lines changed: 7 additions & 3 deletions

File tree

sbncode/CAFMaker/RecoUtils/CMakeLists.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,4 @@ art_make_library( LIBRARY_NAME caf_RecoUtils
1111
larsim::MCCheater_BackTrackerService_service
1212
larsim::MCCheater_ParticleInventoryService_service
1313
larcorealg::Geometry
14-
sbnanaobj::StandardRecord
15-
sbnanaobj::StandardRecordFlat
1614
)

sbncode/HitFinder/GaussHitFinderSBN_module.cc

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,12 +71,18 @@ namespace hit {
7171
std::vector<double> FillOutHitParameterVector(const std::vector<double>& input);
7272

7373
template<class T>
74-
inline std::vector<T> getValueOrListOf(fhicl::ParameterSet const& pset, std::string const& key) {
74+
std::vector<T> getValueOrListOf(fhicl::ParameterSet const& pset, std::string const& key) const {
7575

7676
auto const& wireReadoutGeom = art::ServiceHandle<geo::WireReadout const>()->Get();
7777
const unsigned int N_PLANES = wireReadoutGeom.Nplanes();
7878

7979
if (pset.is_key_to_sequence(key))
80+
auto vec = pset.get<std::vector<T>>(key);
81+
if (vec.size() != N_PLANES) {
82+
throw cet::exception("Configuration")
83+
<< "Parameter '" << key << "' has size " << vec.size()
84+
<< " but expected " << N_PLANES << " (number of planes)";
85+
}
8086
return pset.get<std::vector<T>>(key);
8187
else
8288
return std::vector<T>(N_PLANES, pset.get<T>(key));

0 commit comments

Comments
 (0)