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 impl3
25{
26
27std::map<int, CathodeSegmentationCreator>& Creators()
28{
29 static std::map<int, CathodeSegmentationCreator> creators;
30 return creators;
31}
32
34{
35 if (Creators().find(segType) != Creators().end()) {
36 std::cerr << "WARNING: there is already a creator registered for segType=" << segType << ". Will override it\n";
37 }
38 Creators()[segType] = func;
39}
40
42
43} // namespace impl3
44} // namespace mapping
45} // namespace mch
46} // namespace o2
GLenum func
Definition glcorearb.h:778
GLuint GLuint end
Definition glcorearb.h:469
CathodeSegmentation *(*)(bool) CathodeSegmentationCreator
void registerCathodeSegmentationCreator(int segType, CathodeSegmentationCreator func)
CathodeSegmentationCreator getCathodeSegmentationCreator(int segType)
std::map< int, CathodeSegmentationCreator > & Creators()
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...