ATLAS Offline Software
Functions | Variables
python.ClassNameManips Namespace Reference

Functions

def pers_to_trans_name (p)
 

Variables

 cnm_log = Logging.logging.getLogger('ClassNameManips')
 

Function Documentation

◆ pers_to_trans_name()

def python.ClassNameManips.pers_to_trans_name (   p)

Definition at line 12 of file ClassNameManips.py.

12 def pers_to_trans_name(p):
13  # Baseline: transient name is identical
14  t = p
15  # Let's look for a version in the name
16  vers = re.findall( r'_v\d+',t )
17  if len(vers)>1:
18  cnm_log.warning('Input name '+p+' seems to have multiple version numbers: '+str(vers)+' - will wipe them all')
19  for v in vers:
20  # Wipe out the version
21  t = t.replace(v,'')
22  # Now convert data vectors
23  if 'DataVector<' in t:
24  t = t.replace('DataVector<','').replace('>','')
25  t = 'Container#'.join(t.split('#'))
26  cnm_log.debug('Translated '+p+' to '+t)
27  return t

Variable Documentation

◆ cnm_log

python.ClassNameManips.cnm_log = Logging.logging.getLogger('ClassNameManips')

Definition at line 10 of file ClassNameManips.py.

replace
std::string replace(std::string s, const std::string &s2, const std::string &s3)
Definition: hcg.cxx:307
python.ClassNameManips.pers_to_trans_name
def pers_to_trans_name(p)
Definition: ClassNameManips.py:12
TCS::join
std::string join(const std::vector< std::string > &v, const char c=',')
Definition: Trigger/TrigT1/L1Topo/L1TopoCommon/Root/StringUtils.cxx:10
str
Definition: BTagTrackIpAccessor.cxx:11