Project
Loading...
Searching...
No Matches
SanityCheck.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
12
#include "
MCHBase/SanityCheck.h
"
13
#include <fmt/core.h>
14
15
namespace
o2::mch
16
{
17
18
bool
isOK
(
const
SanityError
& error)
19
{
20
return
error.
nofDuplicatedIndices
== 0 &&
21
error.
nofDuplicatedItems
== 0 &&
22
error.
nofMissingItems
== 0 &&
23
error.
nofOutOfBounds
== 0;
24
}
25
26
std::string
asString
(
const
SanityError
& error)
27
{
28
return
fmt::format(
"error counts : {} duplicated items {} missing items {} out-of-bounds index {} duplicated index"
, error.
nofDuplicatedItems
, error.
nofMissingItems
, error.
nofOutOfBounds
, error.
nofDuplicatedIndices
);
29
}
30
31
}
// namespace o2::mch
SanityCheck.h
o2::mch
Definition
SimTraits.h:155
o2::mch::asString
std::string asString(const o2::mch::TrackMCH &t)
Definition
TrackMCH.cxx:104
o2::mch::isOK
bool isOK(const SanityError &error)
Definition
SanityCheck.cxx:18
o2::mch::SanityError
Definition
SanityCheck.h:37
o2::mch::SanityError::nofOutOfBounds
uint32_t nofOutOfBounds
Definition
SanityCheck.h:41
o2::mch::SanityError::nofMissingItems
uint32_t nofMissingItems
Definition
SanityCheck.h:40
o2::mch::SanityError::nofDuplicatedItems
uint32_t nofDuplicatedItems
Definition
SanityCheck.h:38
o2::mch::SanityError::nofDuplicatedIndices
uint32_t nofDuplicatedIndices
Definition
SanityCheck.h:39
Detectors
MUON
MCH
Base
src
SanityCheck.cxx
Generated on Tue Feb 25 2025 17:03:04 for Project by
1.9.8