Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
J
JZCaPA
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
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
Riccardo Longo
JZCaPA
Commits
721b5fe5
Commit
721b5fe5
authored
6 years ago
by
Riccardo Longo
Browse files
Options
Downloads
Patches
Plain Diff
Control to spot double entries in the .xml file and avoid crashes
parent
fc3e069e
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Analysis/src/DataReader.cpp
+11
-4
11 additions, 4 deletions
Analysis/src/DataReader.cpp
with
11 additions
and
4 deletions
Analysis/src/DataReader.cpp
+
11
−
4
View file @
721b5fe5
...
...
@@ -182,7 +182,14 @@ void DataReader::LoadConfigurationFile(std::string _inFile ){
m_XMLparser
->
getChildValue
(
"channel"
,
i
,
"is_on"
,
buffer_ch
->
is_on
);
m_XMLparser
->
getChildValue
(
"channel"
,
i
,
"Vop"
,
buffer_ch
->
Vop
);
channelEntries
.
push_back
(
buffer_ch
);
bool
isNew
(
true
);
for
(
int
k
=
0
;
k
<
channelEntries
.
size
();
k
++
){
if
(
buffer_ch
->
name
==
channelEntries
.
at
(
k
)
->
name
){
std
::
cout
<<
"WARNING!!! Redundancy in your settings file for "
<<
buffer_ch
->
name
<<
". Check it carefully. The second entry found will be skipped..."
<<
std
::
endl
;
isNew
=
false
;
}
}
if
(
isNew
)
channelEntries
.
push_back
(
buffer_ch
);
}
std
::
cout
<<
"Loaded "
<<
channelEntries
.
size
()
<<
" configuration entries "
<<
std
::
endl
;
...
...
@@ -346,15 +353,16 @@ void DataReader::ProcessEvents(){
// !! EVENT LOOP
for
(
int
ev
=
0
;
ev
<
tree
->
GetEntries
();
ev
++
){
tree
->
GetEntry
(
ev
);
std
::
cout
<<
"Event : "
<<
ev
<<
std
::
endl
;
// Fill the raw waveforms
for
(
uint
detID
=
0
;
detID
<
(
int
)
m_detectors
.
size
();
detID
++
)
m_detectors
.
at
(
detID
)
->
FillHistograms
();
std
::
cout
<<
"Event : "
<<
ev
<<
std
::
endl
;
//Here if you're interested in already processed waveform
for
(
uint
ch
=
0
;
ch
<
m_nCh
;
ch
++
)
{
// Loop over samples in each channel
...
...
@@ -372,7 +380,6 @@ void DataReader::ProcessEvents(){
if
(
m_debug
){
// Uncomment to run a few events at a time
//if(ev==8) break;
// Uncomment to run a single event
if
(
ev
!=
8
)
continue
;
...
...
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