ATLAS Offline Software
Loading...
Searching...
No Matches
IDPVMtoIDTPMConverter Namespace Reference

Functions

 getall (d, basepath="")
 now opening and looping input IDPVM file

Variables

 log = logging.getLogger( "IDPVMtoIDTPMConverter.py" )
 parser = argparse.ArgumentParser( description = "IDPVMtoIDTPMConverter.py options:" )
 help
 required
 default
 action
 MyArgs = parser.parse_args()
 inputPath = custom_find_datafile( MyArgs.inputFile )
 Check if input histogram file exists.
 configFileName = custom_find_datafile( MyArgs.config )
 Check if config file exists.
dict namingMap_base = {}
 First, read config file to fill bas map.
 parsed = line.strip().split()
 htype = parsed[0]
 hIDPVM = parsed[1]
 hIDTPM = parsed[2]
list expandMap = []
 Expand map to account for other track analyses.
dict namingMap = namingMap_base.copy()
dict namingMap_add = {}
 newhname = hname.replace( "SquirrelPlots/", expitem["IDPVMrepl"] )
 newhdict = hdict.copy()
 inFile = ROOT.TFile.Open( inputPath, "READ" )
 outFile = ROOT.TFile.Open( MyArgs.outputFile, "RECREATE" )
 keytype = keyobj.ClassName()
dict mapHtype = namingMap[ keyname ]["type"]
 checking if histogram is in map
dict newHname = namingMap[ keyname ]["IDTPMname"]
 newHname_path = os.path.dirname( newHname )
 getting input histo
 newHname_obj = os.path.basename( newHname )

Function Documentation

◆ getall()

IDPVMtoIDTPMConverter.getall ( d,
basepath = "" )

now opening and looping input IDPVM file

Definition at line 70 of file IDPVMtoIDTPMConverter.py.

70def getall(d, basepath=""):
71 "Generator function to recurse into a ROOT file/dir and yield (path, obj) pairs"
72 for key in d.GetListOfKeys():
73 kname = key.GetName()
74
75 if key.GetClassName() == "TTree":
76 continue
77 if key.IsFolder():
78 for i in getall(d.Get(kname), basepath+kname+"/"):
79 yield i
80 else:
81 yield basepath+kname, d.Get(kname)
82

Variable Documentation

◆ action

IDPVMtoIDTPMConverter.action

Definition at line 17 of file IDPVMtoIDTPMConverter.py.

◆ configFileName

IDPVMtoIDTPMConverter.configFileName = custom_find_datafile( MyArgs.config )

Check if config file exists.

Definition at line 31 of file IDPVMtoIDTPMConverter.py.

◆ default

IDPVMtoIDTPMConverter.default

Definition at line 15 of file IDPVMtoIDTPMConverter.py.

◆ expandMap

list IDPVMtoIDTPMConverter.expandMap = []

Expand map to account for other track analyses.

Definition at line 53 of file IDPVMtoIDTPMConverter.py.

◆ help

IDPVMtoIDTPMConverter.help

Definition at line 14 of file IDPVMtoIDTPMConverter.py.

◆ hIDPVM

IDPVMtoIDTPMConverter.hIDPVM = parsed[1]

Definition at line 46 of file IDPVMtoIDTPMConverter.py.

◆ hIDTPM

IDPVMtoIDTPMConverter.hIDTPM = parsed[2]

Definition at line 47 of file IDPVMtoIDTPMConverter.py.

◆ htype

IDPVMtoIDTPMConverter.htype = parsed[0]

Definition at line 45 of file IDPVMtoIDTPMConverter.py.

◆ inFile

IDPVMtoIDTPMConverter.inFile = ROOT.TFile.Open( inputPath, "READ" )

Definition at line 83 of file IDPVMtoIDTPMConverter.py.

◆ inputPath

IDPVMtoIDTPMConverter.inputPath = custom_find_datafile( MyArgs.inputFile )

Check if input histogram file exists.

Definition at line 25 of file IDPVMtoIDTPMConverter.py.

◆ keytype

IDPVMtoIDTPMConverter.keytype = keyobj.ClassName()

Definition at line 88 of file IDPVMtoIDTPMConverter.py.

◆ log

IDPVMtoIDTPMConverter.log = logging.getLogger( "IDPVMtoIDTPMConverter.py" )

Definition at line 10 of file IDPVMtoIDTPMConverter.py.

◆ mapHtype

dict IDPVMtoIDTPMConverter.mapHtype = namingMap[ keyname ]["type"]

checking if histogram is in map

Grabbing info from naming map

Definition at line 96 of file IDPVMtoIDTPMConverter.py.

◆ MyArgs

IDPVMtoIDTPMConverter.MyArgs = parser.parse_args()

Definition at line 20 of file IDPVMtoIDTPMConverter.py.

◆ namingMap

dict IDPVMtoIDTPMConverter.namingMap = namingMap_base.copy()

Definition at line 58 of file IDPVMtoIDTPMConverter.py.

◆ namingMap_add

dict IDPVMtoIDTPMConverter.namingMap_add = {}

Definition at line 60 of file IDPVMtoIDTPMConverter.py.

◆ namingMap_base

dict IDPVMtoIDTPMConverter.namingMap_base = {}

First, read config file to fill bas map.

Definition at line 37 of file IDPVMtoIDTPMConverter.py.

◆ newhdict

IDPVMtoIDTPMConverter.newhdict = hdict.copy()

Definition at line 63 of file IDPVMtoIDTPMConverter.py.

◆ newHname

dict IDPVMtoIDTPMConverter.newHname = namingMap[ keyname ]["IDTPMname"]

Definition at line 97 of file IDPVMtoIDTPMConverter.py.

◆ newhname

IDPVMtoIDTPMConverter.newhname = hname.replace( "SquirrelPlots/", expitem["IDPVMrepl"] )

Definition at line 62 of file IDPVMtoIDTPMConverter.py.

◆ newHname_obj

IDPVMtoIDTPMConverter.newHname_obj = os.path.basename( newHname )

Definition at line 111 of file IDPVMtoIDTPMConverter.py.

◆ newHname_path

IDPVMtoIDTPMConverter.newHname_path = os.path.dirname( newHname )

getting input histo

writing histo

Definition at line 110 of file IDPVMtoIDTPMConverter.py.

◆ outFile

IDPVMtoIDTPMConverter.outFile = ROOT.TFile.Open( MyArgs.outputFile, "RECREATE" )

Definition at line 84 of file IDPVMtoIDTPMConverter.py.

◆ parsed

IDPVMtoIDTPMConverter.parsed = line.strip().split()

Definition at line 44 of file IDPVMtoIDTPMConverter.py.

◆ parser

IDPVMtoIDTPMConverter.parser = argparse.ArgumentParser( description = "IDPVMtoIDTPMConverter.py options:" )

Definition at line 13 of file IDPVMtoIDTPMConverter.py.

◆ required

IDPVMtoIDTPMConverter.required

Definition at line 14 of file IDPVMtoIDTPMConverter.py.