Project
Loading...
Searching...
No Matches
MergerBuilder.h
Go to the documentation of this file.
1// Copyright 2019-2020 CERN and copyright holders of ALICE O2.
2// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
3// All rights not expressly granted are reserved.
4//
5// This software is distributed under the terms of the GNU General Public
6// License v3 (GPL Version 3), copied verbatim in the file "COPYING".
7//
8// In applying this license CERN does not waive the privileges and immunities
9// granted to it by virtue of its status as an Intergovernmental Organization
10// or submit itself to any jurisdiction.
11
12#ifndef ALICEO2_MERGERBUILDER_H
13#define ALICEO2_MERGERBUILDER_H
14
19
21
23
24#include <string>
25
26namespace o2
27{
28namespace framework
29{
30class CompletionPolicy;
31}
32
33namespace mergers
34{
35
42{
43 public:
47 ~MergerBuilder() = default;
48
49 void setName(std::string);
51 void setOutputSpec(const framework::OutputSpec& outputSpec);
53 void setTopologyPosition(size_t layer, size_t id);
54 void setTimePipeline(size_t timepipeline);
56
58
60 static void customizeInfrastructure(std::vector<framework::CompletionPolicy>&);
61
62 static inline framework::DataProcessorLabel mergerLabel() { return {"merger"}; }
63 static inline std::string mergerIntegralOutputBinding() { return "out"; };
64 static inline std::string mergerMovingWindowOutputBinding() { return "mw_out"; };
65 static inline std::string mergerIdString() { return "MERGER"; };
66 static inline header::DataOrigin mergerDataOrigin() { return {"MRGR"}; };
68 {
69 header::DataDescription description;
70 description.runtimeInit(name.substr(0, 16).c_str());
71 return description;
72 };
74 {
75 return (layer << 16) + id;
76 };
77
78 private:
79 std::string mName;
80 size_t mId{0};
81 size_t mLayer{1};
82 size_t mTimePipeline{1};
83 framework::Inputs mInputSpecs;
84 framework::OutputSpec mOutputSpecIntegral;
85 framework::OutputSpec mOutputSpecMovingWindow;
86 MergerConfig mConfig;
87};
88
89} // namespace mergers
90} // namespace o2
91
92#endif //ALICEO2_MERGERBUILDER_H
Definition of O2 MergerConfig, v0.1.
A builder class to generate a DataProcessorSpec of one Merger.
static std::string mergerIdString()
static header::DataOrigin mergerDataOrigin()
void setOutputSpecMovingWindow(const framework::OutputSpec &outputSpec)
void setTopologyPosition(size_t layer, size_t id)
static std::string mergerIntegralOutputBinding()
~MergerBuilder()=default
Default destructor.
static framework::DataProcessorLabel mergerLabel()
static header::DataHeader::SubSpecificationType mergerSubSpec(size_t layer, size_t id)
static void customizeInfrastructure(std::vector< framework::CompletionPolicy > &)
Configures mergers to consume any data immediately.
framework::DataProcessorSpec buildSpec()
MergerBuilder()
Default constructor.
void setTimePipeline(size_t timepipeline)
void setConfig(MergerConfig)
static std::string mergerMovingWindowOutputBinding()
void setOutputSpec(const framework::OutputSpec &outputSpec)
static header::DataDescription mergerDataDescription(std::string name)
void setInputSpecs(const framework::Inputs &)
GLuint const GLchar * name
Definition glcorearb.h:781
GLenum GLuint GLint GLint layer
Definition glcorearb.h:1310
GLuint id
Definition glcorearb.h:650
std::vector< InputSpec > Inputs
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...
A label that can be associated to a DataProcessorSpec.
uint32_t SubSpecificationType
Definition DataHeader.h:620
void runtimeInit(const char *string, short length=-1)
Definition DataHeader.h:261