Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
canvas
canvas
Persistency
Provenance
Transient.h
Go to the documentation of this file.
1
#ifndef canvas_Persistency_Provenance_Transient_h
2
#define canvas_Persistency_Provenance_Transient_h
3
// vim: set sw=2 expandtab :
4
5
// ===================================================================
6
// We give all instantiations of this template a 'transient="true"'
7
// attribute for the value_ data member to tell ROOT to never write
8
// it to disk. We also set all instantiations (by hand!) to have a
9
// custom streamer (TransientStreamer) that makes sure if the ROOT
10
// I/O buffer is reused for reading that the data member _value is
11
// reinitialized with a default-constructed T.
12
// ===================================================================
13
14
namespace
art
{
15
template
<
typename
T>
16
class
Transient
{
17
public
:
18
typedef
T
value_type
;
19
Transient
(
T
value
=
T
()) :
value_
(
value
) {}
20
operator
T
()
const
{
return
value_
; }
21
Transient
&
22
operator=
(
T
rh)
23
{
24
value_
= rh;
25
return
*
this
;
26
}
27
T
const
&
28
get
()
const
noexcept
29
{
30
return
value_
;
31
}
32
T
&
33
get
() noexcept
34
{
35
return
value_
;
36
}
37
38
private
:
39
T
value_
;
40
};
41
}
42
#endif
/* canvas_Persistency_Provenance_Transient_h */
43
44
// Local Variables:
45
// mode: c++
46
// End:
art::Transient::Transient
Transient(T value=T())
Definition:
Transient.h:19
ValidateOpDetSimulation.T
T
Definition:
ValidateOpDetSimulation.py:52
art::Transient::operator=
Transient & operator=(T rh)
Definition:
Transient.h:22
art::Transient
Definition:
Transient.h:16
art::Transient::value_type
T value_type
Definition:
Transient.h:18
art
Definition:
BasicOptionsHandler.h:9
art::Transient::value_
T value_
Definition:
Transient.h:39
submit_mcc.value
value
Definition:
submit_mcc.py:159
Generated by
1.8.11