Fork me on GitHub

source: git/external/HepMC3/GenParticle_fwd.h@ 06630ef

Last change on this file since 06630ef was 95a917c, checked in by Pavel Demin <pavel.demin@…>, 3 years ago

add HepMC3 library

  • Property mode set to 100644
File size: 971 bytes
Line 
1// -*- C++ -*-
2//
3// This file is part of HepMC
4// Copyright (C) 2014-2020 The HepMC collaboration (see AUTHORS for details)
5//
6///
7/// @file GenParticle_fwd.h
8/// @brief Minimal forward declarations for GenParticle
9///
10
11#ifndef HEPMC3_GENPARTICLE_FWD_H
12#define HEPMC3_GENPARTICLE_FWD_H
13
14#include <memory>
15#include <vector>
16
17namespace HepMC3 {
18
19class GenParticle;
20
21using GenParticlePtr = std::shared_ptr<GenParticle>;
22using ConstGenParticlePtr = std::shared_ptr<const GenParticle>;
23
24using GenParticles = std::vector<GenParticlePtr>;
25using ConstGenParticles = std::vector<ConstGenParticlePtr>;
26
27/// An alias to a vector of GenParticle pointers whose constness depends on the
28/// constness of the template shared_ptr param
29/// This is convenient for declaring the return types based on the input type
30template<typename T>
31using GenParticles_type = typename std::conditional<std::is_const<typename T::element_type>::value, ConstGenParticles, GenParticles>::type;
32
33}
34
35#endif
Note: See TracBrowser for help on using the repository browser.