#include <RegionSelectorBase.h>
Definition at line 16 of file RegionSelectorBase.h.
◆ RegionSelectorBase()
MuonCalib::RegionSelectorBase::RegionSelectorBase |
( |
| ) |
|
|
default |
◆ ~RegionSelectorBase()
virtual MuonCalib::RegionSelectorBase::~RegionSelectorBase |
( |
| ) |
|
|
virtualdefault |
◆ GetRegion()
◆ Print()
virtual void MuonCalib::RegionSelectorBase::Print |
( |
std::ostream & |
os | ) |
const |
|
pure virtual |
◆ print_position()
void MuonCalib::RegionSelectorBase::print_position |
( |
const std::string & |
input, |
|
|
const unsigned int & |
position, |
|
|
MsgStream * |
msgStr |
|
) |
| |
|
staticprivate |
◆ process_region()
std::unique_ptr< RegionSelectorBase > MuonCalib::RegionSelectorBase::process_region |
( |
const std::string & |
input, |
|
|
unsigned int & |
i, |
|
|
bool |
is_in_braces |
|
) |
| |
|
staticprivate |
Definition at line 18 of file RegionSelectorBase.cxx.
19 unsigned int start_sub(
i);
21 std::unique_ptr<RegionLogicalOperation> new_region = std::make_unique<RegionLogicalOperation>();
22 bool currect_inverse(
false);
33 element.push_back(
input[
i]);
34 if (
input[
i] ==
']')
break;
37 log << MSG::WARNING <<
"Missing ']' at end of input! Started here:" <<
endmsg;
41 std::unique_ptr<RegionElement> reg_el = std::make_unique<RegionElement>();
43 if (!reg_el->Initialize(element)) {
48 if (!new_region->AddRegion(std::move(reg_el), currect_inverse)) {
49 log << MSG::WARNING <<
"Missing operator!" <<
endmsg;
53 currect_inverse =
false;
60 log << MSG::WARNING <<
"'(' at end of input!" <<
endmsg;
65 if (!second_region) {
return nullptr; }
66 if (!new_region->AddRegion(std::move(second_region), currect_inverse)) {
67 log << MSG::WARNING <<
"Missing operator!" <<
endmsg;
71 currect_inverse =
false;
76 if (currect_inverse) {
77 log << MSG::WARNING <<
"Surplus '!'" <<
endmsg;
81 currect_inverse =
true;
87 bool next_op(
input[
i] ==
'|');
88 if (!new_region->AddOperator(next_op)) {
89 log << MSG::WARNING <<
"Unexpected operator!" <<
endmsg;
97 if (new_region->SurplusOperator()) {
98 log << MSG::WARNING <<
"Surplus operator" <<
endmsg;
102 if (is_in_braces) {
return new_region; }
103 log << MSG::WARNING <<
"Unexpected ')'" <<
endmsg;
114 log << MSG::WARNING <<
"Syntax Error" <<
endmsg;
121 log << MSG::WARNING <<
"Missing ')'" <<
endmsg;
125 if (new_region->SurplusOperator()) {
126 log << MSG::WARNING <<
"Surplus operator" <<
endmsg;
◆ Result()
virtual bool MuonCalib::RegionSelectorBase::Result |
( |
const MuonFixedId & |
region | ) |
const |
|
pure virtual |
The documentation for this class was generated from the following files: