Feature #78: Output system improvements
Replace THaVform with THaFormula
|Status:||In Progress||Start date:||08/07/2017|
|Assignee:||Ole Hansen||% Done:|
|Category:||-||Estimated time:||40.00 hours|
|Target version:||1.7||Spent time:||42.00 hours|
The THaVform class, used internally by THaOutput, duplicates functionality of THaFormula. The duplication should be removed. Since THaOutput supports more than just formulas, additional logic will be required to support non-formula cases. Currently, all that is wrapped up in THaVform, making that class hard to understand.
Since the current functionality is complex and hard to follow, it will take additional time for research and design to implement this properly.
#4 Updated by Ole Hansen over 3 years ago
A bit of a to-do list:
- Check for duplicate formulas/cuts in Init
- Move histogram init from LoadFile to Init
- Make THaVhist work with THaFormulas (this is a big one)
- Make Attach() work with THaFormulas
- Add Bob's new THaOutput features to our branch
- Explicit definition of scalar histograms (the usual kind)
- Offset in "[I]" expressions
#5 Updated by Ole Hansen over 3 years ago
Moved histogram init to THaOutput::Init. Loading of histogram parameters works, but Init not yet.
Created a class hierarchy of branch handlers, so all defined branches can be in one map. I think this will work better than individual handler types and separate arrays, but we'll have to see. The BranchHandlers.C module compiles, but the changes haven't been applied in THaOutput.
#10 Updated by Ole Hansen over 3 years ago
- % Done changed from 40 to 50
Continue implementing THaOutput::InitHistos. This is actually quite tricky. There are many different combinations of scalar/fixed-size/variable-size axis and cut expressions, separately for 1D and 2D. Bob's original code seems to have a few bugs (size == 0 -> scalar?) and apparent ill-defined (or not very useful) behavior for certain combinations.
I made two tables of possible axis/cut type combinations in InitHistos. This helps a lot. The tables are not be quite finished yet - Bob's original code is hard to follow because of unexpected interactions. For instance, it looks like vector histograms may re-designate themselves as scalars on the fly, depending on the result of FindVarSize()? Heck!
I also realize that I had better keep the original implementation of THaOutput around for analyzer version 1.6. Maybe we can add the #include file logic to it, and maybe fix any obvious bugs. Then add the new code as a module with a different name. Although this might run into problems with the ROOT file handling. Then again, we can postpone moving the ROOT file handling into the output module. Or we create a second version of THaAnalyzer. Let THaOldAnalyzer use the old THaOutput.