Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
cbmroot
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Qiunan Zhang
cbmroot
Commits
b9e901b0
Commit
b9e901b0
authored
4 years ago
by
Pierre-Alain Loizeau
Browse files
Options
Downloads
Patches
Plain Diff
mCBM 2019: bring macros to mCBM branch stand
- Explicitely enable TimesliceMetaData output to file for the source class
parent
b5b94da4
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
macro/beamtime/mcbm2019/check_events.C
+56
-12
56 additions, 12 deletions
macro/beamtime/mcbm2019/check_events.C
macro/beamtime/mcbm2019/unpack_tsa_mcbm.C
+9
-0
9 additions, 0 deletions
macro/beamtime/mcbm2019/unpack_tsa_mcbm.C
with
65 additions
and
12 deletions
macro/beamtime/mcbm2019/check_events.C
+
56
−
12
View file @
b9e901b0
void
check_events
(
Int_t
nEvents
=
10
,
UInt_t
uRunId
=
0
,
TString
inDir
=
"data/"
,
TString
friendFile
=
""
,
TString
inFile
=
""
)
void
check_events
(
Int_t
nEvents
=
10
,
UInt_t
uRunId
=
0
,
TString
inDir
=
"data/"
,
TString
friendFile
=
""
,
TString
inFile
=
""
)
{
Int_t
iVerbose
=
1
;
Int_t
iBugCor
=
0
;
...
...
@@ -13,46 +13,61 @@ void check_events(Int_t nEvents = 10, UInt_t uRunId=0, TString inDir="data/", TS
FairLogger
::
GetLogger
();
gLogger
->
SetLogScreenLevel
(
logLevel
);
gLogger
->
SetLogVerbosityLevel
(
"VERYHIGH"
);
TString
workDir
=
gSystem
->
Getenv
(
"VMCWORKDIR"
);
TString
runId
=
TString
::
Format
(
"%u"
,
uRunId
);
TString
runId
=
TString
::
Format
(
"%
03
u"
,
uRunId
);
TString
ParFile
=
inDir
+
"/unp_mcbm_params_"
+
runId
+
".root"
;
TString
InputFile
=
inDir
+
"/unp_mcbm_"
+
runId
+
".root"
;
TString
InputFileEvent
=
""
;
if
(
friendFile
.
Length
()
>
0
)
{
InputFileEvent
=
inDir
+
friendFile
;
}
if
(
""
==
friendFile
)
{
InputFileEvent
=
inDir
+
"/events_"
+
runId
+
".root"
;
}
// if( "" == friendFile )
else
{
InputFileEvent
=
inDir
+
friendFile
;
}
// else of if( "" == friendFile )
TString
OutputFile
=
inDir
+
"/test_"
+
runId
+
".out.root"
;
TList
*
parFileList
=
new
TList
();
// ----- Timer --------------------------------------------------------
TStopwatch
timer
;
timer
.
Start
();
// ------------------------------------------------------------------------
// ----- Reconstruction run -------------------------------------------
FairRunAna
*
run
=
new
FairRunAna
();
FairFileSource
*
inputSource
=
new
FairFileSource
(
InputFile
);
if
(
friendFile
.
Length
()
>
0
)
{
inputSource
->
AddFriend
(
InputFileEvent
);
}
inputSource
->
AddFriend
(
InputFileEvent
);
run
->
SetSource
(
inputSource
);
run
->
SetOutputFile
(
OutputFile
);
run
->
SetEventHeaderPersistence
(
kFALSE
);
// ------------------------------------------------------------------------
// Enable FairMonitor
FairMonitor
::
GetMonitor
()
->
EnableMonitor
(
kFALSE
);
// ------------------------------------------------------------------------
CbmCheckEvents
*
checker
=
new
CbmCheckEvents
();
run
->
AddTask
(
checker
);
// ----- Parameter database --------------------------------------------
FairRuntimeDb
*
rtdb
=
run
->
GetRuntimeDb
();
Bool_t
kParameterMerged
=
kTRUE
;
FairParRootFileIo
*
parIo2
=
new
FairParRootFileIo
(
kParameterMerged
);
parIo2
->
open
(
ParFile
.
Data
(),
"UPDATE"
);
parIo2
->
print
();
rtdb
->
setFirstInput
(
parIo2
);
FairParAsciiFileIo
*
parIo1
=
new
FairParAsciiFileIo
();
parIo1
->
open
(
parFileList
,
"in"
);
parIo1
->
print
();
...
...
@@ -70,5 +85,34 @@ void check_events(Int_t nEvents = 10, UInt_t uRunId=0, TString inDir="data/", TS
run
->
Run
(
0
,
nEvents
);
//tofClust->Finish();
// ------------------------------------------------------------------------
// default display
// default display
// ----- Finish -------------------------------------------------------
timer
.
Stop
();
Double_t
rtime
=
timer
.
RealTime
();
Double_t
ctime
=
timer
.
CpuTime
();
cout
<<
endl
<<
endl
;
cout
<<
"Macro finished succesfully."
<<
endl
;
cout
<<
"Real time "
<<
rtime
<<
" s, CPU time "
<<
ctime
<<
" s"
<<
endl
;
cout
<<
endl
;
// ------------------------------------------------------------------------
// Extract the maximal used memory an add is as Dart measurement
// This line is filtered by CTest and the value send to CDash
FairSystemInfo
sysInfo
;
Float_t
maxMemory
=
sysInfo
.
GetMaxMemory
();
cout
<<
"<DartMeasurement name=
\"
MaxMemory
\"
type=
\"
numeric/double
\"
>"
;
cout
<<
maxMemory
;
cout
<<
"</DartMeasurement>"
<<
endl
;
Float_t
cpuUsage
=
ctime
/
rtime
;
cout
<<
"<DartMeasurement name=
\"
CpuLoad
\"
type=
\"
numeric/double
\"
>"
;
cout
<<
cpuUsage
;
cout
<<
"</DartMeasurement>"
<<
endl
;
FairMonitor
*
tempMon
=
FairMonitor
::
GetMonitor
();
tempMon
->
Print
();
// RemoveGeoManager();
cout
<<
" Test passed"
<<
endl
;
cout
<<
" All ok "
<<
endl
;
}
This diff is collapsed.
Click to expand it.
macro/beamtime/mcbm2019/unpack_tsa_mcbm.C
+
9
−
0
View file @
b9e901b0
...
...
@@ -232,15 +232,24 @@ void unpack_tsa_mcbm(TString inFile = "", UInt_t uRunId = 0, UInt_t nrEvents=0,
unpacker_much
->
SetTimeOffsetNsAsic
(
34
,
0
.
0
);
// Run 384, DPB 5 ASIC 4
unpacker_much
->
SetTimeOffsetNsAsic
(
35
,
0
.
0
);
// Run 384, DPB 5 ASIC 5
unpacker_psd
->
SetTimeOffsetNs
(
-
180
.
0
);
break
;
}
// 384
case
365
:
{
unpacker_psd
->
SetTimeOffsetNs
(
-
1007
.
0
);
break
;
}
default:
break
;
}
// switch( uRunId )
// --- Source task
CbmMcbm2018Source
*
source
=
new
CbmMcbm2018Source
();
source
->
SetWriteOutputFlag
(
kTRUE
);
// For writing TS metadata
source
->
SetFileName
(
inFile
);
// source->SetInputDir(inDir);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment