Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
nptool
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
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
Admin message
Gitlab has been updated. More info
here
.
Show more breadcrumbs
np
nptool
Commits
73e99182
Commit
73e99182
authored
4 years ago
by
LAVIRON Adrien
Browse files
Options
Downloads
Plain Diff
Merge branch 'NPTool.2.dev' of
https://gitlab.in2p3.fr/np/nptool
into NPTool.2.dev
parents
b4196d02
cd919c5a
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Projects/ComptonTelescope/online/src/online_dsssd.cpp
+24
-6
24 additions, 6 deletions
Projects/ComptonTelescope/online/src/online_dsssd.cpp
with
24 additions
and
6 deletions
Projects/ComptonTelescope/online/src/online_dsssd.cpp
+
24
−
6
View file @
73e99182
...
@@ -15,12 +15,12 @@
...
@@ -15,12 +15,12 @@
#include
<iostream>
#include
<iostream>
#include
<fstream>
#include
<fstream>
#include
<string>
#include
<string>
#include
<cstdlib>
using
namespace
std
;
using
namespace
std
;
//--//--//--//--//--//--//--//--//--//--//--//--//--//--//--//
//--//--//--//--//--//--//--//--//--//--//--//--//--//--//--//
int
main
()
int
main
(
int
argc
,
char
*
argv
[]
)
{
{
///////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////
// configure option manager
// configure option manager
// NPOptionManager::getInstance()->Destroy();
// NPOptionManager::getInstance()->Destroy();
...
@@ -49,16 +49,34 @@ int main()
...
@@ -49,16 +49,34 @@ int main()
auto
ccamPhys
=
(
TComptonTelescopePhysics
*
)
m_NPDetectorManager
->
GetDetector
(
"ComptonTelescope"
);
auto
ccamPhys
=
(
TComptonTelescopePhysics
*
)
m_NPDetectorManager
->
GetDetector
(
"ComptonTelescope"
);
ccamPhys
->
SetRawDataPointer
(
ccamData
);
ccamPhys
->
SetRawDataPointer
(
ccamData
);
// deal with file name and number of events to treat from command line
std
::
cout
<<
"
\n
"
;
int
nevents
=
-
1
;
string
fileName
=
"bb7_3309-7_cs137_20210304_14h35_conv.root"
;
if
(
argc
==
1
)
{
std
::
cout
<<
"Name of file to analyse should be provided as a command line argument
\n
"
;
std
::
cout
<<
"Default file "
<<
fileName
<<
" is considered
\n
"
;
}
else
{
fileName
=
argv
[
1
];
if
(
argc
==
3
)
nevents
=
std
::
atoi
(
argv
[
2
]);
}
// read data file/flux and fill ccamData object
// read data file/flux and fill ccamData object
std
::
cout
<<
"Reading data
\n
"
;
std
::
cout
<<
"Reading data
from "
<<
fileName
<<
"
\n
"
;
DecodeD
*
DD
=
new
DecodeD
(
true
);
// Instantiates DecodeD object reading DSSSD(s) data flux
DecodeD
*
DD
=
new
DecodeD
(
true
);
// Instantiates DecodeD object reading DSSSD(s) data flux
newframe_t
*
event
;
newframe_t
*
event
;
DD
->
setTree
(
"../data/20200128_10h44_bi207_conv.root"
);
fileName
=
"../data/"
+
fileName
;
DD
->
setTree
(
fileName
.
c_str
());
// DD -> setTree("../data/20200128_10h44_bi207_conv.root");
// DD -> setTree("../data/bb7_3309-7_cs137_20210304_14h35_conv.root");
//DD -> setTree("../data/bb7_3309-7_bi207_20210209_12h50_run10_conv.root");
//DD -> setTree("../data/bb7_3309-7_bi207_20210209_12h50_run10_conv.root");
int
dlen
=
DD
->
getLength
();
int
dlen
=
DD
->
getLength
();
// read a limited number of events
if
(
nevents
>
0
)
dlen
=
nevents
;
std
::
cout
<<
"Reading the first "
<<
dlen
<<
" entries
\n
"
;
while
(
DD
->
getCursor
()
<
49970
)
while
(
DD
->
getCursor
()
<
dlen
)
//while (DD -> getCursor() < dlen)
{
{
// cout number of entries treated
// cout number of entries treated
if
(
DD
->
getCursor
()
%
10000
==
0
)
{
if
(
DD
->
getCursor
()
%
10000
==
0
)
{
...
...
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