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

Minor

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