Skip to content

Commit 82e6c82

Browse files
knopers8Barthelemy
authored andcommitted
Document why customize functions are where they are (#239)
1 parent ab12d5b commit 82e6c82

4 files changed

Lines changed: 15 additions & 1 deletion

File tree

Framework/src/runAdvanced.cxx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,9 @@ using namespace o2::framework;
4141

4242
// Additional configuration of the topology, which is done by implementing `customize` functions and placing them
4343
// before `runDataProcessing.h` header. In this case, both Dispatcher and Merger are configured to accept incoming
44-
// messages without waiting for the rest of inputs.
44+
// messages without waiting for the rest of inputs. The `customize` functions have to be above
45+
// `#include "Framework/runDataProcessing.h"` - that header checks if these functions are defined by user and if so, it
46+
// invokes them. It uses a trick with SFINAE expressions to do that.
4547
void customize(std::vector<CompletionPolicy>& policies)
4648
{
4749
DataSampling::CustomizeInfrastructure(policies);

Framework/src/runBasic.cxx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,10 @@
3939
using namespace o2;
4040
using namespace o2::framework;
4141

42+
// The customize() functions are used to declare the executable arguments and to specify custom completion and channel
43+
// configuration policies. They have to be above `#include "Framework/runDataProcessing.h"` - that header checks if
44+
// these functions are defined by user and if so, it invokes them. It uses a trick with SFINAE expressions to do that.
45+
4246
void customize(std::vector<CompletionPolicy>& policies)
4347
{
4448
DataSampling::CustomizeInfrastructure(policies);

Framework/src/runMergerTest.cxx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@
2222
#include <random>
2323
using namespace o2::framework;
2424

25+
// The customize() functions are used to declare the executable arguments and to specify custom completion and channel
26+
// configuration policies. They have to be above `#include "Framework/runDataProcessing.h"` - that header checks if
27+
// these functions are defined by user and if so, it invokes them. It uses a trick with SFINAE expressions to do that.
28+
2529
void customize(std::vector<CompletionPolicy>& policies)
2630
{
2731
CompletionPolicy mergerConsumesASAP =

Framework/src/runQC.cxx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,10 @@
3131
using namespace o2;
3232
using namespace o2::framework;
3333

34+
// The customize() functions are used to declare the executable arguments and to specify custom completion and channel
35+
// configuration policies. They have to be above `#include "Framework/runDataProcessing.h"` - that header checks if
36+
// these functions are defined by user and if so, it invokes them. It uses a trick with SFINAE expressions to do that.
37+
3438
void customize(std::vector<ConfigParamSpec>& workflowOptions)
3539
{
3640
workflowOptions.push_back(

0 commit comments

Comments
 (0)