From efc9b89c1e45958276abfc6c38e5e6b22131706c Mon Sep 17 00:00:00 2001 From: Paul Dauncey Date: Sat, 12 Jan 2019 19:37:12 +0000 Subject: [PATCH] Throttling and exceeding --- interface/Buffering/BeSlinkAna.hh | 90 ++--- interface/Buffering/BeSlinkSim.hh | 621 ++++++++++++++---------------- interface/Buffering/EconAna.hh | 13 + interface/Buffering/EconSim.hh | 232 ++++------- interface/Buffering/Throttle.hh | 10 +- src/DaqDaqBuffer.cpp | 95 +++-- 6 files changed, 488 insertions(+), 573 deletions(-) diff --git a/interface/Buffering/BeSlinkAna.hh b/interface/Buffering/BeSlinkAna.hh index c66b521..ba92323 100644 --- a/interface/Buffering/BeSlinkAna.hh +++ b/interface/Buffering/BeSlinkAna.hh @@ -19,6 +19,9 @@ public: void boj(const BeSlinkSim &b, unsigned nHistory=100000) { fBeSlinkSim=&b; + fPreviousThrottleActive=false; + fRaisedThrottleBx=-1; + fEndedThrottleBx=-1; std::ostringstream sout; sout << "BeSlinkAna" << std::setw(2) << std::setfill('0') @@ -26,15 +29,7 @@ public: std::string sHgcroc[18]={"00","01","02","03","04","05","06","07","08", "09","10","11","12","13","14","15","16","17"}; - /* - hBitmapWordsVsChannels=new TH1I((sout.str()+"BitmapWordsVsChannels").c_str(), - ";Number of channels per HGCROC packet;Number of words per HGCROC packet",73,-0.5,72.5); - hLabelsWordsVsChannels=new TH1I((sout.str()+"LabelsWordsVsChannels").c_str(), - ";Number of channels per HGCROC packet;Number of words per HGCROC packet",73,-0.5,72.5); - - hTotalChannels=new TH1D((sout.str()+"TotalChannels").c_str(), - ";ECON total number of channels",1300,0,1300); - */ + hTotalEventWords=new TH1D((sout.str()+"TotalEventWords").c_str(), ";Total number of bytes per event",250,0,4000); @@ -46,45 +41,22 @@ public: ";Number of event buffer words used",1000,0,10000); hEventBufferUsedHistory[e][b]=new TH1I((sout.str()+"Econ"+sHgcroc[e]+"Block"+sHgcroc[b]+"EventBufferUsedHistory").c_str(), ";BX;Number of event buffer words used",nHistory,0,nHistory); + hEventBufferExceeded[e][b]=new TH1D((sout.str()+"Econ"+sHgcroc[e]+"Block"+sHgcroc[b]+"EventBufferExceeded").c_str(), + ";Number of event buffer words used",1000,0,10000); } } - /* - for(unsigned h(0);h<18;h++) { - hChannels[h]=new TH1D((sout.str()+"Hgcroc"+sHgcroc[h]+"Channels").c_str(), - ";Number of channels per HGCROC packet",73,0,73); - hWords[h]=new TH1D((sout.str()+"Hgcroc"+sHgcroc[h]+"Words").c_str(), - ";Number of words per HGCROC packet",60,0,60); - hWordsVsChannels[h]=new TH2D((sout.str()+"Hgcroc"+sHgcroc[h]+"WordsVsChannels").c_str(), - ";Number of channels per HGCROC packet;Number of words per HGCROC packet",73,-0.5,72.5,60,-0.5,59.5); - } - */ + + hThrottleActiveHistory=new TH1I((sout.str()+"ThrottleActiveHistory").c_str(), + ";BX;Throttle active",nHistory,0,nHistory); + hRaisedThrottleToL1Accept=new TH1D((sout.str()+"RaisedThrottleToL1Accept").c_str(), + ";L1Accept - ended throttle (BX)",1000,0,1000); + hEndedThrottleToL1Accept=new TH1D((sout.str()+"EndedThrottleToL1Accept").c_str(), + ";L1Accept - ended throttle (BX)",1000,0,1000); } void analyseL1Accept(uint64_t bx) { - /* - unsigned nChannels(0),nWords(0); - for(unsigned h(0);h<18;h++) { - hChannels[h]->Fill(fEconSim->numberOfChannels(h)); - hWords[h]->Fill(fEconSim->numberOfWords(h)); - hWordsVsChannels[h]->Fill(fEconSim->numberOfChannels(h),fEconSim->numberOfWords(h)); - nChannels+=fEconSim->numberOfChannels(h); - nWords+=fEconSim->numberOfWords(h); - } - - hTotalChannels->Fill(nChannels); - hTotalWords->Fill(nWords); - - for(unsigned block(0);blockfEconArch.fNumberOfBlocks;block++) { - unsigned nBlockChannels(0),nBlockWords(0); - for(unsigned i(0);ifEconArch.fHgcrocNumber[block].size();i++) { - unsigned h(fEconSim->fEconArch.fHgcrocNumber[block][i]); - nBlockChannels+=fEconSim->numberOfChannels(h); - nBlockWords+=fEconSim->numberOfWords(h); - } - hBlockTotalChannels[block]->Fill(nBlockChannels); - hBlockTotalWords[block]->Fill(nBlockWords); - } - */ + if(fRaisedThrottleBx!=-1) hRaisedThrottleToL1Accept->Fill(bx-fRaisedThrottleBx); + if(fEndedThrottleBx!=-1) hEndedThrottleToL1Accept->Fill(bx-fEndedThrottleBx); } void analyseBx(uint64_t bx) { @@ -94,12 +66,22 @@ public: for(unsigned b(0);bFill(fBeSlinkSim->fEventBuffer[e][b].used()); hEventBufferUsedHistory[e][b]->Fill(bx,fBeSlinkSim->fEventBuffer[e][b].used()); + if(fBeSlinkSim->exceededBuffer()) hEventBufferExceeded[e][b]->Fill(fBeSlinkSim->fEventBuffer[e][b].used()); } } if(fBeSlinkSim->fL1AcceptEoe) { hTotalEventWords->Fill(16*fBeSlinkSim->fTotalNumberOfEventWords); } + + if(fBeSlinkSim->fThrottleActive) { + if(!fPreviousThrottleActive) fRaisedThrottleBx=bx; + hThrottleActiveHistory->Fill(bx); + } else { + if(fPreviousThrottleActive) fEndedThrottleBx=bx; + } + + fPreviousThrottleActive=fBeSlinkSim->fThrottleActive; } void eoj() { @@ -108,24 +90,18 @@ public: private: const BeSlinkSim *fBeSlinkSim; - //TH1I *hBitmapWordsVsChannels; - //TH1I *hLabelsWordsVsChannels; - - //TH1D *hMeans; + bool fPreviousThrottleActive; + uint64_t fRaisedThrottleBx; + uint64_t fEndedThrottleBx; - //TH1D *hChannels[18]; - //TH1D *hWords[18]; - //TH2D *hWordsVsChannels[18]; - - //TH1D *hTotalChannels; - //TH1D *hTotalWords; - //TH1D *hBlockTotalChannels[7]; - //TH1D *hBlockTotalWords[7]; - TH1D *hTotalEventWords; - + TH1I *hThrottleActiveHistory; + TH1D *hRaisedThrottleToL1Accept; + TH1D *hEndedThrottleToL1Accept; + TH1D *hEventBufferUsed[Dimensions::MaxNumberOfEconsPerSlink][Dimensions::MaxNumberOfBlocksPerEcon]; TH1I *hEventBufferUsedHistory[Dimensions::MaxNumberOfEconsPerSlink][Dimensions::MaxNumberOfBlocksPerEcon]; + TH1D *hEventBufferExceeded[Dimensions::MaxNumberOfEconsPerSlink][Dimensions::MaxNumberOfBlocksPerEcon]; }; #endif diff --git a/interface/Buffering/BeSlinkSim.hh b/interface/Buffering/BeSlinkSim.hh index ccbe2e2..507c497 100644 --- a/interface/Buffering/BeSlinkSim.hh +++ b/interface/Buffering/BeSlinkSim.hh @@ -15,50 +15,48 @@ class BeSlinkSim { public: /* - enum { + enum { NumberOfParallelBuffers=2 - }; + }; - enum DataRandomMethod { + enum DataRandomMethod { NotRandom, Binomial, Flat, Mixed - }; + }; - enum DataFormatMethod { + enum DataFormatMethod { FixedChannelBitmap, FixedChannelLabels, FixedMixture, VariableMixture - }; + }; - enum DataFlowMethod { + enum DataFlowMethod { FixedHgcrocMap, VariableHgcrocMap, EventBuild - }; + }; */ //BeSlinkSim(unsigned e, unsigned h=18, unsigned m=0) : fEcon(e) { BeSlinkSim() { } - void boj(const SlinkArch &a) { - //fSlink=a.slinkNumber(); + void boj(const SlinkArch &a, unsigned bl) { fSlinkArch=&a; + fBufferLimit=bl; if(fPrintLevel>0) { std::cout << "BeSlinkSim[" << fSlinkArch->slinkNumber() << "]::ctor() " - << "Entered" << std::endl; + << "Entered with buffer limit = " << fBufferLimit << std::endl; } + fThrottleActive=false; fEventActive=false; fActiveInputBuffer=0; fWriteElink=0; - - //fBufferLimit=1048; - fBufferLimit=1000000000; fArrayWrite=0; for(unsigned i(0);i<4;i++) fArrayWord[i]=0; @@ -89,82 +87,29 @@ public: void processBx(uint64_t bx, const SlinkElinkData &d) { - //#define OLD_METHOD -#ifdef OLD_METHOD - if((bx%2)==0) { - fSlinkElinkData=d; + fExceededBuffer=false; + + for(unsigned e(0);enumberOfEcons();e++) { + const EconArch &econArch(fSlinkArch->econArch(e)); - } else { - uint64_t word,word2; -#endif - for(unsigned e(0);enumberOfEcons();e++) { - const EconArch &econArch(fSlinkArch->econArch(e)); - - for(unsigned b(0);b &elinkNumber(econArch.elinkNumber(b)); - -#ifdef OLD_METHOD - unsigned eo(0); - for(unsigned w(0);weconArch(e).numberOfBlocks()==1?0:w].writeAndIncrementPtr(word)); - if(word!=0) assert(fEventBuffer[e][b].writeAndIncrementPtr(word)); - } - eo++; - } - - for(unsigned w(0);weconArch(e).numberOfBlocks()==1?0:w].writeAndIncrementPtr(word)); - if(word!=0) assert(fEventBuffer[e][b].writeAndIncrementPtr(word)); - } - eo++; - } - /* - // DO BY ARCH PROPERLY!!! - for(unsigned w(0);weconArch(e).numberOfBlocks()==1?0:w].writeAndIncrementPtr(word)); - } - - for(unsigned w(0);weconArch(e).numberOfBlocks()==1?0:w].writeAndIncrementPtr(word)); - } - */ - } - -#else + for(unsigned b(0);b &elinkNumber(econArch.elinkNumber(b)); + uint32_t word; for(unsigned w(0);w=4095) fExceededBuffer=true; } } - + // Output to Slink - + fL1AcceptBoe=false; fL1AcceptEoe=false; - + bool done(false); uint128_t w; fNumberOfSlinkWords=0; @@ -251,336 +196,368 @@ public: uint32_t nextWord(0); assert(fEventBuffer[fEconRead][fBlockRead].halfReadAndIncrementPtr(nextWord)); #endif - if(nextWord!=0) { - if(fPrintLevel>5) { - std::cout << "BeSlinkSim[" << fSlinkArch->slinkNumber() << "]::processBx() " - << "Read buffer words = 0x" << std::hex - << nextWord << std::dec << std::endl; - } + if(nextWord!=0) { + if(fPrintLevel>5) { + std::cout << "BeSlinkSim[" << fSlinkArch->slinkNumber() << "]::processBx() " + << "Read buffer words = 0x" << std::hex + << nextWord << std::dec << std::endl; + } - fArrayWord[fArrayWrite]=nextWord; - fArrayWrite++; + fArrayWord[fArrayWrite]=nextWord; + fArrayWrite++; - if(fBlockCheck[fEconRead][fBlockRead].processBx(fArrayWord[fArrayWrite-1])) fBlockRead++; + if(fBlockCheck[fEconRead][fBlockRead].processBx(fArrayWord[fArrayWrite-1])) fBlockRead++; - if(fBlockRead==fSlinkArch->econArch(fEconRead).numberOfBlocks()) { - fBlockRead=0; - fEconRead++; - } + if(fBlockRead==fSlinkArch->econArch(fEconRead).numberOfBlocks()) { + fBlockRead=0; + fEconRead++; + } - if(fEconRead==fSlinkArch->numberOfEcons()) fArrayWrite=4; - } + if(fEconRead==fSlinkArch->numberOfEcons()) fArrayWrite=4; + } - } else { - if(fPrintLevel>5) { - std::cout << "BeSlinkSim[" << fSlinkArch->slinkNumber() << "]::processBx() " - << "Nothing in buffer" << std::endl; - } + } else { + if(fPrintLevel>5) { + std::cout << "BeSlinkSim[" << fSlinkArch->slinkNumber() << "]::processBx() " + << "Nothing in buffer" << std::endl; + } - done=true; + done=true; + } } - } - if(fArrayWrite==4) { - w.first=fArrayWord[1]; - w.first=(w.first<<32)+fArrayWord[0]; - w.second=fArrayWord[3]; - w.second=(w.second<<32)+fArrayWord[2]; - fSlinkWord[fNumberOfSlinkWords]=std::pair(w,false); - fNumberOfSlinkWords++; - fNumberOfEventWords++; + if(fArrayWrite==4) { + w.first=fArrayWord[1]; + w.first=(w.first<<32)+fArrayWord[0]; + w.second=fArrayWord[3]; + w.second=(w.second<<32)+fArrayWord[2]; + fSlinkWord[fNumberOfSlinkWords]=std::pair(w,false); + fNumberOfSlinkWords++; + fNumberOfEventWords++; - if(fPrintLevel>3) { - std::cout << "BeSlinkSim[" << fSlinkArch->slinkNumber() << "]::processBx() " - << "Writing Slink data word = 0x" << std::hex << w.second << " " << w.first - << std::dec << std::endl; - } + if(fPrintLevel>3) { + std::cout << "BeSlinkSim[" << fSlinkArch->slinkNumber() << "]::processBx() " + << "Writing Slink data word = 0x" << std::hex << w.second << " " << w.first + << std::dec << std::endl; + } - fArrayWrite=0; - for(unsigned i(0);i<4;i++) fArrayWord[i]=0; + fArrayWrite=0; + for(unsigned i(0);i<4;i++) fArrayWord[i]=0; + } } } } } - } - void processEconBx(unsigned ec, const uint32_t *d) { + bool exceededBuffer() const { + return fExceededBuffer; + } + + void processEconBx(unsigned ec, const uint32_t *d) { - return; + return; #ifdef NOT_YET - uint32_t a[7]; + uint32_t a[7]; - // Switch for different dataflow methods + // Switch for different dataflow methods - if(fDataFlowMethod==FixedHgcrocMap) { + if(fDataFlowMethod==FixedHgcrocMap) { - // 4 words per BX for 7 eLinks - unsigned nWords(4); + // 4 words per BX for 7 eLinks + unsigned nWords(4); - if(fPrintLevel>3) { - std::cout << "BeSlinkSim[" << fSlinkArch->slinkNumber() << "][" << fEcon << "]::processBx() " - << "Data flow method = fixed HGCROC map, reading " - << nWords << " words per BX" << std::endl; - } + if(fPrintLevel>3) { + std::cout << "BeSlinkSim[" << fSlinkArch->slinkNumber() << "][" << fEcon << "]::processBx() " + << "Data flow method = fixed HGCROC map, reading " + << nWords << " words per BX" << std::endl; + } - for(unsigned b(0);b4) { - std::cout << "BeSlinkSim[" << fSlinkArch->slinkNumber() << "][" << fEcon << "]::processBx() " - << "Copying BX word " << w << " from first buffer " << b - << ", HGCROC " << fReadHgcroc[b] << ", word " << fReadWord[b] - << " of " << fFirstBuffer[b][fReadHgcroc[b]].size() << " = " - << std::hex << fFirstBuffer[b][fReadHgcroc[b]][fReadWord[b]] - << std::dec << std::endl; + if(fPrintLevel>4) { + std::cout << "BeSlinkSim[" << fSlinkArch->slinkNumber() << "][" << fEcon << "]::processBx() " + << "Copying BX word " << w << " from first buffer " << b + << ", HGCROC " << fReadHgcroc[b] << ", word " << fReadWord[b] + << " of " << fFirstBuffer[b][fReadHgcroc[b]].size() << " = " + << std::hex << fFirstBuffer[b][fReadHgcroc[b]][fReadWord[b]] + << std::dec << std::endl; + } + assert(fElink[fHgcrocToElink[h]].writeAndIncrementPtr(fFirstBuffer[b][fReadHgcrocNumber[b]][fReadWord[b]])); } - assert(fElink[fHgcrocToElink[h]].writeAndIncrementPtr(fFirstBuffer[b][fReadHgcrocNumber[b]][fReadWord[b]])); } } } } - } - // Add zero padding word if odd - //if((nWords%2)==1) assert(fElink[fHgcrocToElink[h]].writeAndIncrementPtr(0)); + // Add zero padding word if odd + //if((nWords%2)==1) assert(fElink[fHgcrocToElink[h]].writeAndIncrementPtr(0)); - uint64_t d; - for(unsigned e(0);e<7;e++) { - if(fElink[e].readAndIncrementPtr(d)) a[e]=(d&0xffffffff); - else a[e]=0; + uint64_t d; + for(unsigned e(0);e<7;e++) { + if(fElink[e].readAndIncrementPtr(d)) a[e]=(d&0xffffffff); + else a[e]=0; - if(fPrintLevel>4) { - std::cout << "BeSlinkSim[" << fSlinkArch->slinkNumber() << "][" << fEcon << "]::processBx() " - << "Sending eLink " << e << " = " - << std::hex << a[e] - << std::dec << std::endl; + if(fPrintLevel>4) { + std::cout << "BeSlinkSim[" << fSlinkArch->slinkNumber() << "][" << fEcon << "]::processBx() " + << "Sending eLink " << e << " = " + << std::hex << a[e] + << std::dec << std::endl; + } } - } - } else if(fDataFlowMethod==VariableHgcrocMap) { + } else if(fDataFlowMethod==VariableHgcrocMap) { - unsigned nWords(0); + unsigned nWords(0); - if(fPrintLevel>3) { - std::cout << "BeSlinkSim[" << fSlinkArch->slinkNumber() << "][" << fEcon << "]::processBx() " - << "Data flow method = variable HGCROC map, reading " - << nWords << " words per BX" << std::endl; - } + if(fPrintLevel>3) { + std::cout << "BeSlinkSim[" << fSlinkArch->slinkNumber() << "][" << fEcon << "]::processBx() " + << "Data flow method = variable HGCROC map, reading " + << nWords << " words per BX" << std::endl; + } - assert(false); + assert(false); - } else if(fDataFlowMethod==EventBuild) { + } else if(fDataFlowMethod==EventBuild) { - // 24 words per BX for 2 parallel buffers = 960 MHz - // 12 words per BX for 3 parallel buffers = 480 MHz - // 8 words per BX for 4 parallel buffers = 320 MHz - //unsigned nWords(24/(NumberOfParallelBuffers-1)); + // 24 words per BX for 2 parallel buffers = 960 MHz + // 12 words per BX for 3 parallel buffers = 480 MHz + // 8 words per BX for 4 parallel buffers = 320 MHz + //unsigned nWords(24/(NumberOfParallelBuffers-1)); - // For one block, must be > 55 words x 18 HGCROCs/44 BX = 22.5; also more than output = 7 words/BX - // OR - // For one block, must be > 39 words x 18 HGCROCs/44 BX = 15.95; also more than output = 7 words/BX - // For seven blocks, must be > 55 words x 3 HGCROCs/44 BX = 3.75; also more than output = 1 word/BX - // OR - // For seven blocks, must be > 39 words x 3 HGCROCs/44 BX = 2.66; also more than output = 1 word/BX + // For one block, must be > 55 words x 18 HGCROCs/44 BX = 22.5; also more than output = 7 words/BX + // OR + // For one block, must be > 39 words x 18 HGCROCs/44 BX = 15.95; also more than output = 7 words/BX + // For seven blocks, must be > 55 words x 3 HGCROCs/44 BX = 3.75; also more than output = 1 word/BX + // OR + // For seven blocks, must be > 39 words x 3 HGCROCs/44 BX = 2.66; also more than output = 1 word/BX - unsigned nWords(fEconArch.fNumberOfBlocks==1?24:4); - //unsigned nWords(fEconArch.fNumberOfBlocks==1?16:3); + unsigned nWords(fEconArch.fNumberOfBlocks==1?24:4); + //unsigned nWords(fEconArch.fNumberOfBlocks==1?16:3); - if(fPrintLevel>3) { - std::cout << "BeSlinkSim[" << fSlinkArch->slinkNumber() << "][" << fEcon << "]::processBx() " - << "Data flow method = event build, reading " - << nWords << " words per BX" << std::endl; - } + if(fPrintLevel>3) { + std::cout << "BeSlinkSim[" << fSlinkArch->slinkNumber() << "][" << fEcon << "]::processBx() " + << "Data flow method = event build, reading " + << nWords << " words per BX" << std::endl; + } - for(unsigned block(0);block4) { - std::cout << "BeSlinkSim[" << fSlinkArch->slinkNumber() << "][" << fEcon << "]::processBx() " - << "Reading HGCROC number " << fReadHgcrocNumber[b][block] - << " < " << fEconArch.fHgcrocNumber[block].size() - << ", word number " << fReadWord[b][block] << std::endl; - } + if(fPrintLevel>4) { + std::cout << "BeSlinkSim[" << fSlinkArch->slinkNumber() << "][" << fEcon << "]::processBx() " + << "Reading HGCROC number " << fReadHgcrocNumber[b][block] + << " < " << fEconArch.fHgcrocNumber[block].size() + << ", word number " << fReadWord[b][block] << std::endl; + } - //if(fReadHgcrocNumber[b] &readBuffer(fFirstBuffer[b][readHgcroc]); // Convenient - assert(fReadWord[b][block] &readBuffer(fFirstBuffer[b][readHgcroc]); // Convenient + assert(fReadWord[b][block]4) { - std::cout << "BeSlinkSim[" << fSlinkArch->slinkNumber() << "][" << fEcon << "]::processBx() " - << "Copying BX word " << w << " from block " << block << ", first buffer " << b - << ", HGCROC " << readHgcroc << ", word " << fReadWord[b][block] - << " of " << readBuffer.size() << " = " - << std::hex << readBuffer[fReadWord[b][block]] - << std::dec << std::endl; - } - - // Write word to FIFO + if(fPrintLevel>4) { + std::cout << "BeSlinkSim[" << fSlinkArch->slinkNumber() << "][" << fEcon << "]::processBx() " + << "Copying BX word " << w << " from block " << block << ", first buffer " << b + << ", HGCROC " << readHgcroc << ", word " << fReadWord[b][block] + << " of " << readBuffer.size() << " = " + << std::hex << readBuffer[fReadWord[b][block]] + << std::dec << std::endl; + } + + // Write word to FIFO - assert(fEventBuffer[0][block].writeAndIncrementPtr(readBuffer[fReadWord[b][block]])); + assert(fEventBuffer[0][block].writeAndIncrementPtr(readBuffer[fReadWord[b][block]])); - // Check if completed all words of this HGCROC + // Check if completed all words of this HGCROC - fReadWord[b][block]++; - if(fReadWord[b][block]==readBuffer.size()) { - fReadWord[b][block]=0; - fReadHgcrocNumber[b][block]++; + fReadWord[b][block]++; + if(fReadWord[b][block]==readBuffer.size()) { + fReadWord[b][block]=0; + fReadHgcrocNumber[b][block]++; - // Check if completed all HGCROCs + // Check if completed all HGCROCs - if(fReadHgcrocNumber[b][block]==fEconArch.fHgcrocNumber[block].size()) w=nWords; + if(fReadHgcrocNumber[b][block]==fEconArch.fHgcrocNumber[block].size()) w=nWords; + } } } } } + + uint64_t d; + for(unsigned e(0);e4) { + for(unsigned e(0);e<7;e++) { + std::cout << "BeSlinkSim[" << fSlinkArch->slinkNumber() << "][" << fEcon << "]::processBx() " + << "Sending eLink " << e << " = " + << std::hex << a[e] + << std::dec << std::endl; + } } + + } else { + assert(false); } +#endif + } - if(fPrintLevel>4) { - for(unsigned e(0);e<7;e++) { - std::cout << "BeSlinkSim[" << fSlinkArch->slinkNumber() << "][" << fEcon << "]::processBx() " - << "Sending eLink " << e << " = " - << std::hex << a[e] - << std::dec << std::endl; + bool throttle() { + if(fThrottleActive) return false; + + for(unsigned e(0);enumberOfEcons();e++) { + const EconArch &econArch(fSlinkArch->econArch(e)); + for(unsigned b(0);b=fBufferLimit) { + if(fPrintLevel>5) { + std::cout << "BeSlinkSim[" << fSlinkArch->slinkNumber() << "]::throttle() " + << "Applying throttle" + << std::endl; + } + fThrottleActive=true; + return true; + } } } - - } else { - assert(false); + + return false; } -#endif - } - bool throttle() const { - for(unsigned e(0);enumberOfEcons();e++) { - const EconArch &econArch(fSlinkArch->econArch(e)); - for(unsigned b(0);b=fBufferLimit) { - if(fPrintLevel>5) { - std::cout << "BeSlinkSim[" << fSlinkArch->slinkNumber() << "]::throttle() " - << "Applying throttle" - << std::endl; + bool unThrottle() { + if(!fThrottleActive) return false; + + for(unsigned e(0);enumberOfEcons();e++) { + const EconArch &econArch(fSlinkArch->econArch(e)); + for(unsigned b(0);b=fBufferLimit) { + return false; } - return true; } } + + if(fPrintLevel>5) { + std::cout << "BeSlinkSim[" << fSlinkArch->slinkNumber() << "]::throttle() " + << "Removing throttle" + << std::endl; + } + + fThrottleActive=false; + return true; } - return false; - } - unsigned numberOfSlinkWords() const { - return fNumberOfSlinkWords; - } + unsigned numberOfSlinkWords() const { + return fNumberOfSlinkWords; + } - const std::pair& slinkWord(unsigned n) const { - assert(n& slinkWord(unsigned n) const { + assert(nslinkNumber(); - } + unsigned slinkNumber() const { + return fSlinkArch->slinkNumber(); + } -public: - static unsigned fPrintLevel; - /* - static DataRandomMethod fDataRandomMethod; - static DataFormatMethod fDataFormatMethod; - static DataFlowMethod fDataFlowMethod; - static unsigned fFormatBreakEven; - - double fTotalNum; - double fTotalMean; - double fTotalWords; - */ -protected: -private: - //unsigned fSlink; - const SlinkArch *fSlinkArch; + public: + static unsigned fPrintLevel; + /* + static DataRandomMethod fDataRandomMethod; + static DataFormatMethod fDataFormatMethod; + static DataFlowMethod fDataFlowMethod; + static unsigned fFormatBreakEven; + + double fTotalNum; + double fTotalMean; + double fTotalWords; + */ + protected: + private: + //unsigned fSlink; + const SlinkArch *fSlinkArch; - SlinkElinkData fSlinkElinkData; + SlinkElinkData fSlinkElinkData; - //unsigned fEcon; - EconFile fEconFile; + //unsigned fEcon; + EconFile fEconFile; - EconArch fEconArch; + EconArch fEconArch; - bool fL1AcceptBoe; - bool fL1AcceptEoe; + bool fL1AcceptBoe; + bool fL1AcceptEoe; - //unsigned fNumberOfHgcrocs; - //double fHgcrocMean[18]; + //unsigned fNumberOfHgcrocs; + //double fHgcrocMean[18]; - //unsigned fHgcrocToElink[18]; - //CircularBufferUR32<1> fElink[7]; - CircularBufferUR32<16> fEventBuffer[Dimensions::MaxNumberOfEconsPerSlink][Dimensions::MaxNumberOfBlocksPerEcon]; - //PartitionedBuffer<7,16> fPartitionedBuffer[5]; - - //unsigned fNumberOfChannels[18]; - //unsigned fNumberOfWords[18]; - - bool fEventActive; - unsigned fEconRead; - unsigned fBlockRead; - unsigned fArrayWrite; - uint32_t fArrayWord[4]; - unsigned fNumberOfEventWords; - unsigned fTotalNumberOfEventWords; - - BlockCheck fBlockCheck[Dimensions::MaxNumberOfEconsPerSlink][Dimensions::MaxNumberOfBlocksPerEcon]; - std::pair fBlockPair[Dimensions::MaxNumberOfEconsPerSlink][Dimensions::MaxNumberOfBlocksPerEcon]; + //unsigned fHgcrocToElink[18]; + //CircularBufferUR32<1> fElink[7]; + CircularBufferUR32<16> fEventBuffer[Dimensions::MaxNumberOfEconsPerSlink][Dimensions::MaxNumberOfBlocksPerEcon]; + //PartitionedBuffer<7,16> fPartitionedBuffer[5]; + + //unsigned fNumberOfChannels[18]; + //unsigned fNumberOfWords[18]; + + bool fThrottleActive; + bool fEventActive; + bool fExceededBuffer; + unsigned fEconRead; + unsigned fBlockRead; + unsigned fArrayWrite; + uint32_t fArrayWord[4]; + unsigned fNumberOfEventWords; + unsigned fTotalNumberOfEventWords; + + BlockCheck fBlockCheck[Dimensions::MaxNumberOfEconsPerSlink][Dimensions::MaxNumberOfBlocksPerEcon]; + std::pair fBlockPair[Dimensions::MaxNumberOfEconsPerSlink][Dimensions::MaxNumberOfBlocksPerEcon]; - //unsigned fReadHgcroc[NumberOfParallelBuffers]; - //unsigned fReadWord[NumberOfParallelBuffers]; - //unsigned fReadHgcrocNumber[NumberOfParallelBuffers][20]; - //unsigned fReadWord[NumberOfParallelBuffers][20]; - unsigned fWriteElink; - - //unsigned fNumberOfBlocks; - std::vector fHgcrocNumber[7]; - std::vector fElinkNumber[7]; - - unsigned fBufferLimit; - unsigned fActiveInputBuffer; - //std::vector fFirstBuffer[NumberOfParallelBuffers][18]; - - CircularBufferUR<1> fSlinkBoeCb; - unsigned fNumberOfSlinkWords; - std::pair fSlinkWord[3]; -}; - -unsigned BeSlinkSim::fPrintLevel(1); -/* -BeSlinkSim::DataRandomMethod BeSlinkSim::fDataRandomMethod(BeSlinkSim::Binomial); -BeSlinkSim::DataFormatMethod BeSlinkSim::fDataFormatMethod(BeSlinkSim::FixedChannelBitmap); -BeSlinkSim::DataFlowMethod BeSlinkSim::fDataFlowMethod(BeSlinkSim::FixedHgcrocMap); -unsigned BeSlinkSim::fFormatBreakEven(0); -*/ + //unsigned fReadHgcroc[NumberOfParallelBuffers]; + //unsigned fReadWord[NumberOfParallelBuffers]; + //unsigned fReadHgcrocNumber[NumberOfParallelBuffers][20]; + //unsigned fReadWord[NumberOfParallelBuffers][20]; + unsigned fWriteElink; + + //unsigned fNumberOfBlocks; + std::vector fHgcrocNumber[7]; + std::vector fElinkNumber[7]; + + unsigned fBufferLimit; + unsigned fActiveInputBuffer; + //std::vector fFirstBuffer[NumberOfParallelBuffers][18]; + + CircularBufferUR<1> fSlinkBoeCb; + unsigned fNumberOfSlinkWords; + std::pair fSlinkWord[3]; + }; + + unsigned BeSlinkSim::fPrintLevel(1); + /* + BeSlinkSim::DataRandomMethod BeSlinkSim::fDataRandomMethod(BeSlinkSim::Binomial); + BeSlinkSim::DataFormatMethod BeSlinkSim::fDataFormatMethod(BeSlinkSim::FixedChannelBitmap); + BeSlinkSim::DataFlowMethod BeSlinkSim::fDataFlowMethod(BeSlinkSim::FixedHgcrocMap); + unsigned BeSlinkSim::fFormatBreakEven(0); + */ #endif diff --git a/interface/Buffering/EconAna.hh b/interface/Buffering/EconAna.hh index ff9a7c9..b1c652e 100644 --- a/interface/Buffering/EconAna.hh +++ b/interface/Buffering/EconAna.hh @@ -46,6 +46,12 @@ public: ";Number of event buffer words used",50000,0,50000); hEventBufferUsedHistory[block]=new TH1I((sout.str()+"Block"+sHgcroc[block]+"EventBufferUsedHistory").c_str(), ";BX;Number of event buffer words used",nHistory,0,nHistory); + hEventBufferExceeded[block]=new TH1D((sout.str()+"Block"+sHgcroc[block]+"EventBufferExceeded").c_str(), + ";Number of event buffer words used",50000,0,50000); + hL1AcceptDifference[block]=new TH1D((sout.str()+"Block"+sHgcroc[block]+"L1AcceptDifference").c_str(), + ";Difference in L1Accept numbers",100,0,100); + hL1AcceptDifferenceHistory[block]=new TH1I((sout.str()+"Block"+sHgcroc[block]+"L1AcceptDifferenceHistory").c_str(), + ";BX;Difference in L1Accept numbers",nHistory,0,nHistory); } for(unsigned c(0);c<=72;c++) { @@ -100,6 +106,10 @@ public: for(unsigned block(0);blockeconArch().fNumberOfBlocks;block++) { hEventBufferUsed[block]->Fill(fEconSim->fEventBuffer[block].used()); hEventBufferUsedHistory[block]->Fill(bx,fEconSim->fEventBuffer[block].used()); + if(fEconSim->exceededBuffer()) hEventBufferExceeded[block]->Fill(fEconSim->fEventBuffer[block].used()); + + hL1AcceptDifference[block]->Fill(fEconSim->l1AcceptDifference(block)); + hL1AcceptDifferenceHistory[block]->Fill(bx,fEconSim->l1AcceptDifference(block)); } } @@ -124,6 +134,9 @@ private: TH1D *hBlockTotalWords[7]; TH1D *hEventBufferUsed[7]; TH1I *hEventBufferUsedHistory[7]; + TH1D *hEventBufferExceeded[7]; + TH1D *hL1AcceptDifference[7]; + TH1I *hL1AcceptDifferenceHistory[7]; }; #endif diff --git a/interface/Buffering/EconSim.hh b/interface/Buffering/EconSim.hh index d07358e..5c1d63e 100644 --- a/interface/Buffering/EconSim.hh +++ b/interface/Buffering/EconSim.hh @@ -52,56 +52,6 @@ public: fActiveInputBuffer=0; fWriteElink=0; - /* - if(false) { - - fNumberOfBlocks=1; - - for(unsigned h(0);h<18;h++) { - fHgcrocNumber[0].push_back(h); - } - - for(unsigned e(0);e<7;e++) { - fElinkNumber[0].push_back(e); - } - - } else { - - fNumberOfBlocks=7; - - for(unsigned h(0);h<18;h++) { - fHgcrocNumber[h%7].push_back(h); - } - - for(unsigned e(0);e<7;e++) { - fElinkNumber[e].push_back(e); - } - - } - - if(fPrintLevel>1) { - std::cout << "EconSim::ctor() " - << "Number of blocks = " << fNumberOfBlocks << std::endl; - - for(unsigned block(0);blockfNumberOfBlocks;block++) { fEventBuffer[block].reset(16*4096); + fOldestL1Accept[block]=0; } - } - -#ifdef CRAP - void initialise(unsigned m) { - //assert(fEconFile->fNumberOfHgcrocs<=18); - - setFormatBreakEven(); - fActiveInputBuffer=0; - fWriteElink=0; - - // Random values for now - /* - for(unsigned h(0);hfHgcrocMean[h]=0.5*h+1; - fHgcrocToElink[h]=(h%7); - } - */ - - for(unsigned h(0);h<18;h++) { - fFirstBuffer[0][h].resize(channelsToWords(72,false)); - fFirstBuffer[1][h].resize(channelsToWords(72,false)); - - fEconFile->fHgcrocMean[h]=0.0; - } - - for(unsigned h(0);hfNumberOfHgcrocs;h++) { - if(m==0) { - fEconFile->fHgcrocMean[h]=10; - if(h<14) fEconFile->fHgcrocMean[h]=20; - if(h< 7) fEconFile->fHgcrocMean[h]=35; - if(h==6) fEconFile->fHgcrocMean[h]=40; - } - if(m==1) { - fEconFile->fHgcrocMean[h]=5; - if(h<14) fEconFile->fHgcrocMean[h]=10; - if(h< 7) fEconFile->fHgcrocMean[h]=15; - } - if(m==2) { - fEconFile->fHgcrocMean[h]=3; - if(h<14) fEconFile->fHgcrocMean[h]=7; - if(h< 7) fEconFile->fHgcrocMean[h]=10; - } - if(m==3) { - fEconFile->fHgcrocMean[h]=2; - if(h<14) fEconFile->fHgcrocMean[h]=4; - if(h< 7) fEconFile->fHgcrocMean[h]=5; - } - if(m>=4) { - fEconFile->fHgcrocMean[h]=1; - if(h<14) fEconFile->fHgcrocMean[h]=2; - if(h< 7) fEconFile->fHgcrocMean[h]=3; - } - - fHgcrocToElink[h]=(h%7); - } - - std::cout << std::endl << "Econ::ctor() number of HGCROCs = " - << fEconFile->fNumberOfHgcrocs << std::endl; - - double elinkNum[7]={0,0,0,0,0,0,0}; - double elinkMean[7]={0,0,0,0,0,0,0}; - - for(unsigned h(0);hfNumberOfHgcrocs;h++) { - std::cout << " HGCROC " << std::setw(2) << h - << ", average number of channels = " << fEconFile->fHgcrocMean[h] - << ", assigned to Elink = " << fHgcrocToElink[h] << std::endl; - - elinkNum[fHgcrocToElink[h]]++; - elinkMean[fHgcrocToElink[h]]+=fEconFile->fHgcrocMean[h]; - } - - /* - fTotalNum=0; - fTotalMean=0; - for(unsigned e(0);e<7;e++) { - fTotalNum+=elinkNum[e]; - fTotalMean+=elinkMean[e]; - - std::cout << " Elink " << e << ", number of HGCROCs = " << elinkNum[e] - << ", total average number of channels = " - << elinkMean[e] << ", average number of 32-bit words = " - << 3*elinkNum[e]+0.5*elinkMean[e] - << std::endl; - } - - fTotalWords=3*fTotalNum+0.5*fTotalMean; - std::cout << " ECON, total average number of channels = " - << fTotalMean << ", average number of 32-bit words = " - << fTotalWords - << std::endl; - */ } -#endif - + void slinkNumber(unsigned s) { fSlink=s; } @@ -247,13 +106,20 @@ public: return fEconFile->fHgcrocMean[h]; } - void processZs(uint8_t bx, uint8_t l1a) { + void processZs(uint64_t bx, uint64_t l1a) { if(fPrintLevel>3) { - std::cout << "EconSim[" << fSlink << "][" << fEcon << "]::processZs(" << unsigned(bx) - << "," << unsigned(l1a) << ") " + std::cout << "EconSim[" << fSlink << "][" << fEcon << "]::processZs(" << bx + << "," << l1a << ") " << "Entered" << std::endl; } + fNewestL1Accept=l1a; + + if(fPrintLevel>5) { + std::cout << "Incrementing newest L1Accept to " << fNewestL1Accept + << std::endl; + } + TRandom &random(Random::random()); bool binomialOrFlat; @@ -311,8 +177,8 @@ public: } if(fPrintLevel>4) { - std::cout << "EconSim[" << fSlink << "][" << fEcon << "]::processZs(" << unsigned(bx) - << "," << unsigned(l1a) << ") " + std::cout << "EconSim[" << fSlink << "][" << fEcon << "]::processZs(" << bx + << "," << l1a << ") " << "Hgcroc " << h << ", number of channels = " << fNumberOfChannels[h] << ", words = " << fNumberOfWords[h] << std::endl; @@ -320,23 +186,23 @@ public: // Create HGCROC header - HgcrocBoe hboe(fEcon,h,bx,l1a,fNumberOfWords[h]); + HgcrocBoe hboe(fEcon,h,bx&0xff,l1a&0xff,fNumberOfWords[h]); if(fPrintLevel>4) { - std::cout << "EconSim[" << fSlink << "][" << fEcon << "]::processZs(" << unsigned(bx) - << "," << unsigned(l1a) << ") " + std::cout << "EconSim[" << fSlink << "][" << fEcon << "]::processZs(" << bx + << "," << l1a << ") " << "Hgcroc " << h << " BOE" << std::endl; hboe.print(); } // Write data into selected buffer - assert((fActiveInputBuffer&0xff)==l1a); + assert(fActiveInputBuffer==l1a); fFirstBuffer[fActiveInputBuffer%NumberOfParallelBuffers][h].resize(fNumberOfWords[h]); fFirstBuffer[fActiveInputBuffer%NumberOfParallelBuffers][h][0]=hboe.word(); for(unsigned i(1);i=255) fExceededBuffer=true; + + // Read out for elinks + uint32_t d; for(unsigned e(0);efElinkNumber[block].size();e++) { //if(fEventBuffer[block].readAndIncrementPtr(d)) a[fEconArch->fElinkNumber[block][e]]=(d&0xffffffff); - if(fEventBuffer[block].readAndIncrementPtr(d)) a[fEconArch->fElinkNumber[block][e]]=d; - else a[fEconArch->fElinkNumber[block][e]]=0; + if(fEventBuffer[block].readAndIncrementPtr(d)) { + a[fEconArch->fElinkNumber[block][e]]=d; + + HgcrocBoe tempBoe(d); + if(tempBoe.l1a()==((fOldestL1Accept[block]+1)&0xff)) { + fOldestL1Accept[block]++; + if(fPrintLevel>5) { + std::cout << "Incrementing block " << block + << " oldest L1Accept to " << fOldestL1Accept[block] + << std::endl; + } + } + + } else a[fEconArch->fElinkNumber[block][e]]=0; } } @@ -521,6 +407,22 @@ public: } } + bool exceededBuffer() const { + if(fPrintLevel>5) { + if(fExceededBuffer) { + std::cout << "EconSim[" << fSlink << "][" << fEcon << "]::exceededBuffer() " + << "Buffer exceeded" << std::endl; + } + } + + return fExceededBuffer; + } + + unsigned l1AcceptDifference(unsigned b) const { + assert(bfNumberOfBlocks); + return fNewestL1Accept-fOldestL1Accept[b]; + } + unsigned numberOfHgcrocs() const { return fEconFile->fNumberOfHgcrocs; } @@ -626,11 +528,6 @@ public: static DataFormatMethod fDataFormatMethod; static DataFlowMethod fDataFlowMethod; static unsigned fFormatBreakEven; - /* - double fTotalNum; - double fTotalMean; - double fTotalWords; - */ protected: private: @@ -639,6 +536,11 @@ private: const EconFile *fEconFile; const EconArch *fEconArch; + bool fExceededBuffer; + + uint64_t fNewestL1Accept; + uint64_t fOldestL1Accept[Dimensions::MaxNumberOfBlocksPerEcon]; + //unsigned fNumberOfHgcrocs; //double fHgcrocMean[18]; diff --git a/interface/Buffering/Throttle.hh b/interface/Buffering/Throttle.hh index 3078936..b7dd1b8 100644 --- a/interface/Buffering/Throttle.hh +++ b/interface/Buffering/Throttle.hh @@ -4,8 +4,6 @@ class Throttle { public: Throttle(uint64_t b) : fDelay(60), fRaisedBx(b), fEndedBx(-1) { - - } void endThrottle(uint64_t bx) { @@ -13,8 +11,16 @@ public: } bool allowL1Accept(uint64_t bx) { + if(fEndedBx==-1) return bx<(fRaisedBx+fDelay); return bx<(fRaisedBx+fDelay) || bx>=(fEndedBx+fDelay); } + + void print() const { + std::cout << "Throttle::print() Raised, ended BXs = " + << fRaisedBx << ", " << fEndedBx + << ", duration = " << fEndedBx - fRaisedBx + << std::endl; + } private: const uint64_t fDelay; diff --git a/src/DaqDaqBuffer.cpp b/src/DaqDaqBuffer.cpp index 03cffc2..2008719 100644 --- a/src/DaqDaqBuffer.cpp +++ b/src/DaqDaqBuffer.cpp @@ -206,8 +206,8 @@ int main(int argc, char* argv[]) { unsigned l1AcceptRate(750); unsigned l1AcceptRandom(1); - bool doingEcon(false); - bool doingBe(false); + bool doingEcon(true); + bool doingBe(doingEcon && true); // HGCROC unsigned hgcrocLimit(7); @@ -223,6 +223,8 @@ int main(int argc, char* argv[]) { // BE + unsigned beLimit(block==1?4000:1000); + //if(argc>2 && (argc%2)!=1) { if(argc==1) { std::cerr << "Usage: " << argv[0] << " -- or " << std::endl; @@ -241,13 +243,19 @@ int main(int argc, char* argv[]) { std::cout << nArg << std::endl; l1AcceptRate=550+50*(nArg%10); - nArg/=10; - l1AcceptRandom=(nArg%10); nArg/=10; hgcrocLimit=(nArg%10); nArg/=10; hgcrocTransmission=40+2*(nArg%10); + + nArg/=10; + block=(nArg%10); + nArg/=10; + econRandom=(nArg%10); + + nArg/=10; + beLimit=500*(nArg%10); } for(int i(initial);i> econRandom; if(sarg1=="--econFormat") sarg2 >> econFormat; //if(sarg1=="--econFlow") sarg2 >> econFlow; - } + + if(sarg1=="--beLimit") sarg2 >> beLimit; +} std::ostringstream sout; sout << "_L1AcceptRate" << l1AcceptRate; @@ -286,6 +296,7 @@ int main(int argc, char* argv[]) { assert(block==1 || block==7); if(doingBe) { + sout << "_BeLimit" << beLimit; } } @@ -349,7 +360,6 @@ int main(int argc, char* argv[]) { bool completeEvent[5][18][256]; bool doneEvent[5][18][256]; unsigned nHgcrocWords=-1; - unsigned nHgcrocWord(0); unsigned readL1A=0; unsigned readEcon=0; @@ -435,7 +445,7 @@ int main(int argc, char* argv[]) { } if(doingBe) { - beSlinkSim[sl].boj(slinkArch[sl]); + beSlinkSim[sl].boj(slinkArch[sl],beLimit); beSlinkAna[sl].boj(beSlinkSim[sl],nHistory); slinkCheck[sl].boj(slinkArch[sl]); @@ -510,11 +520,15 @@ int main(int argc, char* argv[]) { uint64_t numberL1AOut(0); uint64_t nHgcrocDeadtime(0); - uint64_t nThrottleDeadtime(0); + uint64_t nEconThrottleDeadtime(0); + uint64_t nEconExceeded(0); + uint64_t nBeThrottleDeadtime(0); + uint64_t nBeExceeded(0); //TriggerRule tr(50); - std::vector vThrottle; + std::vector vEconThrottle; + std::vector vBeThrottle; catchSignals(); uint64_t bx; @@ -535,16 +549,24 @@ int main(int argc, char* argv[]) { bool newL1AIn(false); bool newL1AOut(false); - bool allowL1a(true); - for(unsigned t(0);t0) { - vThrottle[vThrottle.size()-1].endThrottle(bx); - } + if(beSlinkSim[sl].throttle()) vBeThrottle.push_back(Throttle(bx)); + if(beSlinkSim[sl].unThrottle()) { + assert(vBeThrottle.size()>0); + vBeThrottle[vBeThrottle.size()-1].endThrottle(bx); + //vBeThrottle[vBeThrottle.size()-1].print(); } + if(beSlinkSim[sl].exceededBuffer()) anyExceeded=true; + beSlinkAna[sl].analyseBx(bx); for(unsigned w(0);wSetBinContent(2,numberL1AIn); hCounts->SetBinContent(3,numberL1AOut); hCounts->SetBinContent(4,nHgcrocDeadtime); - hCounts->SetBinContent(5,nThrottleDeadtime); + hCounts->SetBinContent(5,nEconThrottleDeadtime); + hCounts->SetBinContent(6,nEconExceeded); + hCounts->SetBinContent(7,nBeThrottleDeadtime); + hCounts->SetBinContent(8,nBeExceeded); std::cout << "Number of BXs = " << bx << ", number of L1As = " << numberL1AIn << ", " << numberL1AOut @@ -996,8 +1031,14 @@ int main(int argc, char* argv[]) { std::cout << "Number of HGCROC deadtime BXs = " << nHgcrocDeadtime << ", fraction = " << 1.0*nHgcrocDeadtime/bx << std::endl; - std::cout << "Number of throttle deadtime BXs = " << nThrottleDeadtime - << ", fraction = " << 1.0*nThrottleDeadtime/bx << std::endl; + std::cout << "Number of ECON throttle deadtime BXs = " << nEconThrottleDeadtime + << ", fraction = " << 1.0*nEconThrottleDeadtime/bx << std::endl; + std::cout << "Number of BX with ECON buffer exceeded = " << nEconExceeded + << ", fraction = " << 1.0*nEconExceeded/bx << std::endl; + std::cout << "Number of BE throttle deadtime BXs = " << nBeThrottleDeadtime + << ", fraction = " << 1.0*nBeThrottleDeadtime/bx << std::endl; + std::cout << "Number of BX with BE buffer exceeded = " << nBeExceeded + << ", fraction = " << 1.0*nBeExceeded/bx << std::endl; // Finish up -- GitLab