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
2e4d83d6
Commit
2e4d83d6
authored
Oct 14, 2016
by
Georg Auzinger
Browse files
first round of degubbing, fixed an important bug in systemcontroller related to file handler
parent
fd6ad38d
Changes
17
Hide whitespace changes
Inline
Side-by-side
.gitignore
View file @
2e4d83d6
...
...
@@ -7,6 +7,8 @@ latex
html
html/
latex/
logs/
logs/*
*.bin
*.raw
Results/
...
...
AMC13/Amc13Description.h
View file @
2e4d83d6
...
...
@@ -6,7 +6,7 @@
#include <vector>
#include <stdint.h>
#include <iostream>
#include "../Utils/easylogging++"
#include "../Utils/easylogging++
.h
"
typedef
std
::
map
<
std
::
string
,
uint32_t
>
RegMap
;
...
...
HWDescription/BeBoard.cc
View file @
2e4d83d6
...
...
@@ -78,7 +78,7 @@ namespace Ph2_HwDescription {
}
else
{
LOG
(
I
F
NO
)
<<
"Error:The BeBoard: "
<<
+
fBeId
LOG
(
IN
F
O
)
<<
"Error:The BeBoard: "
<<
+
fBeId
<<
" doesn't have the module "
<<
+
pModuleId
;
return
false
;
}
...
...
HWInterface/CtaFWInterface.cc
View file @
2e4d83d6
...
...
@@ -87,7 +87,7 @@ namespace Ph2_HwInterface {
//LOG(INFO) << "FMC2 present : " << ReadReg ( "status.fmc2_present" ) ;
uint32_t
cVersionMajor
=
ReadReg
(
"firm_id.firmware_major"
);
uint32_t
cVersionMinor
=
ReadReg
(
"firm_id.firmware_minor"
);
LOG
(
INFO
)
<<
"FW version : "
<<
cVersionMajor
<<
"."
<<
cVersionMinor
<<
"."
<<
ReadReg
(
"firm_id.firmware_build"
)
;
LOG
(
INFO
)
<<
"FW version : "
<<
cVersionMajor
<<
"."
<<
cVersionMinor
<<
"."
<<
std
::
to_string
(
ReadReg
(
"firm_id.firmware_build"
)
)
;
uhal
::
ValWord
<
uint32_t
>
cBoardType
=
ReadReg
(
"board_id"
);
...
...
HWInterface/GlibFWInterface.cc
View file @
2e4d83d6
...
...
@@ -78,11 +78,11 @@ namespace Ph2_HwInterface {
uint32_t
GlibFWInterface
::
getBoardInfo
()
{
LOG
(
INFO
)
<<
"FMC1 present : "
<<
ReadReg
(
"status.fmc1_present"
)
;
LOG
(
INFO
)
<<
"FMC2 present : "
<<
ReadReg
(
"status.fmc2_present"
)
;
LOG
(
INFO
)
<<
"FMC1 present : "
<<
std
::
to_string
(
ReadReg
(
"status.fmc1_present"
)
)
;
LOG
(
INFO
)
<<
"FMC2 present : "
<<
std
::
to_string
(
ReadReg
(
"status.fmc2_present"
)
)
;
uint32_t
cVersionMajor
=
ReadReg
(
"firm_id.firmware_major"
);
uint32_t
cVersionMinor
=
ReadReg
(
"firm_id.firmware_minor"
);
LOG
(
INFO
)
<<
"FW version : "
<<
cVersionMajor
<<
"."
<<
cVersionMinor
<<
"."
<<
ReadReg
(
"firm_id.firmware_build"
)
;
LOG
(
INFO
)
<<
"FW version : "
<<
cVersionMajor
<<
"."
<<
cVersionMinor
<<
"."
<<
std
::
to_string
(
ReadReg
(
"firm_id.firmware_build"
)
)
;
uhal
::
ValWord
<
uint32_t
>
cBoardType
=
ReadReg
(
"board_id"
);
...
...
HWInterface/GlibFWInterface.h
View file @
2e4d83d6
...
...
@@ -20,6 +20,7 @@
#include "BeBoardFWInterface.h"
#include "../HWDescription/Module.h"
#include "../Utils/Visitor.h"
#include "../Utils/easylogging++.h"
using
namespace
Ph2_HwDescription
;
...
...
HWInterface/ICFc7FWInterface.cc
View file @
2e4d83d6
...
...
@@ -90,7 +90,7 @@ namespace Ph2_HwInterface {
uint32_t
cVersionMajor
,
cVersionMinor
;
cVersionMajor
=
ReadReg
(
"user_stat.version.ver_major"
);
cVersionMinor
=
ReadReg
(
"user_stat.version.ver_minor"
);
LOG
(
INFO
)
<<
"FW version : "
<<
cVersionMajor
<<
"."
<<
cVersionMinor
<<
"."
<<
ReadReg
(
"user_stat.version.ver_build"
)
;
LOG
(
INFO
)
<<
"FW version : "
<<
cVersionMajor
<<
"."
<<
cVersionMinor
<<
"."
<<
std
::
to_string
(
ReadReg
(
"user_stat.version.ver_build"
)
)
;
uhal
::
ValWord
<
uint32_t
>
cBoardType
=
ReadReg
(
"sys_regs.board_id"
);
...
...
HWInterface/ICGlibFWInterface.cc
View file @
2e4d83d6
...
...
@@ -90,7 +90,7 @@ namespace Ph2_HwInterface {
uint32_t
cVersionMajor
,
cVersionMinor
;
cVersionMajor
=
ReadReg
(
"user_stat.version.ver_major"
);
cVersionMinor
=
ReadReg
(
"user_stat.version.ver_minor"
);
LOG
(
INFO
)
<<
"FW version : "
<<
cVersionMajor
<<
"."
<<
cVersionMinor
<<
"."
<<
ReadReg
(
"user_stat.version.ver_build"
)
;
LOG
(
INFO
)
<<
"FW version : "
<<
cVersionMajor
<<
"."
<<
cVersionMinor
<<
"."
<<
std
::
to_string
(
ReadReg
(
"user_stat.version.ver_build"
)
)
;
uhal
::
ValWord
<
uint32_t
>
cBoardType
=
ReadReg
(
"sys_regs.board_id"
);
...
...
System/FileParser.cc
View file @
2e4d83d6
...
...
@@ -227,10 +227,12 @@ namespace Ph2_System {
for
(
pugi
::
xml_node
nSettings
=
doc
.
child
(
"Settings"
);
nSettings
;
nSettings
=
nSettings
.
next_sibling
()
)
{
os
<<
std
::
endl
;
for
(
pugi
::
xml_node
nSetting
=
nSettings
.
child
(
"Setting"
);
nSetting
;
nSetting
=
nSetting
.
next_sibling
()
)
{
pSettingsMap
[
nSetting
.
attribute
(
"name"
).
value
()]
=
convertAnyInt
(
nSetting
.
first_child
().
value
()
);
os
<<
RED
<<
"Setting"
<<
RESET
<<
" --"
<<
BOLDCYAN
<<
nSetting
.
attribute
(
"name"
).
value
()
<<
RESET
<<
":"
<<
BOLDYELLOW
<<
convertAnyInt
(
nSetting
.
first_child
().
value
()
)
<<
RESET
<<
std
::
endl
;
os
<<
RED
<<
"Setting"
<<
RESET
<<
" --"
<<
BOLDCYAN
<<
nSetting
.
attribute
(
"name"
).
value
()
<<
RESET
<<
":"
<<
BOLDYELLOW
<<
convertAnyInt
(
nSetting
.
first_child
().
value
()
)
<<
RESET
<<
std
::
endl
;
}
}
}
...
...
System/SystemController.cc
View file @
2e4d83d6
...
...
@@ -17,7 +17,8 @@ using namespace Ph2_HwInterface;
namespace
Ph2_System
{
SystemController
::
SystemController
()
:
fFileHandler
(
nullptr
)
:
fFileHandler
(
nullptr
),
fWriteHandlerEnabled
(
false
)
{
}
...
...
@@ -67,7 +68,7 @@ namespace Ph2_System {
void
SystemController
::
InitializeHw
(
const
std
::
string
&
pFilename
,
std
::
ostream
&
os
)
{
this
->
fParser
.
parseHW
(
pFilename
,
fBeBoardFWMap
,
fBoardVector
,
os
);
this
->
fParser
.
parseHW
(
pFilename
,
fBeBoardFWMap
,
fBoardVector
,
os
);
fBeBoardInterface
=
new
BeBoardInterface
(
fBeBoardFWMap
);
fCbcInterface
=
new
CbcInterface
(
fBeBoardFWMap
);
...
...
@@ -78,7 +79,7 @@ namespace Ph2_System {
void
SystemController
::
InitializeSettings
(
const
std
::
string
&
pFilename
,
std
::
ostream
&
os
)
{
this
->
fParser
.
parseSettings
(
pFilename
,
fSettingsMap
,
os
);
this
->
fParser
.
parseSettings
(
pFilename
,
fSettingsMap
,
os
);
}
void
SystemController
::
ConfigureHw
(
std
::
ostream
&
os
,
bool
bIgnoreI2c
)
...
...
System/SystemController.h
View file @
2e4d83d6
...
...
@@ -134,17 +134,17 @@ namespace Ph2_System {
* \param pFilename : HW Description file
*\param os : ostream to dump output
*/
void
InitializeHw
(
const
std
::
string
&
pFilename
,
std
::
ostream
&
os
);
void
InitializeHw
(
const
std
::
string
&
pFilename
,
std
::
ostream
&
os
=
std
::
cout
);
/*!
* \brief Initialize the settings
* \param pFilename : settings file
*\param os : ostream to dump output
*/
void
InitializeSettings
(
const
std
::
string
&
pFilename
,
std
::
ostream
&
os
);
void
InitializeSettings
(
const
std
::
string
&
pFilename
,
std
::
ostream
&
os
=
std
::
cout
);
/*!
* \brief Configure the Hardware with XML file indicated values
*/
void
ConfigureHw
(
std
::
ostream
&
os
,
bool
bIgnoreI2c
=
false
);
void
ConfigureHw
(
std
::
ostream
&
os
=
std
::
cout
,
bool
bIgnoreI2c
=
false
);
/*!
* \brief Run a DAQ
* \param pBeBoard
...
...
settings/HWDescription_2CBC.xml
View file @
2e4d83d6
<?xml version='1.0' encoding='utf-8'?>
<HwDescription>
<BeBoard
Id=
"0"
boardType=
"GLIB"
>
<!--
<connection id="board" uri="ipbusudp-2.0://192.168.000.163:50001" address_table="file://settings/address_table_2CBC.xml" />
-->
<connection
id=
"board"
uri=
"chtcp-2.0://cmsuptracker002:10203?target=192.168.0.175:50001"
address_table=
"file://settings/address_table_2CBC.xml"
/>
<connection
id=
"board"
uri=
"ipbusudp-2.0://192.168.000.163:50001"
address_table=
"file://settings/address_table_2CBC.xml"
/>
<!--
<connection id="board" uri="chtcp-2.0://cmsuptracker002:10203?target=192.168.0.175:50001" address_table="file://settings/address_table_2CBC.xml" />
-->
<FW_Version
NCbcDataSize=
"4"
/>
<Module
FeId=
"0"
FMCId=
"0"
ModuleId=
"0"
Status=
"1"
>
<Global_CBC_Register
name=
"VCth"
>
0x76
</Global_CBC_Register>
...
...
@@ -12,9 +12,9 @@
<!--<Global_CBC_Register name="TestPulsePot">0xE0</Global_CBC_Register>-->
<!--<Global_CBC_Register name="SelTestPulseDel&ChanGroup">0x00</Global_CBC_Register>-->
<CBC_Files
path=
"./
Results/Calibration_Electron_23-05-16_17:45
/"
/>
<CBC
Id=
"0"
configfile=
"
FE0CBC0
.txt"
/>
<CBC
Id=
"1"
configfile=
"
FE0CBC1
.txt"
/>
<CBC_Files
path=
"./
settings
/"
/>
<CBC
Id=
"0"
configfile=
"
Cbc_default_hole
.txt"
/>
<CBC
Id=
"1"
configfile=
"
Cbc_default_hole
.txt"
/>
<!--<CBC_Files path="./Results/Calibration_Hole_27-04-16_17:55/" />-->
<!--<CBC Id="0" configfile="FE0CBC0.txt" />-->
...
...
src/.gitignore
View file @
2e4d83d6
*
!*.*
\ No newline at end of file
*.o
systemtest
calibrate
hybridtest
configure
datatest
cmtest
commission
fpgaconfig
src/calibrate.cc
View file @
2e4d83d6
...
...
@@ -7,7 +7,6 @@
#include "../HWDescription/Definition.h"
#include "../tools/Calibration.h"
#include "../tools/PedeNoise.h"
#include "../tools/OldCalibration.h"
#include "../Utils/argvparser.h"
#include "TROOT.h"
#include "TApplication.h"
...
...
@@ -21,9 +20,14 @@ using namespace Ph2_System;
using
namespace
CommandLineProcessing
;
INITIALIZE_EASYLOGGINGPP
int
main
(
int
argc
,
char
*
argv
[]
)
{
//configure the logger
el
::
Configurations
conf
(
"settings/logger.conf"
);
el
::
Loggers
::
reconfigureAllLoggers
(
conf
);
ArgvParser
cmd
;
// init
...
...
@@ -60,7 +64,7 @@ int main ( int argc, char* argv[] )
if
(
result
!=
ArgvParser
::
NoParserError
)
{
std
::
cout
<<
cmd
.
parseErrorDescription
(
result
);
LOG
(
ERROR
)
<<
cmd
.
parseErrorDescription
(
result
);
exit
(
1
);
}
...
...
@@ -85,12 +89,15 @@ int main ( int argc, char* argv[] )
//create a genereic Tool Object, I can then construct all other tools from that using the Inherit() method
//this tool stays on the stack and lives until main finishes - all other tools will update the HWStructure from cTool
Tool
cTool
;
cTool
.
InitializeHw
(
cHWFile
);
cTool
.
InitializeSettings
(
cHWFile
);
std
::
stringstream
outp
;
cTool
.
InitializeHw
(
cHWFile
,
outp
);
cTool
.
InitializeSettings
(
cHWFile
,
outp
);
cTool
.
CreateResultDirectory
(
cDirectory
);
cTool
.
InitResultFile
(
"CalibrationResults"
);
cTool
.
StartHttpServer
();
cTool
.
ConfigureHw
();
cTool
.
ConfigureHw
(
outp
);
LOG
(
INFO
)
<<
outp
.
str
();
outp
.
clear
();
//if ( !cOld )
//{
t
.
start
();
...
...
@@ -116,7 +123,9 @@ int main ( int argc, char* argv[] )
//tool provides an Inherit(Tool* pTool) for this purpose
PedeNoise
cPedeNoise
;
cPedeNoise
.
Inherit
(
&
cTool
);
cPedeNoise
.
ConfigureHw
();
cPedeNoise
.
ConfigureHw
(
outp
);
LOG
(
INFO
)
<<
outp
.
str
();
outp
.
clear
();
cPedeNoise
.
Initialise
();
// canvases etc. for fast calibration
cPedeNoise
.
measureNoise
();
cPedeNoise
.
Validate
();
...
...
@@ -129,27 +138,6 @@ int main ( int argc, char* argv[] )
cTool
.
SaveResults
();
cTool
.
CloseResultFile
();
cTool
.
Destroy
();
//introduce a separate Destroy method for tool? And delete objects there?
//}
//else
//{
//t.start();
//OldCalibration cCalibration( cCalibrateTGrp );
//cCalibration.InitializeHw( cHWFile );
//cCalibration.InitializeSettings( cHWFile );
//cCalibration.CreateResultDirectory( cDirectory );
//cCalibration.InitResultFile( "CalibrationResults" );
//cCalibration.StartHttpServer();
//cCalibration.Initialise( ); // canvases etc. for fast calibration
//if ( cVplus ) cCalibration.ScanVplus();
//cCalibration.ScanOffset();
//cCalibration.SaveResults();
//t.stop();
//t.show( "Time to Calibrate the system: " );
//}
if
(
!
batchMode
)
cApp
.
Run
();
...
...
src/systemtest.cc
View file @
2e4d83d6
...
...
@@ -7,59 +7,71 @@
using
namespace
Ph2_System
;
using
namespace
CommandLineProcessing
;
int
main
(
int
argc
,
char
**
argv
)
INITIALIZE_EASYLOGGINGPP
int
main
(
int
argc
,
char
**
argv
)
{
//configure the logger
el
::
Configurations
conf
(
"settings/logger.conf"
);
el
::
Loggers
::
reconfigureAllLoggers
(
conf
);
ArgvParser
cmd
;
// init
cmd
.
setIntroductoryDescription
(
"CMS Ph2_ACF system test application"
);
// error codes
cmd
.
addErrorCode
(
0
,
"Success"
);
cmd
.
addErrorCode
(
1
,
"Error"
);
// options
cmd
.
setHelpOption
(
"h"
,
"help"
,
"Print this help page"
);
cmd
.
defineOption
(
"file"
,
"Hw Description File . Default value: settings/HWDescription_2CBC.xml"
,
ArgvParser
::
OptionRequiresValue
/*| ArgvParser::OptionRequired*/
);
cmd
.
defineOptionAlternative
(
"file"
,
"f"
);
ArgvParser
cmd
;
cmd
.
defineOption
(
"configure"
,
"Configure HW"
,
ArgvParser
::
NoOptionAttribute
);
cmd
.
defineOptionAlternative
(
"configure"
,
"c"
);
// init
cmd
.
setIntroductoryDescription
(
"CMS Ph2_ACF system test application"
);
// error codes
cmd
.
addErrorCode
(
0
,
"Success"
);
cmd
.
addErrorCode
(
1
,
"Error"
);
// options
cmd
.
setHelpOption
(
"h"
,
"help"
,
"Print this help page"
);
int
result
=
cmd
.
parse
(
argc
,
argv
);
cmd
.
defineOption
(
"file"
,
"Hw Description File . Default value: settings/HWDescription_2CBC.xml"
,
ArgvParser
::
OptionRequiresValue
/*| ArgvParser::OptionRequired*/
);
cmd
.
defineOptionAlternative
(
"file"
,
"f"
);
if
(
result
!=
ArgvParser
::
NoParserError
)
{
std
::
cout
<<
cmd
.
parseErrorDescription
(
result
);
exit
(
1
);
}
cmd
.
defineOption
(
"configure"
,
"Configure HW"
,
ArgvParser
::
NoOptionAttribute
);
cmd
.
defineOptionAlternative
(
"configure"
,
"c"
);
// now query the parsing results
std
::
string
cHWFile
=
(
cmd
.
foundOption
(
"file"
)
)
?
cmd
.
optionValue
(
"file"
)
:
"settings/HWDescription_2CBC.xml"
;
bool
cConfigure
=
(
cmd
.
foundOption
(
"configure"
)
)
?
true
:
false
;
int
result
=
cmd
.
parse
(
argc
,
argv
);
if
(
result
!=
ArgvParser
::
NoParserError
)
{
std
::
cout
<<
cmd
.
parseErrorDescription
(
result
);
exit
(
1
);
}
// now query the parsing results
std
::
string
cHWFile
=
(
cmd
.
foundOption
(
"file"
)
)
?
cmd
.
optionValue
(
"file"
)
:
"settings/HWDescription_2CBC.xml"
;
bool
cConfigure
=
(
cmd
.
foundOption
(
"configure"
)
)
?
true
:
false
;
std
::
stringstream
outp
;
SystemController
cSystemController
;
cSystemController
.
InitializeHw
(
cHWFile
,
outp
);
cSystemController
.
InitializeSettings
(
cHWFile
,
outp
);
LOG
(
INFO
)
<<
outp
.
str
();
outp
.
clear
();
SystemController
cSystemController
;
cSystemController
.
InitializeHw
(
cHWFile
);
cSystemController
.
InitializeSettings
(
cHWFile
);
if
(
cConfigure
)
cSystemController
.
ConfigureHw
();
if
(
cConfigure
)
cSystemController
.
ConfigureHw
(
outp
);
LOG
(
INFO
)
<<
outp
.
str
();
//Timer t;
//t.start();
//for(uint8_t cVcth = 0x00; cVcth < 0xFF; cVcth++)
//{
//std::vector<std::pair<std::string, uint8_t>> cRegVec;
//cRegVec.push_back({"VCth", cVcth});
//cRegVec.push_back({"TriggerLatency", 255 - cVcth});
//std::cout << "Writing Vcth " << +cVcth << " Trigger Lat:" << 255-cVcth << std::endl;
//cSystemController.fCbcInterface->WriteBroadcastMultReg(cSystemController.fBoardVector.at(0)->fModuleVector.at(0), cRegVec);
//CbcRegReader cReader(cSystemController.fCbcInterface, "TriggerLatency");
//cSystemController.accept(cReader);
//std::vector<std::pair<std::string, uint8_t>> cRegVec;
//cRegVec.push_back({"VCth", cVcth});
//cRegVec.push_back({"TriggerLatency", 255 - cVcth});
//std::cout << "Writing Vcth " << +cVcth << " Trigger Lat:" << 255-cVcth << std::endl;
//cSystemController.fCbcInterface->WriteBroadcastMultReg(cSystemController.fBoardVector.at(0)->fModuleVector.at(0), cRegVec);
//CbcRegReader cReader(cSystemController.fCbcInterface, "TriggerLatency");
//cSystemController.accept(cReader);
//}
//t.stop();
//t.show("Time to loop VCth from 0 to ff with broadcast:");
std
::
cout
<<
"*** End of the System test ***"
<<
std
::
endl
;
LOG
(
INFO
)
<<
"*** End of the System test ***"
;
cSystemController
.
Destroy
();
return
0
;
return
0
;
}
tools/Channel.h
View file @
2e4d83d6
...
...
@@ -24,6 +24,7 @@
#include "TCanvas.h"
#include "../Utils/ConsoleColor.h"
#include "../Utils/Utilities.h"
#include "../Utils/easylogging++.h"
/*!
...
...
@@ -33,7 +34,7 @@
struct
Channel
{
Channel
(
uint8_t
pBeId
,
uint8_t
pFeId
,
uint8_t
pCbcId
,
uint8_t
pChannelId
);
Channel
(
uint8_t
pBeId
,
uint8_t
pFeId
,
uint8_t
pCbcId
,
uint8_t
pChannelId
);
~
Channel
();
// members
...
...
@@ -74,32 +75,32 @@ struct Channel
* \brief set the Offset of the Channel object: this is not propagated to HW
* \param pOffset: set the fOffset member to pOffset
*/
void
setOffset
(
uint8_t
pOffset
);
void
setOffset
(
uint8_t
pOffset
);
/*!
* \brief Initialize the Histogram and Fit for the Channel
* \param pParameter: the current parameter that is being varied for storing in file
* \param pValue: the value of pParameter
*/
void
initializeHist
(
uint8_t
pValue
,
TString
pParameter
);
void
initializeHist
(
uint8_t
pValue
,
TString
pParameter
);
/*!
*brief Initialize the TGraph to store the PulseShapeMeasurement
*param pTitle: the Title for the TGraph
*/
void
initializePulse
(
TString
pTitle
);
void
initializePulse
(
TString
pTitle
);
/*!
*\ brief: set a point on the Test Pulse Graph
*\ param x: xCoordinate
*\ param y: yCoordinate
*/
void
setPulsePoint
(
double
x
,
double
y
)
void
setPulsePoint
(
double
x
,
double
y
)
{
fPulse
->
SetPoint
(
fPulse
->
GetN
(),
x
,
y
);
fPulse
->
SetPoint
(
fPulse
->
GetN
(),
x
,
y
);
}
/*!
* \brief fill the histogram
* \param pVcth: the bin at which to fill the histogram (normally Vcth value)
*/
void
fillHist
(
uint8_t
pVcth
);
void
fillHist
(
uint8_t
pVcth
);
/*!
* \brief fit the SCurve Histogram with the Fit object
...
...
@@ -109,7 +110,7 @@ struct Channel
* \param pValue: the value of pParameter
*\param pResutlfile: pointer to the ROOT file where the results are supposed to be stored
*/
void
fitHist
(
uint32_t
pEventsperVcth
,
bool
pHole
,
uint8_t
pValue
,
TString
pParameter
,
TFile
*
pResultfile
);
void
fitHist
(
uint32_t
pEventsperVcth
,
bool
pHole
,
uint8_t
pValue
,
TString
pParameter
,
TFile
*
pResultfile
);
/*!
* \brief differentiate the SCurve Histogram with the Derivative object
...
...
@@ -119,7 +120,7 @@ struct Channel
* \param pValue: the value of pParameter
*\param pResutlfile: pointer to the ROOT file where the results are supposed to be stored
*/
void
differentiateHist
(
uint32_t
pEventsperVcth
,
bool
pHole
,
uint8_t
pValue
,
TString
pParameter
,
TFile
*
pResultfile
);
void
differentiateHist
(
uint32_t
pEventsperVcth
,
bool
pHole
,
uint8_t
pValue
,
TString
pParameter
,
TFile
*
pResultfile
);
/*!
* \brief reset the Histogram and Fit objects
...
...
@@ -129,7 +130,7 @@ struct Channel
struct
TestGroup
{
TestGroup
(
uint8_t
pBeId
,
uint8_t
pFeId
,
uint8_t
pCbcId
,
uint8_t
pGroupId
);
TestGroup
(
uint8_t
pBeId
,
uint8_t
pFeId
,
uint8_t
pCbcId
,
uint8_t
pGroupId
);
uint8_t
fBeId
;
uint8_t
fFeId
;
...
...
@@ -140,27 +141,27 @@ struct TestGroup
struct
TestGroupGraph
{
TestGroupGraph
();
TestGroupGraph
(
uint8_t
pBeId
,
uint8_t
pFeId
,
uint8_t
pCbcId
,
uint8_t
pGroupId
);
void
FillVplusVcthGraph
(
uint8_t
&
pVplus
,
double
pPedestal
,
double
pNoise
);
TestGroupGraph
(
uint8_t
pBeId
,
uint8_t
pFeId
,
uint8_t
pCbcId
,
uint8_t
pGroupId
);
void
FillVplusVcthGraph
(
uint8_t
&
pVplus
,
double
pPedestal
,
double
pNoise
);
TGraphErrors
*
fVplusVcthGraph
;
};
struct
TestGroupComparer
{
bool
operator
()(
const
TestGroup
&
g1
,
const
TestGroup
&
g2
)
const
bool
operator
()
(
const
TestGroup
&
g1
,
const
TestGroup
&
g2
)
const
{
if
(
g1
.
fBeId
==
g2
.
fBeId
)
{
if
(
g1
.
fFeId
==
g2
.
fFeId
)
{
if
(
g1
.
fCbcId
==
g2
.
fCbcId
)
return
g1
.
fGroupId
<
g2
.
fGroupId
;
else
return
g1
.
fCbcId
<
g2
.
fCbcId
;
}
else
return
g1
.
fFeId
<
g2
.
fFeId
;
}
else
return
g1
.
fBeId
<
g2
.
fBeId
;
if
(
g1
.
fBeId
==
g2
.
fBeId
)
{
if
(
g1
.
fFeId
==
g2
.
fFeId
)
{
if
(
g1
.
fCbcId
==
g2
.
fCbcId
)
return
g1
.
fGroupId
<
g2
.
fGroupId
;
else
return
g1
.
fCbcId
<
g2
.
fCbcId
;
}
else
return
g1
.
fFeId
<
g2
.
fFeId
;
}
else
return
g1
.
fBeId
<
g2
.
fBeId
;
}
};
...
...
tools/HybridTester.cc
View file @
2e4d83d6
...
...
@@ -606,7 +606,9 @@ void HybridTester::TestRegisters()
start_time
=
time
(
0
);
char
*
stop
=
ctime
(
&
start_time
);
LOG
(
INFO
)
<<
"stop: "
<<
stop
;
ConfigureHw
();
std
::
stringstream
ss
;
ConfigureHw
(
ss
);
LOG
(
INFO
)
<<
ss
.
str
();
}
void
HybridTester
::
DisplayGroupsContent
(
std
::
array
<
std
::
vector
<
std
::
array
<
int
,
5
>>
,
8
>
pShortedGroupsArray
)
...
...
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