Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
ControlSystemAdapter-DoocsAdapter
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ChimeraTK Mirror
ControlSystemAdapter-DoocsAdapter
Commits
6e01279e
Commit
6e01279e
authored
4 years ago
by
Martin Killenberg
Browse files
Options
Downloads
Patches
Plain Diff
IFFF: added processIfff and IfffDescription. Still not working becasue it's not in the factory yet
parent
5b54aa11
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
include/PropertyDescription.h
+20
-13
20 additions, 13 deletions
include/PropertyDescription.h
include/VariableMapper.h
+1
-0
1 addition, 0 deletions
include/VariableMapper.h
src/VariableMapper.cc
+26
-2
26 additions, 2 deletions
src/VariableMapper.cc
with
47 additions
and
15 deletions
include/PropertyDescription.h
+
20
−
13
View file @
6e01279e
...
...
@@ -107,19 +107,6 @@ namespace ChimeraTK {
}
};
// struct SpectrumDescription:
// public PropertyDescription, public PropertyAttributes{
// float xStart;
// float xIncrement;
// ChimeraTK::RegisterPath mainSource;
// ChimeraTK::RegisterPath xStartSource;
// ChimeraTK::RegisterPath xIncrementSource;
// SpectrumDescription(float start_=0.0, float increment_=1.0)
// : start(start_), increment(increment_){}
// bool operator==(SpectrumDescription const & other) const{
// return start==other.start && increment==other.increment;
// }
// };
/********************************************************************************************************************/
struct
XyDescription
:
public
PropertyDescription
,
public
PropertyAttributes
{
...
...
@@ -149,6 +136,26 @@ namespace ChimeraTK {
/********************************************************************************************************************/
struct
IfffDescription
:
public
PropertyDescription
,
public
PropertyAttributes
{
ChimeraTK
::
RegisterPath
i1Source
;
ChimeraTK
::
RegisterPath
f1Source
,
f2Source
,
f3Source
;
IfffDescription
(
ChimeraTK
::
RegisterPath
const
&
i1Source_
=
""
,
ChimeraTK
::
RegisterPath
const
&
f1Source_
=
""
,
ChimeraTK
::
RegisterPath
const
&
f2Source_
=
""
,
ChimeraTK
::
RegisterPath
const
&
f3Source_
=
""
,
std
::
string
const
&
location_
=
""
,
std
::
string
const
&
name_
=
""
)
:
PropertyDescription
(
location_
,
name_
),
i1Source
(
i1Source_
),
f1Source
(
f1Source_
),
f2Source
(
f2Source_
),
f3Source
(
f3Source_
)
{}
const
std
::
type_info
&
type
()
const
override
{
return
typeid
(
IfffDescription
);
}
void
print
(
std
::
ostream
&
os
=
std
::
cout
)
const
override
{
os
<<
"i1: "
<<
i1Source
<<
", f1: "
<<
f1Source
<<
", f2: "
<<
f2Source
<<
", f3: "
<<
f3Source
<<
" -> "
<<
location
<<
" / "
<<
name
<<
std
::
endl
;
}
};
/********************************************************************************************************************/
// This is the per location information which are used as default for the
// properties in this location
struct
LocationInfo
:
public
PropertyAttributes
{
...
...
This diff is collapsed.
Click to expand it.
include/VariableMapper.h
+
1
−
0
View file @
6e01279e
...
...
@@ -67,6 +67,7 @@ namespace ChimeraTK {
void
processNode
(
xmlpp
::
Node
const
*
propertyNode
,
std
::
string
locationName
);
void
processSpectrumNode
(
xmlpp
::
Node
const
*
node
,
std
::
string
locationName
);
void
processXyNode
(
xmlpp
::
Node
const
*
node
,
std
::
string
&
locationName
);
void
processIfffNode
(
xmlpp
::
Node
const
*
node
,
std
::
string
&
locationName
);
void
processImportNode
(
xmlpp
::
Node
const
*
importNode
,
std
::
string
importLocationName
=
std
::
string
());
void
processCode
(
xmlpp
::
Element
const
*
location
,
std
::
string
locationName
);
...
...
This diff is collapsed.
Click to expand it.
src/VariableMapper.cc
+
26
−
2
View file @
6e01279e
...
...
@@ -77,6 +77,9 @@ namespace ChimeraTK {
else
if
(
node
->
get_name
()
==
"D_xy"
)
{
processXyNode
(
node
,
locationName
);
}
else
if
(
node
->
get_name
()
==
"D_ifff"
)
{
processIfffNode
(
node
,
locationName
);
}
else
{
throw
std
::
invalid_argument
(
std
::
string
(
"Error parsing xml file in location "
)
+
locationName
+
": Unknown node '"
+
node
->
get_name
()
+
"'"
);
...
...
@@ -315,6 +318,28 @@ namespace ChimeraTK {
addDescription
(
xyDescription
,
{
xAbsoluteSource
,
yAbsoluteSource
});
}
/********************************************************************************************************************/
void
VariableMapper
::
processIfffNode
(
xmlpp
::
Node
const
*
node
,
std
::
string
&
locationName
)
{
auto
ifffXml
=
asXmlElement
(
node
);
auto
i1Source
=
getAttributeValue
(
ifffXml
,
"i1_source"
);
auto
f1Source
=
getAttributeValue
(
ifffXml
,
"f1_source"
);
auto
f2Source
=
getAttributeValue
(
ifffXml
,
"f2_source"
);
auto
f3Source
=
getAttributeValue
(
ifffXml
,
"f3_source"
);
auto
name
=
getAttributeValue
(
ifffXml
,
"name"
);
std
::
list
<
std
::
string
>
absoluteSources
;
absoluteSources
.
push_back
(
getAbsoluteSource
(
i1Source
,
locationName
));
absoluteSources
.
push_back
(
getAbsoluteSource
(
f1Source
,
locationName
));
absoluteSources
.
push_back
(
getAbsoluteSource
(
f2Source
,
locationName
));
absoluteSources
.
push_back
(
getAbsoluteSource
(
f3Source
,
locationName
));
auto
ifffDescription
=
std
::
make_shared
<
IfffDescription
>
(
i1Source
,
f1Source
,
f2Source
,
f3Source
,
locationName
,
name
);
processHistoryAndWritableAttributes
(
ifffDescription
,
ifffXml
,
locationName
);
addDescription
(
ifffDescription
,
absoluteSources
);
}
/********************************************************************************************************************/
...
...
@@ -394,8 +419,7 @@ namespace ChimeraTK {
autoPropertyDescription
->
hasHistory
=
getHasHistoryDefault
(
locationName
);
autoPropertyDescription
->
isWriteable
=
getIsWriteableDefault
(
locationName
);
autoPropertyDescription
->
macroPulseNumberSource
=
getMacroPusleNumberSourceDefault
(
locationName
);
autoPropertyDescription
->
dataMatching
=
getDataMatchingDefault
(
locationName
);
autoPropertyDescription
->
dataMatching
=
getDataMatchingDefault
(
locationName
);
addDescription
(
autoPropertyDescription
,
{
processVariable
});
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment