JobOptionsSvc missing properties for ApplicationMgr
Hi, I am trying to save a copy of the Job options in the output file using the JobOptionsSvc to improve reproducibility. Our implementation goes something like this:
// retrieve the configuration of the job
// and write it to file as vector of strings
std::vector<std::string> config_data;
auto jobOptionsSvc = service<IJobOptionsSvc>("JobOptionsSvc");
auto configured_components = jobOptionsSvc->getClients();
for (const auto& name : configured_components) {
auto properties = jobOptionsSvc->getProperties(name);
std::stringstream config_stream;
for (const auto& property : *properties) {
config_stream << name << " : " << property->name() << " = " << property->toString() << std::endl;
}
config_data.push_back(config_stream.str());
}
This works well enough, and an opts file like this:
ApplicationMgr.EvtMax = 2;
ApplicationMgr.EvtSel = "NONE";
ApplicationMgr.ExtSvc = ["FCCDataSvc/EventDataSvc"];
ApplicationMgr.OutputLevel = 3;
ApplicationMgr.TopAlg = ["GenAlg/Pythia8", "HepMCToEDMConverter/HepMCToEDMConverter", "GenParticleFilter/StableParticles", "PodioOutput/out"];
HepMCToEDMConverter.genparticles = DataObjectHandleBase("GenParticles");
HepMCToEDMConverter.genvertices = DataObjectHandleBase("GenVertices");
HepMCToEDMConverter.hepmcStatusList = [];
Pythia8.HepMCMergeTool = "HepMCSimpleMerge/HepMCMergeTool";
Pythia8.PileUpProvider = "MomentumRangeParticleGun/HepMCProviderTool";
Pythia8.PileUpTool = "ConstPileUp/PileUpTool";
Pythia8.SignalProvider = "PythiaInterface/PythiaInterface";
Pythia8.VertexSmearingTool = "GaussSmearVertex/GaussSmearVertex";
Pythia8.GaussSmearVertex.tVertexSigma = 0.18;
Pythia8.GaussSmearVertex.xVertexSigma = 0.5;
Pythia8.GaussSmearVertex.yVertexSigma = 0.5;
Pythia8.GaussSmearVertex.zVertexSigma = 40.0;
Pythia8.PythiaInterface.Filename = "Generation/data/Pythia_standard.cmd";
Pythia8.PythiaInterface.VertexSmearingTool = "";
StableParticles.allGenParticles = DataObjectHandleBase("GenParticles");
StableParticles.filteredGenParticles = DataObjectHandleBase("GenpParticlesStable");
ToolSvc.GaussSmearVertex.tVertexSigma = 0.18;
ToolSvc.GaussSmearVertex.xVertexSigma = 0.5;
ToolSvc.GaussSmearVertex.yVertexSigma = 0.5;
ToolSvc.GaussSmearVertex.zVertexSigma = 40.0;
ToolSvc.PythiaInterface.Filename = "Generation/data/Pythia_standard.cmd";
ToolSvc.PythiaInterface.VertexSmearingTool = "";
out.OutputLevel = 2;
gives an output like this:
HepMCToEDMConverter : genparticles = GenParticles
HepMCToEDMConverter : genvertices = GenVertices
HepMCToEDMConverter : hepmcStatusList = []
Pythia8 : HepMCMergeTool = HepMCSimpleMerge/HepMCMergeTool
Pythia8 : PileUpProvider = MomentumRangeParticleGun/HepMCProviderTool
Pythia8 : PileUpTool = ConstPileUp/PileUpTool
Pythia8 : SignalProvider = PythiaInterface/PythiaInterface
Pythia8 : VertexSmearingTool = GaussSmearVertex/GaussSmearVertex
Pythia8.GaussSmearVertex : tVertexSigma = 0.18
Pythia8.GaussSmearVertex : xVertexSigma = 0.5
Pythia8.GaussSmearVertex : yVertexSigma = 0.5
Pythia8.GaussSmearVertex : zVertexSigma = 40.0
Pythia8.PythiaInterface : Filename = Generation/data/Pythia_standard.cmd
Pythia8.PythiaInterface : VertexSmearingTool =
StableParticles : allGenParticles = GenParticles
StableParticles : filteredGenParticles = GenpParticlesStable
ToolSvc.GaussSmearVertex : tVertexSigma = 0.18
ToolSvc.GaussSmearVertex : xVertexSigma = 0.5
ToolSvc.GaussSmearVertex : yVertexSigma = 0.5
ToolSvc.GaussSmearVertex : zVertexSigma = 40.0
ToolSvc.PythiaInterface : Filename = Generation/data/Pythia_standard.cmd
ToolSvc.PythiaInterface : VertexSmearingTool =
out : OutputLevel = 2
However, this does not output any properties set for the ApplicationMgr, which crucially holds the names/types of algorithms. Is it necessary to get those properties from the ApplicationMgr/AlgorithmManager directly?