Idea #21368
A proposal to make CommandableFragmentGenerator non-default constructible
Status:
Closed
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Start date:
11/14/2018
Due date:
% Done:
0%
Estimated time:
Experiment:
-
Description
To prevent incidental use of the default constructor in CommandableFragmentGenerator make it non-default constructible.
//CommandableFragmentGenerator(); CommandableFragmentGenerator() = delete;
I tested the proposed change by running run_demo.sh using the HEAD of develop and ardaq_demo v3_03_01.
[mu2etrg@mu2edaq11 artdaq]$ git diff diff --git a/artdaq/Application/CommandableFragmentGenerator.cc b/artdaq/Application/CommandableFragmentGenerator.cc index 6800134..3fa116c 100644 --- a/artdaq/Application/CommandableFragmentGenerator.cc +++ b/artdaq/Application/CommandableFragmentGenerator.cc @@ -43,6 +43,7 @@ #define TLVL_SENDEMPTYFRAGMENTS 19 #define TLVL_CHECKWINDOWS 14 +/* artdaq::CommandableFragmentGenerator::CommandableFragmentGenerator() : mutex_() , requestReceiver_(nullptr) @@ -82,7 +83,7 @@ artdaq::CommandableFragmentGenerator::CommandableFragmentGenerator() , instance_name_for_metrics_("FragmentGenerator") , sleep_on_stop_us_(0) {} - +*/ artdaq::CommandableFragmentGenerator::CommandableFragmentGenerator(const fhicl::ParameterSet& ps) : mutex_() , requestReceiver_(nullptr) diff --git a/artdaq/Application/CommandableFragmentGenerator.hh b/artdaq/Application/CommandableFragmentGenerator.hh index e0ac98f..f63583d 100644 --- a/artdaq/Application/CommandableFragmentGenerator.hh +++ b/artdaq/Application/CommandableFragmentGenerator.hh @@ -145,7 +145,12 @@ namespace artdaq * * This constructor default-initializes all parameters */ - CommandableFragmentGenerator(); +// CommandableFragmentGenerator(); + CommandableFragmentGenerator()=delete; + CommandableFragmentGenerator(CommandableFragmentGenerator const& ) = delete; + CommandableFragmentGenerator(CommandableFragmentGenerator && ) = delete; + CommandableFragmentGenerator& operator= (CommandableFragmentGenerator const&) = delete; + CommandableFragmentGenerator& operator= (CommandableFragmentGenerator &&) = delete; /** * \brief CommandableFragmentGenerator Constr
History
#1 Updated by Eric Flumerfelt over 1 year ago
- Status changed from New to Closed
As of artdaq v3_06_02, this has been implemented for some time.