Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Irene Mateos Dominguez
Ph2_ACF
Commits
71dd9aa2
Commit
71dd9aa2
authored
Aug 19, 2015
by
Georg Auzinger
Browse files
some more merging, no idea why
parents
c870027c
cf166e32
Changes
4
Hide whitespace changes
Inline
Side-by-side
Utils/Makefile
View file @
71dd9aa2
Objs
=
Exception.o Utilities.o Event.o Data.o argvparser.o FileHandler.o
Antenna.o
Objs
=
Exception.o Utilities.o Event.o Data.o argvparser.o
Antenna.o
FileHandler.o
CC
=
gcc
CXX
=
g++
CCFlags
=
-g
-O1
-w
-Wall
-pedantic
-fPIC
-Wcpp
-L
/usr/lib64/
-lusb
CCFlags
=
-g
-O1
-w
-Wall
-pedantic
-fPIC
`
root-config
--cflags
--evelibs
`
-Wcpp
-L
/usr/lib64/
-lusb
#DevFlags = -D__CBCDAQ_DEV__
DevFlags
=
...
...
src/hybridtest.cc
View file @
71dd9aa2
...
...
@@ -20,7 +20,6 @@ using namespace CommandLineProcessing;
int
main
(
int
argc
,
char
*
argv
[]
)
{
ArgvParser
cmd
;
// init
...
...
@@ -67,7 +66,7 @@ int main( int argc, char* argv[] )
exit
(
1
);
}
bool
isGui
=
(
cmd
.
foundOption
(
"gui"
)
)
?
true
:
false
;
bool
isGui
=
(
cmd
.
foundOption
(
"gui"
)
)
?
true
:
false
;
// now query the parsing results
std
::
string
cHWFile
=
(
cmd
.
foundOption
(
"file"
)
)
?
cmd
.
optionValue
(
"file"
)
:
"settings/HybridTest2CBC.xml"
;
bool
batchMode
=
(
cmd
.
foundOption
(
"batch"
)
)
?
true
:
false
;
...
...
@@ -76,13 +75,13 @@ int main( int argc, char* argv[] )
std
::
string
cDirectory
=
(
cmd
.
foundOption
(
"output"
)
)
?
cmd
.
optionValue
(
"output"
)
:
"Results/"
;
cDirectory
+=
"HybridTest"
;
TApplication
cApp
(
"Root Application"
,
&
argc
,
argv
);
if
(
batchMode
)
gROOT
->
SetBatch
(
true
);
else
TQObject
::
Connect
(
"TCanvas"
,
"Closed()"
,
"TApplication"
,
&
cApp
,
"Terminate()"
);
HybridTester
cHybridTester
;
if
(
!
isGui
)
{
cHybridTester
.
InitializeHw
(
cHWFile
);
...
...
@@ -130,7 +129,6 @@ int main( int argc, char* argv[] )
}
if
(
!
batchMode
)
cApp
.
Run
();
return
0
;
...
...
tools/HybridTester.cc
View file @
71dd9aa2
...
...
@@ -34,7 +34,7 @@ void HybridTester::InitializeHists()
fHistTop
=
(
TH1F
*
)(
gROOT
->
FindObject
(
cFrontName
)
);
if
(
fHistTop
)
delete
fHistTop
;
fHistTop
=
new
TH1F
(
cFrontName
,
"Front Pad Channels; Pad Number; Occupancy [%]"
,
(
fNCbc
/
2
*
25
4
)
+
1
,
-
0.5
,
(
fNCbc
/
2
*
25
4
)
+
.5
);
fHistTop
=
new
TH1F
(
cFrontName
,
"Front Pad Channels; Pad Number; Occupancy [%]"
,
(
fNCbc
/
2
*
25
3
)
+
1
,
-
0.5
,
(
fNCbc
/
2
*
25
3
)
+
.5
);
fHistTop
->
SetFillColor
(
4
);
fHistTop
->
SetFillStyle
(
3001
);
...
...
@@ -42,7 +42,7 @@ void HybridTester::InitializeHists()
fHistBottom
=
(
TH1F
*
)(
gROOT
->
FindObject
(
cBackName
)
);
if
(
fHistBottom
)
delete
fHistBottom
;
fHistBottom
=
new
TH1F
(
cBackName
,
"Back Pad Channels; Pad Number; Occupancy [%]"
,
(
fNCbc
/
2
*
25
4
)
+
1
,
-
0.5
,
(
fNCbc
/
2
*
25
4
)
+
.5
);
fHistBottom
=
new
TH1F
(
cBackName
,
"Back Pad Channels; Pad Number; Occupancy [%]"
,
(
fNCbc
/
2
*
25
3
)
+
1
,
-
0.5
,
(
fNCbc
/
2
*
25
3
)
+
.5
);
fHistBottom
->
SetFillColor
(
4
);
fHistBottom
->
SetFillStyle
(
3001
);
...
...
@@ -124,6 +124,7 @@ void HybridTester::InitialiseGUI( int pVcth, int pNevents, bool pTestreg, bool p
InitializeHists
();
}
void
HybridTester
::
Initialize
(
bool
pThresholdScan
)
{
fThresholdScan
=
pThresholdScan
;
...
...
@@ -142,6 +143,7 @@ void HybridTester::Initialize( bool pThresholdScan )
fSCurveCanvas
=
new
TCanvas
(
"fSCurveCanvas"
,
"Noise Occupancy as function of VCth"
);
fSCurveCanvas
->
Divide
(
fNCbc
);
}
InitializeHists
();
InitialiseSettings
();
}
...
...
@@ -193,7 +195,7 @@ void HybridTester::ScanThreshold()
const
std
::
vector
<
Event
*>&
events
=
fBeBoardInterface
->
GetEvents
(
pBoard
);
// Loop over Events from this Acquisition
for
(
auto
&
cEvent
:
events
)
for
(
auto
&
cEvent
:
events
)
{
// loop over Modules & Cbcs and count hits separately
cHitCounter
+=
fillSCurves
(
pBoard
,
cEvent
,
cVcth
);
...
...
@@ -391,6 +393,7 @@ void HybridTester::updateSCurveCanvas( BeBoard* pBoard )
}
void
HybridTester
::
TestRegisters
()
{
// This method has to be followed by a configure call, otherwise the CBCs will be in an undefined state
...
...
@@ -546,7 +549,7 @@ void HybridTester::Measure()
std
::
cout
<<
"Wrong number of CBC2 chips detected in the hybrid: "
<<
fNCbc
<<
", breaking the acquisition loop ..."
<<
std
::
endl
;
break
;
}
/*Here clearing histograms after each event*/
fHistBottom
->
SetContent
(
(
double
*
)
zero_fill
);
...
...
@@ -563,8 +566,9 @@ void HybridTester::Measure()
fHistTop
->
GetYaxis
()
->
SetRangeUser
(
0
,
100
);
fHistBottom
->
Scale
(
100
/
double_t
(
fTotalEvents
)
);
fHistBottom
->
GetYaxis
()
->
SetRangeUser
(
0
,
100
);
UpdateHists
();
cAntenna
.
close
();
TestChannels
(
(
double
*
)
cTopHistogramMerged
,
sizeof
(
cTopHistogramMerged
)
/
sizeof
(
cTopHistogramMerged
[
0
]
),
(
double
*
)
cBottomHistogramMerged
,
sizeof
(
cBottomHistogramMerged
)
/
sizeof
(
cBottomHistogramMerged
[
0
]
),
fDecisionThreshold
);
...
...
tools/HybridTester.h
View file @
71dd9aa2
...
...
@@ -12,7 +12,6 @@
#ifndef HybridTester_h__
#define HybridTester_h__
#include "Tool.h"
#include "../Utils/Visitor.h"
#include "../Utils/Utilities.h"
...
...
Write
Preview
Supports
Markdown
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