From c71bff372f2db57bb22d2ae7d3a9dcb9f5144e49 Mon Sep 17 00:00:00 2001 From: klendathu2k Date: Fri, 18 Nov 2022 11:21:51 -0500 Subject: [PATCH] Cling appears to have problems with using ProcessLine to get a pointer to a maker, and then call configuration methods. Refactor to use maker attributes, and set configuration options at initialization time. --- StRoot/StBFChain/StBFChain.cxx | 12 ++++++------ StRoot/StStrangeMuDstMaker/StStrangeMuDstMaker.cxx | 5 +++++ 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/StRoot/StBFChain/StBFChain.cxx b/StRoot/StBFChain/StBFChain.cxx index 6efb7623ef5..32e7e87e828 100644 --- a/StRoot/StBFChain/StBFChain.cxx +++ b/StRoot/StBFChain/StBFChain.cxx @@ -638,12 +638,12 @@ Int_t StBFChain::Instantiate() } if (maker == "StStrangeMuDstMaker" && GetOption("CMuDST")&& GetOption("StrngMuDST") ) { - TString cmd(Form("StStrangeMuDstMaker *pSMMk = (StStrangeMuDstMaker*) %p;",mk)); - cmd += "pSMMk->DoV0();"; // Set StrangeMuDstMaker parameters - cmd += "pSMMk->DoXi();"; - cmd += "pSMMk->DoKink();"; - cmd += "pSMMk->SetNoKeep();"; // Set flag for output OFF - ProcessLine(cmd); + + mk -> SetAttr( "DoV0", 1 ); + mk -> SetAttr( "DoXi", 1 ); + mk -> SetAttr( "DoKink", 1 ); + mk -> SetAttr( "SetNoKeep", 1 ); + } // Alex requested an option (not turned by default) to disable all diff --git a/StRoot/StStrangeMuDstMaker/StStrangeMuDstMaker.cxx b/StRoot/StStrangeMuDstMaker/StStrangeMuDstMaker.cxx index a1ac062f3db..a7f5de314e1 100755 --- a/StRoot/StStrangeMuDstMaker/StStrangeMuDstMaker.cxx +++ b/StRoot/StStrangeMuDstMaker/StStrangeMuDstMaker.cxx @@ -90,6 +90,11 @@ StStrangeMuDstMaker::~StStrangeMuDstMaker() { //_____________________________________________________________________________ Int_t StStrangeMuDstMaker::Init() { + if ( 1 == IAttr( "DoV0" ) ) DoV0(); + if ( 1 == IAttr( "DoXi" ) ) DoXi(); + if ( 1 == IAttr( "DoKink" ) ) DoKink(); + if ( 1 == IAttr( "SetNoKeep" ) ) SetNoKeep(); + abortEvent = kFALSE; firstEvent = kTRUE; if (Debug()) gMessMgr->Debug() << "In StStrangeMuDstMaker::Init() ... "