Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
H
hallc_replay
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
Container Registry
Model registry
Operate
Environments
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
jlab
hallc
exp
polhe3
hallc_replay
Commits
09c9bd0f
Commit
09c9bd0f
authored
8 years ago
by
Mark K Jones
Committed by
GitHub
8 years ago
Browse files
Options
Downloads
Plain Diff
Merge pull request #14 from JureBericic/fixes
Fixes for ROOT6 and C++11.
parents
54e5fb97
c685d2cc
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
SCRIPTS/hms.C
+13
-13
13 additions, 13 deletions
SCRIPTS/hms.C
SCRIPTS/replay_hms.C
+2
-2
2 additions, 2 deletions
SCRIPTS/replay_hms.C
with
15 additions
and
15 deletions
SCRIPTS/hms.C
+
13
−
13
View file @
09c9bd0f
...
@@ -5,7 +5,7 @@ void replay_hms(Int_t RunNumber=0, Int_t MaxEvent=0) {
...
@@ -5,7 +5,7 @@ void replay_hms(Int_t RunNumber=0, Int_t MaxEvent=0) {
if
(
RunNumber
==
0
)
{
if
(
RunNumber
==
0
)
{
cout
<<
"Enter a Run Number (-1 to exit): "
;
cout
<<
"Enter a Run Number (-1 to exit): "
;
cin
>>
RunNumber
;
cin
>>
RunNumber
;
if
(
RunNumber
<=
0
)
b
re
ak
;
if
(
RunNumber
<=
0
)
re
turn
;
}
}
if
(
MaxEvent
==
0
)
{
if
(
MaxEvent
==
0
)
{
cout
<<
"
\n
Number of Events to analyze: "
;
cout
<<
"
\n
Number of Events to analyze: "
;
...
@@ -15,13 +15,13 @@ void replay_hms(Int_t RunNumber=0, Int_t MaxEvent=0) {
...
@@ -15,13 +15,13 @@ void replay_hms(Int_t RunNumber=0, Int_t MaxEvent=0) {
exit
;
exit
;
}
}
}
}
char
*
RunFileNamePattern
=
"raw/test_%d.log.0"
;
const
char
*
RunFileNamePattern
=
"raw/test_%d.log.0"
;
const
char
*
ROOTFileNamePattern
=
"ROOTfiles/hms1190_%d.root"
;
const
char
*
ROOTFileNamePattern
=
"ROOTfiles/hms1190_%d.root"
;
//
//
gHcParms
->
Define
(
"gen_run_number"
,
"Run Number"
,
RunNumber
);
gHcParms
->
Define
(
"gen_run_number"
,
"Run Number"
,
RunNumber
);
gHcParms
->
AddString
(
"g_ctp_database_filename"
,
"DBASE/standard.database"
);
gHcParms
->
AddString
(
"g_ctp_database_filename"
,
"DBASE/standard.database"
);
gHcParms
->
Load
(
gHcParms
->
GetString
(
"g_ctp_database_filename"
),
RunNumber
);
gHcParms
->
Load
(
gHcParms
->
GetString
(
"g_ctp_database_filename"
),
RunNumber
);
// g_ctp_parm_filename and g_decode_map_filename should now be defined
// g_ctp_parm_filename and g_decode_map_filename should now be defined
...
@@ -39,12 +39,12 @@ void replay_hms(Int_t RunNumber=0, Int_t MaxEvent=0) {
...
@@ -39,12 +39,12 @@ void replay_hms(Int_t RunNumber=0, Int_t MaxEvent=0) {
// Load the Hall C style detector map
// Load the Hall C style detector map
gHcDetectorMap
=
new
THcDetectorMap
();
gHcDetectorMap
=
new
THcDetectorMap
();
gHcDetectorMap
->
Load
(
gHcParms
->
GetString
(
"g_decode_map_filename"
));
gHcDetectorMap
->
Load
(
gHcParms
->
GetString
(
"g_decode_map_filename"
));
// Set up the equipment to be analyzed.
// Set up the equipment to be analyzed.
THaApparatus
*
HMS
=
new
THcHallCSpectrometer
(
"H"
,
"HMS"
);
THaApparatus
*
HMS
=
new
THcHallCSpectrometer
(
"H"
,
"HMS"
);
gHaApps
->
Add
(
HMS
);
gHaApps
->
Add
(
HMS
);
// HMS->AddDetector( new THcHodoscope("hod", "Hodoscope" ));
// HMS->AddDetector( new THcHodoscope("hod", "Hodoscope" ));
//HMS->AddDetector( new THcShower("cal", "Shower" ));
//HMS->AddDetector( new THcShower("cal", "Shower" ));
//THcCherenkov* cherenkov = new THcCherenkov("cher", "Gas Cerenkov" );
//THcCherenkov* cherenkov = new THcCherenkov("cher", "Gas Cerenkov" );
...
@@ -66,13 +66,13 @@ void replay_hms(Int_t RunNumber=0, Int_t MaxEvent=0) {
...
@@ -66,13 +66,13 @@ void replay_hms(Int_t RunNumber=0, Int_t MaxEvent=0) {
// tests/cuts, loops over Acpparatus's and PhysicsModules,
// tests/cuts, loops over Acpparatus's and PhysicsModules,
// and executes the output routines.
// and executes the output routines.
THcAnalyzer
*
analyzer
=
new
THcAnalyzer
;
THcAnalyzer
*
analyzer
=
new
THcAnalyzer
;
// A simple event class to be output to the resulting tree.
// A simple event class to be output to the resulting tree.
// Creating your own descendant of THaEvent is one way of
// Creating your own descendant of THaEvent is one way of
// defining and controlling the output.
// defining and controlling the output.
THaEvent
*
event
=
new
THaEvent
;
THaEvent
*
event
=
new
THaEvent
;
// Define the run(s) that we want to analyze.
// Define the run(s) that we want to analyze.
// We just set up one, but this could be many.
// We just set up one, but this could be many.
char
RunFileName
[
100
];
char
RunFileName
[
100
];
...
@@ -89,16 +89,16 @@ void replay_hms(Int_t RunNumber=0, Int_t MaxEvent=0) {
...
@@ -89,16 +89,16 @@ void replay_hms(Int_t RunNumber=0, Int_t MaxEvent=0) {
// Define the analysis parameters
// Define the analysis parameters
analyzer
->
SetCountMode
(
2
);
// 0 = counter is # of physics triggers
analyzer
->
SetCountMode
(
2
);
// 0 = counter is # of physics triggers
//1 = counter is # of all decode reads
//1 = counter is # of all decode reads
//2= counter is event number
//2= counter is event number
analyzer
->
SetEvent
(
event
);
analyzer
->
SetEvent
(
event
);
analyzer
->
SetOutFile
(
ROOTFileName
.
Data
()
);
analyzer
->
SetOutFile
(
ROOTFileName
.
Data
()
);
analyzer
->
SetOdefFile
(
"Def-files/hdana.def"
);
analyzer
->
SetOdefFile
(
"Def-files/hdana.def"
);
analyzer
->
SetCutFile
(
"Def-files/hdana_cuts.def"
);
// optional
analyzer
->
SetCutFile
(
"Def-files/hdana_cuts.def"
);
// optional
// File to record cuts accounting information
// File to record cuts accounting information
// analyzer->SetSummaryFile("summary_example.log"); // optional
// analyzer->SetSummaryFile("summary_example.log"); // optional
analyzer
->
Process
(
run
);
// start the actual analysis
analyzer
->
Process
(
run
);
// start the actual analysis
analyzer
->
PrintReport
(
"TEMPLATES/report.template"
,
Form
(
"REPORT_OUTPUT/replay_both_%05d.report"
,
RunNumber
));
analyzer
->
PrintReport
(
"TEMPLATES/report.template"
,
Form
(
"REPORT_OUTPUT/replay_both_%05d.report"
,
RunNumber
));
}
}
This diff is collapsed.
Click to expand it.
SCRIPTS/replay_hms.C
+
2
−
2
View file @
09c9bd0f
...
@@ -4,7 +4,7 @@ void replay_hms(Int_t RunNumber=0, Int_t MaxEvent=0) {
...
@@ -4,7 +4,7 @@ void replay_hms(Int_t RunNumber=0, Int_t MaxEvent=0) {
if
(
RunNumber
==
0
)
{
if
(
RunNumber
==
0
)
{
cout
<<
"Enter a Run Number (-1 to exit): "
;
cout
<<
"Enter a Run Number (-1 to exit): "
;
cin
>>
RunNumber
;
cin
>>
RunNumber
;
if
(
RunNumber
<=
0
)
b
re
ak
;
if
(
RunNumber
<=
0
)
re
turn
;
}
}
if
(
MaxEvent
==
0
)
{
if
(
MaxEvent
==
0
)
{
cout
<<
"
\n
Number of Events to analyze: "
;
cout
<<
"
\n
Number of Events to analyze: "
;
...
@@ -16,7 +16,7 @@ void replay_hms(Int_t RunNumber=0, Int_t MaxEvent=0) {
...
@@ -16,7 +16,7 @@ void replay_hms(Int_t RunNumber=0, Int_t MaxEvent=0) {
}
}
// Create file name patterns.
// Create file name patterns.
char
*
RunFileNamePattern
=
"raw/test_%d.dat"
;
const
char
*
RunFileNamePattern
=
"raw/test_%d.dat"
;
const
char
*
ROOTFileNamePattern
=
"ROOTfiles/hms1190_%d.root"
;
const
char
*
ROOTFileNamePattern
=
"ROOTfiles/hms1190_%d.root"
;
// Add variables to global list.
// Add variables to global list.
gHcParms
->
Define
(
"gen_run_number"
,
"Run Number"
,
RunNumber
);
gHcParms
->
Define
(
"gen_run_number"
,
"Run Number"
,
RunNumber
);
...
...
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