Project
Loading...
Searching...
No Matches
ErrorMap.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 O2_MCH_BASE_ERROR_MAP_H_H
13#define O2_MCH_BASE_ERROR_MAP_H_H
14
15#include <cstdint>
16#include <functional>
17#include <map>
18
19#include <gsl/span>
20
21#include "MCHBase/Error.h"
22
23namespace o2::mch
24{
25
38{
39 public:
40 using ErrorFunction = std::function<void(Error error)>;
41
43 void add(ErrorType errorType, uint32_t id0, uint32_t id1, uint64_t n = 1);
45 void add(Error error);
47 void add(gsl::span<const Error> errors);
49 void add(const ErrorMap& errors);
50
52 void clear() { mErrors.clear(); }
53
55 uint64_t getNumberOfErrorTypes() const { return mErrors.size(); }
62
64 void forEach(ErrorFunction f) const;
69
70 private:
71 std::map<ErrorType, std::map<uint64_t, Error>> mErrors{};
72};
73
74} // namespace o2::mch
75
76#endif
definition of the MCH processing errors
Timeframe settings Average distance in cm of events merged into Randomize distance around average distance of merged events Simulate correct bunch interactions instead of placing only the average number of events A value[n] sets TFlen for[n] collisions in Number of bunches per trainsort Number of bunch trains Instantaneous interaction rate Do not simulate border Total number of collisions to be placed in the interior of all time Do not select random but walk over array of events in stride steps h Event generator settings h configStandalone Use CPU for GPU Force usage of the specified GPU device no CPU fallback Continue processing after an error First event to Number of events to Number of iterations to Number of iterations to Number of initial iterations excluded from const char Directory with events to Events directory is and not inside events Show standalone event Run event generator maximum time bin of continuous for triggered for automatic continuous for automatic continuous triggered uint64_t
char error[CURL_ERROR_SIZE]
A container class to summarize errors encountered during processing.
Definition ErrorMap.h:38
void forEach(ErrorFunction f) const
Definition ErrorMap.cxx:90
uint64_t getNumberOfErrors() const
Definition ErrorMap.cxx:63
void add(ErrorType errorType, uint32_t id0, uint32_t id1, uint64_t n=1)
Definition ErrorMap.cxx:33
uint64_t getNumberOfErrorTypes() const
Definition ErrorMap.h:55
std::function< void(Error error)> ErrorFunction
Definition ErrorMap.h:40
GLdouble n
Definition glcorearb.h:1982
GLdouble f
Definition glcorearb.h:310
GLint GLint GLsizei GLint GLenum GLenum type
Definition glcorearb.h:275
GLboolean GLuint group
Definition glcorearb.h:3991
typedef void(APIENTRYP PFNGLCULLFACEPROC)(GLenum mode)
ErrorGroup
Definition Error.h:31
ErrorType
Definition Error.h:54