Project
Loading...
Searching...
No Matches
CathodeSegmentationCreator.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
15#include <iostream>
16#include <map>
17
18namespace o2
19{
20namespace mch
21{
22namespace mapping
23{
24namespace impl4
25{
26
27std::map<int, CathodeSegmentationCreator>& Creators()
28{
29 static std::map<int, CathodeSegmentationCreator> creators;
30 return creators;
31}
32
35{
36 if (Creators().find(segType) != Creators().end()) {
37 std::cerr << "WARNING: there is already a creator registered for segType="
38 << segType << ". Will override it\n";
39 }
40 Creators()[segType] = func;
41}
42
44{
45 return Creators()[segType];
46}
47
48} // namespace impl4
49} // namespace mapping
50} // namespace mch
51} // namespace o2
GLenum func
Definition glcorearb.h:778
GLuint GLuint end
Definition glcorearb.h:469
void registerCathodeSegmentationCreator(int segType, CathodeSegmentationCreator func)
CathodeSegmentationCreator getCathodeSegmentationCreator(int segType)
CathodeSegmentation *(*)(bool) CathodeSegmentationCreator
std::map< int, CathodeSegmentationCreator > & Creators()
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...