Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
N
NeuRad_tests
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Vratislav Chudoba
NeuRad_tests
Commits
90bdde37
Commit
90bdde37
authored
Jan 09, 2017
by
Vratislav Chudoba
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Data analysed for 4 channels.
parent
f6a3f0c4
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
29 additions
and
30 deletions
+29
-30
read_binary.cpp
convertDRS4/read_binary.cpp
+1
-1
analysis_07_1.root
data/dataDSR4/analysis_07_1.root
+0
-0
AEvent.h
dataClasses/AEvent.h
+2
-2
analyse.C
macros/analyse.C
+22
-8
testShowGraphs.cxx
macros/testShowGraphs.cxx
+4
-4
try_event_class.cxx
macros/try_event_class.cxx
+0
-15
No files found.
convertDRS4/read_binary.cpp
View file @
90bdde37
...
@@ -130,7 +130,7 @@ int main(int argc, const char * argv[])
...
@@ -130,7 +130,7 @@ int main(int argc, const char * argv[])
RawEvent
*
event
[
4
];
RawEvent
*
event
[
4
];
for
(
Int_t
i
=
0
;
i
<
4
;
i
++
)
{
for
(
Int_t
i
=
0
;
i
<
4
;
i
++
)
{
event
[
i
]
=
new
RawEvent
();
event
[
i
]
=
new
RawEvent
();
bName
.
Form
(
"ch%d"
,
i
);
bName
.
Form
(
"ch%d
.
"
,
i
);
rtree
->
Bronch
(
bName
.
Data
(),
"RawEvent"
,
&
event
[
i
]);
rtree
->
Bronch
(
bName
.
Data
(),
"RawEvent"
,
&
event
[
i
]);
}
}
...
...
data/dataDSR4/analysis_07_1.root
View file @
90bdde37
No preview for this file type
dataClasses/AEvent.h
View file @
90bdde37
...
@@ -43,8 +43,8 @@ private:
...
@@ -43,8 +43,8 @@ private:
public
:
public
:
AEvent
();
AEvent
();
virtual
~
AEvent
();
ClassDef
(
AEvent
,
1
)
virtual
~
AEvent
();
;
ClassDef
(
AEvent
,
1
)
;
void
SetRawDataFile
(
const
char
*
inprawfile
,
const
char
*
treename
);
void
SetRawDataFile
(
const
char
*
inprawfile
,
const
char
*
treename
);
void
ProcessEvent
();
void
ProcessEvent
();
...
...
macros/analyse.C
View file @
90bdde37
...
@@ -5,23 +5,37 @@ void analyse()
...
@@ -5,23 +5,37 @@ void analyse()
TFile
*
f
=
new
TFile
(
"../data/rawDataDSR4/NeuRad_test_07_1.root"
);
TFile
*
f
=
new
TFile
(
"../data/rawDataDSR4/NeuRad_test_07_1.root"
);
TTree
*
tr
=
(
TTree
*
)
f
->
Get
(
"rtree"
);
TTree
*
tr
=
(
TTree
*
)
f
->
Get
(
"rtree"
);
RawEvent
*
revent
=
new
RawEvent
();
const
Int_t
noBranches
=
4
;
tr
->
SetBranchAddress
(
"rawEvent"
,
&
revent
);
TString
bName
;
RawEvent
*
revent
[
noBranches
];
for
(
Int_t
j
=
0
;
j
<
noBranches
;
j
++
)
{
revent
[
j
]
=
new
RawEvent
();
bName
.
Form
(
"ch%d"
,
j
);
tr
->
SetBranchAddress
(
bName
.
Data
(),
&
revent
[
j
]);
}
// tr->SetMakeClass(1);
// tr->SetMakeClass(1);
TFile
*
fw
=
new
TFile
(
"../data/dataDSR4/analysis_07_1.root"
,
"RECREATE"
);
TFile
*
fw
=
new
TFile
(
"../data/dataDSR4/analysis_07_1.root"
,
"RECREATE"
);
TTree
*
tw
=
new
TTree
(
"drs4analysis"
,
"title of drs4 analysis tree"
);
TTree
*
tw
=
new
TTree
(
"atree"
,
"title of drs4 analysis tree"
);
AEvent
*
wevent
=
new
AEvent
();
AEvent
*
wevent
[
noBranches
];
wevent
->
SetInputEvent
(
&
revent
);
for
(
Int_t
j
=
0
;
j
<
noBranches
;
j
++
)
{
tw
->
Bronch
(
"AEvent"
,
"AEvent"
,
&
wevent
);
wevent
[
j
]
=
new
AEvent
();
bName
.
Form
(
"Ach%d."
,
j
);
wevent
[
j
]
->
SetInputEvent
(
&
revent
[
j
]);
tw
->
Bronch
(
bName
.
Data
(),
"AEvent"
,
&
wevent
[
j
]);
}
Long64_t
nentries
=
tr
->
GetEntries
();
Long64_t
nentries
=
tr
->
GetEntries
();
for
(
Long64_t
i
=
0
;
i
<
nentries
;
i
++
)
{
for
(
Long64_t
i
=
0
;
i
<
nentries
;
i
++
)
{
tr
->
GetEntry
(
i
);
tr
->
GetEntry
(
i
);
wevent
->
ProcessEvent
();
for
(
Int_t
j
=
0
;
j
<
noBranches
;
j
++
)
{
wevent
[
j
]
->
Reset
();
wevent
[
j
]
->
ProcessEvent
();
}
tw
->
Fill
();
tw
->
Fill
();
}
}
...
...
macros/testShowGraphs.cxx
View file @
90bdde37
...
@@ -3,11 +3,11 @@ void testShowGraphs()
...
@@ -3,11 +3,11 @@ void testShowGraphs()
gSystem
->
Load
(
"../libData.so"
);
gSystem
->
Load
(
"../libData.so"
);
TFile
fr
(
"../data/
rawDataDSR4/NeuRad_test
_07_1.root"
);
TFile
fr
(
"../data/
dataDSR4/analysis
_07_1.root"
);
TTree
*
tr
=
(
TTree
*
)
fr
.
Get
(
"
r
tree"
);
TTree
*
tr
=
(
TTree
*
)
fr
.
Get
(
"
a
tree"
);
RawEvent
*
revent
=
new
Raw
Event
();
AEvent
*
revent
=
new
A
Event
();
tr
->
SetBranchAddress
(
"
rawEvent
"
,
&
revent
);
tr
->
SetBranchAddress
(
"
Ach1
"
,
&
revent
);
TGraph
*
gr
[
10
];
TGraph
*
gr
[
10
];
...
...
macros/try_event_class.cxx
deleted
100644 → 0
View file @
f6a3f0c4
#include <TSystem.h>
#include <iostream>
using
namespace
std
;
void
try_event_class
()
{
gSystem
->
Load
(
"/home/dariak/NeuRad_tests/macros/event_C.so"
);
event
ev
;
ev
.
GetEntry
(
499
);
ev
.
Show
();
ev
.
Loop
();
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment