Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • rrabadan/LHCb
  • talin/LHCb
  • imjelde/LHCb
  • mstahl/LHCb
  • padeken/LHCb
  • mimazure/LHCb
  • roiser/LHCb
  • conrad/LHCb
  • kklimasz/LHCb
  • rcurrie/LHCb
  • wkrzemie/LHCb
  • fkeizer/LHCb
  • valassi/LHCb
  • hschrein/LHCb
  • anstahll/LHCb
  • jonrob/LHCb
  • graven/LHCb
  • clemenci/LHCb
  • chaen/LHCb
  • sstahl/LHCb
  • lhcb/LHCb
21 results
Show changes
Commits on Source (8)
......@@ -224,13 +224,11 @@ inline void FTReadoutMap::readFile1( const Gaudi::Algorithm* parent, const YAML:
m_sourceIDs.clear();
m_sourceIDs.reserve( sourceIDs.size() );
#ifdef USE_DD4HEP
// Warding against possibilities that no bank is activated.
// If no TELL40 sources are defined, this must mean that conditions are old.
// We can't do anything but enable all links for all sources.
bool ignore = std::none_of( sourceIDs.begin(), sourceIDs.end(),
[&]( auto const& id ) { return deLHCb.tell40links( id ).has_value(); } );
if ( ignore )
parent->warning() << "No SourceID activated for this run. This may mean that conditions are too old to support "
"automatic link/bank deactivation. Activating all banks/links."
<< endmsg;
const auto activatedBank = [&deLHCb, &ignore]( int sourceID ) {
return ( ignore || deLHCb.tell40links( sourceID ).has_value() );
};
......
......@@ -18,8 +18,8 @@
namespace LHCb {
class SelectViewForHltSourceID : public Algorithm::Transformer<RawBank::View( RawBank::View const& )> {
Gaudi::Property<LHCb::Hlt::DAQ::SourceID> m_source_id{this, "SourceID", LHCb::Hlt::DAQ::SourceID::Hlt1};
mutable Gaudi::Accumulators::Counter<> m_selected_banks{this, "Number of selected banks"};
Gaudi::Property<LHCb::Hlt::DAQ::SourceID> m_source_id{this, "SourceID", LHCb::Hlt::DAQ::SourceID::Hlt1};
mutable Gaudi::Accumulators::BinomialCounter<> m_selected_banks{this, "Number of selected banks"};
public:
SelectViewForHltSourceID( const std::string& name, ISvcLocator* locator )
......@@ -36,7 +36,7 @@ namespace LHCb {
}
}
m_selected_banks += count;
auto selection = input_view.subspan( offset, count );
auto selection = ( offset >= 0 ) ? input_view.subspan( offset, count ) : RawBank::View{};
return selection;
}
};
......
......@@ -2699,22 +2699,26 @@ constexpr int align_size( int n ) { return ( n / 16 + 1 ) * 16; }
// Maths :
template <typename T>
inline auto faster_atan2( T y, T x ) { // error < 0.07 rad, no 0/0 security
const T c1 = M_PI / 4.0;
const T c2 = 3.0 * M_PI / 4.0;
T abs_y = abs( y );
T x_plus_y = x + abs_y;
T x_sub_y = x - abs_y;
T y_sub_x = abs_y - x;
T nom = signselect( x, x_sub_y, x_plus_y );
T den = signselect( x, x_plus_y, y_sub_x );
T r = nom / den;
T angle = signselect( x, c1, c2 ) - c1 * r;
inline auto atan_approx( T x ) {
const T a1 = 0.99997726f;
const T a3 = -0.33262347f;
const T a5 = 0.19354346f;
const T a7 = -0.11643287f;
const T a9 = 0.05265332f;
const T a11 = -0.01172120f;
const auto x_sq = x * x;
return x * ( a1 + x_sq * ( a3 + x_sq * ( a5 + x_sq * ( a7 + x_sq * ( a9 + x_sq * a11 ) ) ) ) );
}
return copysign( angle, y );
template <typename T>
inline auto faster_atan2( T y, T x ) { // adapted from https://mazzo.li/posts/vectorized-atan2.html
auto swap = abs( x ) < abs( y );
auto atan_input = select( swap, x, y ) / select( swap, y, x );
auto res = atan_approx( atan_input );
const T PI_2 = M_PI_2;
const T PI = M_PI;
res = select( swap, copysign( PI_2, atan_input ) - res, res );
return select( x < 0, copysign( PI, y ) + res, res );
}
template <typename T>
......
......@@ -92,7 +92,7 @@ Implicit in the control flow is the *data flow*. Notice above that we don't
specify that the reconstruction should run, even though we need the
reconstruction to run the PV filters!
In brief, satisfying data dependencies is the job of `the scheduler`_,
In brief, satisfying data dependencies is the job of the scheduler,
``HLTControlFlowMgr``. When the scheduler needs to run an algorithm, it takes
care of running the algorithms in the data dependency tree. (It's clever
enough to not run the same algorithm multiple times, in case it appears in
......@@ -115,8 +115,6 @@ enum is used to specify how child decisions should be combined, ``AND`` or
.. autoclass:: PyConf.control_flow.CompositeNode
:members:
.. _the scheduler: https://lhcb-doxygen.web.cern.ch/lhcb-doxygen/moore/latest/de/d00/class_h_l_t_control_flow_mgr.html
"""
from __future__ import absolute_import, division, print_function
......