Closed nhvaughan closed 1 year ago
You can check out this pull request to see how it works. There are no conflicts with the current state of main, and if you're not doing anything in any of the files changed here there shouldn't be any other conflicts.
Changed the way tuning is configured. This loses functionality to switch doing tuning on and off on individual variables, but this feature was never used and deprecated long ago. Below are the changes I made. Don't need to read all of them, mostly here just for the record.
Main config file (see
make_hists/Test_v14.json
):useTuned
, but code still recognize this and set accordingly.tunedmc
, which can be set to"tuned"
,"untuned"
, or"both"
. This consolidates the naming convention (as previously there were multiple).scalefileIn
. Code now smart enough to turn tuning off (i.e.tunedmc
set to"untuned"
) if this value is missing in config or left as a blank string.weight_MCreScale
:bool m_useTuned
member variable withstd::string m_tunedmc
that matches main config conventiontunedmc
value instead ofuseTuned
, but should be smart enough to figure out what to do if you useuseTuned
."untuned"
in generalscalefileIn
value in main config, defaults to no scale file (instead of a hardcoded file like before) and turns internalm_tunedmc
to"untuned"
, turning tuning off entirelyFillers
code should pick up and skip tuningVariableFromConfig.h
:bool m_useTuned
, replacing withstd::string m_tunedmc
following same main config conventionstd::string GetTunedMC
andvoid SetTunedMC(std::string tunedmc)
methods. The latter checks iftunedmc
is in the right formatm_tunedmc
is set to"tuned"
,"untuned"
, or"both"
InitializeTunedMCHistograms
smarter so it can recognize if tuning is turned on (cleans uprunsamplesMain.C
a little)Variable2DFromConfig.h
:VariableFromConfig
(switch tom_tunedmc
, checks on that string value, clean up and Google C++ formatting)GetVariablesFromConfig
:std::string tunedmc
argument that defaults to"untuned"
.VariableFromConfig::SetTunedMC
to settunedmc
value after initializationGetVariables2DFromConfig
:Fillers.h
:tunedmc
convention.runsamplesMain.C
:tunedmc
in config (defaults to"untuned"
).useTuned
for backwards compatibility on old configs, but it'll complain about it.GetVariables
new argument fortunedmc
InitializeTunedMCHistograms
without a check ontunedmc
(VariableFromConfig
is smart enough to handle this on its own now)cout
at the end with the outfile name so it's easier to access to check after running.