v06_43_00-UpdateGeometryToLArCoreAlg.py
Go to the documentation of this file.
1 #!/usr/bin/env python2
2 #
3 # This script changes C++ code, CMake files and FHiCL configuration to use
4 # larcorealg instead of larcore for geometrye
5 #
6 # Change log:
7 # 20170703 (petrillo@fnal.gov)
8 # original version
9 #
10 
11 import sys, re
12 
13 import SerialSubstitution
14 from SerialSubstitution import AddProcessor, RunSubstitutor
15 
16 
17 ################################################################################
18 if __name__ == "__main__":
19 
20  #############################################################################
21  # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
22  # FHiCL configuration
23  #
25 
26  Subst.AddFileType("fcl")
27 
28  # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
29  # CMakeLists.txt
30  #
32 
33  Subst.AddFileNamePattern("CMakeLists.txt")
34 
35  # note that GeometryTestAlg was also moved, but it did not sport the product name header
36  Subst.AddWord ("larcore_Geometry", "larcorealg_Geometry")
37  Subst.AddWord ("larcore_CoreUtils", "larcorealg_CoreUtils")
38  Subst.AddWord ("larcore_TestUtils", "larcorealg_TestUtils")
39 
40 
41  # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
42  # C++ source code (including modules and services)
43  #
45 
46  Subst.AddFileType("h", "hh", "cc", "cpp", "cxx", "icc", "tcc" )
47 
48  Subst.AddWord ("larcore/TestUtils/NameSelector.h", "larcorealg/TestUtils/NameSelector.h")
49  Subst.AddWord ("larcore/TestUtils/boost_unit_test_base.h", "larcorealg/TestUtils/boost_unit_test_base.h")
50  Subst.AddWord ("larcore/TestUtils/ProviderList.h", "larcorealg/TestUtils/ProviderList.h")
51  Subst.AddWord ("larcore/TestUtils/unit_test_base.h", "larcorealg/TestUtils/unit_test_base.h")
52  Subst.AddWord ("larcore/TestUtils/ProviderTestHelpers.h", "larcorealg/TestUtils/ProviderTestHelpers.h")
53  Subst.AddWord ("larcore/TestUtils/StopWatch.h", "larcorealg/TestUtils/StopWatch.h")
54  Subst.AddWord ("larcore/Geometry/ChannelMapAlg.h", "larcorealg/Geometry/ChannelMapAlg.h")
55  Subst.AddWord ("larcore/Geometry/Exceptions.h", "larcorealg/Geometry/Exceptions.h")
56  Subst.AddWord ("larcore/Geometry/AuxDetGeometryCore.h", "larcorealg/Geometry/AuxDetGeometryCore.h")
57  Subst.AddWord ("larcore/Geometry/StandaloneGeometrySetup.h", "larcorealg/Geometry/StandaloneGeometrySetup.h")
58  Subst.AddWord ("larcore/Geometry/AuxDetGeoObjectSorter.h", "larcorealg/Geometry/AuxDetGeoObjectSorter.h")
59  Subst.AddWord ("larcore/Geometry/LocalTransformation.h", "larcorealg/Geometry/LocalTransformation.h")
60  Subst.AddWord ("larcore/Geometry/geo.h", "larcorealg/Geometry/geo.h")
61  Subst.AddWord ("larcore/Geometry/AuxDetChannelMapAlg.h", "larcorealg/Geometry/AuxDetChannelMapAlg.h")
62  Subst.AddWord ("larcore/Geometry/WireGeo.h", "larcorealg/Geometry/WireGeo.h")
63  Subst.AddWord ("larcore/Geometry/GeometryCore.h", "larcorealg/Geometry/GeometryCore.h")
64  Subst.AddWord ("larcore/Geometry/TPCGeo.h", "larcorealg/Geometry/TPCGeo.h")
65  Subst.AddWord ("larcore/Geometry/PlaneGeo.h", "larcorealg/Geometry/PlaneGeo.h")
66  Subst.AddWord ("larcore/Geometry/CryostatGeo.h", "larcorealg/Geometry/CryostatGeo.h")
67  Subst.AddWord ("larcore/Geometry/BoxBoundedGeo.h", "larcorealg/Geometry/BoxBoundedGeo.h")
68  Subst.AddWord ("larcore/Geometry/GeoObjectSorterStandard.h", "larcorealg/Geometry/GeoObjectSorterStandard.h")
69  Subst.AddWord ("larcore/Geometry/Decomposer.h", "larcorealg/Geometry/Decomposer.h")
70  Subst.AddWord ("larcore/Geometry/AuxDetSensitiveGeo.h", "larcorealg/Geometry/AuxDetSensitiveGeo.h")
71  Subst.AddWord ("larcore/Geometry/AuxDetGeo.h", "larcorealg/Geometry/AuxDetGeo.h")
72  Subst.AddWord ("larcore/Geometry/SimpleGeo.h", "larcorealg/Geometry/SimpleGeo.h")
73  Subst.AddWord ("larcore/Geometry/ChannelMapStandardAlg.h", "larcorealg/Geometry/ChannelMapStandardAlg.h")
74  Subst.AddWord ("larcore/Geometry/StandaloneBasicSetup.h", "larcorealg/Geometry/StandaloneBasicSetup.h")
75  Subst.AddWord ("larcore/Geometry/OpDetGeo.h", "larcorealg/Geometry/OpDetGeo.h")
76  Subst.AddWord ("larcore/Geometry/GeoObjectSorter.h", "larcorealg/Geometry/GeoObjectSorter.h")
77  Subst.AddWord ("larcore/CoreUtils/DereferenceIterator.h", "larcorealg/CoreUtils/DereferenceIterator.h")
78  Subst.AddWord ("larcore/CoreUtils/DumpUtils.h", "larcorealg/CoreUtils/DumpUtils.h")
79  Subst.AddWord ("larcore/CoreUtils/ProviderUtil.h", "larcorealg/CoreUtils/ProviderUtil.h")
80  Subst.AddWord ("larcore/CoreUtils/DebugUtils.h", "larcorealg/CoreUtils/DebugUtils.h")
81  Subst.AddWord ("larcore/CoreUtils/ProviderPack.h", "larcorealg/CoreUtils/ProviderPack.h")
82  Subst.AddWord ("larcore/CoreUtils/UncopiableAndUnmovableClass.h", "larcorealg/CoreUtils/UncopiableAndUnmovableClass.h")
83  Subst.AddWord ("larcore/CoreUtils/RealComparisons.h", "larcorealg/CoreUtils/RealComparisons.h")
84  Subst.AddWord ("larcore/CoreUtils/quiet_Math_Functor.h", "larcorealg/CoreUtils/quiet_Math_Functor.h")
85 
86 
87  # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
88  #############################################################################
89 
90  sys.exit(RunSubstitutor())
91 #
def AddProcessor(processor)