Commit ae8a615d authored by Mauro Dinardo's avatar Mauro Dinardo
Browse files

Minor

parent 192adea3
......@@ -39,8 +39,8 @@ class RD53Interface : public ReadoutChipInterface
bool MaskAllChannels(Ph2_HwDescription::ReadoutChip* pChip, bool mask, bool pVerifLoop = true) override;
bool maskChannelsAndSetInjectionSchema(Ph2_HwDescription::ReadoutChip* pChip, const ChannelGroupBase* group, bool mask, bool inject, bool pVerifLoop = false) override;
void PackChipCommands(Ph2_HwDescription::Chip* pChip, const std::string& pRegNode, uint16_t data, std::vector<uint16_t>& commandList);
void SendCommandsPack(const std::vector<uint16_t>& commandList, int hybridId);
void PackChipCommands(Ph2_HwDescription::Chip* pChip, const std::string& pRegNode, uint16_t data, std::vector<uint16_t>& commandList);
void SendCommandsPack(const std::vector<uint16_t>& commandList, int hybridId);
private:
std::vector<std::pair<uint16_t, uint16_t>> ReadRD53Reg(Ph2_HwDescription::ReadoutChip* pChip, const std::string& pRegNode);
......
......@@ -233,31 +233,31 @@ void GainOptimization::bitWiseScanGlobal(const std::string& regName, uint32_t nE
for(const auto cBoard: *fDetectorContainer)
for(const auto cOpticalGroup: *cBoard)
for(const auto cHybrid: *cOpticalGroup)
{
commandList.clear();
int hybridId = cHybrid->getId();
for(const auto cChip: *cHybrid)
{
midDACcontainer.at(cBoard->getIndex())->at(cOpticalGroup->getIndex())->at(cHybrid->getIndex())->at(cChip->getIndex())->getSummary<uint16_t>() =
(minDACcontainer.at(cBoard->getIndex())->at(cOpticalGroup->getIndex())->at(cHybrid->getIndex())->at(cChip->getIndex())->getSummary<uint16_t>() +
maxDACcontainer.at(cBoard->getIndex())->at(cOpticalGroup->getIndex())->at(cHybrid->getIndex())->at(cChip->getIndex())->getSummary<uint16_t>()) /
2;
static_cast<RD53Interface*>(this->fReadoutChipInterface)
->PackChipCommands(static_cast<RD53*>(cChip),
regName,
midDACcontainer.at(cBoard->getIndex())->at(cOpticalGroup->getIndex())->at(cHybrid->getIndex())->at(cChip->getIndex())->getSummary<uint16_t>(),
commandList);
LOG(INFO) << BOLDMAGENTA << ">>> " << BOLDYELLOW << regName << BOLDMAGENTA << " value for [board/opticalGroup/hybrid/chip = " << BOLDYELLOW << cBoard->getId() << "/"
<< cOpticalGroup->getId() << "/" << cHybrid->getId() << "/" << +cChip->getId() << RESET << BOLDMAGENTA << "] = " << RESET << BOLDYELLOW
<< midDACcontainer.at(cBoard->getIndex())->at(cOpticalGroup->getIndex())->at(cHybrid->getIndex())->at(cChip->getIndex())->getSummary<uint16_t>() << BOLDMAGENTA
<< " <<<" << RESET;
}
static_cast<RD53Interface*>(this->fReadoutChipInterface)->SendCommandsPack(commandList, hybridId);
}
{
commandList.clear();
int hybridId = cHybrid->getId();
for(const auto cChip: *cHybrid)
{
midDACcontainer.at(cBoard->getIndex())->at(cOpticalGroup->getIndex())->at(cHybrid->getIndex())->at(cChip->getIndex())->getSummary<uint16_t>() =
(minDACcontainer.at(cBoard->getIndex())->at(cOpticalGroup->getIndex())->at(cHybrid->getIndex())->at(cChip->getIndex())->getSummary<uint16_t>() +
maxDACcontainer.at(cBoard->getIndex())->at(cOpticalGroup->getIndex())->at(cHybrid->getIndex())->at(cChip->getIndex())->getSummary<uint16_t>()) /
2;
static_cast<RD53Interface*>(this->fReadoutChipInterface)
->PackChipCommands(static_cast<RD53*>(cChip),
regName,
midDACcontainer.at(cBoard->getIndex())->at(cOpticalGroup->getIndex())->at(cHybrid->getIndex())->at(cChip->getIndex())->getSummary<uint16_t>(),
commandList);
LOG(INFO) << BOLDMAGENTA << ">>> " << BOLDYELLOW << regName << BOLDMAGENTA << " value for [board/opticalGroup/hybrid/chip = " << BOLDYELLOW << cBoard->getId() << "/"
<< cOpticalGroup->getId() << "/" << cHybrid->getId() << "/" << +cChip->getId() << RESET << BOLDMAGENTA << "] = " << RESET << BOLDYELLOW
<< midDACcontainer.at(cBoard->getIndex())->at(cOpticalGroup->getIndex())->at(cHybrid->getIndex())->at(cChip->getIndex())->getSummary<uint16_t>() << BOLDMAGENTA
<< " <<<" << RESET;
}
static_cast<RD53Interface*>(this->fReadoutChipInterface)->SendCommandsPack(commandList, hybridId);
}
// ################
// # Run analysis #
......
Supports Markdown
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