Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
H
hcana
Manage
Activity
Members
Labels
Plan
Issues
6
Issue boards
Milestones
Wiki
Code
Merge requests
1
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
analyzer_software
hcana
Commits
4b09c617
Commit
4b09c617
authored
6 years ago
by
Whitney Armstrong
Browse files
Options
Downloads
Patches
Plain Diff
Adding fmt/spdlog
parent
69e1d4a2
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
CMakeLists.txt
+2
-0
2 additions, 0 deletions
CMakeLists.txt
src/Scandalizer.cxx
+40
-36
40 additions, 36 deletions
src/Scandalizer.cxx
src/THcAnalyzer.cxx
+0
-3
0 additions, 3 deletions
src/THcAnalyzer.cxx
with
42 additions
and
39 deletions
CMakeLists.txt
+
2
−
0
View file @
4b09c617
...
...
@@ -41,6 +41,8 @@ else()
get_target_property
(
SPDLOG_INCLUDE_DIR spdlog::spdlog INTERFACE_INCLUDE_DIRECTORIES
)
endif
()
#https://github.com/fmtlib/fmt.git
find_package
(
fmt REQUIRED
)
#----------------------------------------------------------------------------
# Install in GNU-style directory layout
...
...
This diff is collapsed.
Click to expand it.
src/Scandalizer.cxx
+
40
−
36
View file @
4b09c617
...
...
@@ -10,12 +10,13 @@ Int_t Scandalizer::ReadOneEvent()
// Read one event from current run (fRun) and raw-decode it using the
// current decoder (fEvData)
if
(
fDoBench
)
fBench
->
Begin
(
"RawDecode"
);
if
(
fDoBench
)
{
fBench
->
Begin
(
"RawDecode"
);
}
bool
to_read_file
=
false
;
if
(
!
fEvData
->
IsMultiBlockMode
()
||
(
fEvData
->
IsMultiBlockMode
()
&&
fEvData
->
BlockIsDone
())
)
(
fEvData
->
IsMultiBlockMode
()
&&
fEvData
->
BlockIsDone
())
)
{
to_read_file
=
true
;
}
// Find next event buffer in CODA file. Quit if error.
Int_t
status
=
THaRunBase
::
READ_OK
;
...
...
@@ -31,8 +32,9 @@ Int_t Scandalizer::ReadOneEvent()
std
::
cout
<<
skipped
<<
" skipped
\n
"
;
continue
;
}
if
(
to_read_file
)
if
(
to_read_file
)
{
status
=
fRun
->
ReadEvent
();
}
// there may be a better place to do this, but this works
if
(
fWantCodaVers
>
0
)
{
...
...
@@ -77,7 +79,7 @@ Int_t Scandalizer::ReadOneEvent()
break
;
}
if
(
fDoBench
)
fBench
->
Stop
(
"RawDecode"
);
if
(
fDoBench
)
{
fBench
->
Stop
(
"RawDecode"
);
}
return
status
;
}
...
...
@@ -89,13 +91,14 @@ Int_t Scandalizer::Process( THaRunBase* run )
// If Event and Filename are defined, then fill the output tree with Event
// and write the file.
static
const
char
*
const
here
=
"Process"
;
static
const
char
*
const
here
=
"
Scandalizer::
Process"
;
if
(
!
run
)
{
if
(
fRun
)
if
(
fRun
)
{
run
=
fRun
;
else
}
else
{
return
-
1
;
}
}
//--- Initialization. Creates fFile, fOutput, and fEvent if necessary.
...
...
@@ -128,13 +131,11 @@ Int_t Scandalizer::Process( THaRunBase* run )
// Informational messages
if
(
fVerbose
>
1
)
{
cout
<<
"Decoder: helicity "
<<
(
fEvData
->
HelicityEnabled
()
?
"enabled"
:
"disabled"
)
<<
endl
;
cout
<<
endl
<<
"Starting analysis"
<<
endl
;
_logger
->
info
(
"Decoder: helicity {}"
,
(
fEvData
->
HelicityEnabled
()
?
"enabled"
:
"disabled"
));
_logger
->
trace
(
"Starting analysis in {}"
,
here
);
}
if
(
fVerbose
>
2
&&
fRun
->
GetFirstEvent
()
>
1
)
{
_logger
->
info
(
"Skipping {} events"
,
fRun
->
GetFirstEvent
());
if
(
fVerbose
>
1
&&
fRun
->
GetFirstEvent
()
>
1
)
{
_logger
->
debug
(
"Skipping {} events"
,
fRun
->
GetFirstEvent
());
}
//--- The main event loop.
...
...
@@ -212,9 +213,9 @@ Int_t Scandalizer::Process( THaRunBase* run )
}
//--- Clear all tests/cuts
if
(
fDoBench
)
fBench
->
Begin
(
"Cuts"
);
if
(
fDoBench
)
{
fBench
->
Begin
(
"Cuts"
);
}
gHaCuts
->
ClearAll
();
if
(
fDoBench
)
fBench
->
Stop
(
"Cuts"
);
if
(
fDoBench
)
{
fBench
->
Stop
(
"Cuts"
);
}
//--- Perform the analysis
Int_t
err
=
MainAnalysis
();
...
...
@@ -230,7 +231,7 @@ Int_t Scandalizer::Process( THaRunBase* run )
terminate
=
true
;
break
;
default:
Error
(
here
,
"
Unknown return code from MainAnalysis():
%d"
,
err
);
_logger
->
error
(
"{} :
Unknown return code from MainAnalysis():
{}"
,
here
,
err
);
terminate
=
fatal
=
true
;
continue
;
}
...
...
@@ -239,6 +240,7 @@ Int_t Scandalizer::Process( THaRunBase* run )
}
// End of event loop
// restore the previous signal handler
signal
(
SIGINT
,
prev_handler
);
EndAnalysis
();
...
...
@@ -285,32 +287,34 @@ Int_t Scandalizer::Process( THaRunBase* run )
if
(
!
fatal
)
{
PrintCounters
();
if
(
fVerbose
>
1
)
PrintScalers
();
//if (fVerbose > 1) {
// PrintScalers();
//}
}
}
// Print cut summary (also to file if one given)
//if( !fatal )
// PrintCutSummary();
if
(
!
fatal
)
{
PrintCutSummary
();
}
// Print timing statistics, if benchmarking enabled
//if( fDoBench && !fatal ) {
// cout << "Timing summary:" << endl;
// fBench->Print("Init");
// fBench->Print("RawDecode");
// fBench->Print("Decode");
// fBench->Print("CoarseTracking");
// fBench->Print("CoarseReconstruct");
// fBench->Print("Tracking");
// fBench->Print("Reconstruct");
// fBench->Print("Physics");
// fBench->Print("Output");
// fBench->Print("Cuts");
//}
//if( (fVerbose>1 || fDoBench) && !fatal )
// fBench->Print("Total");
if
(
fDoBench
&&
!
fatal
)
{
cout
<<
"Timing summary:"
<<
endl
;
fBench
->
Print
(
"Init"
);
fBench
->
Print
(
"RawDecode"
);
fBench
->
Print
(
"Decode"
);
fBench
->
Print
(
"CoarseTracking"
);
fBench
->
Print
(
"CoarseReconstruct"
);
fBench
->
Print
(
"Tracking"
);
fBench
->
Print
(
"Reconstruct"
);
fBench
->
Print
(
"Physics"
);
fBench
->
Print
(
"Output"
);
fBench
->
Print
(
"Cuts"
);
}
if
(
(
fVerbose
>
1
||
fDoBench
)
&&
!
fatal
){
fBench
->
Print
(
"Total"
);
}
//keep the last run available
// gHaRun = NULL;
...
...
This diff is collapsed.
Click to expand it.
src/THcAnalyzer.cxx
+
0
−
3
View file @
4b09c617
...
...
@@ -174,7 +174,4 @@ void THcAnalyzer::LoadInfo()
*
lastevent
=
fRun
->
GetFirstEvent
()
+
fRun
->
GetNumAnalyzed
();
}
//_____________________________________________________________________________
ClassImp
(
THcAnalyzer
)
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