ATLAS Offline Software
Functions
python.CodeGenerators Namespace Reference

Functions

def makeCppRootReaderV1 (obj, classname, dir="./")
 Function for generating C++ D3PDReader source files. More...
 
def makeCppRootReaderV2 (obj, classname, dir="./")
 Function for generating C++ D3PDReader source files. More...
 

Function Documentation

◆ makeCppRootReaderV1()

def python.CodeGenerators.makeCppRootReaderV1 (   obj,
  classname,
  dir = "./" 
)

Function for generating C++ D3PDReader source files.

Parameters
objA configured D3PDObject for which the reader should be generated
classnameName of the generated C++ class
dirDirectory where the source files should be put

Definition at line 12 of file CodeGenerators.py.

12 def makeCppRootReaderV1( obj, classname, dir = "./" ):
13 
14  # Set up the D3PDSvc:
15  __serviceName = "RootReaderD3PDSvcV1"
16  from AthenaCommon.AppMgr import ServiceMgr
17  if not hasattr( ServiceMgr, __serviceName ):
18  service = D3PDMakerReader.RootReaderD3PDSvc( __serviceName )
19  service.Version = 1
20  ServiceMgr += service
21  service = getattr( ServiceMgr, __serviceName )
22 
23  # Create a custom ReaderAlg:
24  alg = D3PDMakerReader.ReaderAlg( classname, Directory = dir,
25  ClassName = classname,
26  TuplePath = "D3PDReader/" + classname,
27  D3PDSvc = service )
28 
29  # Add the specified object to the ReaderAlg:
30  alg += obj
31  return
32 

◆ makeCppRootReaderV2()

def python.CodeGenerators.makeCppRootReaderV2 (   obj,
  classname,
  dir = "./" 
)

Function for generating C++ D3PDReader source files.

Parameters
objA configured D3PDObject for which the reader should be generated
classnameName of the generated C++ class
dirDirectory where the source files should be put

Definition at line 39 of file CodeGenerators.py.

39 def makeCppRootReaderV2( obj, classname, dir = "./" ):
40 
41  # Set up the D3PDSvc:
42  __serviceName = "RootReaderD3PDSvcV2"
43  from AthenaCommon.AppMgr import ServiceMgr
44  if not hasattr( ServiceMgr, __serviceName ):
45  service = D3PDMakerReader.RootReaderD3PDSvc( __serviceName )
46  service.Version = 2
47  ServiceMgr += service
48  service = getattr( ServiceMgr, __serviceName )
49 
50  # Create a custom ReaderAlg:
51  alg = D3PDMakerReader.ReaderAlg( classname, Directory = dir,
52  ClassName = classname,
53  TuplePath = "D3PDReader/" + classname,
54  D3PDSvc = service )
55 
56  # Add the specified object to the ReaderAlg:
57  alg += obj
58  return
python.CodeGenerators.makeCppRootReaderV1
def makeCppRootReaderV1(obj, classname, dir="./")
Function for generating C++ D3PDReader source files.
Definition: CodeGenerators.py:12
python.CodeGenerators.makeCppRootReaderV2
def makeCppRootReaderV2(obj, classname, dir="./")
Function for generating C++ D3PDReader source files.
Definition: CodeGenerators.py:39