Analysis Software
Documentation for
sPHENIX
simulation software
Home page
Related Pages
Modules
Namespaces
Classes
Files
Examples
External Links
File List
File Members
Analysis Software
Deprecated List
Modules
Namespaces
Classes
Files
File List
acts
acts-fatras
analysis
analysis_tpc_prototype
coresoftware
Doxygen_Assist
g4exampledetector
GenFit
JETSCAPE
KFParticle
macros
online_distribution
OnlMon
prototype
pythia6
rcdaq
RDBC
tutorials
blob
master
AnaTutorial
block
CaloAna
clusters
CreateSubsysRecoModule
cylinder
eventgenerator_display
IonGun
MagneticField
macros
Print3dFieldMap.C
ReadFieldMap.C
src
materialscan
Momentum
myjetanalysis
MyOwnTTree
PHG4DSTReader
sPHENIX_sims
doxygen_mainpage.h
File Members
Examples
External Links
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
ReadFieldMap.C
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file ReadFieldMap.C
1
#ifndef MACRO_READFIELDMAP_C
2
#define MACRO_READFIELDMAP_C
3
4
#include <
fun4all/Fun4AllInputManager.h
>
5
#include <
fun4all/Fun4AllDstInputManager.h
>
6
#include <
fun4all/Fun4AllDummyInputManager.h
>
7
#include <
fun4all/Fun4AllServer.h
>
8
9
#include <fieldmapreadback/FieldMapReadBack.h>
10
11
R__LOAD_LIBRARY(libfieldmapreadbackread.so)
12
13
// reads fieldmap from the DST. Needs only one event to force the opening
14
// and reading of the runwise information, running more just wastes your time
15
16
FieldMapReadBack
*
ReadFieldMap
(const
int
nEvents
= 1, const std::
string
&
filename
="DST_TRKR_CLUSTER_sHijing_0_20fm_50kHz_bkg_0_20fm-0000000001-04001.
root
")
17
{
18
gSystem->Load(
"libg4dst.so"
);
19
Fun4AllServer
*se =
Fun4AllServer::instance
();
20
se->
Verbosity
();
// set it to 1 if you want event printouts
21
FieldMapReadBack
*fmap =
new
FieldMapReadBack
();
22
se->
registerSubsystem
(fmap);
23
Fun4AllInputManager
*
in
=
new
Fun4AllDstInputManager
(
"DSTin"
);
24
in->
fileopen
(
filename
);
25
se->
registerInputManager
(in);
26
if
(nEvents < 0)
27
{
28
return
;
29
}
30
se->
run
(nEvents);
31
return
fmap;
32
}
33
34
35
#endif
tutorials
blob
master
MagneticField
macros
ReadFieldMap.C
Built by
Jin Huang
. updated:
Sat Feb 17 2024 22:18:49
using
1.8.2 with
sPHENIX GitHub integration