Analysis Software
Documentation for
sPHENIX
simulation software
Home page
Related Pages
Modules
Namespaces
Classes
Files
Examples
External Links
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
PidCandidatev1.h
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file PidCandidatev1.h
1
#ifndef PIDCANDIDATEv1_H__
2
#define PIDCANDIDATEv1_H__
3
4
#include "
PidCandidate.h
"
5
6
#ifdef __CINT__
7
#include <stdint.h>
8
#else
9
#include <cstdint>
10
#endif
11
#include <iostream>
12
#include <map>
13
14
class
PidCandidatev1
:
public
PidCandidate
15
{
16
public
:
17
PidCandidatev1
();
18
explicit
PidCandidatev1
(
const
PidCandidate
&
tc
);
19
virtual
~PidCandidatev1
() {}
20
21
void
identify
(std::ostream&
os
= std::cout)
const
;
22
23
void
Reset
();
24
25
void
set_candidate_id
(
const
int
i
) {
_candidateid
=
i
; }
26
int
get_candidate_id
()
const
{
return
_candidateid
; }
27
28
virtual
void
print
()
const
;
29
30
bool
has_property
(
const
PROPERTY
prop_id)
const
;
31
float
get_property_float
(
const
PROPERTY
prop_id)
const
;
32
int
get_property_int
(
const
PROPERTY
prop_id)
const
;
33
unsigned
int
get_property_uint
(
const
PROPERTY
prop_id)
const
;
34
void
set_property
(
const
PROPERTY
prop_id,
const
float
value
);
35
void
set_property
(
const
PROPERTY
prop_id,
const
int
value
);
36
void
set_property
(
const
PROPERTY
prop_id,
const
unsigned
int
value
);
37
38
protected
:
39
unsigned
int
get_property_nocheck
(
const
PROPERTY
prop_id)
const
;
40
void
set_property_nocheck
(
const
PROPERTY
prop_id,
const
unsigned
int
ui) {
prop_map
[prop_id]=ui;}
41
int
_candidateid
;
42
44
typedef
uint8_t
prop_id_t
;
45
typedef
uint32_t
prop_storage_t
;
46
typedef
std::map<prop_id_t, prop_storage_t>
prop_map_t
;
47
49
union
u_property
{
50
float
fdata
;
51
int32_t
idata
;
52
uint32_t
uidata
;
53
54
u_property
(int32_t
in
):
idata
(in) {}
55
u_property
(uint32_t
in
):
uidata
(in) {}
56
u_property
(
float
in
):
fdata
(in) {}
57
u_property
():
uidata
(0) {}
58
59
prop_storage_t
get_storage
()
const
{
return
uidata
;}
60
};
61
63
prop_map_t
prop_map
;
64
65
ClassDef(
PidCandidatev1
,2)
66
};
67
68
#endif
analysis
blob
master
EICAnalysis
PidCandidatev1.h
Built by
Jin Huang
. updated:
Sat Feb 17 2024 22:17:49
using
1.8.2 with
sPHENIX GitHub integration