Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Instrument Control
NomadSpecialModules
Commits
26f515db
Commit
26f515db
authored
Dec 15, 2017
by
cyclops
Browse files
Merge branch 'master' of
https://code.ill.fr/instrument-control/nomad-special-modules.git
parents
d33af0b4
70cb400f
Changes
11
Expand all
Hide whitespace changes
Inline
Side-by-side
ChangeLog
View file @
26f515db
* Add virtual inheritance for base classes *Properties in Count (TimeCountProperties, KineticCountProperties...). That implied to add init function and empty constructor in some classes.
\ No newline at end of file
build.sh
View file @
26f515db
...
...
@@ -24,12 +24,4 @@ automake --gnu --add-missing
export
CXXFLAGS
=
"
$CXXFLAGS
-Wall -Wconversion -O2 -g -pthread"
cd
build
if
[
-d
"/usr/local/src/boost"
]
then
# SUSE
../configure
--prefix
=
$NOMAD_HOME
/mod
--with-boost
=
"/usr/local/src/boost"
LIBS
=
-lboost_system
else
../configure
--prefix
=
$NOMAD_HOME
/mod
fi
configure.ac
View file @
26f515db
...
...
@@ -18,6 +18,8 @@ AC_PROG_LIBTOOL
AC_CONFIG_MACRO_DIR([m4])
AX_CXX_COMPILE_STDCXX_11([noext], [mandatory])
AX_BOOST_BASE([1.41],, [AC_MSG_ERROR([Boost 1.41 required])])
AX_BOOST_DATE_TIME
AX_BOOST_SYSTEM
...
...
@@ -28,8 +30,7 @@ AX_BOOST_THREAD
AX_BOOST_UNIT_TEST_FRAMEWORK
AC_QT4
NOMAD_CXXFLAGS="$BOOST_CPPFLAGS"
NOMAD_CXXFLAGS="-DBOOST_NO_CXX11_SCOPED_ENUMS $BOOST_CPPFLAGS"
NOMAD_LDFLAGS="$BOOST_LDFLAGS"
NOMAD_LIBS="$BOOST_DATE_TIME_LIB \
...
...
m4/ax_cxx_compile_stdcxx.m4
0 → 100644
View file @
26f515db
This diff is collapsed.
Click to expand it.
m4/ax_cxx_compile_stdcxx_11.m4
0 → 100644
View file @
26f515db
# =============================================================================
# https://www.gnu.org/software/autoconf-archive/ax_cxx_compile_stdcxx_11.html
# =============================================================================
#
# SYNOPSIS
#
# AX_CXX_COMPILE_STDCXX_11([ext|noext], [mandatory|optional])
#
# DESCRIPTION
#
# Check for baseline language coverage in the compiler for the C++11
# standard; if necessary, add switches to CXX and CXXCPP to enable
# support.
#
# This macro is a convenience alias for calling the AX_CXX_COMPILE_STDCXX
# macro with the version set to C++11. The two optional arguments are
# forwarded literally as the second and third argument respectively.
# Please see the documentation for the AX_CXX_COMPILE_STDCXX macro for
# more information. If you want to use this macro, you also need to
# download the ax_cxx_compile_stdcxx.m4 file.
#
# LICENSE
#
# Copyright (c) 2008 Benjamin Kosnik <bkoz@redhat.com>
# Copyright (c) 2012 Zack Weinberg <zackw@panix.com>
# Copyright (c) 2013 Roy Stogner <roystgnr@ices.utexas.edu>
# Copyright (c) 2014, 2015 Google Inc.; contributed by Alexey Sokolov <sokolov@google.com>
# Copyright (c) 2015 Paul Norman <penorman@mac.com>
# Copyright (c) 2015 Moritz Klammler <moritz@klammler.eu>
#
# Copying and distribution of this file, with or without modification, are
# permitted in any medium without royalty provided the copyright notice
# and this notice are preserved. This file is offered as-is, without any
# warranty.
#serial 18
AX_REQUIRE_DEFINED([AX_CXX_COMPILE_STDCXX])
AC_DEFUN([AX_CXX_COMPILE_STDCXX_11], [AX_CXX_COMPILE_STDCXX([11], [$1], [$2])])
src/controllers/dif/cyclops/CyclopsDataHeader.cpp
View file @
26f515db
...
...
@@ -32,7 +32,7 @@ const string CyclopsDataHeader::END = "*";
* Constructor
*/
CyclopsDataHeader
::
CyclopsDataHeader
(
const
string
&
name
)
:
utilities
::
Co
u
nt
Spy
(
name
)
{
Experiment
Cont
roller
(
name
)
{
setFamily
(
family
::
HIDDEN
);
...
...
@@ -40,6 +40,7 @@ CyclopsDataHeader::CyclopsDataHeader(const string& name) :
m_CamDriver
.
init
(
this
,
"cammeraDriver"
);
m_Title
.
init
(
this
,
"title"
);
m_CountSpy
.
init
(
this
,
"count_spy"
);
m_SampleSettings
.
init
(
this
,
"sample_settings"
);
m_ScanInfo
.
init
(
this
,
"scan_info"
);
m_CyclopsSetting
.
init
(
this
,
"cyclops_setting"
);
...
...
@@ -66,30 +67,17 @@ CyclopsDataHeader::~CyclopsDataHeader() {
* postConfiguration
*/
void
CyclopsDataHeader
::
postConfiguration
()
{
utilities
::
CountSpy
::
postConfiguration
(
);
registerUpdater
(
m_CountSpy
->
statusMessage
,
&
CyclopsDataHeader
::
updateStatusMessage
,
this
);
}
/*
* updateProperty
*/
void
CyclopsDataHeader
::
updateProperty
(
ChangeAspect
*
aChangeAspect
)
{
string
propertyName
=
aChangeAspect
->
getStringParam
();
string
controllername
=
aChangeAspect
->
getControllerName
();
int32
i
;
for
(
i
=
0
;
i
<
(
int32
)
m_CountControllers
.
size
();
++
i
)
{
if
(
m_CountControllers
[
i
]
->
getName
()
==
controllername
)
{
break
;
}
}
if
(
i
<
(
int32
)
m_CountControllers
.
size
())
{
if
(
propertyName
==
statusMessage
.
getName
())
{
boost
::
any
propvalue
=
dynamic_cast
<
AbstractController
*>
(
m_CountControllers
[
i
])
->
getValue
(
propertyName
);
if
(
any_cast
<
string
>
(
propvalue
)
==
"Writing parameters"
)
{
createHeader
();
}
}
void
CyclopsDataHeader
::
updateStatusMessage
()
{
if
(
m_CountSpy
->
statusMessage
()
==
"Writing parameters"
)
{
createHeader
();
}
utilities
::
CountSpy
::
updateProperty
(
aChangeAspect
);
}
/*
...
...
@@ -115,7 +103,7 @@ void CyclopsDataHeader::createHeader() {
create_i
(
header
,
"nbang"
,
m_ScanInfo
->
nbController
(),
0
);
create_i
(
header
,
"nkmes"
,
m_ScanInfo
->
nbStep
(),
0
);
create_i
(
header
,
"npmes"
,
m_ScanInfo
->
actualStep
(),
0
);
create_i
(
header
,
"jcode"
,
modeint
(),
0
);
create_i
(
header
,
"jcode"
,
m_CountSpy
->
modeint
(),
0
);
create_i
(
header
,
"count"
,
0
,
0
);
create_i
(
header
,
"gain"
,
m_CyclopsSetting
->
gain
(),
0
);
create_i
(
header
,
"mode"
,
m_CyclopsSetting
->
mode
(),
0
);
...
...
src/controllers/dif/cyclops/CyclopsDataHeader.h
View file @
26f515db
...
...
@@ -41,7 +41,7 @@ namespace cyclops {
* \class cyclops data server path setiing
* \brief Configure data path and name for cyclops data server
*/
class
CyclopsDataHeader
:
public
utilities
::
Co
u
nt
Spy
{
class
CyclopsDataHeader
:
public
Experiment
Cont
roller
{
public:
...
...
@@ -59,12 +59,6 @@ public:
*/
virtual
~
CyclopsDataHeader
();
virtual
void
updateProperty
(
ChangeAspect
*
aChangeAspect
);
/*!
* Properties
*/
private:
/*!
...
...
@@ -73,8 +67,11 @@ private:
*/
virtual
void
postConfiguration
();
void
updateStatusMessage
();
DriverPtr
<
psl
::
PslDriver
>
m_CamDriver
;
ControllerPtr
<
acquisition
::
ExperimentData
>
m_Title
;
ControllerPtr
<
utilities
::
CountSpy
>
m_CountSpy
;
ControllerPtr
<
sample_environment
::
SampleSettings
>
m_SampleSettings
;
ControllerPtr
<
scan
::
ScanInfo
>
m_ScanInfo
;
ControllerPtr
<
CyclopsSetting
>
m_CyclopsSetting
;
...
...
src/controllers/lss/d22special/gui/nomadd22gui.jar
View file @
26f515db
No preview for this file type
src/controllers/npp/CAENAdcController.cpp
View file @
26f515db
...
...
@@ -32,7 +32,11 @@ const string CAENAdcController::TYPE = "adc_controller";
/*
* Constructor
*/
CAENAdcController
::
CAENAdcController
(
const
string
&
name
)
:
ExperimentController
(
name
),
ClearData
(
this
),
acquisition
::
ListModeProperties
(
this
)
{
CAENAdcController
::
CAENAdcController
(
const
string
&
name
)
{
ExperimentController
::
init
(
name
);
acquisition
::
ListModeProperties
::
init
(
name
);
ClearData
::
init
(
this
);
setFamily
(
family
::
ACQUISITION
,
family
::
SETTING
);
...
...
src/controllers/npp/CAENAdcController.h
View file @
26f515db
...
...
@@ -33,6 +33,12 @@ public:
ClearData
(
ExperimentController
*
c
)
:
controller
::
Command
(
c
,
"clearData"
,
&
ClearData
::
clearData
,
this
)
{
}
ClearData
()
:
controller
::
Command
()
{
}
void
init
(
ExperimentController
*
c
)
{
controller
::
Command
::
init
(
c
,
"clearData"
,
&
ClearData
::
clearData
,
this
);
}
virtual
void
clearData
()
=
0
;
void
clearDataCommand
(
bool
logging
=
false
)
{
...
...
@@ -54,7 +60,7 @@ public:
*/
class
CAENAdcController
:
public
ExperimentController
,
public
ClearData
,
public
acquisition
::
ListModeProperties
{
class
CAENAdcController
:
public
virtual
ExperimentController
,
public
ClearData
,
public
acquisition
::
ListModeProperties
{
public:
...
...
src/drivers/stereo_elec/RealStereoElecDriver.cpp
View file @
26f515db
...
...
@@ -196,11 +196,6 @@ void RealStereoElecDriver::qtLoop() {
}
}
else
if
(
*
command
==
STOP_COMMAND
)
{
//read scalers a last time to have a better estimation of T1 accepted
unsigned
int
accepted_cnt
,
rejected_cnt
,
fifo_rejected_cnt
;
long
elapsedtime
;
daq
->
QtAcqLoopCounter
(
accepted_cnt
,
rejected_cnt
,
fifo_rejected_cnt
,
false
,
scalers
,
elapsedtime
);
cout
<<
dec
<<
"T1 accepted "
<<
accepted_cnt
<<
" T1 rejected "
<<
rejected_cnt
<<
" Fifo rejected "
<<
fifo_rejected_cnt
<<
" T2 accepted "
<<
owner
()
->
nbevent
<<
endl
;
daq
->
DoStop
();
cout
<<
"DoStop ok"
<<
endl
;
daq
->
DoSave
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment