Commit efc9b89c authored by dauncey's avatar dauncey

Throttling and exceeding

parent 56642b92
......@@ -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);block<fEconSim->fEconArch.fNumberOfBlocks;block++) {
unsigned nBlockChannels(0),nBlockWords(0);
for(unsigned i(0);i<fEconSim->fEconArch.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);b<econArch.numberOfBlocks();b++) {
hEventBufferUsed[e][b]->Fill(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
This diff is collapsed.
......@@ -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);block<fEconSim->econArch().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
......@@ -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);block<fNumberOfBlocks;block++) {
std::cout << " Block " << block << ", HGCROCs =";
for(unsigned h(0);h<fHgcrocNumber[block].size();h++) {
std::cout << " " << fHgcrocNumber[block][h];
}
std::cout << ", Elinks =";
for(unsigned e(0);e<fElinkNumber[block].size();e++) {
std::cout << " " << fElinkNumber[block][e];
}
std::cout << std::endl;
}
}
*/
for(unsigned b(0);b<NumberOfParallelBuffers;b++) {
for(unsigned block(0);block<20;block++) {
fReadHgcrocNumber[b][block]=EconFile::MaxNumberOfHgcrocs;
......@@ -114,12 +64,11 @@ public:
<< ", word number " << fReadWord[b][block] << std::endl;
}
}
for(unsigned h(0);h<EconFile::MaxNumberOfHgcrocs;h++) {
fFirstBuffer[b][h].resize(channelsToWords(72,false));
}
}
//fHgcrocToElink[h]=(h%7);
}
void boj(unsigned s, unsigned e, const EconFile &f, const EconArch &a) {
......@@ -128,104 +77,14 @@ public:
fEconFile=&f;
fEconArch=&a;
fNewestL1Accept=0;
for(unsigned block(0);block<fEconArch->fNumberOfBlocks;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);h<fNumberOfHgcrocs;h++) {
fEconFile->fHgcrocMean[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);h<fEconFile->fNumberOfHgcrocs;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);h<fEconFile->fNumberOfHgcrocs;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<fNumberOfWords[h];i++) {
fFirstBuffer[fActiveInputBuffer%NumberOfParallelBuffers][h][i]=(l1a<<24)+i;
fFirstBuffer[fActiveInputBuffer%NumberOfParallelBuffers][h][i]=((l1a&0xff)<<24)+i;
}
}
......@@ -350,14 +216,15 @@ public:
fActiveInputBuffer++;
}
void processBx(uint32_t *a) {
fExceededBuffer=false;
// Switch for different dataflow methods
if(fDataFlowMethod==FixedHgcrocMap) {
#ifdef NOT_YET
// 4 words per BX for 7 eLinks
unsigned nWords(4);
......@@ -367,6 +234,10 @@ public:
<< nWords << " words per BX" << std::endl;
}
assert(false);
#ifdef NOT_YET
for(unsigned b(0);b<NumberOfParallelBuffers;b++) {
if(b!=(fActiveInputBuffer%NumberOfParallelBuffers)) {
......@@ -498,12 +369,27 @@ public:
}
}
//uint64_t d;
if(fEventBuffer[block].used()>=255) fExceededBuffer=true;
// Read out for elinks
uint32_t d;
for(unsigned e(0);e<fEconArch->fElinkNumber[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(b<fEconArch->fNumberOfBlocks);
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];
......
......@@ -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;
......
......@@ -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] << " --<parameter> <value> or <parameter number>" << 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<argc;i+=2) {
......@@ -269,7 +277,9 @@ int main(int argc, char* argv[]) {
if(sarg1=="--econRandom") sarg2 >> 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<Throttle> vThrottle;
std::vector<Throttle> vEconThrottle;
std::vector<Throttle> 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);t<vThrottle.size() && allowL1a;t++) {
allowL1a=vThrottle[t].allowL1Accept(bx);
bool econAllowL1a(true);
for(unsigned t(0);t<vEconThrottle.size() && econAllowL1a;t++) {
econAllowL1a=vEconThrottle[t].allowL1Accept(bx);
}
bool beAllowL1a(true);
for(unsigned t(0);t<vBeThrottle.size() && beAllowL1a;t++) {
beAllowL1a=vBeThrottle[t].allowL1Accept(bx);
}
if(!hgcrocSim.allowL1Accept()) {
nHgcrocDeadtime++;
} else if(!allowL1a) {
nThrottleDeadtime++;
} else if(!econAllowL1a) {
nEconThrottleDeadtime++;
} else if(!beAllowL1a) {
nBeThrottleDeadtime++;
} else {
if(l1AcceptRandom!=0) newL1AIn=(random.random().Uniform()<(l1AcceptRate/40000.0));
......@@ -575,23 +597,28 @@ int main(int argc, char* argv[]) {
////////////////////////////////////////////////////////////
if(doingEcon) {
bool anyExceeded(false);
for(unsigned sl(0);sl<NumberOfSlinks;sl++) {
for(unsigned ec(0);ec<5;ec++) {
if(newL1AOut) {
econSim[sl][ec].processZs(bx&0xff,numberL1AOut&0xff);
econSim[sl][ec].processZs(bx,numberL1AOut);
econAna[sl][ec].analyseZs(bx);
}
//econSim[sl][ec].processBx(array[ec][bx%2]);
econSim[sl][ec].processBx(slinkElinkData[sl].fData[ec]);
if(econSim[sl][ec].exceededBuffer()) anyExceeded=true;