fix_headers_cal.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 "lardata/AnalysisAlg/CalorimetryAlg.h" => "larreco/Calorimetry/CalorimetryAlg.h",
9 "lardata/AnalysisAlg/Chi2PIDAlg.h" => "larana/ParticleIdentification/Chi2PIDAlg.h",
10 "lardata/RecoObjects/BezierCurveHelper.h" => "larreco/Deprecated/BezierCurveHelper.h",
11 "lardata/RecoObjects/BezierTrack.h" => "larreco/Deprecated/BezierTrack.h",
12 "larana/Calorimetry/TrackCalorimetryAlg.h" => "larreco/Calorimetry/TrackCalorimetryAlg.h",
13 "larsim/Simulation/EmEveIdCalculator.h" => "nutools/ParticleNavigation/EmEveIdCalculator.h",
14 "larsim/Simulation/EveIdCalculator.h" => "nutools/ParticleNavigation/EveIdCalculator.h",
15 "larsim/Simulation/ParticleHistory.h" => "nutools/ParticleNavigation/ParticleHistory.h",
16 "larsim/Simulation/ParticleList.h" => "nutools/ParticleNavigation/ParticleList.h"
17  ); }
18 
19 foreach my $inc (sort keys %header_list) {
20  s&^(\s*#include\s+["<])\Q$inc\E(.*)&${1}$header_list{$inc}${2}& and last;
21 }