EIC Software
Reference for
EIC
simulation and reconstruction software on GitHub
Home page
Related Pages
Modules
Namespaces
Classes
Files
External Links
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
RunSampling.C
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file RunSampling.C
1
#include <eicqa_modules/SamplingFractionReco.h>
2
3
#include <
fun4all/Fun4AllServer.h
>
4
#include <
fun4all/Fun4AllInputManager.h
>
5
#include <
fun4all/Fun4AllDstInputManager.h
>
6
#include <
fun4all/Fun4AllDstOutputManager.h
>
7
#include <
fun4all/Fun4AllOutputManager.h
>
8
9
R__LOAD_LIBRARY
(libfun4all.so)
10
R__LOAD_LIBRARY
(libeicqa_modules.so)
11
12
void
RunSampling
(const std::
string
&detector, const std::
string
&fname, const
int
nevnt = 0, const std::
string
&outdir = ".")
13
{
14
gSystem->Load(
"libg4dst"
);
15
std::string outfile = outdir +
"/SF_"
+ detector +
".root"
;
16
Fun4AllServer
*se =
Fun4AllServer::instance
();
17
18
SamplingFractionReco
*sf =
new
SamplingFractionReco
(
"SF"
,outfile);
19
sf->
Detector
(detector);
20
sf->
add_support_eloss
();
21
se->
registerSubsystem
(sf);
22
Fun4AllInputManager
*
in
=
new
Fun4AllDstInputManager
(
"QAin"
);
23
in->
fileopen
(fname);
24
se->
registerInputManager
(in);
25
if
(nevnt < 0)
26
{
27
return
;
28
}
29
se->
run
(nevnt);
30
se->
End
();
31
delete
se;
32
gSystem->Exit(0);
33
}
fun4all_eic_qa
blob
master
macros
RunSampling.C
Built by
Jin Huang
. updated:
Mon Jan 22 2024 12:43:51
using
1.8.2 with
EIC GitHub integration