Commit 8944b4e1 authored by minime's avatar minime
Browse files

Minor

parent 69c0de58
......@@ -291,7 +291,7 @@ void RD53Interface::WriteRD53Mask(RD53* pRD53, bool doSparse, bool doDefault, bo
const uint16_t PIX_PORTAL_ADDR = pRD53->getRegItem("PIX_PORTAL").fAddress;
const uint8_t highGain = pRD53->getRegItem("HighGain_LIN").fValue;
const uint8_t chipID = pRD53->getId();
std::vector<perColumnPixelData>& mask = doDefault ? *pRD53->getPixelsMaskDefault() : *pRD53->getPixelsMask();
std::vector<perColumnPixelData>& mask = doDefault == true ? *pRD53->getPixelsMaskDefault() : *pRD53->getPixelsMask();
// ##########################
// # Disable default config #
......
......@@ -39,8 +39,8 @@ Tool::Tool()
, fAllChan(false)
, fMaskChannelsFromOtherGroups(false)
, fTestPulse(false)
, fDoHybridBroadcast(false)
, fDoBoardBroadcast(false)
, fDoHybridBroadcast(false)
, fChannelGroupHandler(nullptr)
{
#ifdef __HTTP__
......@@ -64,8 +64,8 @@ Tool::Tool(THttpServer* pHttpServer)
, fAllChan(false)
, fMaskChannelsFromOtherGroups(false)
, fTestPulse(false)
, fDoHybridBroadcast(false)
, fDoBoardBroadcast(false)
, fDoHybridBroadcast(false)
, fChannelGroupHandler(nullptr)
{
}
......@@ -125,8 +125,8 @@ void Tool::Inherit(const Tool* pTool)
fAllChan = pTool->fAllChan;
fMaskChannelsFromOtherGroups = pTool->fMaskChannelsFromOtherGroups;
fTestPulse = pTool->fTestPulse;
fDoHybridBroadcast = pTool->fDoHybridBroadcast;
fDoBoardBroadcast = pTool->fDoBoardBroadcast;
fDoHybridBroadcast = pTool->fDoHybridBroadcast;
#ifdef __HTTP__
fHttpServer = pTool->fHttpServer;
......@@ -1349,17 +1349,9 @@ void Tool::setAllGlobalDacBeBoard(uint16_t boardIndex, const std::string& dacNam
void Tool::setAllLocalDacBeBoard(uint16_t boardIndex, const std::string& dacName, DetectorDataContainer& globalDACContainer)
{
for(auto cOpticalGroup: *(fDetectorContainer->at(boardIndex)))
{
for(auto cHybrid: *cOpticalGroup)
{
for(auto cChip: *cHybrid)
{
std::vector<uint16_t> dacVector; //= dacList.at(cHybrid->getHybridId()).at(cChip->getId());
fReadoutChipInterface->WriteChipAllLocalReg(cChip, dacName, *globalDACContainer.at(boardIndex)->at(cOpticalGroup->getIndex())->at(cHybrid->getIndex())->at(cChip->getIndex()));
}
}
}
return;
}
// Set same global DAC for all chips
......@@ -1372,18 +1364,12 @@ void Tool::setSameGlobalDac(const std::string& dacName, const uint16_t dacValue)
void Tool::setSameGlobalDacBeBoard(BeBoard* pBoard, const std::string& dacName, const uint16_t dacValue)
{
if(fDoBoardBroadcast == false)
{
for(auto cOpticalGroup: *pBoard)
{
for(auto cHybrid: *cOpticalGroup)
{
if(fDoHybridBroadcast == false)
for(auto cChip: *cHybrid) fReadoutChipInterface->WriteChipReg(static_cast<ReadoutChip*>(cChip), dacName, dacValue);
else
fReadoutChipInterface->WriteHybridBroadcastChipReg(static_cast<Hybrid*>(cHybrid), dacName, dacValue);
}
}
}
else
fReadoutChipInterface->WriteBoardBroadcastChipReg(pBoard, dacName, dacValue);
}
......
......@@ -333,8 +333,8 @@ class Tool : public Ph2_System::SystemController
bool fAllChan;
bool fMaskChannelsFromOtherGroups;
bool fTestPulse;
bool fDoHybridBroadcast;
bool fDoBoardBroadcast;
bool fDoHybridBroadcast;
ChannelGroupHandler* fChannelGroupHandler;
std::string getCalibrationName();
......
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