CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
BU.cc
Go to the documentation of this file.
1 //
3 // BU
4 // --
5 //
6 // Emilio Meschi <emilio.meschi@cern.ch>
7 // Philipp Schieferdecker <philipp.schieferdecker@cern.ch>
9 
10 
12 
14 
17 
18 #include "xoap/SOAPEnvelope.h"
19 #include "xoap/SOAPBody.h"
20 #include "xoap/domutils.h"
21 
22 #include <netinet/in.h>
23 #include <sstream>
24 
25 
26 using namespace std;
27 using namespace evf;
28 
29 
31 // construction/destruction
33 
34 //______________________________________________________________________________
35 BU::BU(xdaq::ApplicationStub *s)
36  : xdaq::Application(s)
37  , log_(getApplicationLogger())
38  , buAppDesc_(getApplicationDescriptor())
39  , fuAppDesc_(0)
40  , buAppContext_(getApplicationContext())
41  , fsm_(this)
42  , gui_(0)
43  , evtNumber_(0)
44  , isBuilding_(false)
45  , isSending_(false)
46  , isHalting_(false)
47  , wlBuilding_(0)
48  , asBuilding_(0)
49  , wlSending_(0)
50  , asSending_(0)
51  , wlMonitoring_(0)
52  , asMonitoring_(0)
53  , instance_(0)
54  , runNumber_(0)
55  , memUsedInMB_(0.0)
56  , deltaT_(0.0)
57  , deltaN_(0)
58  , deltaSumOfSquares_(0)
59  , deltaSumOfSizes_(0)
60  , throughput_(0.0)
61  , average_(0.0)
62  , rate_(0.0)
63  , rms_(0.0)
64  , nbEventsInBU_(0)
65  , nbEventsRequested_(0)
66  , nbEventsBuilt_(0)
67  , nbEventsSent_(0)
68  , nbEventsDiscarded_(0)
69  , mode_("RANDOM")
70  , replay_(false)
71  , crc_(true)
72  , overwriteEvtId_(true)
73  , firstEvent_(1)
74  , queueSize_(32)
75  , eventBufferSize_(0x400000)
76  , msgBufferSize_(32768)
77  , fedSizeMax_(65536)
78  , fedSizeMean_(1024)
79  , fedSizeWidth_(1024)
80  , useFixedFedSize_(false)
81  , monSleepSec_(1)
82  , gaussianMean_(0.0)
83  , gaussianWidth_(1.0)
84  , monLastN_(0)
85  , monLastSumOfSquares_(0)
86  , monLastSumOfSizes_(0)
87  , sumOfSquares_(0)
88  , sumOfSizes_(0)
89  , i2oPool_(0)
90 {
91  // initialize state machine
92  fsm_.initialize<evf::BU>(this);
93 
94  // initialize application info
95  url_ =
96  getApplicationDescriptor()->getContextDescriptor()->getURL()+"/"+
97  getApplicationDescriptor()->getURN();
98  class_ =getApplicationDescriptor()->getClassName();
99  instance_=getApplicationDescriptor()->getInstance();
100  hostname_=getApplicationDescriptor()->getContextDescriptor()->getURL();
101  sourceId_=class_.toString()+instance_.toString();
102 
103  // i2o callbacks
104  i2o::bind(this,&BU::I2O_BU_ALLOCATE_Callback,I2O_BU_ALLOCATE,XDAQ_ORGANIZATION_ID);
105  i2o::bind(this,&BU::I2O_BU_DISCARD_Callback, I2O_BU_DISCARD, XDAQ_ORGANIZATION_ID);
106 
107  // allocate i2o memery pool
108  string i2oPoolName=sourceId_+"_i2oPool";
109  try {
110  toolbox::mem::HeapAllocator *allocator=new toolbox::mem::HeapAllocator();
111  toolbox::net::URN urn("toolbox-mem-pool",i2oPoolName);
112  toolbox::mem::MemoryPoolFactory* poolFactory=
113  toolbox::mem::getMemoryPoolFactory();
114  i2oPool_=poolFactory->createPool(urn,allocator);
115  }
117  string s="Failed to create pool: "+i2oPoolName;
118  LOG4CPLUS_FATAL(log_,s);
119  XCEPT_RETHROW(xcept::Exception,s,e);
120  }
121 
122  // web interface
123  xgi::bind(this,&evf::BU::webPageRequest,"Default");
124  gui_=new WebGUI(this,&fsm_);
125  gui_->setSmallAppIcon("/rubuilder/bu/images/bu32x32.gif");
126  gui_->setLargeAppIcon("/rubuilder/bu/images/bu64x64.gif");
127 
128  vector<toolbox::lang::Method*> methods=gui_->getMethods();
129  vector<toolbox::lang::Method*>::iterator it;
130  for (it=methods.begin();it!=methods.end();++it) {
131  if ((*it)->type()=="cgi") {
132  string name=static_cast<xgi::MethodSignature*>(*it)->name();
133  xgi::bind(this,&evf::BU::webPageRequest,name);
134  }
135  }
136  xgi::bind(this,&evf::BU::customWebPage,"customWebPage");
137 
138 
139  // export parameters to info space(s)
141 
142  // findRcmsStateListener
144 
145  // compute parameters for fed size generation (a la Emilio)
148  (0.5*
149  (1+std::sqrt
150  (1.0+4.0*
151  fedSizeWidth_.value_*fedSizeWidth_.value_/
152  fedSizeMean_.value_/fedSizeMean_.value_))));
153 
154  // start monitoring thread, once and for all
156 
157  // propagate crc flag to BUEvent
159 }
160 
161 
162 //______________________________________________________________________________
164 {
165  while (!events_.empty()) { delete events_.back(); events_.pop_back(); }
166 }
167 
168 
170 // implementation of member functions
172 
173 //______________________________________________________________________________
174 bool BU::configuring(toolbox::task::WorkLoop* wl)
175 {
176  isHalting_=false;
177  try {
178  LOG4CPLUS_INFO(log_,"Start configuring ...");
179  reset();
180  LOG4CPLUS_INFO(log_,"Finished configuring!");
181  fsm_.fireEvent("ConfigureDone",this);
182  }
183  catch (xcept::Exception &e) {
184  string msg = "configuring FAILED: " + (string)e.what();
185  fsm_.fireFailed(msg,this);
186  }
187 
188  return false;
189 }
190 
191 
192 //______________________________________________________________________________
193 bool BU::enabling(toolbox::task::WorkLoop* wl)
194 {
195  isHalting_=false;
196  try {
197  LOG4CPLUS_INFO(log_,"Start enabling ...");
198  // determine valid fed ids (assumes Playback EP is already configured hence PBRDP::instance
199  // not null in case we are playing back)
201  for (unsigned int i=0;i<(unsigned int)FEDNumbering::MAXFEDID+1;i++)
202  if (FEDNumbering::inRange(i)) validFedIds_.push_back(i);
203  }
204  else{
205  for (unsigned int i=0;i<(unsigned int)FEDNumbering::MAXFEDID+1;i++)
206  if (FEDNumbering::inRangeNoGT(i)) validFedIds_.push_back(i);
207  }
210  LOG4CPLUS_INFO(log_,"Finished enabling!");
211  fsm_.fireEvent("EnableDone",this);
212  }
213  catch (xcept::Exception &e) {
214  string msg = "enabling FAILED: " + (string)e.what();
215  fsm_.fireFailed(msg,this);
216  }
217 
218  return false;
219 }
220 
221 
222 //______________________________________________________________________________
223 bool BU::stopping(toolbox::task::WorkLoop* wl)
224 {
225  try {
226  LOG4CPLUS_INFO(log_,"Start stopping :) ...");
227 
229  (!replay_.value_||nbEventsBuilt_<(uint32_t)events_.size())) {
230  lock();
231  freeIds_.push(events_.size());
232  unlock();
233  postBuild();
234  while (!builtIds_.empty()) {
235  LOG4CPLUS_INFO(log_,"wait to flush ... #builtIds="<<builtIds_.size());
236  ::sleep(1);
237  }
238  // let the playback go to the last event and exit
240  }
241 
242  lock();
243  builtIds_.push(events_.size());
244  unlock();
245 
246  postSend();
247  while (!sentIds_.empty()) {
248  LOG4CPLUS_INFO(log_,"wait to flush ...");
249  ::sleep(1);
250  }
252  (replay_.value_&&nbEventsBuilt_>=(uint32_t)events_.size())) {
253  lock();
254  freeIds_.push(events_.size());
255  unlock();
256  postBuild();
257  }
258  LOG4CPLUS_INFO(log_,"Finished stopping!");
259  fsm_.fireEvent("StopDone",this);
260  }
261  catch (xcept::Exception &e) {
262  string msg = "stopping FAILED: " + (string)e.what();
263  fsm_.fireFailed(msg,this);
264  }
265  return false;
266 }
267 
268 
269 //______________________________________________________________________________
270 bool BU::halting(toolbox::task::WorkLoop* wl)
271 {
272  try {
273  LOG4CPLUS_INFO(log_,"Start halting ...");
274  isHalting_=true;
275  if (isBuilding_&&isSending_) {
276  lock();
277  freeIds_.push(events_.size());
278  builtIds_.push(events_.size());
279  unlock();
280  postBuild();
281  postSend();
282  }
283  LOG4CPLUS_INFO(log_,"Finished halting!");
284  fsm_.fireEvent("HaltDone",this);
285  }
286  catch (xcept::Exception &e) {
287  string msg = "halting FAILED: " + (string)e.what();
288  fsm_.fireFailed(msg,this);
289  }
290 
291  return false;
292 }
293 
294 
295 //______________________________________________________________________________
296 xoap::MessageReference BU::fsmCallback(xoap::MessageReference msg)
298 {
299  return fsm_.commandCallback(msg);
300 }
301 
302 
303 //______________________________________________________________________________
304 void BU::I2O_BU_ALLOCATE_Callback(toolbox::mem::Reference *bufRef)
305 {
306  if (isHalting_) {
307  LOG4CPLUS_WARN(log_,"Ignore BU_ALLOCATE message while halting.");
308  bufRef->release();
309  return;
310  }
311 
312  I2O_MESSAGE_FRAME *stdMsg;
313  I2O_BU_ALLOCATE_MESSAGE_FRAME *msg;
314 
315  stdMsg=(I2O_MESSAGE_FRAME*)bufRef->getDataLocation();
316  msg =(I2O_BU_ALLOCATE_MESSAGE_FRAME*)stdMsg;
317 
318  if (0==fuAppDesc_) {
319  I2O_TID fuTid=stdMsg->InitiatorAddress;
320  fuAppDesc_=i2o::utils::getAddressMap()->getApplicationDescriptor(fuTid);
321  }
322 
323  for (unsigned int i=0;i<msg->n;i++) {
324  unsigned int fuResourceId=msg->allocate[i].fuTransactionId;
325  lock();
326  rqstIds_.push(fuResourceId);
327  postRqst();
329  nbEventsInBU_++;
330  unlock();
331  }
332 
333  bufRef->release();
334 }
335 
336 
337 //______________________________________________________________________________
338 void BU::I2O_BU_DISCARD_Callback(toolbox::mem::Reference *bufRef)
339 {
340  if (isHalting_) {
341  LOG4CPLUS_WARN(log_,"Ignore BU_DISCARD message while halting.");
342  bufRef->release();
343  return;
344  }
345 
346  I2O_MESSAGE_FRAME *stdMsg=(I2O_MESSAGE_FRAME*)bufRef->getDataLocation();
347  I2O_BU_DISCARD_MESSAGE_FRAME*msg =(I2O_BU_DISCARD_MESSAGE_FRAME*)stdMsg;
348  unsigned int buResourceId=msg->buResourceId[0];
349 
350  lock();
351  int result=sentIds_.erase(buResourceId);
352  unlock();
353 
354  if (!result) {
355  LOG4CPLUS_ERROR(log_,"can't discard unknown buResourceId '"<<buResourceId<<"'");
356  }
357  else {
358  lock();
359  freeIds_.push(buResourceId);
360  nbEventsDiscarded_.value_++;
361  unlock();
362  postBuild();
363  }
364 
365  bufRef->release();
366 }
367 
368 
369 //______________________________________________________________________________
370 void BU::actionPerformed(xdata::Event& e)
371 {
372  gui_->monInfoSpace()->lock();
373  if (e.type()=="urn:xdata-event:ItemGroupRetrieveEvent") {
374  mode_=(0==PlaybackRawDataProvider::instance())?"RANDOM":"PLAYBACK";
375  if (0!=i2oPool_) memUsedInMB_=i2oPool_->getMemoryUsage().getUsed()*9.53674e-07;
376  else memUsedInMB_=0.0;
377  }
378  else if (e.type()=="ItemChangedEvent") {
379  string item=dynamic_cast<xdata::ItemChangedEvent&>(e).itemName();
380  if (item=="crc") BUEvent::setComputeCrc(crc_.value_);
381  }
382  gui_->monInfoSpace()->unlock();
383 }
384 
385 
386 //______________________________________________________________________________
389 {
390  string name=in->getenv("PATH_INFO");
391  if (name.empty()) name="defaultWebPage";
392  static_cast<xgi::MethodSignature*>(gui_->getMethod(name))->invoke(in,out);
393 }
394 
395 
396 //______________________________________________________________________________
399 {
400  *out<<"<html></html>"<<endl;
401 }
402 
403 
404 //______________________________________________________________________________
406 {
407  try {
408  LOG4CPLUS_INFO(log_,"Start 'building' workloop");
409  wlBuilding_=
410  toolbox::task::getWorkLoopFactory()->getWorkLoop(sourceId_+
411  "Building",
412  "waiting");
413  if (!wlBuilding_->isActive()) wlBuilding_->activate();
414  asBuilding_=toolbox::task::bind(this,&BU::building,sourceId_+"Building");
415  wlBuilding_->submit(asBuilding_);
416  isBuilding_=true;
417  }
418  catch (xcept::Exception& e) {
419  string msg = "Failed to start workloop 'building'.";
420  XCEPT_RETHROW(evf::Exception,msg,e);
421  }
422 }
423 
424 
425 //______________________________________________________________________________
426 bool BU::building(toolbox::task::WorkLoop* wl)
427 {
428  waitBuild();
429  lock();
430  unsigned int buResourceId=freeIds_.front(); freeIds_.pop();
431  unlock();
432 
433  if (buResourceId>=(uint32_t)events_.size()) {
434  LOG4CPLUS_INFO(log_,"shutdown 'building' workloop.");
435  isBuilding_=false;
436  return false;
437  }
438 
439  if (!isHalting_) {
440  BUEvent* evt=events_[buResourceId];
441  if(generateEvent(evt)) {
442  lock();
443  nbEventsBuilt_++;
444  builtIds_.push(buResourceId);
445  unlock();
446 
447  postSend();
448  }
449  else {
450  LOG4CPLUS_INFO(log_,"building:received null post");
451  lock();
452  unsigned int saveBUResourceId = buResourceId;
453  //buResourceId = freeIds_.front(); freeIds_.pop();
454  freeIds_.push(saveBUResourceId);
455  unlock();
456  isBuilding_=false;
457  return false;
458  }
459  }
460  return true;
461 }
462 
463 
464 //______________________________________________________________________________
466 {
467  try {
468  LOG4CPLUS_INFO(log_,"Start 'sending' workloop");
469  wlSending_=toolbox::task::getWorkLoopFactory()->getWorkLoop(sourceId_+
470  "Sending",
471  "waiting");
472  if (!wlSending_->isActive()) wlSending_->activate();
473  asSending_=toolbox::task::bind(this,&BU::sending,sourceId_+"Sending");
474  wlSending_->submit(asSending_);
475  isSending_=true;
476  }
477  catch (xcept::Exception& e) {
478  string msg = "Failed to start workloop 'sending'.";
479  XCEPT_RETHROW(evf::Exception,msg,e);
480  }
481 }
482 
483 
484 //______________________________________________________________________________
485 bool BU::sending(toolbox::task::WorkLoop* wl)
486 {
487  waitSend();
488  lock();
489  unsigned int buResourceId=builtIds_.front(); builtIds_.pop();
490  unlock();
491 
492  if (buResourceId>=(uint32_t)events_.size()) {
493  LOG4CPLUS_INFO(log_,"shutdown 'sending' workloop.");
494  isSending_=false;
495  return false;
496  }
497 
498  if (!isHalting_) {
499  waitRqst();
500  lock();
501  unsigned int fuResourceId=rqstIds_.front(); rqstIds_.pop();
502  unlock();
503 
504  BUEvent* evt=events_[buResourceId];
505  toolbox::mem::Reference* msg=createMsgChain(evt,fuResourceId);
506 
507  lock();
508  sumOfSquares_+=(uint64_t)evt->evtSize()*(uint64_t)evt->evtSize();
509  sumOfSizes_ +=evt->evtSize();
510  nbEventsInBU_--;
511  nbEventsSent_++;
512  sentIds_.insert(buResourceId);
513  unlock();
514 
515  buAppContext_->postFrame(msg,buAppDesc_,fuAppDesc_);
516  }
517 
518  return true;
519 }
520 
521 
522 //______________________________________________________________________________
524 {
525  struct timezone timezone;
526  gettimeofday(&monStartTime_,&timezone);
527 
528  try {
529  LOG4CPLUS_INFO(log_,"Start 'monitoring' workloop");
531  toolbox::task::getWorkLoopFactory()->getWorkLoop(sourceId_+
532  "Monitoring",
533  "waiting");
534  if (!wlMonitoring_->isActive()) wlMonitoring_->activate();
535  asMonitoring_=toolbox::task::bind(this,&BU::monitoring,sourceId_+"Monitoring");
536  wlMonitoring_->submit(asMonitoring_);
537  }
538  catch (xcept::Exception& e) {
539  string msg = "Failed to start workloop 'monitoring'.";
540  XCEPT_RETHROW(evf::Exception,msg,e);
541  }
542 }
543 
544 
545 //______________________________________________________________________________
546 bool BU::monitoring(toolbox::task::WorkLoop* wl)
547 {
548  struct timeval monEndTime;
549  struct timezone timezone;
550 
551  gettimeofday(&monEndTime,&timezone);
552 
553  lock();
554  unsigned int monN =nbEventsBuilt_.value_;
555  uint64_t monSumOfSquares=sumOfSquares_;
556  unsigned int monSumOfSizes =sumOfSizes_;
557  uint64_t deltaSumOfSquares;
558  unlock();
559 
560  gui_->monInfoSpace()->lock();
561 
562  deltaT_.value_=deltaT(&monStartTime_,&monEndTime);
563  monStartTime_=monEndTime;
564 
565  deltaN_.value_=monN-monLastN_;
566  monLastN_=monN;
567 
568  deltaSumOfSquares=monSumOfSquares-monLastSumOfSquares_;
569  deltaSumOfSquares_.value_=(double)deltaSumOfSquares;
570  monLastSumOfSquares_=monSumOfSquares;
571 
572  deltaSumOfSizes_.value_=monSumOfSizes-monLastSumOfSizes_;
573  monLastSumOfSizes_=monSumOfSizes;
574 
575  if (deltaT_.value_!=0) {
576  throughput_=deltaSumOfSizes_.value_/deltaT_.value_;
577  rate_ =deltaN_.value_/deltaT_.value_;
578  }
579  else {
580  throughput_=0.0;
581  rate_ =0.0;
582  }
583 
584  double meanOfSquares,mean,squareOfMean,variance;
585 
586  if(deltaN_.value_!=0) {
587  meanOfSquares=deltaSumOfSquares_.value_/((double)(deltaN_.value_));
588  mean=((double)(deltaSumOfSizes_.value_))/((double)(deltaN_.value_));
589  squareOfMean=mean*mean;
590  variance=meanOfSquares-squareOfMean;
591  average_=deltaSumOfSizes_.value_/deltaN_.value_;
592  rms_ =std::sqrt(variance);
593  }
594  else {
595  average_=0.0;
596  rms_ =0.0;
597  }
598 
599  gui_->monInfoSpace()->unlock();
600 
601  ::sleep(monSleepSec_.value_);
602 
603  return true;
604 }
605 
606 
607 
609 // implementation of private member functions
611 
612 //______________________________________________________________________________
614 {
615  if (0==gui_) {
616  LOG4CPLUS_ERROR(log_,"No GUI, can't export parameters");
617  return;
618  }
619 
620  gui_->addMonitorParam("url", &url_);
621  gui_->addMonitorParam("class", &class_);
622  gui_->addMonitorParam("instance", &instance_);
623  gui_->addMonitorParam("hostname", &hostname_);
624  gui_->addMonitorParam("runNumber", &runNumber_);
625  gui_->addMonitorParam("stateName", fsm_.stateName());
626  gui_->addMonitorParam("memUsedInMB", &memUsedInMB_);
627  gui_->addMonitorParam("deltaT", &deltaT_);
628  gui_->addMonitorParam("deltaN", &deltaN_);
629  gui_->addMonitorParam("deltaSumOfSquares", &deltaSumOfSquares_);
630  gui_->addMonitorParam("deltaSumOfSizes", &deltaSumOfSizes_);
631  gui_->addMonitorParam("throughput", &throughput_);
632  gui_->addMonitorParam("average", &average_);
633  gui_->addMonitorParam("rate", &rate_);
634  gui_->addMonitorParam("rms", &rms_);
635 
636  gui_->addMonitorCounter("nbEvtsInBU", &nbEventsInBU_);
637  gui_->addMonitorCounter("nbEvtsRequested", &nbEventsRequested_);
638  gui_->addMonitorCounter("nbEvtsBuilt", &nbEventsBuilt_);
639  gui_->addMonitorCounter("nbEvtsSent", &nbEventsSent_);
640  gui_->addMonitorCounter("nbEvtsDiscarded", &nbEventsDiscarded_);
641 
642  gui_->addStandardParam("mode", &mode_);
643  gui_->addStandardParam("replay", &replay_);
644  gui_->addStandardParam("overwriteEvtId", &overwriteEvtId_);
645  gui_->addStandardParam("crc", &crc_);
646  gui_->addStandardParam("firstEvent", &firstEvent_);
647  gui_->addStandardParam("queueSize", &queueSize_);
648  gui_->addStandardParam("eventBufferSize", &eventBufferSize_);
649  gui_->addStandardParam("msgBufferSize", &msgBufferSize_);
650  gui_->addStandardParam("fedSizeMax", &fedSizeMax_);
651  gui_->addStandardParam("fedSizeMean", &fedSizeMean_);
652  gui_->addStandardParam("fedSizeWidth", &fedSizeWidth_);
653  gui_->addStandardParam("useFixedFedSize", &useFixedFedSize_);
654  gui_->addStandardParam("monSleepSec", &monSleepSec_);
655  gui_->addStandardParam("rcmsStateListener", fsm_.rcmsStateListener());
656  gui_->addStandardParam("foundRcmsStateListener",fsm_.foundRcmsStateListener());
657 
658 
660 
661  gui_->addItemChangedListener("crc",this);
662 
663 }
664 
665 
666 //______________________________________________________________________________
667 void BU::reset()
668 {
669  gui_->resetCounters();
670 
671  deltaT_ =0.0;
672  deltaN_ = 0;
673  deltaSumOfSquares_ = 0;
674  deltaSumOfSizes_ = 0;
675 
676  throughput_ =0.0;
677  average_ = 0;
678  rate_ = 0;
679  rms_ = 0;
680 
681  monLastN_ = 0;
683  monLastSumOfSizes_ = 0;
684 
685  while (events_.size()) {
686  delete events_.back();
687  events_.pop_back();
688  }
689 
690  while (!rqstIds_.empty()) rqstIds_.pop();
691  while (!freeIds_.empty()) freeIds_.pop();
692  while (!builtIds_.empty()) builtIds_.pop();
693  sentIds_.clear();
694 
695  sem_init(&lock_,0,1);
696  sem_init(&buildSem_,0,queueSize_);
697  sem_init(&sendSem_,0,0);
698  sem_init(&rqstSem_,0,0);
699 
700  for (unsigned int i=0;i<queueSize_;i++) {
701  events_.push_back(new BUEvent(i,eventBufferSize_));
702  freeIds_.push(i);
703  }
704 }
705 
706 
707 //______________________________________________________________________________
708 double BU::deltaT(const struct timeval *start,const struct timeval *end)
709 {
710  unsigned int sec;
711  unsigned int usec;
712 
713  sec = end->tv_sec - start->tv_sec;
714 
715  if(end->tv_usec > start->tv_usec) {
716  usec = end->tv_usec - start->tv_usec;
717  }
718  else {
719  sec--;
720  usec = 1000000 - ((unsigned int )(start->tv_usec - end->tv_usec));
721  }
722 
723  return ((double)sec) + ((double)usec) / 1000000.0;
724 }
725 
726 
727 //______________________________________________________________________________
729 {
730  // replay?
731  if (replay_.value_&&nbEventsBuilt_>=(uint32_t)events_.size())
732  {
734  return true;
735  }
736  // PLAYBACK mode
738 
739  unsigned int runNumber,evtNumber;
740 
741  FEDRawDataCollection* event=
742  PlaybackRawDataProvider::instance()->getFEDRawData(runNumber,evtNumber);
743  if(event == 0) return false;
744  evt->initialize(evtNumber);
745 
746  for (unsigned int i=0;i<validFedIds_.size();i++) {
747  unsigned int fedId =validFedIds_[i];
748  unsigned int fedSize=event->FEDData(fedId).size();
749  unsigned char* fedAddr=event->FEDData(fedId).data();
750  if (overwriteEvtId_.value_ && fedAddr != 0) {
751  fedh_t *fedHeader=(fedh_t*)fedAddr;
752  fedHeader->eventid=(fedHeader->eventid&0xFF000000)+(evtNumber&0x00FFFFFF);
753  }
754  if (fedSize>0) evt->writeFed(fedId,fedAddr,fedSize);
755  }
756  delete event;
757  }
758  // RANDOM mode
759  else {
760  unsigned int evtNumber=(firstEvent_+evtNumber_++)%0x1000000;
761  evt->initialize(evtNumber);
762  unsigned int fedSizeMin=fedHeaderSize_+fedTrailerSize_;
763  for (unsigned int i=0;i<validFedIds_.size();i++) {
764  unsigned int fedId(validFedIds_[i]);
765  unsigned int fedSize(fedSizeMean_);
766  if (!useFixedFedSize_) {
767  double logFedSize=CLHEP::RandGauss::shoot(gaussianMean_,gaussianWidth_);
768  fedSize=(unsigned int)(std::exp(logFedSize));
769  if (fedSize<fedSizeMin) fedSize=fedSizeMin;
770  if (fedSize>fedSizeMax_) fedSize=fedSizeMax_;
771  fedSize-=fedSize%8;
772  }
773 
774  evt->writeFed(fedId,0,fedSize);
775  evt->writeFedHeader(i);
776  evt->writeFedTrailer(i);
777  }
778 
779  }
780  return true;
781 }
782 
783 
784 //______________________________________________________________________________
785 toolbox::mem::Reference *BU::createMsgChain(BUEvent* evt,
786  unsigned int fuResourceId)
787 {
788  unsigned int msgHeaderSize =sizeof(I2O_EVENT_DATA_BLOCK_MESSAGE_FRAME);
789  unsigned int msgPayloadSize=msgBufferSize_-msgHeaderSize;
790 
791  if((msgPayloadSize%4)!=0) LOG4CPLUS_ERROR(log_,"Invalid Payload Size.");
792 
793  toolbox::mem::Reference *head =0;
794  toolbox::mem::Reference *tail =0;
795  toolbox::mem::Reference *bufRef=0;
796 
797  I2O_MESSAGE_FRAME *stdMsg=0;
798  I2O_PRIVATE_MESSAGE_FRAME *pvtMsg=0;
799  I2O_EVENT_DATA_BLOCK_MESSAGE_FRAME *block =0;
800 
801  unsigned int iFed =0;
802  unsigned int nSuperFrag =64;
803  unsigned int nFedPerSuperFrag=validFedIds_.size()/nSuperFrag;
804  unsigned int nBigSuperFrags =validFedIds_.size()%nSuperFrag;
805 
806  if (evt->nFed()<nSuperFrag) {
807  nSuperFrag=evt->nFed();
808  nFedPerSuperFrag=1;
809  nBigSuperFrags=0;
810  }
811  else
812  {
813  nFedPerSuperFrag=evt->nFed()/nSuperFrag;
814  nBigSuperFrags =evt->nFed()%nSuperFrag;
815  }
816  // loop over all super fragments
817  for (unsigned int iSuperFrag=0;iSuperFrag<nSuperFrag;iSuperFrag++) {
818 
819  // compute index of last fed in this super fragment
820  unsigned int nFed=iFed+nFedPerSuperFrag;
821  if (iSuperFrag<nBigSuperFrags) ++nFed;
822 
823  // compute number of blocks in this super fragment
824  unsigned int nBlock =0;
825  unsigned int curbSize=frlHeaderSize_;
826  unsigned int totSize =curbSize;
827  for (unsigned int i=iFed;i<nFed;i++) {
828  curbSize+=evt->fedSize(i);
829  totSize+=evt->fedSize(i);
830  if (curbSize>msgPayloadSize) {
831  curbSize+=frlHeaderSize_*(curbSize/msgPayloadSize);
832  if(curbSize%msgPayloadSize)totSize+=frlHeaderSize_*(curbSize/msgPayloadSize);
833  else totSize+=frlHeaderSize_*((curbSize/msgPayloadSize)-1);
834  curbSize=curbSize%msgPayloadSize;
835  }
836  }
837  nBlock=totSize/msgPayloadSize+(totSize%msgPayloadSize>0 ? 1 : 0);
838 
839 
840  // loop over all blocks (msgs) in the current super fragment
841  unsigned int remainder =0;
842  bool fedTrailerLeft=false;
843  bool last =false;
844  bool warning =false;
845  unsigned char *startOfPayload=0;
846  U32 payload(0);
847 
848  for(unsigned int iBlock=0;iBlock<nBlock;iBlock++) {
849 
850  // If last block and its partial (there can be only 0 or 1 partial)
851  payload=msgPayloadSize;
852 
853  // Allocate memory for a fragment block / message
854  try {
855  bufRef=toolbox::mem::getMemoryPoolFactory()->getFrame(i2oPool_,
857  }
858  catch(xcept::Exception &e) {
859  LOG4CPLUS_FATAL(log_,"xdaq::frameAlloc failed");
860  }
861 
862  // Fill in the fields of the fragment block / message
863  stdMsg=(I2O_MESSAGE_FRAME*)bufRef->getDataLocation();
864  pvtMsg=(I2O_PRIVATE_MESSAGE_FRAME*)stdMsg;
865  block =(I2O_EVENT_DATA_BLOCK_MESSAGE_FRAME*)stdMsg;
866 
867  pvtMsg->XFunctionCode =I2O_FU_TAKE;
868  pvtMsg->OrganizationID =XDAQ_ORGANIZATION_ID;
869 
870  stdMsg->MessageSize =(msgHeaderSize + payload) >> 2;
871  stdMsg->Function =I2O_PRIVATE_MESSAGE;
872  stdMsg->VersionOffset =0;
873  stdMsg->MsgFlags =0;
874  stdMsg->InitiatorAddress=i2o::utils::getAddressMap()->getTid(buAppDesc_);
875  stdMsg->TargetAddress =i2o::utils::getAddressMap()->getTid(fuAppDesc_);
876 
877  block->buResourceId =evt->buResourceId();
878  block->fuTransactionId =fuResourceId;
879  block->blockNb =iBlock;
880  block->nbBlocksInSuperFragment=nBlock;
881  block->superFragmentNb =iSuperFrag;
882  block->nbSuperFragmentsInEvent=nSuperFrag;
883  block->eventNumber =evt->evtNumber();
884 
885  // Fill in payload
886  startOfPayload =(unsigned char*)block+msgHeaderSize;
887  frlh_t* frlHeader=(frlh_t*)startOfPayload;
888  frlHeader->trigno=evt->evtNumber();
889  frlHeader->segno =iBlock;
890 
891  unsigned char *startOfFedBlocks=startOfPayload+frlHeaderSize_;
892  payload -=frlHeaderSize_;
893  frlHeader->segsize =payload;
894  unsigned int leftspace=payload;
895 
896  // a fed trailer was left over from the previous block
897  if(fedTrailerLeft) {
898  memcpy(startOfFedBlocks,
899  evt->fedAddr(iFed)+evt->fedSize(iFed)-fedTrailerSize_,
901 
902  startOfFedBlocks+=fedTrailerSize_;
903  leftspace -=fedTrailerSize_;
904  remainder =0;
905  fedTrailerLeft =false;
906 
907  // if this is the last fed, adjust block (msg) size and set last=true
908  if((iFed==nFed-1) && !last) {
909  frlHeader->segsize-=leftspace;
910  int msgSize=stdMsg->MessageSize << 2;
911  msgSize -=leftspace;
912  bufRef->setDataSize(msgSize);
913  stdMsg->MessageSize = msgSize >> 2;
914  frlHeader->segsize=frlHeader->segsize | FRL_LAST_SEGM;
915  last=true;
916  }
917 
918  // !! increment iFed !!
919  iFed++;
920  }
921 
925  if (remainder>0) {
926 
927  // the remaining fed fits entirely into the new block
928  if(payload>=remainder) {
929  memcpy(startOfFedBlocks,
930  evt->fedAddr(iFed)+evt->fedSize(iFed)-remainder,
931  remainder);
932 
933  startOfFedBlocks+=remainder;
934  leftspace -=remainder;
935 
936  // if this is the last fed in the superfragment, earmark it
937  if(iFed==nFed-1) {
938  frlHeader->segsize-=leftspace;
939  int msgSize=stdMsg->MessageSize << 2;
940  msgSize -=leftspace;
941  bufRef->setDataSize(msgSize);
942  stdMsg->MessageSize = msgSize >> 2;
943  frlHeader->segsize=frlHeader->segsize | FRL_LAST_SEGM;
944  last=true;
945  }
946 
947  // !! increment iFed !!
948  iFed++;
949 
950  // start new fed -> set remainder to 0!
951  remainder=0;
952  }
953  // the remaining payload fits, but not the fed trailer
954  else if (payload>=(remainder-fedTrailerSize_)) {
955  memcpy(startOfFedBlocks,
956  evt->fedAddr(iFed)+evt->fedSize(iFed)-remainder,
957  remainder-fedTrailerSize_);
958 
959  frlHeader->segsize=remainder-fedTrailerSize_;
960  fedTrailerLeft =true;
961  leftspace -=(remainder-fedTrailerSize_);
962  remainder =fedTrailerSize_;
963  }
964  // the remaining payload fits only partially, fill whole block
965  else {
966  memcpy(startOfFedBlocks,
967  evt->fedAddr(iFed)+evt->fedSize(iFed)-remainder,payload);
968  remainder-=payload;
969  leftspace =0;
970  }
971  }
972 
976  if(remainder==0) {
977 
978  // loop on feds
979  while(iFed<nFed) {
980 
981  // if the next header does not fit, jump to following block
982  if((int)leftspace<fedHeaderSize_) {
983  frlHeader->segsize-=leftspace;
984  break;
985  }
986 
987  memcpy(startOfFedBlocks,evt->fedAddr(iFed),fedHeaderSize_);
988 
989  leftspace -=fedHeaderSize_;
990  startOfFedBlocks+=fedHeaderSize_;
991 
992  // fed fits with its trailer
993  if(evt->fedSize(iFed)-fedHeaderSize_<=leftspace) {
994  memcpy(startOfFedBlocks,
995  evt->fedAddr(iFed)+fedHeaderSize_,
996  evt->fedSize(iFed)-fedHeaderSize_);
997 
998  leftspace -=(evt->fedSize(iFed)-fedHeaderSize_);
999  startOfFedBlocks+=(evt->fedSize(iFed)-fedHeaderSize_);
1000  }
1001  // fed payload fits only without fed trailer
1002  else if(evt->fedSize(iFed)-fedHeaderSize_-fedTrailerSize_<=leftspace) {
1003  memcpy(startOfFedBlocks,
1004  evt->fedAddr(iFed)+fedHeaderSize_,
1006 
1007  leftspace -=(evt->fedSize(iFed)-fedHeaderSize_-fedTrailerSize_);
1008  frlHeader->segsize-=leftspace;
1009  fedTrailerLeft =true;
1010  remainder =fedTrailerSize_;
1011 
1012  break;
1013  }
1014  // fed payload fits only partially
1015  else {
1016  memcpy(startOfFedBlocks,evt->fedAddr(iFed)+fedHeaderSize_,leftspace);
1017  remainder=evt->fedSize(iFed)-fedHeaderSize_-leftspace;
1018  leftspace=0;
1019 
1020  break;
1021  }
1022 
1023  // !! increase iFed !!
1024  iFed++;
1025 
1026  } // while (iFed<fedN_)
1027 
1028  // earmark the last block
1029  if (iFed==nFed && remainder==0 && !last) {
1030  frlHeader->segsize-=leftspace;
1031  int msgSize=stdMsg->MessageSize << 2;
1032  msgSize -=leftspace;
1033  bufRef->setDataSize(msgSize);
1034  stdMsg->MessageSize=msgSize >> 2;
1035  frlHeader->segsize =frlHeader->segsize | FRL_LAST_SEGM;
1036  last=true;
1037  }
1038 
1039  } // if (remainder==0)
1040 
1041  if(iSuperFrag==0&&iBlock==0) { // This is the first fragment block / message
1042  head=bufRef;
1043  tail=bufRef;
1044  }
1045  else {
1046  tail->setNextReference(bufRef);
1047  tail=bufRef;
1048  }
1049 
1050  if((iBlock==nBlock-1) && remainder!=0) {
1051  nBlock++;
1052  warning=true;
1053  }
1054 
1055  } // for (iBlock)
1056 
1057  // fix case where block estimate was wrong
1058  if(warning) {
1059  toolbox::mem::Reference* next=head;
1060  do {
1061  block =(I2O_EVENT_DATA_BLOCK_MESSAGE_FRAME*)next->getDataLocation();
1062  if (block->superFragmentNb==iSuperFrag)
1063  block->nbBlocksInSuperFragment=nBlock;
1064  } while((next=next->getNextReference()));
1065  }
1066 
1067  } // iSuperFrag < nSuperFrag
1068 
1069  return head; // return the top of the chain
1070 }
1071 
1072 //______________________________________________________________________________
1073 void BU::dumpFrame(unsigned char* data,unsigned int len)
1074 {
1075  char left1[20];
1076  char left2[20];
1077  char right1[20];
1078  char right2[20];
1079 
1080  printf("Byte 0 1 2 3 4 5 6 7\n");
1081 
1082  int c(0);
1083  int pos(0);
1084 
1085  for (unsigned int i=0;i<(len/8);i++) {
1086  int rpos(0);
1087  int off(3);
1088  for (pos=0;pos<12;pos+=3) {
1089  sprintf(&left1[pos],"%2.2x ",
1090  ((unsigned char*)data)[c+off]);
1091  sprintf(&right1[rpos],"%1c",
1092  ((data[c+off] > 32)&&(data[c+off] < 127)) ? data[c+off] : '.');
1093  sprintf (&left2[pos],"%2.2x ",
1094  ((unsigned char*)data)[c+off+4]);
1095  sprintf (&right2[rpos],"%1c",
1096  ((data[c+off+4] > 32)&&(data[c+off+4]<127)) ? data[c+off+4] : '.');
1097  rpos++;
1098  off--;
1099  }
1100  c+=8;
1101 
1102  printf ("%4d: %s%s || %s%s %p\n",
1103  c-8, left1, left2, right1, right2, &data[c-8]);
1104  }
1105 
1106  fflush(stdout);
1107 }
1108 
1109 
1111 // xdaq instantiator implementation macro
1113 
1114 XDAQ_INSTANTIATOR_IMPL(BU)
static const char runNumber_[]
void setLargeAppIcon(CString_t &icon)
Definition: WebGUI.h:74
xdata::UnsignedInteger32 nbEventsInBU_
Definition: BU.h:201
int i
Definition: DBlmapReader.cc:9
void initialize(unsigned int evtNumber)
Definition: BUEvent.cc:74
void resetCounters()
Definition: WebGUI.cc:217
void unlock()
Definition: BU.h:111
#define Input(cl)
Definition: vmac.h:189
bool configuring(toolbox::task::WorkLoop *wl)
Definition: BU.cc:174
void webPageRequest(xgi::Input *in, xgi::Output *out)
Definition: BU.cc:387
xdata::Boolean overwriteEvtId_
Definition: BU.h:211
toolbox::task::ActionSignature * asMonitoring_
Definition: BU.h:177
xdata::Double memUsedInMB_
Definition: BU.h:188
unsigned int evtNumber() const
Definition: BUEvent.h:28
xdata::Boolean replay_
Definition: BU.h:209
static void setComputeCrc(bool computeCrc)
Definition: BUEvent.h:37
std::queue< unsigned int > builtIds_
Definition: BU.h:158
double gaussianWidth_
Definition: BU.h:224
void addStandardParam(CString_t &name, Param_t *param)
Definition: WebGUI.cc:134
bool sending(toolbox::task::WorkLoop *wl)
Definition: BU.cc:485
void exportParameters()
Definition: WebGUI.cc:200
xdata::String mode_
Definition: BU.h:208
bool writeFed(unsigned int id, unsigned char *data, unsigned int size)
Definition: BUEvent.cc:83
xdata::UnsignedInteger32 msgBufferSize_
Definition: BU.h:215
xdata::String class_
Definition: BU.h:184
StateMachine fsm_
Definition: BU.h:149
xdaq::ApplicationContext * buAppContext_
Definition: BU.h:146
toolbox::mem::Reference * createMsgChain(evf::BUEvent *evt, unsigned int fuResourceId)
Definition: BU.cc:785
unsigned int buResourceId() const
Definition: BUEvent.h:27
virtual FEDRawDataCollection * getFEDRawData()
xdata::Boolean useFixedFedSize_
Definition: BU.h:219
double deltaT(const struct timeval *start, const struct timeval *end)
Definition: BU.cc:708
Logger log_
Definition: BU.h:137
xdata::UnsignedInteger32 fedSizeWidth_
Definition: BU.h:218
static const int frlHeaderSize_
Definition: BU.h:248
std::queue< unsigned int > rqstIds_
Definition: BU.h:156
Exp< T >::type exp(const T &t)
Definition: Exp.h:22
bool isSending_
Definition: BU.h:164
void setSmallAppIcon(CString_t &icon)
Definition: WebGUI.h:75
void addMonitorParam(CString_t &name, Param_t *param)
Definition: WebGUI.cc:145
void addItemChangedListener(CString_t &name, xdata::ActionListener *l)
Definition: WebGUI.cc:238
xdata::Double rate_
Definition: BU.h:197
bool monitoring(toolbox::task::WorkLoop *wl)
Definition: BU.cc:546
xdata::UnsignedInteger32 instance_
Definition: BU.h:185
unsigned int evtNumber_
Definition: BU.h:160
sem_t sendSem_
Definition: BU.h:241
void postBuild()
Definition: BU.h:113
bool writeFedHeader(unsigned int i)
Definition: BUEvent.cc:106
void sleep(Duration_t)
Definition: Utils.h:163
xdata::Double throughput_
Definition: BU.h:195
void startMonitoringWorkLoop()
Definition: BU.cc:523
static const int fedTrailerSize_
Definition: BU.h:250
void initialize(T *app)
Definition: StateMachine.h:84
void lock()
Definition: BU.h:110
void customWebPage(xgi::Input *in, xgi::Output *out)
Definition: BU.cc:397
void waitSend()
Definition: BU.h:114
bool stopping(toolbox::task::WorkLoop *wl)
Definition: BU.cc:223
void actionPerformed(xdata::Event &e)
Definition: BU.cc:370
void waitRqst()
Definition: BU.h:116
unsigned char * fedAddr(unsigned int i) const
Definition: BUEvent.cc:146
xdata::Double deltaSumOfSquares_
Definition: BU.h:192
void startBuildingWorkLoop()
Definition: BU.cc:405
xdata::Bag< xdaq2rc::ClassnameAndInstance > * rcmsStateListener()
Definition: StateMachine.h:72
WebGUI * gui_
Definition: BU.h:152
void fireFailed(const std::string &errorMsg, void *originator)
xoap::MessageReference fsmCallback(xoap::MessageReference msg)
Definition: BU.cc:296
unsigned int sumOfSizes_
Definition: BU.h:232
static PlaybackRawDataProvider * instance()
void reset()
Definition: BU.cc:667
toolbox::task::ActionSignature * asBuilding_
Definition: BU.h:169
toolbox::task::WorkLoop * wlSending_
Definition: BU.h:172
xdata::UnsignedInteger32 nbEventsSent_
Definition: BU.h:204
void I2O_BU_ALLOCATE_Callback(toolbox::mem::Reference *bufRef)
Definition: BU.cc:304
xdata::UnsignedInteger32 nbEventsRequested_
Definition: BU.h:202
xdata::Double rms_
Definition: BU.h:198
Definition: BU.h:49
virtual ~BU()
Definition: BU.cc:163
T sqrt(T t)
Definition: SSEVec.h:28
unsigned int evtSize() const
Definition: BUEvent.h:29
uint64_t sumOfSquares_
Definition: BU.h:231
std::string sourceId_
Definition: BU.h:180
toolbox::task::WorkLoop * wlBuilding_
Definition: BU.h:168
bool isBuilding_
Definition: BU.h:163
tuple result
Definition: query.py:137
xdata::Boolean crc_
Definition: BU.h:210
xdaq::ApplicationDescriptor * buAppDesc_
Definition: BU.h:140
sem_t lock_
Definition: BU.h:239
xdata::Double deltaT_
Definition: BU.h:190
double gaussianMean_
Definition: BU.h:223
bool isHalting_
Definition: BU.h:165
xdata::UnsignedInteger32 monSleepSec_
Definition: BU.h:220
#define end
Definition: vmac.h:38
void dumpFrame(unsigned char *data, unsigned int len)
Definition: BU.cc:1073
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger but the state exists so we define the behavior If all triggers are the negative crieriion will lead to accepting the event(this again matches the behavior of"!*"before the partial wildcard feature was incorporated).The per-event"cost"of each negative criterion with multiple relevant triggers is about the same as!*was in the past
block
Formating index page&#39;s pieces.
Definition: Association.py:187
toolbox::task::ActionSignature * asSending_
Definition: BU.h:173
bool writeFedTrailer(unsigned int i)
Definition: BUEvent.cc:123
xdata::UnsignedInteger32 deltaN_
Definition: BU.h:191
void fireEvent(const std::string &evtType, void *originator)
std::vector< unsigned int > validFedIds_
Definition: BU.h:161
tuple out
Definition: dbtoconf.py:99
sem_t buildSem_
Definition: BU.h:240
toolbox::task::WorkLoop * wlMonitoring_
Definition: BU.h:176
Log< T >::type log(const T &t)
Definition: Log.h:22
xdata::String hostname_
Definition: BU.h:186
unsigned long long uint64_t
Definition: Time.h:15
xdata::UnsignedInteger32 fedSizeMax_
Definition: BU.h:216
void exportParameters()
Definition: BU.cc:613
xdata::String * stateName()
Definition: StateMachine.h:69
bool generateEvent(evf::BUEvent *evt)
Definition: BU.cc:728
bool halting(toolbox::task::WorkLoop *wl)
Definition: BU.cc:270
xdata::InfoSpace * monInfoSpace()
Definition: WebGUI.h:72
sem_t rqstSem_
Definition: BU.h:242
void waitBuild()
Definition: BU.h:112
xdata::Double average_
Definition: BU.h:196
xdata::Boolean * foundRcmsStateListener()
Definition: StateMachine.h:78
toolbox::mem::Pool * i2oPool_
Definition: BU.h:236
xdata::UnsignedInteger32 deltaSumOfSizes_
Definition: BU.h:193
unsigned int eventid
Definition: fed_header.h:33
bool building(toolbox::task::WorkLoop *wl)
Definition: BU.cc:426
unsigned int fedSize(unsigned int i) const
Definition: BUEvent.h:33
std::vector< evf::BUEvent * > events_
Definition: BU.h:155
xdata::UnsignedInteger32 runNumber_
Definition: BU.h:187
xdata::UnsignedInteger32 eventBufferSize_
Definition: BU.h:214
static bool inRange(int)
xdata::UnsignedInteger32 fedSizeMean_
Definition: BU.h:217
void I2O_BU_DISCARD_Callback(toolbox::mem::Reference *bufRef)
Definition: BU.cc:338
std::queue< unsigned int > freeIds_
Definition: BU.h:157
xdaq::ApplicationDescriptor * fuAppDesc_
Definition: BU.h:143
unsigned int monLastN_
Definition: BU.h:228
#define Output(cl)
Definition: vmac.h:193
std::set< unsigned int > sentIds_
Definition: BU.h:159
void startSendingWorkLoop()
Definition: BU.cc:465
unsigned int monLastSumOfSizes_
Definition: BU.h:230
uint64_t monLastSumOfSquares_
Definition: BU.h:229
xdata::UnsignedInteger32 nbEventsDiscarded_
Definition: BU.h:205
void addMonitorCounter(CString_t &name, Counter_t *counter)
Definition: WebGUI.cc:178
string s
Definition: asciidump.py:422
void postSend()
Definition: BU.h:115
static const int fedHeaderSize_
Definition: BU.h:249
xdata::UnsignedInteger32 queueSize_
Definition: BU.h:213
unsigned int nFed() const
Definition: BUEvent.h:31
bool enabling(toolbox::task::WorkLoop *wl)
Definition: BU.cc:193
xdata::UnsignedInteger32 nbEventsBuilt_
Definition: BU.h:203
struct timeval monStartTime_
Definition: BU.h:227
static bool inRangeNoGT(int)
void postRqst()
Definition: BU.h:117
xdata::String url_
Definition: BU.h:183
void findRcmsStateListener()
xdata::UnsignedInteger32 firstEvent_
Definition: BU.h:212