Commit b2b3f0d5 authored by legoc's avatar legoc
Browse files

Replaced auto_ptr by unique_ptr and removed Zero block output

parent 7d44a922
This diff is collapsed.
......@@ -15,6 +15,8 @@ AC_LANG(C++)
AC_PROG_LIBTOOL
AC_CONFIG_MACRO_DIR([m4])
AX_CXX_COMPILE_STDCXX_11([noext], [mandatory])
AC_ARG_ENABLE(nomad,
[ --enable-nomad compile Nomad applications],
[case "${enableval}" in
......
dnl
dnl AC_CXX_CLEAN_TEMPLATE_REPOSITORY
dnl
dnl Description
dnl
dnl Sometime failed C++ compiles can leave trash in the template repository.
dnl Just clean them all away.
dnl
dnl Copyright (C) 2003, Alex Tingle <alex.autoconf@firetree.net>
dnl
dnl License:
dnl GNU General Public License
dnl [http://www.gnu.org/software/ac-archive/htmldoc/COPYING.html]
dnl with this special exception
dnl [http://www.gnu.org/software/ac-archive/htmldoc/COPYING-Exception.html].
dnl
AC_DEFUN([AC_CXX_CLEAN_TEMPLATE_REPOSITORY],[
# Sometime failed C++ compiles can leave trash in the template repository.
# Just clean them all away.
rm -rf ./SunWS_cache # Solaris/CC
rm -rf ./.cxx_repository # Tru64/cxx
# ...add more here.
])
This diff is collapsed.
# =============================================================================
# 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])])
......@@ -105,9 +105,10 @@ void Check::processEvent(Event const & event) {
} else {
if (_onZeroBlock) {
if (_zeroCounter > 1) {
cout << "Zero block with " << _zeroCounter << " elements" << endl;
}
// Do not print the zero blocks as it is confusing.
// if (_zeroCounter > 1) {
// cout << "Zero block with " << _zeroCounter << " elements" << endl;
// }
_onZeroBlock = false;
_zeroCounter = 0;
......
......@@ -122,17 +122,17 @@ int main(int argc, char * argv[]) {
log << "analyzing " << numor << ", dT " << dT << ", clean dT " << cleanDT << ", max blocks " << maxBlocks << ", block size " << BUFFER_SIZE << endl;
// connect to the Nomad server
auto_ptr<application::Instance> nomad = application::This::connectToStarter();
unique_ptr<application::Instance> nomad = application::This::connectToStarter();
cout << "connected to " << *nomad << endl;
// create the subscriber
auto_ptr<application::Subscriber> subscriber = application::Subscriber::create(*nomad, "dpp_publisher");
unique_ptr<application::Subscriber> subscriber = application::Subscriber::create(*nomad, "dpp_publisher");
cout << "synchronized with " << *subscriber << endl;
// create the publisher
auto_ptr<application::Publisher> publisher = application::Publisher::create("dpp_coincidence_results");
unique_ptr<application::Publisher> publisher = application::Publisher::create("dpp_coincidence_results");
cout << "created publisher " << *publisher << endl;
......
......@@ -105,17 +105,17 @@ int main(int argc, char * argv[]) {
log << "analyzing " << numor << ", crate " << crate << ", board " << board << ", channel " << channel << ", delay " << delay << ", dT " << dT << ", max blocks " << maxBlocks << ", block size " << BUFFER_SIZE << endl;
// connect to the Nomad server
auto_ptr<application::Instance> nomad = application::This::connectToStarter();
unique_ptr<application::Instance> nomad = application::This::connectToStarter();
cout << "connected to " << *nomad << endl;
// create the subscriber
auto_ptr<application::Subscriber> subscriber = application::Subscriber::create(*nomad, "dpp_publisher");
unique_ptr<application::Subscriber> subscriber = application::Subscriber::create(*nomad, "dpp_publisher");
cout << "synchronized with " << *subscriber << endl;
// create the publisher
auto_ptr<application::Publisher> publisher = application::Publisher::create("dpp_histogram_results");
unique_ptr<application::Publisher> publisher = application::Publisher::create("dpp_histogram_results");
cout << "created publisher " << *publisher << endl;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment