General purpose sorter of fit results.
More...
#include <JEvtToolkit.hh>
|
| | JQualitySorter () |
| | Default constructor.
|
| |
| JReturn_t | operator() (Args... args) const |
| | Function operation.
|
| |
| bool | is_valid () const |
| | Check validity of function.
|
| |
| void | reset () |
| | Reset function adaptor helper.
|
| |
| void | set (__pF__ pf) |
| | Set function.
|
| |
| void | get (const char *symbol) |
| | Get function with given name according to specific protocol.
|
| |
| bool | is_open () const |
| | Check if shared library file is open.
|
| |
| void | open (const char *file_name) |
| | Open file.
|
| |
| void | close () |
| | Close file.
|
| |
| void | load (const std::string &libso, const std::string &symbol) |
| | Load function from shared library.
|
| |
| void | reload () |
| | Reload function from shared library.
|
| |
| void | initialise () |
| | Initialise counter.
|
| |
| void | attach (const JSharedCounter &object) |
| | Attach this counter to given shared counter object.
|
| |
| bool | detach () |
| | Detach.
|
| |
| const int | getCount () |
| | Get count.
|
| |
|
| static const char | SEPARATOR = ':' |
| | Separation character between library file name and function name.
|
| |
General purpose sorter of fit results.
The default constructor will sort fit results according the method JRECONSTRUCTION::qualitySorter.
A different method can dynamically be loaded from a (shared) library using class JEEP::JFunctionAdaptor. For the definition of an alternative method, see e.g. quality_sorter.cc
Definition at line 424 of file JReconstruction/JEvtToolkit.hh.
◆ function_adaptor_type
◆ pF
◆ JQualitySorter()
| JRECONSTRUCTION::JQualitySorter::JQualitySorter |
( |
| ) |
|
|
inline |
Default constructor.
Definition at line 434 of file JReconstruction/JEvtToolkit.hh.
434 :
436 {}
bool qualitySorter(const JFit &first, const JFit &second)
Comparison of fit results.
JFunctionAdaptor< bool, const JFit &, const JFit & > function_adaptor_type
◆ operator()()
template<class JReturn_t = void, class ... Args>
◆ is_valid()
Check validity of function.
- Returns
- true if valid function; else false
Definition at line 56 of file JFunctionAdaptor.hh.
◆ reset()
◆ set()
Set function.
- Parameters
-
Definition at line 80 of file JFunctionAdaptor.hh.
81 {
83
85 }
void reset()
Reset function adaptor helper.
◆ get()
Get function with given name according to specific protocol.
- Parameters
-
Definition at line 93 of file JFunctionAdaptor.hh.
94 {
96
98
99 dlerror();
100
102
103 const char* error = dlerror();
104
105 if (error != NULL) {
106 THROW(JFileReadException, error);
107 }
108
109 } else {
110
111 THROW(JFileReadException,
"Invalid handle.");
112 }
113 }
#define THROW(JException_t, A)
Marco for throwing exception with std::ostream compatible message.
◆ is_open()
Check if shared library file is open.
- Returns
- true if open; else false
Definition at line 121 of file JFunctionAdaptor.hh.
◆ open()
Open file.
- Parameters
-
Definition at line 132 of file JFunctionAdaptor.hh.
133 {
135
136 handle = dlopen(file_name, RTLD_LOCAL | RTLD_LAZY);
137
139 THROW(JFileOpenException, dlerror());
140 }
141
143 }
void initialise()
Initialise counter.
◆ close()
Close file.
Note that the file should remain open as long as the library function is used.
Definition at line 151 of file JFunctionAdaptor.hh.
◆ load()
Load function from shared library.
- Parameters
-
| libso | file name |
| symbol | function name |
Definition at line 168 of file JFunctionAdaptor.hh.
169 {
172
174 }
void reload()
Reload function from shared library.
◆ reload()
Reload function from shared library.
Definition at line 180 of file JFunctionAdaptor.hh.
181 {
183
185 }
void get(const char *symbol)
Get function with given name according to specific protocol.
void open(const char *file_name)
Open file.
◆ initialise()
| void JLANG::JSharedCounter::initialise |
( |
| ) |
|
|
inlineinherited |
◆ attach()
Attach this counter to given shared counter object.
- Parameters
-
Definition at line 46 of file JSharedCounter.hh.
47 {
49
51
53 ++(*counter);
54 }
55 }
◆ detach()
| bool JLANG::JSharedCounter::detach |
( |
| ) |
|
|
inlineinherited |
Detach.
- Returns
- true if counter at zero; else false
Definition at line 63 of file JSharedCounter.hh.
64 {
66
68
70
72
73 return true;
74 }
75
77 }
78
79 return false;
80 }
◆ getCount()
| const int JLANG::JSharedCounter::getCount |
( |
| ) |
|
|
inlineinherited |
◆ SEPARATOR
Separation character between library file name and function name.
Definition at line 39 of file JFunctionAdaptor.hh.
◆ handle
◆ function
◆ libso
◆ symbol
◆ counter
| int* JLANG::JSharedCounter::counter |
|
protectedinherited |
The documentation for this struct was generated from the following file: