|
| Filter (const RangeType &range, const bool &enable) |
| Constructor.
|
|
| Filter ()=default |
| Empty constructor.
|
|
template<typename ... argsType> |
std::enable_if< all_same< argumentType, argsType... >::value, bool >::type | accept (const argsType &... args) const |
| The accept method of the activatable filter: All the real computations are occuring in this method.
|
|
std::string | getNameAndReference (std::vector< std::pair< char, void * > > *pointers=nullptr) |
| Getter for name of and reference to the range of the filters.
|
|
RangeType | getRange (void) const |
| Getter of the range.
|
|
void | persist (TTree *t, const std::string &branchName) |
| Persist the range on a TTree.
|
|
void | setBranchAddress (TTree *t, const std::string &branchName) |
| Set the Branches addresses to this filter.
|
|
Filter< Variable, RangeType, BypassableFilter, Observer > | bypass (const bool &bypassVariable=false) |
| This method creates a new bypassable Filter with the same range of *this E.g.:
|
|
Filter< Variable, RangeType, ActivatableFilter, Observer > | enable (const bool &enableVariable=true) |
| Create a new activatable filter.
|
|
template<class otherObserver > |
Filter< Variable, RangeType, otherObserver > | observeLeaf (const otherObserver &) const |
| Function to observer of a filter.
|
|
template<class Variable, class RangeType, class
Observer>
class Belle2::Filter< Variable, RangeType, Belle2::ActivatableFilter, Observer >
Activatable Filter /// TODO: Remove, as it is no longer used...?
Extended implementation of the Filter tools, adding a boolean to activate the filter. An external bool variable enables or disables the Filter. E.g.:
#include <tracking/trackFindingVXD/filterMap/filterFramework/SelectionVariable.h>
#include <tracking/trackFindingVXD/filterMap/filterFramework/UpperBoundedSet.h>
#include <tracking/trackFindingVXD/filterMap/filterFramework/Filter.h>
struct spacePoint{ float x; float y; float z; };
value(const TSpacePoint & p1, const TSpacePoint &p2){
return pow(p1.x - p2.x, 2) + pow(p1.y - p2.y, 2);
}
};
Filter<Distance3D, UpperBoundedSet, ActivatableFilter, VoidObserver>
spacePoint a( {0,0,0} ), b( {10,0,0} );
cout <<
filter.accept(a,b) << endl;
cout <<
filter.accept(a,b) << endl;
Filter< Variable, RangeType, ActivatableFilter, Observer > enable(const bool &enableVariable=true)
Create a new activatable filter.
Base class of the selection variable objects used for pair filtering.
std::map< ExpRun, std::pair< double, double > > filter(const std::map< ExpRun, std::pair< double, double > > &runs, double cut, std::map< ExpRun, std::pair< double, double > > &runsRemoved)
filter events to remove runs shorter than cut, it stores removed runs in runsRemoved
will produce: true false
The Variable class will provide the static method value x( arg1, arg2) The RangeType object will provide the method contains to decide if x(arg1, arg2) is good The Observer will be notified of the actions via its static method notify
Definition at line 412 of file Filter.h.