Belle II Software  release-08-01-10
CellHolder.h
1 /**************************************************************************
2  * basf2 (Belle II Analysis Software Framework) *
3  * Author: The Belle II Collaboration *
4  * *
5  * See git log for contributors and copyright holders. *
6  * This file is licensed under LGPL-3.0, see LICENSE.md. *
7  **************************************************************************/
8 #pragma once
9 
10 #include <tracking/trackFindingCDC/utilities/IsApplicable.h>
11 
12 namespace Belle2 {
17  namespace TrackFindingCDC {
18  class AutomatonCell;
19 
23  template<class T, class SFINAE = decltype(&T::getAutomatonCell)>
25  {
26  return t.getAutomatonCell();
27  }
28  };
29 
36  template <class T>
37  constexpr bool isCellHolder()
38  {
39  return isApplicable<GetAutomatonCell, T&>();
40  }
41 
43  template <class T>
44  void static_assert_isCellHolder()
45  {
46  static_assert(isCellHolder<T>(), "Template argument must support the CellHolder concept, "
47  "i.e. it must support cellHolder.getAutomatonCell()");
48  }
49  }
51 }
Cell used by the cellular automata.
Definition: AutomatonCell.h:29
Abstract base class for different kinds of events.
Getter functor for the automaton cell of an object.
Definition: CellHolder.h:21
AutomatonCell & operator()(T &t)
Returns the automaton cell of an object.
Definition: CellHolder.h:24