Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Sergey Gorbunov
CbmTools
Commits
28265f89
Commit
28265f89
authored
Dec 19, 2021
by
sergeizharko
Browse files
Changed hardcoded 'data' directory and 'cbmroot' directory to parameters defined in myParameters.h
parent
9abd126a
Changes
5
Hide whitespace changes
Inline
Side-by-side
macro/myDigi.C
View file @
28265f89
#include
"TROOT.h"
#include
"TROOT.h"
#include
"TSystem.h"
#include
"TSystem.h"
#include
"myParameters.h"
/*
/*
Macro to run standard cbmroot digitization in a simplified form
Macro to run standard cbmroot digitization in a simplified form
...
@@ -9,10 +10,10 @@
...
@@ -9,10 +10,10 @@
*/
*/
void
myDigi
(
TString
inpSetup
,
void
myDigi
(
TString
inpSetup
=
"el"
,
TString
inpEnergy
,
TString
inpEnergy
=
"10gev"
,
TString
inpCentr
,
TString
inpCentr
=
"mbias"
,
TString
type
)
{
TString
type
=
"eb"
)
{
// setup: "el" or "mu"
// setup: "el" or "mu"
// energy: "10gev" or "25gev"
// energy: "10gev" or "25gev"
...
@@ -32,10 +33,11 @@ void myDigi(TString inpSetup,
...
@@ -32,10 +33,11 @@ void myDigi(TString inpSetup,
cout
<<
"wrong type "
<<
type
<<
endl
;
cout
<<
"wrong type "
<<
type
<<
endl
;
}
}
TString
command
=
s
+
".x $CBMSRCDIR/macro/run/run_digi.C("
+
"
\"
data/"
+
file
TString
command
=
s
+
".x "
+
myParameters
::
kCBMROOT_DIR
+
"/macro/run/run_digi.C("
+
"
\"
"
+
myParameters
::
kDATA_DIR
+
"/"
+
file
+
"
\"
, -1,
\"\"
, "
+
rate
+
")"
;
+
"
\"
, -1,
\"\"
, "
+
rate
+
")"
;
cout
<<
"processing command "
<<
command
<<
endl
;
cout
<<
"processing command "
<<
command
<<
endl
;
gROOT
->
ProcessLine
(
command
);
gROOT
->
ProcessLine
(
command
);
cout
<<
"processed command "
<<
command
<<
endl
;
cout
<<
"processed command "
<<
command
<<
endl
;
}
}
\ No newline at end of file
macro/myParameters.h
0 → 100644
View file @
28265f89
/**************************************************************************************************************
* @file myParameters.h
*************************************************************************************************************/
#ifndef myParameters_h
#define myParameters_h 1
// NOTE: ROOT does not understand '~' symbol
namespace
myParameters
{
const
TString
kDATA_DIR
{
"/home/sergei/research/CBM/data"
};
const
TString
kCBMROOT_DIR
{
"/home/sergei/research/CBM/cbmroot"
};
}
#endif // myParameters_h
macro/myQa.C
View file @
28265f89
#include
"TROOT.h"
#include
"TROOT.h"
#include
"TSystem.h"
#include
"TSystem.h"
#include
"myParameters.h"
/*
/*
Macro to run standard cbmroot qa in a simplified form
Macro to run standard cbmroot qa in a simplified form
Example:
Example:
...
@@ -9,7 +9,7 @@
...
@@ -9,7 +9,7 @@
*/
*/
void
myQa
(
TString
inpSetup
,
TString
inpEnergy
,
TString
inpCentr
,
TString
type
)
{
void
myQa
(
TString
inpSetup
=
"el"
,
TString
inpEnergy
=
"10gev"
,
TString
inpCentr
=
"mbias"
,
TString
type
=
"eb"
)
{
// setup: "el" or "mu"
// setup: "el" or "mu"
// energy: "10gev" or "25gev"
// energy: "10gev" or "25gev"
...
@@ -31,10 +31,10 @@ void myQa(TString inpSetup, TString inpEnergy, TString inpCentr, TString type) {
...
@@ -31,10 +31,10 @@ void myQa(TString inpSetup, TString inpEnergy, TString inpCentr, TString type) {
TString
file
=
inpSetup
+
"."
+
inpEnergy
+
"."
+
inpCentr
+
"."
+
type
;
TString
file
=
inpSetup
+
"."
+
inpEnergy
+
"."
+
inpCentr
+
"."
+
type
;
TString
command
=
s
+
".x
$CBMSRCDIR/macro/run/run_qa.C("
+
"
\"
data
/"
+
file
TString
command
=
s
+
".x
"
+
myParameters
::
kCBMROOT_DIR
+
"/macro/run/run_qa.C("
+
"
\"
"
+
myParameters
::
kDATA_DIR
+
"
/"
+
file
+
"
\"
, "
+
setup
+
")"
;
+
"
\"
, "
+
setup
+
")"
;
cout
<<
"processing command "
<<
command
<<
endl
;
cout
<<
"processing command "
<<
command
<<
endl
;
gROOT
->
ProcessLine
(
command
);
gROOT
->
ProcessLine
(
command
);
cout
<<
"processed command "
<<
command
<<
endl
;
cout
<<
"processed command "
<<
command
<<
endl
;
}
}
\ No newline at end of file
macro/myReco.C
View file @
28265f89
#include
"TROOT.h"
#include
"TROOT.h"
#include
"TSystem.h"
#include
"TSystem.h"
#include
"myParameters.h"
/*
/*
Macro to run standard cbmroot reconstruction in a simplified form
Macro to run standard cbmroot reconstruction in a simplified form
...
@@ -8,10 +9,10 @@
...
@@ -8,10 +9,10 @@
root -l -q ~/cbmtools/macro/myReco.C'("mu","10gev","mbias","tb")'
root -l -q ~/cbmtools/macro/myReco.C'("mu","10gev","mbias","tb")'
*/
*/
void
myReco
(
TString
inpSetup
,
void
myReco
(
TString
inpSetup
=
"el"
,
TString
inpEnergy
,
TString
inpEnergy
=
"10gev"
,
TString
inpCentr
,
TString
inpCentr
=
"mbias"
,
TString
type
)
{
TString
type
=
"eb"
)
{
// setup: "el" or "mu"
// setup: "el" or "mu"
// energy: "10gev" or "25gev"
// energy: "10gev" or "25gev"
...
@@ -35,7 +36,8 @@ void myReco(TString inpSetup,
...
@@ -35,7 +36,8 @@ void myReco(TString inpSetup,
//TString command = s + ".x $CBMSRCDIR/macro/run/run_reco.C(" + "\"data/" + file
//TString command = s + ".x $CBMSRCDIR/macro/run/run_reco.C(" + "\"data/" + file
// + "\", -1, 0, \"\", \"\", " + setup + ", \"\", true)";
// + "\", -1, 0, \"\", \"\", " + setup + ", \"\", true)";
TString
command
=
s
+
".x $CBMSRCDIR/macro/run/run_reco.C("
+
"
\"
data/"
+
file
TString
command
=
s
+
".x "
+
myParameters
::
kCBMROOT_DIR
+
"/macro/run/run_reco.C("
+
"
\"
"
+
myParameters
::
kDATA_DIR
+
"/"
+
file
+
"
\"
, -1, 0,
\"\"
,
\"\"
, "
+
setup
+
",
\"\"
, true)"
;
+
"
\"
, -1, 0,
\"\"
,
\"\"
, "
+
setup
+
",
\"\"
, true)"
;
//command = s + ".x $CBMSRCDIR/macro/run/run_reco_event.C(-1," + "\"data/" + file
//command = s + ".x $CBMSRCDIR/macro/run/run_reco_event.C(-1," + "\"data/" + file
...
@@ -48,4 +50,4 @@ void myReco(TString inpSetup,
...
@@ -48,4 +50,4 @@ void myReco(TString inpSetup,
cout
<<
"processing command "
<<
command
<<
endl
;
cout
<<
"processing command "
<<
command
<<
endl
;
gROOT
->
ProcessLine
(
command
);
gROOT
->
ProcessLine
(
command
);
cout
<<
"processed command "
<<
command
<<
endl
;
cout
<<
"processed command "
<<
command
<<
endl
;
}
}
\ No newline at end of file
macro/myTransport.C
View file @
28265f89
#include
"TROOT.h"
#include
"TROOT.h"
#include
"TSystem.h"
#include
"TSystem.h"
#include
"myParameters.h"
/*
/*
Macro to run standard cbmroot transport in a simplified form
Macro to run standard cbmroot transport in a simplified form
...
@@ -11,17 +11,16 @@
...
@@ -11,17 +11,16 @@
root -l -q ~/cbmtools/macro/myTransport.C'("mu","10gev","mbias")'
root -l -q ~/cbmtools/macro/myTransport.C'("mu","10gev","mbias")'
*/
*/
void
myTransport
(
TString
inpSetup
=
"el"
,
void
myTransport
(
TString
inpSetup
,
const
char
*
inpEnergy
=
"10gev"
,
const
char
*
inpEnergy
,
const
char
*
inpCentr
=
"mbias"
)
{
const
char
*
inpCentr
)
{
// setup: "el" or "mu"
// setup: "el" or "mu"
// energy: "10gev" or "25gev"
// energy: "10gev" or "25gev"
// centr: "mbias" or "centr"
// centr: "mbias" or "centr"
gSystem
->
Exec
(
"mkdir
data"
);
gSystem
->
Exec
(
"mkdir
"
+
myParameters
::
kDATA_DIR
);
gSystem
->
Exec
(
"cp
$CBMSRCDIR
/macro/run/.rootrc ."
);
gSystem
->
Exec
(
"cp
"
+
myParameters
::
kCBMROOT_DIR
+
"
/macro/run/.rootrc ."
);
TString
s
;
TString
s
;
TString
setup
;
TString
setup
;
...
@@ -30,7 +29,8 @@ void myTransport(TString inpSetup,
...
@@ -30,7 +29,8 @@ void myTransport(TString inpSetup,
}
else
if
(
inpSetup
==
"mu"
)
{
}
else
if
(
inpSetup
==
"mu"
)
{
setup
=
"
\"
sis100_muon_jpsi
\"
"
;
setup
=
"
\"
sis100_muon_jpsi
\"
"
;
}
else
{
}
else
{
cout
<<
"Wrong setup name
\"
"
<<
inpSetup
<<
"
\"
!!!"
<<
endl
;
// TODO: Change stdout to stderr (?)
cerr
<<
"Wrong setup name
\"
"
<<
inpSetup
<<
"
\"
!!!"
<<
endl
;
return
;
return
;
}
}
...
@@ -38,30 +38,30 @@ void myTransport(TString inpSetup,
...
@@ -38,30 +38,30 @@ void myTransport(TString inpSetup,
file
=
file
+
inpSetup
+
"."
+
inpEnergy
+
"."
+
inpCentr
;
file
=
file
+
inpSetup
+
"."
+
inpEnergy
+
"."
+
inpCentr
;
TString
events
;
TString
events
;
events
=
events
+
"
\"
/home/cbmdock/cbmroot
/input/urqmd.auau."
+
inpEnergy
events
=
events
+
"
\"
"
+
myParameters
::
kCBMROOT_DIR
+
"
/input/urqmd.auau."
+
inpEnergy
+
"."
+
inpCentr
+
".root
\"
"
;
+
"."
+
inpCentr
+
".root
\"
"
;
TString
command
;
TString
command
;
command
=
command
+
".x
$CBMSRCDIR
/macro/run/run_transport.C("
+
"10,"
+
setup
command
=
command
+
".x
"
+
myParameters
::
kCBMROOT_DIR
+
"
/macro/run/run_transport.C("
+
"10,"
+
setup
+
",
\"
data
/"
+
file
+
"
\"
,"
+
events
+
")"
;
+
",
\"
"
+
myParameters
::
kDATA_DIR
+
"
/"
+
file
+
"
\"
,"
+
events
+
")"
;
cout
<<
"processing command "
<<
command
<<
endl
;
cout
<<
"processing command "
<<
command
<<
endl
;
gROOT
->
ProcessLine
(
command
);
gROOT
->
ProcessLine
(
command
);
gSystem
->
Exec
(
s
+
"ln -sf "
+
file
+
".par.root
data
/"
+
file
gSystem
->
Exec
(
s
+
"ln -sf "
+
file
+
".par.root
"
+
myParameters
::
kDATA_DIR
+
"
/"
+
file
+
".eb.par.root"
);
+
".eb.par.root"
);
gSystem
->
Exec
(
s
+
"ln -sf "
+
file
+
".tra.root
data
/"
+
file
gSystem
->
Exec
(
s
+
"ln -sf "
+
file
+
".tra.root
"
+
myParameters
::
kDATA_DIR
+
"
/"
+
file
+
".eb.tra.root"
);
+
".eb.tra.root"
);
gSystem
->
Exec
(
s
+
"ln -sf "
+
file
+
".geo.root
data
/"
+
file
gSystem
->
Exec
(
s
+
"ln -sf "
+
file
+
".geo.root
"
+
myParameters
::
kDATA_DIR
+
"
/"
+
file
+
".eb.geo.root"
);
+
".eb.geo.root"
);
gSystem
->
Exec
(
s
+
"ln -sf "
+
file
+
".par.root
data
/"
+
file
gSystem
->
Exec
(
s
+
"ln -sf "
+
file
+
".par.root
"
+
myParameters
::
kDATA_DIR
+
"
/"
+
file
+
".tb.par.root"
);
+
".tb.par.root"
);
gSystem
->
Exec
(
s
+
"ln -sf "
+
file
+
".tra.root
data
/"
+
file
gSystem
->
Exec
(
s
+
"ln -sf "
+
file
+
".tra.root
"
+
myParameters
::
kDATA_DIR
+
"
/"
+
file
+
".tb.tra.root"
);
+
".tb.tra.root"
);
gSystem
->
Exec
(
s
+
"ln -sf "
+
file
+
".geo.root
data
/"
+
file
gSystem
->
Exec
(
s
+
"ln -sf "
+
file
+
".geo.root
"
+
myParameters
::
kDATA_DIR
+
"
/"
+
file
+
".tb.geo.root"
);
+
".tb.geo.root"
);
cout
<<
"processed command "
<<
command
<<
endl
;
cout
<<
"processed command "
<<
command
<<
endl
;
}
}
\ No newline at end of file
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment