GENIEGenerator
Loading...
Searching...
No Matches
Tools
EvtLib
Key.h
Go to the documentation of this file.
1
#ifndef _EVTLIB_KEY_H_
2
#define _EVTLIB_KEY_H_
3
4
#include <ostream>
5
6
#include <tuple>
// for std::make_tuple()
7
8
namespace
genie
{
9
namespace
evtlib
{
10
11
struct
Key
12
{
13
Key
(
int
_nucl_pdg,
int
_nu_pdg,
bool
_iscc)
14
:
nucl_pdg
(_nucl_pdg),
nu_pdg
(_nu_pdg),
iscc
(_iscc) {}
15
16
bool
operator<
(
const
Key
& k)
const
17
{
18
return
(std::make_tuple(
nucl_pdg
,
nu_pdg
,
iscc
) <
19
std::make_tuple(k.
nucl_pdg
, k.
nu_pdg
, k.
iscc
));
20
}
21
22
friend
std::ostream&
operator<<
(std::ostream& os,
const
Key
& k)
23
{
24
os << k.
nu_pdg
<<
" on "
<< k.
nucl_pdg
<<
" "
<<
" via "
<< (k.
iscc
?
"CC"
:
"NC"
);
25
return
os;
26
}
27
28
int
nucl_pdg
;
29
int
nu_pdg
;
30
bool
iscc
;
31
};
32
33
}}
// namespaces
34
35
#endif
genie::evtlib
Definition
EventLibraryInterface.h:38
genie
THE MAIN GENIE PROJECT NAMESPACE
Definition
AlgCmp.h:25
genie::evtlib::Key::iscc
bool iscc
Definition
Key.h:30
genie::evtlib::Key::nucl_pdg
int nucl_pdg
Definition
Key.h:28
genie::evtlib::Key::operator<
bool operator<(const Key &k) const
Definition
Key.h:16
genie::evtlib::Key::nu_pdg
int nu_pdg
Definition
Key.h:29
genie::evtlib::Key::operator<<
friend std::ostream & operator<<(std::ostream &os, const Key &k)
Definition
Key.h:22
genie::evtlib::Key::Key
Key(int _nucl_pdg, int _nu_pdg, bool _iscc)
Definition
Key.h:13
Generated on
for GENIEGenerator by
1.14.0