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
ea515242
Commit
ea515242
authored
Jan 12, 2017
by
Vratislav Chudoba
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Non-working application "convertRawToAnalyzed" added.
parent
58a38423
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
63 additions
and
3 deletions
+63
-3
analyse.cpp
convertRawToAnalyzed/analyse.cpp
+58
-0
IntegralCFD.cxx
macros/IntegralCFD.cxx
+0
-0
makefile
makefile
+5
-3
No files found.
convertRawToAnalyzed/analyse.cpp
0 → 100644
View file @
ea515242
void
analyse
()
{
gSystem
->
Load
(
"../libData.so"
);
TFile
*
f
=
new
TFile
(
"../data/rawDataDSR4/NeuRad_test_07_1.root"
);
TTree
*
tr
=
(
TTree
*
)
f
->
Get
(
"rtree"
);
const
Int_t
noBranches
=
4
;
const
Double_t
cfRatio
=
0.5
;
const
Int_t
cfTD
=
5
;
TString
bName
;
RawEvent
*
revent
[
noBranches
];
// pointer to the array (of RawEvent class) in which raw data for each channel will be put
for
(
Int_t
j
=
0
;
j
<
noBranches
;
j
++
)
{
revent
[
j
]
=
new
RawEvent
();
//each raw event element is of class RawEvent()
bName
.
Form
(
"ch%d."
,
j
);
tr
->
SetBranchAddress
(
bName
.
Data
(),
&
revent
[
j
]);
//read the tree tr with raw data and fill array revent with raw data
}
// tr->SetMakeClass(1);
TFile
*
fw
=
new
TFile
(
"../data/dataDSR4/analysis_07_1.root"
,
"RECREATE"
);
//create .root file with somehow analyzed data
TTree
*
tw
=
new
TTree
(
"atree"
,
"title of drs4 analysis tree"
);
//create analysis tree atree in it
AEvent
*
wevent
[
noBranches
];
// pointer to the array (of AEvent class) in which analyzed data for each channel will be put
for
(
Int_t
j
=
0
;
j
<
noBranches
;
j
++
)
{
wevent
[
j
]
=
new
AEvent
();
bName
.
Form
(
"Ach%d."
,
j
);
wevent
[
j
]
->
SetInputEvent
(
&
revent
[
j
]);
//takes raw event from RawEvent
wevent
[
j
]
->
SetCFratio
(
cfRatio
);
wevent
[
j
]
->
SetCFtimeDelay
(
cfTD
);
tw
->
Bronch
(
bName
.
Data
(),
"AEvent"
,
&
wevent
[
j
]);
// create branches in atree to hold analyzed data
}
//----event loop in tr input tree
Long64_t
nentries
=
tr
->
GetEntries
();
for
(
Long64_t
i
=
0
;
i
<
nentries
;
i
++
)
{
tr
->
GetEntry
(
i
);
if
(
!
(
tr
->
GetEntry
(
i
)
%
100
)
)
{
printf
(
"Found event #%d
\n
"
,
tr
->
GetEntry
(
i
));
}
for
(
Int_t
j
=
0
;
j
<
noBranches
;
j
++
)
{
wevent
[
j
]
->
Reset
();
wevent
[
j
]
->
ProcessEvent
();
//here all the analysis is going on so far
}
tw
->
Fill
();
}
//----end of event loop
tw
->
Write
();
fw
->
Close
();
return
;
}
convertTektronix/IntegralCFD.c
→
macros/IntegralCFD.cxx
View file @
ea515242
File moved
makefile
View file @
ea515242
...
...
@@ -25,12 +25,14 @@ PWD = $(shell pwd)
DATA
=
$(PWD)
/dataClasses
CONVERTDRS4
=
$(PWD)
/convertDRS4
CONVERTTEKTRONIX
=
$(PWD)
/convertTektronix
CONVERTRAWTOANALYZED
=
$(PWD)
/convertRawToAnalyzed
-include
$(DATA)/Data.mk
all
:
libData.so
\
read_binary_DRS4
\
convertTektronix
convertTektronix
\
convertRawToAnalyzed
#ROOT html documentation, it will be done as a program which will be alsa compiled by this makefile, program will be as a last condition after all of the libraries
...
...
@@ -69,11 +71,11 @@ read_binary_DRS4: $(CONVERTDRS4)/read_binary.cpp libData.so
@echo 'Finished building target
:
$@'
@
echo
' '
convert
Tektronix
:
$(CONVERTTEKTRONIX)/read1
.cpp libData.so
convert
RawToAnalyzed
:
$(CONVERTRAWTOANALYZED)/analyse
.cpp libData.so
@
echo
'Building target: $@'
@
echo
'Invoking: GCC C++ Linker'
# $(CC) -L $(ROOTLIBS) -shared -o"libData.so" $(DATAOBJS) $(DATALIBS)
$(CC)
-o
$(CONVERT
TEKTRONIX)/convertTektronix
$(CONVERTTEKTRONIX)/read1
.cpp
-lm
`root-config
--cflags
--libs`
-L
$(PWD)
-lData
-Wl,-rpath,$(PWD)
$(CC)
-o
$(CONVERT
RAWTOANALYZED)/convertRawToAnalyzed
$(CONVERTRAWTOANALYZED)/analyse
.cpp
-lm
`root-config
--cflags
--libs`
-L
$(PWD)
-lData
-Wl,-rpath,$(PWD)
@echo 'Finished building target
:
$@'
@
echo
' '
...
...
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