Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
Anna
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
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
LAGO
Software
Anna
Commits
2abf84b4
Commit
2abf84b4
authored
6 years ago
by
Hernán Asorey
Browse files
Options
Downloads
Patches
Plain Diff
Verbosity level for raw.cc and defines pulse containers in lago_file.h
parent
82645ff0
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
lago_file.h
+1
-1
1 addition, 1 deletion
lago_file.h
raw.cc
+26
-4
26 additions, 4 deletions
raw.cc
with
27 additions
and
5 deletions
lago_file.h
+
1
−
1
View file @
2abf84b4
...
...
@@ -148,7 +148,7 @@ class LagoFile {
}
}
else
{
// reading pulse
int
c0
,
c1
,
c2
;
int
c0
=
0
,
c1
=
0
,
c2
=
0
;
sscanf
(
line
,
"%d %d %d
\n
"
,
&
c0
,
&
c1
,
&
c2
);
Pulse
[
NbPulses
].
fill
(
c0
,
c1
,
c2
);
}
...
...
This diff is collapsed.
Click to expand it.
raw.cc
+
26
−
4
View file @
2abf84b4
...
...
@@ -84,6 +84,8 @@ int qtr_default = 55; // defined by Luis Otiniano, using typical fluctuations at
// SATURATED PEAKS
int
sat_level
[
CHANNELS
];
int
sat_default
=
ADCMAX
-
1
;
bool
sat_discard
=
false
;
int
sat_drop
[
CHANNELS
];
// TIME DIFFERENCE (AND ALSO ALL PULSE DATA) ANALYSIS
int
tim_pc
=
0
,
tim_pt
=
0
,
tim_dc
=
0
,
tim_dt
=
0
;
...
...
@@ -107,6 +109,9 @@ double mon_avg_bl_tmp;
double
mon_dev_bl_tmp
;
int
mon_bl_counts
;
// VERBOSITY
int
iverbose
=
0
;
// SOL variable time integration
int
iSolTime
=
60
;
// default 60s
...
...
@@ -155,15 +160,16 @@ void TreatSecond(LagoGeneric *Data, LagoEvent*Pulse, int NbPulses) {
// processing pulses
for
(
int
i
=
0
;
i
<
NbPulses
;
i
++
)
{
// discard saturated and it is a saturated pulse?
int
sat_d
rop
=
0
;
sat_d
iscard
=
false
;
if
(
isat
)
{
for
(
int
j
=
0
;
j
<
CHANNELS
;
j
++
)
{
if
(
Pulse
[
i
].
GetPeak
(
j
)
>=
sat_level
[
j
])
{
// pulse is saturated
sat_drop
++
;
sat_drop
[
j
]
++
;
sat_discard
=
true
;
}
}
}
if
(
isat
&&
sat_d
rop
)
if
(
isat
&&
sat_d
iscard
)
continue
;
// impossing external trigger
...
...
@@ -414,7 +420,7 @@ void TreatSecond(LagoGeneric *Data, LagoEvent*Pulse, int NbPulses) {
}
}
void
Usage
(
char
*
prog
,
int
verbose
=
0
)
void
Usage
(
char
*
prog
)
{
cout
<<
"
\t
"
<<
PROJECT
<<
" "
<<
CODEVERSION
<<
endl
;
cout
<<
endl
;
...
...
@@ -475,6 +481,7 @@ void Usage(char *prog, int verbose=0)
cout
<<
"
\t
-i
\t
Only include pulses that trigger each channel to fill"
<<
endl
;
cout
<<
"
\t
\t
the calibration histograms of each channel (by default,"
<<
endl
;
cout
<<
"
\t
\t
all pulses are included."
<<
endl
;
cout
<<
"
\t
-V
\t
increase verbosity level."
<<
endl
;
cout
<<
"
\t
-?
\t
prints this help and exits"
<<
endl
<<
endl
;
cout
<<
endl
;
exit
(
1
);
...
...
@@ -501,6 +508,8 @@ int main (int argc, char *argv[])
scl_scalers
[
i
][
j
][
l
]
=
0
;
for
(
int
i
=
0
;
i
<
CHANNELS
;
i
++
)
scl_flux
[
i
]
=
0
;
for
(
int
i
=
0
;
i
<
CHANNELS
;
i
++
)
sat_drop
[
i
]
=
0
;
for
(
int
i
=
0
;
i
<
CHANNELS
;
i
++
)
trg_level
[
i
]
=
trg_default
;
for
(
int
i
=
0
;
i
<
CHANNELS
;
i
++
)
...
...
@@ -617,6 +626,9 @@ int main (int argc, char *argv[])
iflx
=
1
;
}
break
;
case
'V'
:
iverbose
=
1
;
break
;
case
'g'
:
isclg
=
1
;
break
;
...
...
@@ -736,6 +748,8 @@ int main (int argc, char *argv[])
snprintf
(
nfi
,
256
,
"%s.raw"
,
ifile
);
raw
.
open
(
nfi
);
}
if
(
iverbose
)
fprintf
(
stderr
,
"Verbose mode is on
\n
"
);
if
(
iall
)
{
snprintf
(
nfi
,
256
,
"bzip2 -9z > %s.all.bz2"
,
ifile
);
...
...
@@ -1056,4 +1070,12 @@ int main (int argc, char *argv[])
if
(
iscl
)
fclose
(
scl
);
}
if
(
iverbose
)
{
if
(
isat
)
{
fprintf
(
stderr
,
"INFO: saturated pulses discarded:
\n\t\t
"
);
for
(
int
j
=
0
;
j
<
CHANNELS
;
j
++
)
fprintf
(
stderr
,
"channel %d: %d. "
,
j
+
1
,
sat_drop
[
j
]);
fprintf
(
stderr
,
"
\n
"
);
}
}
}
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