ATLAS Offline Software
Classes | Functions
python.Helpers Namespace Reference

Classes

class  ShutUp
 

Functions

def MakexAODDataFrame (inputs)
 
def separateSources (filenames)
 Separate the source and header files based on their names. More...
 
def dictionaryHeaders (filenames)
 Find the headers needed for dictionary generation. More...
 
def dictionaryClasses (filenames)
 Function collecting the class names to create a dictionary for. More...
 
def writeLinkDefFile (filename, classnames, headers=[])
 Function writing a LinkDef file. More...
 
def makeRootCorePackageSkeleton (directory, name)
 Create the directory structure for a RootCore package. More...
 
def makeSFramePackageSkeleton (directory, name)
 Create an SFrame package skeleton. More...
 
def ROOT6Setup (batch=False)
 
def release_metadata ()
 
str get_release_setup (Logger logger, no_setup=False)
 
None list_changed_packages (Logger logger, no_setup=False)
 
List[strwarnings_count (Path file_name)
 

Function Documentation

◆ dictionaryClasses()

def python.Helpers.dictionaryClasses (   filenames)

Function collecting the class names to create a dictionary for.

This function can parse all headers of the generated sources to collect the class names for which a CINT dictionary should be generated.

Parameters
filenamesHeader file names (as returned by dictionaryHeaders(...))
Returns
A list with the class names

Definition at line 80 of file PhysicsAnalysis/D3PDMaker/D3PDMakerReader/python/Helpers.py.

80 def dictionaryClasses( filenames ):
81 
82  # Create a logger object first of all:
83  from AthenaCommon.Logging import logging
84  logger = logging.getLogger( "dictionaryClasses" )
85 
86  # Extract the class names from the header files:
87  classnames = [ "D3PDReader::VarHandleBase",
88  "D3PDReader::VarProxyBase",
89  "D3PDReader::VariableStats",
90  "D3PDReader::D3PDReadStats",
91  "map<TString,D3PDReader::VariableStats>",
92  "pair<TString,D3PDReader::VariableStats>",
93  "map<TString,D3PDReader::VarHandleBase*>",
94  "pair<TString,D3PDReader::VarHandleBase*>",
95  "D3PDReader::UserD3PDObjectElement",
96  "D3PDReader::UserD3PDObject" ]
97  for header in filenames:
98  # Open the header file:
99  hfile = open( header, "rU" )
100  if not hfile:
101  logger.error( "Couldn't open header file: %s", hfile )
102  return 255
103  for line in hfile:
104  import re
105  m1 = re.match( r".*ClassDef\‍( (\w+), 0 \‍)", line )
106  m2 = re.match( ".*(VarHandle< .* >).*", line )
107  m3 = re.match( ".*(VarProxy< .* >).*", line )
108  if m1:
109  if not ( "D3PDReader::" + m1.group( 1 ) ) in classnames:
110  logger.verbose( "Found class: " + m1.group( 1 ) )
111  classnames += [ "D3PDReader::" + m1.group( 1 ) ]
112  pass
113  continue
114  if m2:
115  if m2.group( 1 ) == "VarHandle< T >": continue
116  if not ( "D3PDReader::" + m2.group( 1 ) ) in classnames:
117  logger.verbose( "Found class: " + m2.group( 1 ) )
118  classnames += [ "D3PDReader::" + m2.group( 1 ) ]
119  pass
120  continue
121  if m3:
122  if m3.group( 1 ) == "VarProxy< T >": continue
123  if not ( "D3PDReader::" + m3.group( 1 ) ) in classnames:
124  logger.verbose( "Found class: " + m3.group( 1 ) )
125  classnames += [ "D3PDReader::" + m3.group( 1 ) ]
126  pass
127  continue
128  pass
129  pass
130 
131  # Now "clean up" these class names a little, so that ROOT would
132  # like them better:
133  import re
134  finalnames = []
135  for cname in classnames:
136  # First, let's remove all mentions of the std namespace:
137  cname = re.sub( r"std::", "", cname )
138  # Now remove all the whitespaces:
139  cname = re.sub( r"\s", "", cname )
140  # Remove the allocator class names:
141  cname = re.sub( r",allocator<\w*>", "", cname )
142  cname = re.sub( r",allocator<\w*<\w*>>", "", cname )
143  cname = re.sub( r",allocator<\w*<\w*<\w*>>>", "", cname )
144  # Make sure whitespaces are re-inserted into the unsigned primitive
145  # names:
146  cname = re.sub( r"unsigned", "unsigned ", cname )
147  # Also take care of adding back the needed whitespace before the
148  # "long" modifier. But don't add a whitespace after the last long in
149  # the name. For instance, "longlong" should become "long long" and not
150  # "long long ".
151  cname = re.sub( r"long(?!>)", "long ", cname )
152  # Finally, make sure that there is a space between the > operators:
153  while cname != re.sub( r">>", "> >", cname ):
154  cname = re.sub( r">>", "> >", cname )
155  pass
156  finalnames += [ cname ]
157  pass
158 
159  return finalnames
160 

◆ dictionaryHeaders()

def python.Helpers.dictionaryHeaders (   filenames)

Find the headers needed for dictionary generation.

This function can be used to find the headers from the specified file names that should be given to rootcint for dictionary generation.

Parameters
filenamesA list of file names
Returns
A list of header file names that should be given to rootcint

Definition at line 48 of file PhysicsAnalysis/D3PDMaker/D3PDMakerReader/python/Helpers.py.

48 def dictionaryHeaders( filenames ):
49 
50  # Loop over the file names, and collect the "dictionary headers":
51  header_files = []
52  for file in filenames:
53  # Skip the lingering linkdef and dictionary files:
54  if file.lower().find( "linkdef" ) != -1 or file.lower().find( "dict" ) != -1:
55  continue
56  # Skip the D3PDReader template classes:
57  if ( file.find( "VarHandle.h" ) != -1 or
58  file.find( "VarHandle.icc" ) != -1 or
59  file.find( "VarProxy.h" ) != -1 or
60  file.find( "VarProxy.icc" ) != -1 ):
61  continue
62  # Find the header files:
63  if file.endswith( ".h" ):
64  header_files += [ file ]
65  pass
66  pass
67 
68  # Return the final list:
69  return header_files
70 

◆ get_release_setup()

str python.Helpers.get_release_setup ( Logger  logger,
  no_setup = False 
)
Get release setup.

Definition at line 9 of file Tools/WorkflowTestRunner/python/Helpers.py.

9 def get_release_setup(logger: Logger, no_setup=False) -> str:
10  """Get release setup."""
11  if no_setup:
12  logger.info("No release information is available when a release is not set-up.\n")
13  return ""
14 
15  current_nightly = environ["AtlasBuildStamp"]
16  release_base = environ["AtlasBuildBranch"]
17  release_head = environ["AtlasVersion"]
18  platform = environ["LCG_PLATFORM"]
19  project = environ["AtlasProject"]
20  builds_dir_search_str = f"/cvmfs/atlas-nightlies.cern.ch/repo/sw/{release_base}_{project}_{platform}/[!latest_]*/{project}/{release_head}"
21  # finds all directories matching above search pattern, and sorts by modification time
22  # suggest to use latest opt over dbg
23  sorted_list = sorted(glob(builds_dir_search_str), key=path.getmtime)
24  latest_nightly = ""
25  for folder in reversed(sorted_list):
26  if not glob(f"{folder}/../../{release_base}__{project}*-opt*.log"):
27  continue
28  latest_nightly = folder.split("/")[-3]
29  break
30 
31  if current_nightly != latest_nightly:
32  logger.info(f"Please be aware that you are not testing your tags in the latest available nightly, which is {latest_nightly}")
33 
34  setup = "%s,%s,%s,Athena" % (release_base, platform.replace("-", ","), current_nightly)
35 
36  logger.info(f"Your tags will be tested in environment {setup}")
37 
38  return setup
39 
40 

◆ list_changed_packages()

None python.Helpers.list_changed_packages ( Logger  logger,
  no_setup = False 
)
List packages that have changed.

Definition at line 41 of file Tools/WorkflowTestRunner/python/Helpers.py.

41 def list_changed_packages(logger: Logger, no_setup=False) -> None:
42  """List packages that have changed."""
43  if no_setup:
44  logger.info("The list of changed packages is not available when the relase is not set-up.\n")
45  return
46 
47  if "WorkDir_DIR" in environ:
48  logger.info("Changed packages in your build to be tested:\n")
49  file_path = Path(environ["WorkDir_DIR"])
50  fname = file_path / "packages.txt"
51  with fname.open() as fp:
52  lines = fp.readlines()
53  last_line = lines[-1].strip() if lines else None
54  for line in lines:
55  line = line.strip()
56  if "#" not in line:
57  if line == last_line:
58  logger.info(f"{line}\n")
59  else:
60  logger.info(line)
61  else:
62  logger.warning("A release area with locally installed packages has not been setup.")
63  logger.warning("quit by executing <CONTROL-C> if this is not your intention, and")
64  logger.warning("source <YOUR_CMake_BUILD_AREA>/setup.sh")
65  logger.warning("to pickup locally built packages in your environment.\n")
66  pass
67 
68 

◆ makeRootCorePackageSkeleton()

def python.Helpers.makeRootCorePackageSkeleton (   directory,
  name 
)

Create the directory structure for a RootCore package.

This function can be used to create the directory structure for a RootCore package.

Parameters
directoryThe directory where the package is to be created
nameThe name for the RootCore package
Returns
0 in case of success, something else in case of failure

Definition at line 279 of file PhysicsAnalysis/D3PDMaker/D3PDMakerReader/python/Helpers.py.

279 def makeRootCorePackageSkeleton( directory, name ):
280 
281  # Create a logger object first of all:
282  from AthenaCommon.Logging import logging
283  logger = logging.getLogger( "makeRootCorePackageSkeleton" )
284 
285  # Check whether the output directory exists:
286  import os.path
287  if not os.path.exists( directory ):
288  logger.error( "The output directory (%s) doesn't exist!", directory )
289  return 255
290 
291  # Check that the package's directory doesn't exist yet:
292  if os.path.exists( directory + "/" + name ):
293  logger.error( "The directory for the package (%s/%s) already exists!", directory, name )
294  return 255
295 
296  # Create the directory structure:
297  import os
298  os.mkdir( directory + "/" + name, 0o755 )
299  os.mkdir( directory + "/" + name + "/" + name, 0o755 )
300  os.mkdir( directory + "/" + name + "/Root", 0o755 )
301  os.mkdir( directory + "/" + name + "/cmt", 0o755 )
302 
303  # Create the RootCore Makefile:
304  makefile = open( directory + "/" + name + "/cmt/Makefile.RootCore", "w" )
305  makefile.write( "# $Id: Helpers.py 600807 2014-06-08 15:26:51Z krasznaa $\n\n" )
306  makefile.write( "PACKAGE = %s\n" % name )
307  makefile.write( "PACKAGE_PRELOAD = Tree\n" )
308  makefile.write( "# Add the option -DACTIVATE_BRANCHES if your analysis framework\n" )
309  makefile.write( "# disables all branches by default.\n" )
310  makefile.write( "# Remove the COLLECT_D3PD_READING_STATISTICS option to gain a bit\n" )
311  makefile.write( "# of performance...\n" )
312  makefile.write( "PACKAGE_CXXFLAGS = -DCOLLECT_D3PD_READING_STATISTICS\n" )
313  makefile.write( "PACKAGE_LDFLAGS =\n" )
314  makefile.write( "PACKAGE_DEP =\n" )
315  makefile.write( "PACKAGE_PEDANTIC = 1\n" )
316  makefile.write( "PACKAGE_NOOPT = dict\n\n" )
317  makefile.write( "include $(ROOTCOREDIR)/Makefile-common\n" )
318  makefile.close()
319 
320  # Create the RootCore requirements file:
321  requirements = open( directory + "/" + name + "/cmt/requirements", "w" )
322  requirements.write( "package %s\n\n" % name )
323  requirements.write( "use AtlasPolicy AtlasPolicy-*\n" )
324  requirements.write( "use AtlasROOT AtlasROOT-* External\n\n" )
325  requirements.write( "library %s ../Root/*.cxx\n" % name )
326  requirements.write( "apply_pattern installed_library\n\n" )
327  requirements.write( "apply_pattern have_root_headers root_headers=\"*.h " \
328  "../Root/LinkDef.h\" headers_lib=%s\n" % name )
329  requirements.close()
330 
331  # Signal that the function was successful:
332  return 0
333 

◆ makeSFramePackageSkeleton()

def python.Helpers.makeSFramePackageSkeleton (   directory,
  name 
)

Create an SFrame package skeleton.

This function can be used to create the directory structure for an SFrame package. It does as similar job as SFrame's sframe_new_package.sh script.

Parameters
directoryThe directory where the package is to be created
nameThe name for the SFrame package
Returns
0 in case of success, something else in case of failure

Definition at line 345 of file PhysicsAnalysis/D3PDMaker/D3PDMakerReader/python/Helpers.py.

345 def makeSFramePackageSkeleton( directory, name ):
346 
347  # Create a logger object first of all:
348  from AthenaCommon.Logging import logging
349  logger = logging.getLogger( "makeSFramePackageSkeleton" )
350 
351  # Check whether the output directory exists:
352  import os.path
353  if not os.path.exists( directory ):
354  logger.error( "The output directory (%s) doesn't exist!", directory )
355  return 255
356 
357  # Check that the package's directory doesn't exist yet:
358  if os.path.exists( directory + "/" + name ):
359  logger.error( "The directory for the package (%s/%s) already exists!", directory, name )
360  return 255
361 
362  # Create the directory structure:
363  import os
364  os.mkdir( directory + "/" + name, 0o755 )
365  os.mkdir( directory + "/" + name + "/include", 0o755 )
366  os.mkdir( directory + "/" + name + "/src", 0o755 )
367  os.mkdir( directory + "/" + name + "/proof", 0o755 )
368 
369  # Create the SFrame Makefile:
370  makefile = open( directory + "/" + name + "/Makefile", "w" )
371  makefile.write( "# $Id: Helpers.py 600807 2014-06-08 15:26:51Z krasznaa $\n\n" )
372  makefile.write( "# Package information\n" )
373  makefile.write( "LIBRARY = %s\n" % name )
374  makefile.write( "OBJDIR = obj\n" )
375  makefile.write( "DEPDIR = $(OBJDIR)/dep\n" )
376  makefile.write( "SRCDIR = src\n" )
377  makefile.write( "INCDIR = include\n\n" )
378  makefile.write( "# Enable collecting D3PD reading statistics\n" )
379  makefile.write( "INCLUDES += -DCOLLECT_D3PD_READING_STATISTICS\n\n" )
380  makefile.write( "# Include the generic compilation rules\n" )
381  makefile.write( "include $(SFRAME_DIR)/Makefile.common\n" )
382  makefile.close()
383 
384  # Create the PROOF related files:
385  setup = open( directory + "/" + name + "/proof/SETUP.C", "w" )
386  setup.write( "// $Id: Helpers.py 600807 2014-06-08 15:26:51Z krasznaa $\n\n" )
387  setup.write( "int SETUP() {\n\n" )
388  setup.write( " if( gSystem->Load( \"libTree\" ) == -1 ) return -1;\n" )
389  setup.write( " if( gSystem->Load( \"lib%s\" ) == -1 ) return -1;\n\n" % name )
390  setup.write( " return 0;\n" )
391  setup.write( "}\n" )
392  setup.close()
393  # Notice that BUILD.sh has to be executable:
394  build = open( directory + "/" + name + "/proof/BUILD.sh", "w" )
395  build.write( "# $Id: Helpers.py 600807 2014-06-08 15:26:51Z krasznaa $\n\n" )
396  build.write( "if [ \"$1\" = \"clean\" ]; then\n" )
397  build.write( " make distclean\n" )
398  build.write( " exit 0\n" )
399  build.write( "fi\n\n" )
400  build.write( "make default\n" )
401  build.close()
402  os.chmod( directory + "/" + name + "/proof/BUILD.sh", 0o755 )
403 
404  # Signal that the function was successful:
405  return 0

◆ MakexAODDataFrame()

def python.Helpers.MakexAODDataFrame (   inputs)
Helper function creating a ROOT::RDataFrame object reading xAOD files

The function returns an instance of ROOT::RDataFrame that uses
xAOD::RDataSource for reading its inputs.

Keyword arguments:
  inputs -- A single string, or a list of string selecting the input file(s)
            Note that the string(s) may contain wildcards and environment
            variables as well.

Definition at line 6 of file Control/xAODDataSource/python/Helpers.py.

6 def MakexAODDataFrame( inputs ):
7  """Helper function creating a ROOT::RDataFrame object reading xAOD files
8 
9  The function returns an instance of ROOT::RDataFrame that uses
10  xAOD::RDataSource for reading its inputs.
11 
12  Keyword arguments:
13  inputs -- A single string, or a list of string selecting the input file(s)
14  Note that the string(s) may contain wildcards and environment
15  variables as well.
16  """
17 
18  # Make sure that the dictionary is loaded.
19  ROOT.xAOD.ROOT6_xAODDataSource_WorkAround_Dummy()
20 
21  # Use the C++ function for the heavy lifting.
22  return ROOT.xAOD.MakeDataFrame( inputs )

◆ release_metadata()

def python.Helpers.release_metadata ( )
Returns information about the current release based on ReleaseData

Definition at line 143 of file Tools/PyUtils/python/Helpers.py.

143 def release_metadata():
144  """Returns information about the current release based on ReleaseData"""
145 
146  import configparser
147  d = {
148  'project name': '?',
149  'release': '?',
150  'base release': '?',
151  'nightly release': '?',
152  'nightly name': '?',
153  'date': '?',
154  'platform': '?',
155  }
156 
157  for cmake_path in os.environ['CMAKE_PREFIX_PATH'].split(os.pathsep):
158  release_data = os.path.join(cmake_path, 'ReleaseData')
159  if os.path.exists(release_data):
160  d1=d
161  cfg = configparser.ConfigParser()
162  try:
163  cfg.read( release_data )
164  if cfg.has_section( 'release_metadata' ):
165  d1.update( dict( cfg.items( 'release_metadata' ) ) )
166  d1['platform'] = os.getenv( '%s_PLATFORM' % d1['project name'],
167  '?' )
168  release = d1['release'].split('.')
169  base_release = d1['base release'].split('.')
170  if len(release)>=3 or len(base_release)>=3:
171  return d1
172  except Exception:
173  pass
174  return d

◆ ROOT6Setup()

def python.Helpers.ROOT6Setup (   batch = False)

Definition at line 19 of file Tools/PyUtils/python/Helpers.py.

19 def ROOT6Setup(batch=False):
20  from AthenaCommon.Logging import log
21  log.info('executing ROOT6Setup')
22  import builtins as builtin_mod
23  oldimporthook = builtin_mod.__import__
24  autoload_var_name = 'ROOT6_NamespaceAutoloadHook'
25  batch_mode = bool(batch)
26 
27  def root6_importhook(name, globals={}, locals={}, fromlist=[], level=0):
28  nonlocal batch_mode
29  isroot = False
30  bm = batch_mode
31  if name=='ROOT' or (name[0:4]=='ROOT' and name!='ROOT.pythonization'):
32  isroot = True
33  batch_mode = None # only set it on first ROOT import
34 
35  m = oldimporthook(name, globals, locals, fromlist, level)
36 
37  if m and isroot:
38  log.debug('Python import module=%s, fromlist=%s', name, fromlist)
39  if bm is not None:
40  log.debug('Setting ROOT batch mode to %s', bm)
41  m.gROOT.SetBatch(bm)
42 
43  if fromlist:
44  # in this case 'm' is the final nested module already, don't walk the full 'name'
45  vars = [ '.'.join(['', fl, autoload_var_name]) for fl in fromlist]
46  else:
47  vars = [ '.'.join([name, autoload_var_name]) ]
48 
49  for v in vars:
50  try:
51  mm = m
52  # walk the module chain and try to touch 'autoload_var_name' to trigger ROOT autoloading of namespaces
53  for comp in v.split('.')[1:]:
54  mm = getattr(mm, comp)
55  except Exception:
56  pass
57 
58  return m
59 
60  builtin_mod.__import__ = root6_importhook
61 
62 

◆ separateSources()

def python.Helpers.separateSources (   filenames)

Separate the source and header files based on their names.

This function can be used to separate a list of file names into header and source files just based on their names.

Parameters
filenameA simple list of the names of all the files
Returns
The a <code>(headers,sources)</code> pair of file name lists

Definition at line 17 of file PhysicsAnalysis/D3PDMaker/D3PDMakerReader/python/Helpers.py.

17 def separateSources( filenames ):
18 
19  # Loop over the file names, and create the header and source lists:
20  header_files = []
21  source_files = []
22  for file in filenames:
23  # Skip the lingering linkdef and dictionary files:
24  if file.lower().find( "linkdef" ) != -1 or file.lower().find( "dict" ) != -1:
25  continue
26  # Find the header files:
27  if file.endswith( ".h" ) or file.endswith( ".icc" ):
28  header_files += [ file ]
29  pass
30  # Find the source files:
31  if file.endswith( ".cxx" ) or file.endswith( ".cpp" ) or file.endswith( ".C" ):
32  source_files += [ file ]
33  pass
34  pass
35 
36  # Return the result:
37  return ( header_files, source_files )
38 

◆ warnings_count()

List[str] python.Helpers.warnings_count ( Path  file_name)
Run a WARNING helper function.

Definition at line 69 of file Tools/WorkflowTestRunner/python/Helpers.py.

69 def warnings_count(file_name: Path) -> List[str]:
70  """Run a WARNING helper function."""
71  warnings = []
72  with file_name.open() as file:
73  for line in file:
74  if "WARNING" in line and "| WARNING |" not in line:
75  warnings.append(line)
76  return warnings

◆ writeLinkDefFile()

def python.Helpers.writeLinkDefFile (   filename,
  classnames,
  headers = [] 
)

Function writing a LinkDef file.

This function can be used to generate a LinkDef file based on the class names for which a dictionary needs to be generated.

Parameters
filenameThe name of the output LinkDef file
classnameA list of the class names to generate a dictionary for
headersHeader file names that are to be included
Returns
0 in case of success, something else in case of failure

Definition at line 172 of file PhysicsAnalysis/D3PDMaker/D3PDMakerReader/python/Helpers.py.

172 def writeLinkDefFile( filename, classnames, headers = [] ):
173 
174  # Create a logger object first of all:
175  from AthenaCommon.Logging import logging
176  logger = logging.getLogger( "writeLinkDefFile" )
177 
178  # Open the linkdef file:
179  linkdef = open( filename, "w" )
180  if not linkdef:
181  logger.error( "Couldn't open %s for writing!", filename )
182  return 255
183  else:
184  logger.info( "Writing linkdef file to: %s", filename )
185  pass
186 
187  # Write the file's header:
188  linkdef.write( "// Dear emacs, this is -*- c++ -*-\n" )
189  linkdef.write( "// $Id: Helpers.py 600807 2014-06-08 15:26:51Z krasznaa $\n" )
190  linkdef.write( "#ifndef D3PDREADER_LINKDEF_H\n" )
191  linkdef.write( "#define D3PDREADER_LINKDEF_H\n\n" )
192 
193  # Write the required includes:
194  for header in headers:
195  linkdef.write( "#include \"%s\"\n" % header )
196  pass
197 
198  # Write the rest of the constant part:
199  linkdef.write( "\n#ifdef __CINT__\n\n" )
200  linkdef.write( "#pragma link off all globals;\n" )
201  linkdef.write( "#pragma link off all classes;\n" )
202  linkdef.write( "#pragma link off all functions;\n\n" )
203  linkdef.write( "#pragma link C++ nestedclass;\n\n" )
204 
205  # Write which files to generate a dictionary for:
206  for classname in classnames:
207  linkdef.write( "#pragma link C++ class %s+;\n" % classname )
208  pass
209 
210  # Write which template functions to generate a dictionary for:
211  linkdef.write( "\n" )
212  linkdef.write( "// You can disable the remaining lines if you don't\n" )
213  linkdef.write( "// plan to use the library in CINT or PyROOT.\n" )
214  functions = [ "D3PDReader::UserD3PDObject::DeclareVariable<bool>",
215  "D3PDReader::UserD3PDObject::DeclareVariable<short>",
216  "D3PDReader::UserD3PDObject::DeclareVariable<unsigned short>",
217  "D3PDReader::UserD3PDObject::DeclareVariable<int>",
218  "D3PDReader::UserD3PDObject::DeclareVariable<unsigned int>",
219  "D3PDReader::UserD3PDObject::DeclareVariable<long long>",
220  "D3PDReader::UserD3PDObject::DeclareVariable<unsigned long long>",
221  "D3PDReader::UserD3PDObject::DeclareVariable<float>",
222  "D3PDReader::UserD3PDObject::DeclareVariable<double>",
223 # "D3PDReader::UserD3PDObject::DeclareVariable<vector<short>* >",
224 # "D3PDReader::UserD3PDObject::DeclareVariable<vector<unsigned short>* >",
225 # "D3PDReader::UserD3PDObject::DeclareVariable<vector<int>* >",
226 # "D3PDReader::UserD3PDObject::DeclareVariable<vector<unsigned int>* >",
227 # "D3PDReader::UserD3PDObject::DeclareVariable<vector<long long>* >",
228 # "D3PDReader::UserD3PDObject::DeclareVariable<vector<unsigned long long>* >",
229 # "D3PDReader::UserD3PDObject::DeclareVariable<vector<float>* >",
230 # "D3PDReader::UserD3PDObject::DeclareVariable<vector<double>* >",
231  "D3PDReader::UserD3PDObject::Variable<bool>",
232  "D3PDReader::UserD3PDObject::Variable<short>",
233  "D3PDReader::UserD3PDObject::Variable<unsigned short>",
234  "D3PDReader::UserD3PDObject::Variable<int>",
235  "D3PDReader::UserD3PDObject::Variable<unsigned int>",
236  "D3PDReader::UserD3PDObject::Variable<long long>",
237  "D3PDReader::UserD3PDObject::Variable<unsigned long long>",
238  "D3PDReader::UserD3PDObject::Variable<float>",
239  "D3PDReader::UserD3PDObject::Variable<double>",
240 # "D3PDReader::UserD3PDObject::Variable<vector<short>* >",
241 # "D3PDReader::UserD3PDObject::Variable<vector<unsigned short>* >",
242 # "D3PDReader::UserD3PDObject::Variable<vector<int>* >",
243 # "D3PDReader::UserD3PDObject::Variable<vector<unsigned int>* >",
244 # "D3PDReader::UserD3PDObject::Variable<vector<long long>* >",
245 # "D3PDReader::UserD3PDObject::Variable<vector<unsigned long long>* >",
246 # "D3PDReader::UserD3PDObject::Variable<vector<float>* >",
247 # "D3PDReader::UserD3PDObject::Variable<vector<double>* >",
248  "D3PDReader::UserD3PDObjectElement::Variable<short>",
249  "D3PDReader::UserD3PDObjectElement::Variable<unsigned short>",
250  "D3PDReader::UserD3PDObjectElement::Variable<int>",
251  "D3PDReader::UserD3PDObjectElement::Variable<unsigned int>",
252  "D3PDReader::UserD3PDObjectElement::Variable<long long>",
253  "D3PDReader::UserD3PDObjectElement::Variable<unsigned long long>",
254  "D3PDReader::UserD3PDObjectElement::Variable<float>",
255  "D3PDReader::UserD3PDObjectElement::Variable<double>" ]
256  for function in functions:
257  linkdef.write( "#pragma link C++ function %s;\n" % function )
258  pass
259 
260  # Close the file:
261  linkdef.write( "\n" )
262  linkdef.write( "#endif // __CINT__\n" )
263  linkdef.write( "#endif // D3PDREADER_LINKDEF_H\n" )
264  linkdef.close()
265 
266  # Signal that the function was successful:
267  return 0
268 
python.Helpers.get_release_setup
str get_release_setup(Logger logger, no_setup=False)
Definition: Tools/WorkflowTestRunner/python/Helpers.py:9
find
std::string find(const std::string &s)
return a remapped string
Definition: hcg.cxx:135
python.Helpers.makeRootCorePackageSkeleton
def makeRootCorePackageSkeleton(directory, name)
Create the directory structure for a RootCore package.
Definition: PhysicsAnalysis/D3PDMaker/D3PDMakerReader/python/Helpers.py:279
python.Helpers.list_changed_packages
None list_changed_packages(Logger logger, no_setup=False)
Definition: Tools/WorkflowTestRunner/python/Helpers.py:41
python.Helpers.release_metadata
def release_metadata()
Definition: Tools/PyUtils/python/Helpers.py:143
python.Helpers.separateSources
def separateSources(filenames)
Separate the source and header files based on their names.
Definition: PhysicsAnalysis/D3PDMaker/D3PDMakerReader/python/Helpers.py:17
python.Helpers.dictionaryClasses
def dictionaryClasses(filenames)
Function collecting the class names to create a dictionary for.
Definition: PhysicsAnalysis/D3PDMaker/D3PDMakerReader/python/Helpers.py:80
python.Helpers.ROOT6Setup
def ROOT6Setup(batch=False)
Definition: Tools/PyUtils/python/Helpers.py:19
DerivationFramework::TriggerMatchingUtils::sorted
std::vector< typename T::value_type > sorted(T begin, T end)
Helper function to create a sorted vector from an unsorted one.
python.Helpers.writeLinkDefFile
def writeLinkDefFile(filename, classnames, headers=[])
Function writing a LinkDef file.
Definition: PhysicsAnalysis/D3PDMaker/D3PDMakerReader/python/Helpers.py:172
python.Helpers.warnings_count
List[str] warnings_count(Path file_name)
Definition: Tools/WorkflowTestRunner/python/Helpers.py:69
TCS::join
std::string join(const std::vector< std::string > &v, const char c=',')
Definition: Trigger/TrigT1/L1Topo/L1TopoCommon/Root/StringUtils.cxx:10
python.Helpers.MakexAODDataFrame
def MakexAODDataFrame(inputs)
Definition: Control/xAODDataSource/python/Helpers.py:6
Trk::open
@ open
Definition: BinningType.h:40
xAOD::bool
setBGCode setTAP setLVL2ErrorBits bool
Definition: TrigDecision_v1.cxx:60
Trk::split
@ split
Definition: LayerMaterialProperties.h:38
python.Helpers.makeSFramePackageSkeleton
def makeSFramePackageSkeleton(directory, name)
Create an SFrame package skeleton.
Definition: PhysicsAnalysis/D3PDMaker/D3PDMakerReader/python/Helpers.py:345
python.Helpers.dictionaryHeaders
def dictionaryHeaders(filenames)
Find the headers needed for dictionary generation.
Definition: PhysicsAnalysis/D3PDMaker/D3PDMakerReader/python/Helpers.py:48