Commit 32fa323b authored by Martin Delcourt's avatar Martin Delcourt
Browse files

Random edits

parent 52db0e98
......@@ -4,14 +4,14 @@
<!-- <connection id="board" uri="chtcp-2.0://pchpdaq01.cern.ch:10203?target=192.168.0.19:50001" address_table="file://settings/address_tables/uDTC_OT_address_table.xml" /> -->
<!-- <connection id="board" uri="ipbusudp-2.0://192.168.13.207:50001" address_table="file://settings/address_tables/uDTC_OT_address_table.xml" /> \ -->
<!-- <connection id="board" uri="chtcp-2.0://hybridtesting.cern.ch:10203?target=192.168.0.9:50001" address_table="file://settings/address_tables/uDTC_OT_address_table.xml" /> -->
<connection id="board" uri="chtcp-2.0://sbgat231.in2p3.fr:10203?target=192.168.7.230:50001" address_table="file://${PH2ACF_BASE_DIR}/settings/address_tables/uDTC_OT_address_table.xml" />
<connection id="board" uri="chtcp-2.0://localhost:10203?target=192.168.0.7:50001" address_table="file://${PH2ACF_BASE_DIR}/settings/address_tables/uDTC_OT_address_table.xml" />
<!-- <connection id="board" uri="chtcp-2.0://jadsdesktop.cern.ch:10203?target=192.168.2.100:50001" address_table="file://settings/address_tables/uDTC_OT_address_table.xml" /> -->
<CDCE configure="0" clockRate="120"/>
<!-- RHS -->
<OpticalGroup Id="0" FMCId="0" >
<GBT phaseTap="7" enable="1"/>
<GBT phaseTap="7" enable="0"/>
<Hybrid Id="0" Status="1" LinkId="0" >
<Global>
<Settings threshold="550" latency="74"/>
......@@ -37,6 +37,7 @@
</Hybrid>
<!-- LHS -->
<!--
<Hybrid Id="1" Status="1" LinkId="0">
<Global>
<Settings threshold="550" latency="19"/>
......@@ -60,7 +61,7 @@
<CIC_Files path="${PH2ACF_BASE_DIR}/settings/CicFiles/" />
<CIC2 Id="8" configfile="CIC2_default.txt" />
</Hybrid>
-->
</OpticalGroup>
<SLink>
......
......@@ -130,7 +130,7 @@ int main(int argc, char* argv[])
Timer t;
Timer cGlobalTimer;
cGlobalTimer.start();
LOG(INFO)<<BOLDRED<<"DEBUG DEBUG DEBUG Ready to go !"<<RESET;
// measure hybrid current and temperature
#ifdef __ANTENNA__
char cBuffer[120];
......@@ -159,7 +159,9 @@ int main(int argc, char* argv[])
// for some reason this does not work
// error I get is new TRootSnifferFull("sniff");
// cTool.StartHttpServer();
LOG(INFO)<<BOLDRED<<"DEBUG DEBUG DEBUG Configuring HW !"<<RESET;
cTool.ConfigureHw();
LOG(INFO)<<BOLDRED<<"DEBUG DEBUG DEBUG Done configuring HW !"<<RESET;
// measure hybrid current and temperature
#ifdef __ANTENNA__
......@@ -170,6 +172,7 @@ int main(int argc, char* argv[])
cAntenna.close();
#endif
LOG(INFO)<<BOLDRED<<"DEBUG DEBUG DEBUG Backend !"<<RESET;
// align back-end
BackEndAlignment cBackEndAligner;
cBackEndAligner.Inherit(&cTool);
......@@ -180,8 +183,10 @@ int main(int argc, char* argv[])
cBackEndAligner.Reset();
// if CIC is enabled then align CIC first
if(cWithCIC)
{
LOG(INFO)<<BOLDRED<<"DEBUG DEBUG DEBUG Aligning CIC !"<<RESET;
CicFEAlignment cCicAligner;
cCicAligner.Inherit(&cTool);
cCicAligner.Start(0);
......@@ -204,6 +209,7 @@ int main(int argc, char* argv[])
// equalize thresholds on readout chips
if(cTune)
{
LOG(INFO)<<BOLDRED<<"DEBUG DEBUG DEBUG Tuning offsets !"<<RESET;
t.start();
// now create a PedestalEqualization object
PedestalEqualization cPedestalEqualization;
......
......@@ -1738,6 +1738,7 @@ void DataChecker::L1Eye(std::vector<uint8_t> pChipIds)
void DataChecker::StubCheck(std::vector<uint8_t> pChipIds)
{
LOG(INFO)<<BOLDRED<<"DEBUG DEBUG DEBUG starting StubCheck..."<<RESET;
std::string cDAQFileName = "StubCheck.daq";
FileHandler* cDAQFileHandler = new FileHandler(cDAQFileName, 'w');
......@@ -1786,7 +1787,9 @@ void DataChecker::StubCheck(std::vector<uint8_t> pChipIds)
for(auto cBoard: *fDetectorContainer)
{
auto cBeBoard = static_cast<BeBoard*>(cBoard);
uint16_t cDelay = fBeBoardInterface->ReadBoardReg(cBeBoard, "fc7_daq_cnfg.fast_command_block.test_pulse.delay_after_test_pulse") - 1;
uint16_t cDelay = fBeBoardInterface->ReadBoardReg(cBeBoard, "fc7_daq_cnfg.fast_command_block.test_pulse.delay_after_test_pulse");
if (cDelay > 0)
cDelay--;
setSameDacBeBoard(cBeBoard, "TriggerLatency", cDelay);
fBeBoardInterface->ChipReSync(cBeBoard); // NEED THIS! ??
......@@ -1843,8 +1846,10 @@ void DataChecker::StubCheck(std::vector<uint8_t> pChipIds)
}
auto cStubLatency = fBeBoardInterface->ReadBoardReg(cBeBoard, "fc7_daq_cnfg.readout_block.global.common_stubdata_delay");
int cStubDelayStart = (cSweepStubDelay == 0) ? cStubLatency - 2 : 0;
int cStubDelayStop = (cSweepStubDelay == 0) ? cStubLatency + 2 : cDelay;
int cStubDelayStart = 0;
if (cStubLatency > 2)
cStubDelayStart = (cSweepStubDelay == 0) ? cStubLatency - 2 : 0;
int cStubDelayStop = (cSweepStubDelay == 0) ? cStubLatency + 1000 : cDelay;
for(auto cStubDelay = cStubDelayStart; cStubDelay <= cStubDelayStop; cStubDelay++)
{
fBeBoardInterface->WriteBoardReg(cBeBoard, "fc7_daq_cnfg.readout_block.global.common_stubdata_delay", cStubDelay);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment