ATLAS Offline Software
Functions | Variables
python.IOVDbAutoCfgFlags Namespace Reference

Functions

def getLastGlobalTag (prevFlags)
 
def getDatabaseInstanceDefault (flags)
 

Variables

 log = logging.getLogger('IOVDbAutoCfgFlags')
 

Function Documentation

◆ getDatabaseInstanceDefault()

def python.IOVDbAutoCfgFlags.getDatabaseInstanceDefault (   flags)

Definition at line 21 of file IOVDbAutoCfgFlags.py.

22  # MC
23  if flags.Input.isMC:
24  return "OFLP200"
25 
26  # real-data
27  try:
28  year = int(flags.Input.ProjectName[4:6])
29  except Exception:
30  log.warning("Failed to extract year from project tag %s. Assuming CONDBR2.", flags.Input.ProjectName)
31  return "CONDBR2"
32 
33  if year > 13:
34  return "CONDBR2"
35  else:
36  return "COMP200"

◆ getLastGlobalTag()

def python.IOVDbAutoCfgFlags.getLastGlobalTag (   prevFlags)

Definition at line 6 of file IOVDbAutoCfgFlags.py.

6 def getLastGlobalTag(prevFlags):
7  if not prevFlags.Input.Files:
8  return ""
9 
10  from AthenaConfiguration.AutoConfigFlags import GetFileMD
11  globaltag = GetFileMD(prevFlags.Input.Files).get("IOVDbGlobalTag", None)
12  if globaltag is None:
13  return ""
14 
15  if isinstance(globaltag, list): # if different tags have been used at different steps
16  globaltag = globaltag[-1]
17 
18  return globaltag
19 
20 

Variable Documentation

◆ log

python.IOVDbAutoCfgFlags.log = logging.getLogger('IOVDbAutoCfgFlags')

Definition at line 4 of file IOVDbAutoCfgFlags.py.

CaloCellPos2Ntuple.int
int
Definition: CaloCellPos2Ntuple.py:24
python.IOVDbAutoCfgFlags.getDatabaseInstanceDefault
def getDatabaseInstanceDefault(flags)
Definition: IOVDbAutoCfgFlags.py:21
python.AutoConfigFlags.GetFileMD
def GetFileMD(filenames, allowEmpty=True)
Definition: AutoConfigFlags.py:51
python.IOVDbAutoCfgFlags.getLastGlobalTag
def getLastGlobalTag(prevFlags)
Definition: IOVDbAutoCfgFlags.py:6
get
T * get(TKey *tobj)
get a TObject* from a TKey* (why can't a TObject be a TKey?)
Definition: hcg.cxx:127