ATLAS Offline Software
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.
11 namespace HepMC3 {
12 bool operator ==(const HepMC3::GenParticle* a, const std::shared_ptr<HepMC3::GenParticle> b ) {
13  return a==b.get();
14 }
15 bool operator ==(const std::shared_ptr<HepMC3::GenParticle> a, const HepMC3::GenParticle* const b) {
16  return a.get()==b;
17 }
18 bool operator ==(const std::shared_ptr<const HepMC3::GenParticle> a, const HepMC3::GenParticle* const b) {
19  return a.get()==b;
20 }
22  return a.id()==b.id();
23 }
24 bool operator !=(const std::shared_ptr<HepMC3::GenParticle> a, const HepMC3::GenParticle* const b) {
25  return a.get()!=b;
26 }
27 bool operator !=(const std::shared_ptr<const HepMC3::GenParticle> a, const HepMC3::GenParticle* const b) {
28  return a.get()!=b;
29 }
31  return a.id()!=b.id();
32 }
33 
34 bool operator ==(const HepMC3::GenVertex* a, const std::shared_ptr<HepMC3::GenVertex> b ) {
35  return a==b.get();
36 }
37 bool operator ==(const std::shared_ptr<HepMC3::GenVertex> a, const HepMC3::GenVertex* const b) {
38  return a.get()==b;
39 }
40 bool operator ==(const std::shared_ptr<const HepMC3::GenVertex> a, const HepMC3::GenVertex* const b) {
41  return a.get()==b;
42 }
43 bool operator ==(const HepMC3::GenVertex a, const HepMC3::GenVertex b) {
44  return a.id()==b.id();
45 }
46 bool operator !=(const std::shared_ptr<HepMC3::GenVertex> a, const HepMC3::GenVertex* const b) {
47  return a.get()!=b;
48 }
49 bool operator !=(const std::shared_ptr<const HepMC3::GenVertex> a, const HepMC3::GenVertex* const b) {
50  return a.get()!=b;
51 }
52 bool operator !=(const HepMC3::GenVertex a, const HepMC3::GenVertex b) {
53  return a.id()!=b.id();
54 }
55 }
56 #endif
57 #endif
operator==
bool operator==(const DataVector< T > &a, const DataVector< T > &b)
Vector equality comparison.
operator!=
bool operator!=(const DataVector< T > &a, const DataVector< T > &b)
Based on operator==.
plotBeamSpotMon.b
b
Definition: plotBeamSpotMon.py:77
a
TList * a
Definition: liststreamerinfos.cxx:10
GenParticle
@ GenParticle
Definition: TruthClasses.h:30