Project
Loading...
Searching...
No Matches
FlagType.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
13#include "DataFormatsQualityControl/FlagTypeFactory.h"
14
15#include <iostream>
16#include <tuple>
17
18namespace o2::quality_control
19{
20
22{
23 *this = FlagTypeFactory::Invalid();
24}
25
26std::ostream& operator<<(std::ostream& os, FlagType const& my)
27{
28 os << "Flag Reason: id - " << my.mId << ", name - " << my.mName << ", bad - " << (my.mBad ? "true" : "false");
29 return os;
30}
31bool FlagType::operator==(const FlagType& rhs) const
32{
33 return std::tie(mId, mName, mBad) == std::tie(rhs.mId, rhs.mName, rhs.mBad);
34}
35bool FlagType::operator!=(const FlagType& rhs) const
36{
37 return std::tie(mId, mName, mBad) != std::tie(rhs.mId, rhs.mName, rhs.mBad);
38}
39bool FlagType::operator<(const FlagType& rhs) const
40{
41 return std::tie(mId, mName, mBad) < std::tie(rhs.mId, rhs.mName, rhs.mBad);
42}
43bool FlagType::operator>(const FlagType& rhs) const
44{
45 return std::tie(mId, mName, mBad) > std::tie(rhs.mId, rhs.mName, rhs.mBad);
46}
47
48} // namespace o2::quality_control
bool operator!=(const FlagType &rhs) const
Definition FlagType.cxx:35
bool operator<(const FlagType &rhs) const
Definition FlagType.cxx:39
bool operator>(const FlagType &rhs) const
Definition FlagType.cxx:43
bool operator==(const FlagType &rhs) const
Definition FlagType.cxx:31
std::ostream & operator<<(std::ostream &os, FlagType const &my)
Definition FlagType.cxx:26