ATLAS Offline Software
Loading...
Searching...
No Matches
Operators.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
3*/
4/* Author: Andrii Verbytskyi andrii.verbytskyi@mpp.mpg.de */
5
6#ifndef ATLASHEPMC_OPERATORS_H
7#define ATLASHEPMC_OPERATORS_H
8#ifdef HEPMC3
9// This suboptimal piece of code is here because of the googletest suite.
10// Include it only in the test suite.
11namespace HepMC3 {
12bool operator ==(const HepMC3::GenParticle* a, const std::shared_ptr<HepMC3::GenParticle> b ) {
13 return a==b.get();
14}
15bool operator ==(const std::shared_ptr<HepMC3::GenParticle> a, const HepMC3::GenParticle* const b) {
16 return a.get()==b;
17}
18bool operator ==(const std::shared_ptr<const HepMC3::GenParticle> a, const HepMC3::GenParticle* const b) {
19 return a.get()==b;
20}
21bool operator ==(const HepMC3::GenParticle a, const HepMC3::GenParticle b) {
22 return a.id()==b.id();
23}
24bool operator !=(const std::shared_ptr<HepMC3::GenParticle> a, const HepMC3::GenParticle* const b) {
25 return a.get()!=b;
26}
27bool operator !=(const std::shared_ptr<const HepMC3::GenParticle> a, const HepMC3::GenParticle* const b) {
28 return a.get()!=b;
29}
30bool operator !=(const HepMC3::GenParticle a, const HepMC3::GenParticle b) {
31 return a.id()!=b.id();
32}
33
34bool operator ==(const HepMC3::GenVertex* a, const std::shared_ptr<HepMC3::GenVertex> b ) {
35 return a==b.get();
36}
37bool operator ==(const std::shared_ptr<HepMC3::GenVertex> a, const HepMC3::GenVertex* const b) {
38 return a.get()==b;
39}
40bool operator ==(const std::shared_ptr<const HepMC3::GenVertex> a, const HepMC3::GenVertex* const b) {
41 return a.get()==b;
42}
43bool operator ==(const HepMC3::GenVertex a, const HepMC3::GenVertex b) {
44 return a.id()==b.id();
45}
46bool operator !=(const std::shared_ptr<HepMC3::GenVertex> a, const HepMC3::GenVertex* const b) {
47 return a.get()!=b;
48}
49bool operator !=(const std::shared_ptr<const HepMC3::GenVertex> a, const HepMC3::GenVertex* const b) {
50 return a.get()!=b;
51}
52bool operator !=(const HepMC3::GenVertex a, const HepMC3::GenVertex b) {
53 return a.id()!=b.id();
54}
55}
56#endif
57#endif
bool operator!=(const DataVector< T > &a, const DataVector< T > &b)
Based on operator==.
bool operator==(const DataVector< T > &a, const DataVector< T > &b)
Vector equality comparison.
static Double_t a