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
Fun4All_CaloProduction.C
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file Fun4All_CaloProduction.C
1
#pragma once
2
#if ROOT_VERSION_CODE >= ROOT_VERSION(6,00,0)
3
#include <
fun4all/SubsysReco.h
>
4
#include <
fun4all/Fun4AllServer.h
>
5
#include <
fun4all/Fun4AllInputManager.h
>
6
#include <
fun4allraw/Fun4AllPrdfInputManager.h
>
7
#include <
fun4all/Fun4AllDstInputManager.h
>
8
#include <
phool/recoConsts.h
>
9
10
#include <caloreco/CaloTowerBuilder.h>
11
#include <caloreco/CaloWaveformProcessing.h>
12
13
#include <
ffamodules/FlagHandler.h
>
14
#include <
ffamodules/HeadReco.h
>
15
#include <
ffamodules/SyncReco.h
>
16
#include <
ffamodules/CDBInterface.h
>
17
18
#include <
fun4all/Fun4AllDstOutputManager.h
>
19
20
R__LOAD_LIBRARY(libfun4all.so)
21
R__LOAD_LIBRARY(libfun4allraw.so)
22
R__LOAD_LIBRARY(libcalo_reco.so)
23
R__LOAD_LIBRARY(libffamodules.so)
24
25
#endif
26
void
Fun4All_CaloProduction
(
const
char
*
fname
=
"/gpfs/mnt/gpfs02/sphenix/user/trinn/combined_event_prdfs/calib-00007377-0000.prdf"
,
const
char
*
outfile
=
"testfile.root"
,
int
nskip = 0,
int
nevents
= 0)
27
{
28
Fun4AllServer
*se =
Fun4AllServer::instance
();
29
se->
Verbosity
(0);
30
recoConsts
*rc =
recoConsts::instance
();
31
32
//===============
33
// conditions DB flags
34
//===============
35
// ENABLE::CDB = true;
36
// global tag
37
rc->
set_StringFlag
(
"CDB_GLOBALTAG"
,
"MDC2"
);
38
rc->
set_uint64Flag
(
"TIMESTAMP"
,6);
39
40
CaloTowerBuilder
*ca =
new
CaloTowerBuilder
();
41
ca->
set_detector_type
(
CaloTowerBuilder::CEMC
);
42
ca->
set_nsamples
(31);
43
ca->
set_processing_type
(
CaloWaveformProcessing::TEMPLATE
);
44
se->
registerSubsystem
(ca);
45
46
CaloTowerBuilder
*ca1 =
new
CaloTowerBuilder
();
47
ca1->
set_detector_type
(
CaloTowerBuilder::HCALIN
);
48
ca1->
set_nsamples
(31);
49
ca1->
set_processing_type
(
CaloWaveformProcessing::TEMPLATE
);
50
se->
registerSubsystem
(ca1);
51
52
CaloTowerBuilder
*ca2 =
new
CaloTowerBuilder
();
53
ca2->
set_detector_type
(
CaloTowerBuilder::HCALOUT
);
54
ca2->
set_nsamples
(31);
55
ca2->
set_processing_type
(
CaloWaveformProcessing::TEMPLATE
);
56
se->
registerSubsystem
(ca2);
57
58
Fun4AllInputManager
*
in
=
new
Fun4AllPrdfInputManager
(
"in"
);
59
in->
fileopen
(
fname
);
60
se->
registerInputManager
(in);
61
62
Fun4AllDstOutputManager
*
out
=
new
Fun4AllDstOutputManager
(
"DSTOUT"
,
outfile
);
63
se->
registerOutputManager
(out);
64
65
66
se->
skip
(nskip);
67
se->
run
(
nevents
);
68
se->
End
();
69
se->
PrintTimer
();
70
gSystem->Exit(0);
71
}
macros
blob
master
common
Fun4All_CaloProduction.C
Built by
Jin Huang
. updated:
Sat Feb 17 2024 22:18:26
using
1.8.2 with
sPHENIX GitHub integration