SFrame 3.6
|
Class creating analysis cycle templates. More...
Public Member Functions | |
def | __init__ |
def | CreateHeader |
Function creating an analysis cycle header. | |
def | CreateSource |
Function creating the analysis cycle source file. | |
def | AddLinkDef |
Function adding link definitions for rootcint. | |
def | CreateConfig |
Function creating a configuration file for the new cycle. | |
def | CreateCycle |
Main analysis cycle creator function. |
Class creating analysis cycle templates.
This class can be used to create a template cycle inheriting from SCycleBase. It is quite smart actually. If you call CycleCreator.CreateCycle from inside an "SFrame package", it will find the right locations for the created files and extend an already existing LinkDef.h file with the line for the new cycle.
Definition at line 31 of file CycleCreators.py.
def CycleCreators::CycleCreator::__init__ | ( | self | ) |
Definition at line 36 of file CycleCreators.py.
def CycleCreators::CycleCreator::AddLinkDef | ( | self, | |
cycleName, | |||
fileName = "LinkDef.h" |
|||
) |
Function adding link definitions for rootcint.
Each new analysis cycle has to declare itself in a so called "LinkDef file". This makes sure that rootcint knows that a dictionary should be generated for this C++ class.
This function is also quite smart. If the file name specified does not yet exist, it creates a fully functionaly LinkDef file. If the file already exists, it just inserts one line declaring the new cycle into this file.
cycleName | Name of the analysis cycle. Can contain the namespace name. |
fileName | Optional parameter with the LinkDef file name |
Definition at line 415 of file CycleCreators.py.
def CycleCreators::CycleCreator::CreateConfig | ( | self, | |
cycleName, | |||
fileName = "" |
|||
) |
Function creating a configuration file for the new cycle.
This function is supposed to create an example configuration file for the new cycle. It uses PyXML to write the configuration, and exactly this causes a bit of trouble. PyXML is about the worst XML implementation I ever came accross... There are tons of things that it can't do. Not to mention the lack of any proper documentation.
All in all, the resulting XML file is not too usable at the moment, it's probably easier just copying one of the example cycles from SFrame/user/config and adjusting it to the user's needs...
cycleName | Name of the analysis cycle. Can contain the namespace name. |
fileName | Optional parameter with the configuration file name |
Definition at line 477 of file CycleCreators.py.
def CycleCreators::CycleCreator::CreateCycle | ( | self, | |
cycleName, | |||
linkdef = "" |
|||
) |
Main analysis cycle creator function.
The users of this class should normally just use this function to create a new analysis cycle.
It only really needs to receive the name of the new cycle, it can guess the name of the LinkDef file by itself if it has to. It calls all the other functions of this class to create all the files for the new cycle.
cycleName | Name of the analysis cycle. Can contain the namespace name. |
linkdef | Optional parameter with the name of the LinkDef file |
Definition at line 559 of file CycleCreators.py.
def CycleCreators::CycleCreator::CreateHeader | ( | self, | |
cycleName, | |||
fileName = "" |
|||
) |
Function creating an analysis cycle header.
This function can be used to create the header file for a new analysis cycle. It can correctly create the header file if the cycle name is defined like "Ana::AnalysisCycle". In this case it creates a cycle called "AnalysisCycle" that is in the C++ namespace "Ana". Multiple namespaces such as "Ana::MyAna::AnalysisCycle" are not supported!
cycleName | Name of the analysis cycle. Can contain the namespace name. |
fileName | Optional parameter with the output header file name |
Definition at line 170 of file CycleCreators.py.
def CycleCreators::CycleCreator::CreateSource | ( | self, | |
cycleName, | |||
fileName = "" |
|||
) |
Function creating the analysis cycle source file.
This function creates the source file that works with the header created by CreateHeader. It is important that CreateHeader is executed before this function, as it depends on knowing where the header file is physically. (To include it correctly in the source file.) It can handle cycles in namespaces, just like CreateHeader. (The same rules apply.)
cycleName | Name of the analysis cycle. Can contain the namespace name. |
fileName | Optional parameter with the output source file name |
Definition at line 343 of file CycleCreators.py.