Project
Loading...
Searching...
No Matches
DataSamplingConditionFactory.cxx
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
16
17#include <memory>
18#include <stdexcept>
19
21using namespace o2::framework;
22
23namespace o2::utilities
24{
25
26std::unique_ptr<DataSamplingCondition> DataSamplingConditionFactory::create(std::string name)
27{
28 if (name == "random" || name == "DataSamplingConditionRandom") {
30 } else if (name == "payloadSize" || name == "DataSamplingConditionPayloadSize") {
32 } else if (name == "nConsecutive" || name == "DataSamplingConditionNConsecutive") {
34 } else if (name == "custom" || name == "DataSamplingConditionCustom") {
36 }
37 throw std::runtime_error("DataSamplingCondition '" + name + "' unknown.");
38}
39
40} // namespace o2::utilities
A definition of DataSamplingConditionFactory.
static std::unique_ptr< DataSamplingCondition > createDataSamplingConditionCustom()
Getter for DataSamplingConditionCustom.
static std::unique_ptr< DataSamplingCondition > createDataSamplingConditionPayloadSize()
Getter for DataSamplingConditionPayloadSize.
static std::unique_ptr< DataSamplingCondition > createDataSamplingConditionRandom()
Getter for DataSamplingConditionRandom.
static std::unique_ptr< DataSamplingCondition > createDataSamplingConditionNConsecutive()
Getter for DataSamplingConditionNConsecutive.
static std::unique_ptr< DataSamplingCondition > create(std::string name)
Creates instance of DataSamplingCondition child, given the name.
GLuint const GLchar * name
Definition glcorearb.h:781
Defining PrimaryVertex explicitly as messageable.
Definition TFIDInfo.h:20
A header which contains some meta-data generated by Data Sampling.