33 """create a new skeleton package
34
35 ex:
36 $ acmd cmake new-skeleton MyPackage
37 """
38 sc = 0
39
40 full_pkg_name = args.pkgname
41
42
43 res = subprocess.getstatusoutput('acmd cmake new-pkg %s' % full_pkg_name)
44 if res[0]!=0:
45 print(
"::: ERROR could not create new package")
46 return -1
47
48
49
50 res = subprocess.getstatusoutput('cd %s;acmd cmake new-analysisalg --newJobo %sAlg' % (full_pkg_name,full_pkg_name))
51 if res[0]!=0:
52 print(
"::: ERROR could not create new alg")
53 return -1
54
55 pkg_name = full_pkg_name
56
57
58 with open(os.path.join(full_pkg_name,'CMakeLists.txt'), 'w') as req:
59 print(textwrap.dedent(
"""\
60 ## automatically generated CMakeLists.txt file
61
62 # Declare the package
63 atlas_subdir( %(pkg_name)s )
64
65 # Declare external dependencies ... default here is to include ROOT
66 find_package( ROOT COMPONENTS MathCore RIO Core Tree Hist )
67
68 # Declare package as a library
69 # Note the convention that library names get "Lib" suffix
70 # Any package you depend on you should add
71 # to LINK_LIBRARIES line below (see the example)
72 atlas_add_library( %(pkg_name)sLib src/*.cxx
73 PUBLIC_HEADERS %(pkg_name)s
74 INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
75 LINK_LIBRARIES ${ROOT_LIBRARIES}
76 AthAnalysisBaseCompsLib
77 )
78
79 # if you add athena components (tools, algorithms) to this package
80 # these lines are needed so you can configure them in joboptions
81 atlas_add_component( %(pkg_name)s src/components/*.cxx
82 NOCLIDDB
83 LINK_LIBRARIES %(pkg_name)sLib
84 )
85
86 # if you add an application (exe) to this package
87 # declare it like this (note convention that apps go in the util dir)
88 # atlas_add_executable( MyApp util/myApp.cxx
89 # LINK_LIBRARIES %(pkg_name)sLib
90 # )
91
92 # Install python modules, joboptions, and share content
93 atlas_install_python_modules( python/*.py )
94 atlas_install_joboptions( share/*.py )
95 atlas_install_data( data/* )
96 atlas_install_scripts( scripts/* )
97 # You can access your data from code using path resolver, e.g.
98 # PathResolverFindCalibFile("%(pkg_name)s/file.txt")
99
100
101 """%locals()), file=req)
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
void print(char *figname, TCanvas *c1)