Project
Loading...
Searching...
No Matches
VMCSeederService.h
Go to the documentation of this file.
1
// Copyright 2019-2020 CERN and copyright holders of ALICE O2.
2
// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
3
// All rights not expressly granted are reserved.
4
//
5
// This software is distributed under the terms of the GNU General Public
6
// License v3 (GPL Version 3), copied verbatim in the file "COPYING".
7
//
8
// In applying this license CERN does not waive the privileges and immunities
9
// granted to it by virtue of its status as an Intergovernmental Organization
10
// or submit itself to any jurisdiction.
11
12
#ifndef ALICEO2_VMC_SEEDERSERVICE_H
13
#define ALICEO2_VMC_SEEDERSERVICE_H
14
15
class
TVirtualMC
;
16
17
#include <functional>
18
19
namespace
o2
20
{
21
namespace
base
22
{
23
24
// A simple (singleton) service to propagate random number seeding
25
// to VMC engines in a loosely-coupled, just-in-time way (without needing to compile against these libraries).
26
class
VMCSeederService
27
{
28
29
public
:
30
static
VMCSeederService
const
&
instance
()
31
{
32
static
VMCSeederService
inst;
33
return
inst;
34
}
35
36
void
setSeed
()
const
;
// will propagate seed to the VMC engines
37
38
typedef
std::function<
void
()>
SeederFcn
;
39
40
private
:
41
VMCSeederService
();
42
void
initSeederFunction(
TVirtualMC
const
*);
43
44
SeederFcn
mSeederFcn;
// the just-in-time compiled function talking to the VMC engines
45
};
46
47
}
// namespace base
48
}
// namespace o2
49
50
#endif
TVirtualMC
o2::base::VMCSeederService
Definition
VMCSeederService.h:27
o2::base::VMCSeederService::setSeed
void setSeed() const
Definition
VMCSeederService.cxx:46
o2::base::VMCSeederService::instance
static VMCSeederService const & instance()
Definition
VMCSeederService.h:30
o2::base::VMCSeederService::SeederFcn
std::function< void()> SeederFcn
Definition
VMCSeederService.h:38
void
typedef void(APIENTRYP PFNGLCULLFACEPROC)(GLenum mode)
o2
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...
Definition
BitstreamReader.h:24
Detectors
Base
include
DetectorsBase
VMCSeederService.h
Generated on Tue Feb 25 2025 23:16:12 for Project by
1.9.8