fix_headers_dnn.pl
Go to the documentation of this file.
1 use strict;
2 
3 use vars qw(%subdir_list);
4 use vars qw(%header_list);
5 
6 # explicit headers to avoid conflicts with experiment code
7 BEGIN { %header_list = (
8 "larreco/RecoAlg/ImagePatternAlgs/Keras/keras_model.h" => "larrecodnn/ImagePatternAlgs/Keras/keras_model.h",
9 "larreco/RecoAlg/ImagePatternAlgs/Tensorflow/PointIdAlg/PointIdAlg.h" => "larrecodnn/ImagePatternAlgs/Tensorflow/PointIdAlg/PointIdAlg.h",
10 "larreco/RecoAlg/ImagePatternAlgs/Tensorflow/TF/tf_graph.h" => "larrecodnn/ImagePatternAlgs/Tensorflow/TF/tf_graph.h"
11  ); }
12 
13 foreach my $inc (sort keys %header_list) {
14  s&^(\s*#include\s+["<])\Q$inc\E(.*)&${1}$header_list{$inc}${2}& and last;
15  s&^(\s*#include\s+["<]GENIE/)\Q$inc\E(.*)&${1}$header_list{$inc}${2}& and last;
16 }