CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
anapath.py
Go to the documentation of this file.
1 import os
2 import glob
3 
4 def anapath():
5  analyzer_path = []
6 
7  cmssw_src = '/'.join( [ os.environ['CMSSW_BASE'], 'src' ] )
8  pkg_pat = '/'.join([cmssw_src, '*', '*'])
9  pkg_dirs = glob.glob( pkg_pat )
10  packages = [dir for dir in pkg_dirs \
11  if os.path.isdir(dir) and \
12  not dir.endswith('CVS') ]
13  for pkg in packages:
14  ana_dir = '/'.join( [pkg, 'python/analyzers'] )
15  # if pkg.endswith('CMGTools/H2TauTau'):
16  # ana_dir = '/'.join( [pkg, 'python/proto/analyzers'] )
17  if os.path.isdir(ana_dir):
18  analyzer_path.append( ana_dir )
19  return analyzer_path
20 
21 analyzer_path = anapath()
22 
23 if __name__ == '__main__':
24  print analyzer_path
25 
def anapath
Definition: anapath.py:4
static std::string join(char **cmd)
Definition: RemoteFile.cc:18