.
h2. User defined properties should always take precedence : exemple with WindowMask
hi, I still have the feeling that this issue could have been mitigated in TriggerAlg. Let me know if I get it wrong here :
The current snippet is
/// Apply window mask. Only proceed if the window was opened / /// or any trigger bit was set if window open mask was not available.
/ *\**{*}if{*}*\** (m_applyWindowMask){
*\**{*}unsigned{*}*\** windowOpen=0;
*\**{*}if{*}*\** (m_pcounter){ /// using ConfigSvc
/ windowOpen=trigger_bits & tcf->windowParams()->windowMask();
}*\**{*}else{*}*\**{
windowOpen=trigger_bits&m_mask;
}
*\**{*}if{*}*\** ( \!windowOpen){
m_window_reject++;
setFilterPassed(false);
*\**{*}return{*}*\** sc;
}
}
m_pcounter is the pointer to the configuration service, and m_mask defaults to 0xffffffff, id est no mask applied. If I had been able to use m_mask to define the right mask to use, I could have been able to override the missing info from ConfigSvc. So, I think that a more flexible logic would be :
/// Apply window mask. Only proceed if the window was opened / /// or any trigger bit was set if window open mask was not available.
/ *\**{*}if{*}*\** (m_applyWindowMask){
*\**{*}unsigned{*}*\** windowOpen=0;
*\**{*}if{*}*\** (m_pcounter&&m_mask==0xffffffff){ /// using ConfigSvc
/ windowOpen=trigger_bits & tcf->windowParams()->windowMask();
}*\**{*}else{*}*\**{
windowOpen=trigger_bits&m_mask;
}
*\**{*}if{*}*\** ( \!windowOpen){
m_window_reject++;
setFilterPassed(false);
*return* sc;
}
}
1) ConfigSvc not available : m_mask is used
2) ConfigSvc available and mask is default pass_all : the user did not set a specific mask and the service is there, so rely on the service
3) ConfigSvc available but mask is not default : the user expresses an intent, as to what he/she wants to applied, so use his/her mask and not the one provided by ConfigSvc. |