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+ // /
13+ // / \file UserInputOutput.cxx
14+ // / \author Piotr Konopka
15+ // /
16+
17+ #include " QualityControl/UserInputOutput.h"
18+
19+ namespace o2 ::quality_control::core
20+ {
21+
22+ framework::ConcreteDataMatcher
23+ createUserDataMatcher (DataSourceType dataSourceType, const std::string& detectorName, const std::string& userCodeName)
24+ {
25+ return {
26+ createDataOrigin (dataSourceType, detectorName),
27+ createDataDescription (userCodeName, dataSourceType),
28+ 0
29+ };
30+ }
31+
32+ framework::InputSpec
33+ createUserInputSpec (DataSourceType dataSourceType, const std::string& detectorName, const std::string& userCodeName)
34+ {
35+ // currently all of our outputs are Lifetime::Sporadic, so we don't allow for customization, but it could be factored out.
36+ // we assume using `userCodeName` as a binding in all cases
37+ return {
38+ userCodeName,
39+ createUserDataMatcher (dataSourceType, detectorName, userCodeName),
40+ framework::Lifetime::Sporadic
41+ };
42+ }
43+
44+ framework::OutputSpec
45+ createUserOutputSpec (DataSourceType dataSourceType, const std::string& detectorName, const std::string& userCodeName)
46+ {
47+ // currently all of our outputs are Lifetime::Sporadic, so we don't allow for customization, but it could be factored out.
48+ // we assume using `userCodeName` as a binding in all cases
49+ return {
50+ framework::OutputLabel{ userCodeName },
51+ createUserDataMatcher (dataSourceType, detectorName, userCodeName),
52+ framework::Lifetime::Sporadic
53+ };
54+ }
55+
56+ } // namespace o2::quality_control::core
0 commit comments