CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Attributes | Static Private Attributes | Friends
evf::FWEPWrapper Class Reference

#include <FWEPWrapper.h>

Inheritance diagram for evf::FWEPWrapper:

Public Member Functions

void adjustLsIndexForRestart ()
 
std::string const & configuration () const
 
void createAndSendScalersMessage ()
 
bool fireScalersUpdate ()
 
void forceInitEventProcessorMaybe ()
 
 FWEPWrapper (log4cplus::Logger &, unsigned int instance)
 
unsigned int getLumiSectionReferenceIndex ()
 
std::vector< std::string > const & getmicromap () const
 
ModuleWebRegistrygetModuleWebRegistry ()
 
unsigned int getNumberOfMicrostates ()
 
MsgBufgetPackedTriggerReport ()
 
TriggerReportStaticgetPackedTriggerReportAsStruct ()
 
unsigned int getScalersUpdates ()
 
ShmOutputModuleRegistrygetShmOutputModuleRegistry ()
 
bool getTriggerReport (bool useLock)
 
void init (unsigned short, std::string &)
 
bool isWaitingForLs ()
 
lsTripletlastLumi ()
 
void lumiSumTable (xgi::Output *out)
 
void makeServicesOnly ()
 
void microState (xgi::Input *in, xgi::Output *out)
 
std::string const & moduleNameFromIndex (unsigned int i) const
 
void moduleWeb (xgi::Input *in, xgi::Output *out)
 
bool monitoring (toolbox::task::WorkLoop *wl)
 
int notstarted_state_code () const
 
 operator bool ()
 
edm::EventProcessoroperator-> ()
 
void publishConfigAndMonitorItems (bool)
 
void publishConfigAndMonitorItemsSP ()
 
void resetLumiSectionReferenceIndex ()
 
void resetPackedTriggerReport ()
 
void resetTriggerReport ()
 
void resetWaiting ()
 
void serviceWeb (xgi::Input *in, xgi::Output *out)
 
void setAppCtxt (xdaq::ApplicationContext *ctx)
 
void setAppDesc (xdaq::ApplicationDescriptor *ad)
 
void setApplicationInfoSpace (xdata::InfoSpace *is)
 
void setMonitorInfoSpace (xdata::InfoSpace *mis, xdata::InfoSpace *mlis)
 
void setMonitorInfoSpaceLegend (xdata::InfoSpace *is)
 
void setRcms (xdaq::ApplicationDescriptor *rcms)
 
void setScalersInfoSpace (xdata::InfoSpace *sis, xdata::InfoSpace *slis)
 
void setupFastTimerService (unsigned int nProcesses)
 
void startMonitoringWorkLoop () throw (evf::Exception)
 
std::string const & stateNameFromIndex (unsigned int i) const
 
edm::EventProcessor::StatusCode stop ()
 
void stopAndHalt ()
 
void sumAndPackTriggerReport (MsgBuf &buf)
 
void summaryWebPage (xgi::Input *, xgi::Output *, const std::string &)
 
void taskWebPage (xgi::Input *, xgi::Output *, const std::string &)
 
void updateRollingReport ()
 
void withdrawLumiSectionIncrement ()
 
std::string wlMonitoring ()
 
virtual ~FWEPWrapper ()
 

Private Attributes

unsigned int allPastLumiProcessed_
 
xdata::InfoSpace * applicationInfoSpace_
 
toolbox::task::ActionSignature * asMonitoring_
 
std::string configString_
 
std::string configuration_
 
bool countDatasets_
 
std::vector
< edm::ModuleDescription const * > 
descs_
 
pthread_mutex_t ep_guard_lock_
 
bool epInitialized_
 
xdata::Integer epMAltState_
 
xdata::Integer epmAltState_
 
xdata::String epMState_
 
xdata::String epmState_
 
edm::EventProcessorevtProcessor_
 
FastTimerServiceftsRef_
 
bool hasModuleWebRegistry_
 
bool hasPrescaleService_
 
bool hasServiceWebRegistry_
 
bool hasSubProcesses
 
xdata::UnsignedInteger32 instance_
 
bool isPython_
 
xdata::UnsignedInteger32 lastLumiPrescaleIndex_
 
xdata::UnsignedInteger32 lastLumiUsingEol_
 
xdata::UnsignedInteger32 localLsIncludingTimeOuts_
 
log4cplus::Logger log_
 
unsigned int lsid_
 
std::string lsidTimedOutAsString_
 
xdata::Boolean lsTimedOut_
 
xdata::UnsignedInteger32 lsTimeOut_
 
xdata::Boolean lsToBeRecovered_
 
xdata::UnsignedInteger32 lumiSectionIndex_
 
std::vector< lsTripletlumiSectionsCtr_
 
std::vector< bool > lumiSectionsTo_
 
xdata::String macro_state_legend_
 
std::vector< std::string > mapmod_
 
xdata::String micro_state_legend_
 
std::map< std::string, int > modmap_
 
xdata::InfoSpace * monitorInfoSpace_
 
xdata::InfoSpace * monitorInfoSpaceLegend_
 
xdata::InfoSpace * monitorLegendaInfoSpace_
 
xdata::UnsignedInteger32 monSleepSec_
 
struct timeval monStartTime_
 
ModuleWebRegistrymwrRef_
 
std::list< std::string > names_
 
std::list< std::string > namesScalersLegenda_
 
std::list< std::string > namesStatusLegenda_
 
xdata::UnsignedInteger32 nbAccepted_
 
xdata::UnsignedInteger32 nbProcessed_
 
int notstarted_state_code_
 
std::string pathTable_
 
xdata::UnsignedInteger32 prescaleSetIndex_
 
edm::service::PrescaleServiceprescaleSvc_
 
unsigned int psid_
 
xdaq::ApplicationDescriptor * rcms_
 
unsigned int rollingLsIndex_
 
bool rollingLsWrap_
 
xdata::Table scalersComplete_
 
xdata::InfoSpace * scalersInfoSpace_
 
xdata::InfoSpace * scalersLegendaInfoSpace_
 
unsigned int scalersUpdateAttempted_
 
unsigned int scalersUpdateCounter_
 
bool servicesDone_
 
edm::ServiceToken serviceToken_
 
ShmOutputModuleRegistrysorRef_
 
std::vector< std::string > statmod_
 
xdata::UnsignedInteger32 timeoutOnStop_
 
fuep::TriggerReportHelpers trh_
 
bool waitingForLs_
 
bool watching_
 
toolbox::task::WorkLoop * wlMonitoring_
 
bool wlMonitoringActive_
 
xdaq::ApplicationContext * xappCtxt_
 
xdaq::ApplicationDescriptor * xappDesc_
 

Static Private Attributes

static const unsigned int lsRollSize_ = 20
 
static const std::string unknown = "unknown"
 

Friends

class FUEventProcessor
 

Detailed Description

Definition at line 47 of file FWEPWrapper.h.

Constructor & Destructor Documentation

evf::FWEPWrapper::FWEPWrapper ( log4cplus::Logger &  log,
unsigned int  instance 
)

Definition at line 52 of file FWEPWrapper.cc.

References ep_guard_lock_, epMAltState_, epmAltState_, names_, namesScalersLegenda_, and namesStatusLegenda_.

53  : evtProcessor_(0)
54  , serviceToken_()
55  , servicesDone_(false)
56  , epInitialized_(false)
57  , prescaleSvc_(0)
58  , log_(log)
59  , isPython_(true)
60  , hasPrescaleService_(false)
61  , hasModuleWebRegistry_(false)
62  , hasServiceWebRegistry_(false)
63  , monitorInfoSpace_(0)
65  , timeoutOnStop_(3)
66  , monSleepSec_(1)
67  , nbProcessed_(0)
68  , nbAccepted_(0)
69  , wlMonitoring_(0)
70  , asMonitoring_(0)
71  , wlMonitoringActive_(false)
72  , watching_(false)
74  , lsid_(0)
75  , psid_(0)
76  , lsTimeOut_(100000000)
81  , lsTimedOut_(false)
82  , lsToBeRecovered_(true)
88  , rollingLsWrap_(false)
89  , rcms_(0)
91  , waitingForLs_(false)
92  , mwrRef_(nullptr)
93  , sorRef_(nullptr)
94  , ftsRef_(nullptr)
95  , countDatasets_(false)
96  {
97  //list of variables for scalers flashlist
98  names_.push_back("lumiSectionIndex");
99  names_.push_back("prescaleSetIndex");
100  names_.push_back("scalersTable");
101  namesStatusLegenda_.push_back("macroStateLegenda");
102  namesStatusLegenda_.push_back("microStateLegenda");
103  namesScalersLegenda_.push_back("scalersLegenda");
104  //some initialization of state data
105  epMAltState_ = -1;
106  epmAltState_ = -1;
107  pthread_mutex_init(&ep_guard_lock_,0);
108  }
ShmOutputModuleRegistry * sorRef_
Definition: FWEPWrapper.h:244
std::vector< bool > lumiSectionsTo_
Definition: FWEPWrapper.h:229
xdata::Integer epmAltState_
Definition: FWEPWrapper.h:197
static PFTauRenderPlugin instance
xdata::UnsignedInteger32 lastLumiPrescaleIndex_
Definition: FWEPWrapper.h:221
xdata::Boolean lsToBeRecovered_
Definition: FWEPWrapper.h:224
ModuleWebRegistry * mwrRef_
Definition: FWEPWrapper.h:243
toolbox::task::WorkLoop * wlMonitoring_
Definition: FWEPWrapper.h:190
std::list< std::string > namesScalersLegenda_
Definition: FWEPWrapper.h:208
xdata::Boolean lsTimedOut_
Definition: FWEPWrapper.h:223
static const unsigned int lsRollSize_
Definition: FWEPWrapper.h:232
unsigned int lsid_
Definition: FWEPWrapper.h:210
edm::ServiceToken serviceToken_
Definition: FWEPWrapper.h:149
unsigned int psid_
Definition: FWEPWrapper.h:211
bool hasPrescaleService_
Definition: FWEPWrapper.h:160
std::list< std::string > namesStatusLegenda_
Definition: FWEPWrapper.h:207
std::list< std::string > names_
Definition: FWEPWrapper.h:206
xdata::InfoSpace * monitorInfoSpaceLegend_
Definition: FWEPWrapper.h:170
xdata::InfoSpace * monitorInfoSpace_
Definition: FWEPWrapper.h:168
unsigned int allPastLumiProcessed_
Definition: FWEPWrapper.h:205
xdata::UnsignedInteger32 lumiSectionIndex_
Definition: FWEPWrapper.h:219
xdata::UnsignedInteger32 nbProcessed_
Definition: FWEPWrapper.h:186
log4cplus::Logger log_
Definition: FWEPWrapper.h:158
xdata::UnsignedInteger32 lastLumiUsingEol_
Definition: FWEPWrapper.h:222
pthread_mutex_t ep_guard_lock_
Definition: FWEPWrapper.h:241
edm::service::PrescaleService * prescaleSvc_
Definition: FWEPWrapper.h:155
xdata::UnsignedInteger32 instance_
Definition: FWEPWrapper.h:238
xdata::UnsignedInteger32 monSleepSec_
Definition: FWEPWrapper.h:180
unsigned int scalersUpdateCounter_
Definition: FWEPWrapper.h:227
toolbox::task::ActionSignature * asMonitoring_
Definition: FWEPWrapper.h:191
xdata::UnsignedInteger32 prescaleSetIndex_
Definition: FWEPWrapper.h:220
unsigned int rollingLsIndex_
Definition: FWEPWrapper.h:230
std::vector< lsTriplet > lumiSectionsCtr_
Definition: FWEPWrapper.h:228
edm::EventProcessor * evtProcessor_
Definition: FWEPWrapper.h:147
xdata::Integer epMAltState_
Definition: FWEPWrapper.h:196
bool hasServiceWebRegistry_
Definition: FWEPWrapper.h:162
FastTimerService * ftsRef_
Definition: FWEPWrapper.h:245
xdaq::ApplicationDescriptor * rcms_
Definition: FWEPWrapper.h:233
bool hasModuleWebRegistry_
Definition: FWEPWrapper.h:161
unsigned int scalersUpdateAttempted_
Definition: FWEPWrapper.h:226
xdata::UnsignedInteger32 lsTimeOut_
Definition: FWEPWrapper.h:216
bool wlMonitoringActive_
Definition: FWEPWrapper.h:192
xdata::UnsignedInteger32 timeoutOnStop_
Definition: FWEPWrapper.h:172
xdata::UnsignedInteger32 nbAccepted_
Definition: FWEPWrapper.h:187
evf::FWEPWrapper::~FWEPWrapper ( )
virtual

Definition at line 110 of file FWEPWrapper.cc.

References evtProcessor_.

110 {if (0!=evtProcessor_) delete evtProcessor_; evtProcessor_=0;}
edm::EventProcessor * evtProcessor_
Definition: FWEPWrapper.h:147

Member Function Documentation

void evf::FWEPWrapper::adjustLsIndexForRestart ( )
inline
std::string const& evf::FWEPWrapper::configuration ( void  ) const
inline

Definition at line 102 of file FWEPWrapper.h.

References configuration_.

Referenced by evf::FUEventProcessor::configuring(), and evf::FUEventProcessor::enabling().

102 {return configuration_;}
std::string configuration_
Definition: FWEPWrapper.h:236
void evf::FWEPWrapper::createAndSendScalersMessage ( )

Definition at line 1276 of file FWEPWrapper.cc.

References asciidump::at, alignCSCRings::e, edm::hlt::Exception, log_, python.rootplot.argparse::message, lumiQueryAPI::msg, rcms_, scalersComplete_, AlCaHLTBitMon_QueryRunRegistry::string, corrections_cfg::tagName, relmon_authenticated_wget::url, xappCtxt_, and xappDesc_.

Referenced by fireScalersUpdate().

1277  {
1278  toolbox::net::URL url(rcms_->getContextDescriptor()->getURL());
1279  toolbox::net::URL at(xappDesc_->getContextDescriptor()->getURL() + "/" + xappDesc_->getURN());
1280  toolbox::net::URL properurl(url.getProtocol(),url.getHost(),url.getPort(),"");
1281  xdaq::ContextDescriptor *ctxdsc = new xdaq::ContextDescriptor(properurl.toString());
1282  xdaq::ApplicationDescriptor *appdesc = new xdaq::ApplicationDescriptorImpl(ctxdsc,rcms_->getClassName(),rcms_->getLocalId(), "pippo");
1283 
1284  appdesc->setAttribute("path","/rcms/servlet/monitorreceiver");
1285 
1286  xoap::MessageReference msg = xoap::createMessage();
1287  xoap::SOAPEnvelope envelope = msg->getSOAPPart().getEnvelope();
1288  xoap::SOAPName responseName = envelope.createName( "report", xmas::NamespacePrefix, xmas::NamespaceUri);
1289  (void) envelope.getBody().addBodyElement ( responseName );
1290  xoap::SOAPName reportName ("report", xmas::NamespacePrefix, xmas::NamespaceUri);
1291  xoap::SOAPElement reportElement = envelope.getBody().getChildElements(reportName)[0];
1292  reportElement.addNamespaceDeclaration (xmas::sensor::NamespacePrefix, xmas::sensor::NamespaceUri);
1293  xoap::SOAPName sampleName = envelope.createName( "sample", xmas::NamespacePrefix, xmas::NamespaceUri);
1294  xoap::SOAPElement sampleElement = reportElement.addChildElement(sampleName);
1295  xoap::SOAPName flashListName = envelope.createName( "flashlist", "", "");
1296  sampleElement.addAttribute(flashListName,"urn:xdaq-flashlist:scalers");
1297  xoap::SOAPName tagName = envelope.createName( "tag", "", "");
1298  sampleElement.addAttribute(tagName,"tag");
1299  xoap::MimeHeaders* headers = msg->getMimeHeaders();
1300  headers->removeHeader("x-xdaq-tags");
1301  headers->addHeader("x-xdaq-tags", "tag");
1302  tagName = envelope.createName( "originator", "", "");
1303  sampleElement.addAttribute(tagName,at.toString());
1304 
1305  xdata::exdr::AutoSizeOutputStreamBuffer outBuffer;
1306  xdata::exdr::Serializer serializer;
1307  try
1308  {
1309  serializer.exportAll( &scalersComplete_, &outBuffer );
1310  }
1312  {
1313  LOG4CPLUS_WARN(log_,
1314  "Exception in serialization of scalers table");
1315  // localLog("-W- Exception in serialization of scalers table");
1316  throw;
1317  }
1318 
1319  xoap::AttachmentPart * attachment = msg->createAttachmentPart(outBuffer.getBuffer(), outBuffer.tellp(), "application/x-xdata+exdr");
1320  attachment->setContentEncoding("binary");
1321  tagName = envelope.createName( "tag", "", "");
1322  sampleElement.addAttribute(tagName,"tag");
1323  std::stringstream contentId;
1324 
1325  contentId << "<" << "urn:xdaq-flashlist:scalers" << "@" << at.getHost() << ">";
1326  attachment->setContentId(contentId.str());
1327  std::stringstream contentLocation;
1328  contentId << at.toString();
1329  attachment->setContentLocation(contentLocation.str());
1330 
1331  std::stringstream disposition;
1332  disposition << "attachment; filename=" << "urn:xdaq-flashlist:scalers" << ".exdr; creation-date=" << "\"" << "dummy" << "\"";
1333  attachment->addMimeHeader("Content-Disposition",disposition.str());
1334  msg->addAttachmentPart(attachment);
1335 
1336  try{
1337  xappCtxt_->postSOAP(msg,*(xappDesc_),*appdesc);
1338  }
1339  catch(xdaq::exception::Exception &ex)
1340  {
1341  std::string message = "exception when posting SOAP message to MonitorReceiver";
1342  message += ex.what();
1343  LOG4CPLUS_WARN(log_,message.c_str());
1344  std::string lmessage = "-W- "+message;
1345  delete appdesc;
1346  delete ctxdsc;
1347  throw;
1348  // localLog(lmessage);
1349  }
1350  delete appdesc;
1351  delete ctxdsc;
1352  }
xdaq::ApplicationContext * xappCtxt_
Definition: FWEPWrapper.h:235
xdata::Table scalersComplete_
Definition: FWEPWrapper.h:217
log4cplus::Logger log_
Definition: FWEPWrapper.h:158
xdaq::ApplicationDescriptor * rcms_
Definition: FWEPWrapper.h:233
xdaq::ApplicationDescriptor * xappDesc_
Definition: FWEPWrapper.h:234
list at
Definition: asciidump.py:428
bool evf::FWEPWrapper::fireScalersUpdate ( )

Definition at line 777 of file FWEPWrapper.cc.

References createAndSendScalersMessage(), evf::fuep::TriggerReportHelpers::getProcThisLumi(), monitorLegendaInfoSpace_, namesStatusLegenda_, rcms_, scalersUpdateAttempted_, scalersUpdateCounter_, and trh_.

Referenced by evf::FUEventProcessor::scalers(), and evf::FUEventProcessor::summarize().

778  {
779  // trh_.printReportTable();
781  //@@EM commented out on
782  // @@EM 21.06.2011 - this flashlist is too big to be handled by LAS
783  /*
784  try{
785  // scalersInfoSpace_->unlock();
786  // scalersInfoSpace_->fireItemGroupChanged(names_,0);
787  ::usleep(10);
788  // scalersInfoSpace_->lock();
789  }
790  catch(xdata::exception::Exception &e)
791  {
792  LOG4CPLUS_ERROR(log_, "Exception from fireItemGroupChanged: " << e.what());
793  // localLog(e.what());
794  return false;
795  }
796  */
797  //@@EM added on 21.06.2011
798  // refresh the microstate legenda every 10 lumisections
799  if(scalersUpdateAttempted_%10 == 0)
800  monitorLegendaInfoSpace_->fireItemGroupChanged(namesStatusLegenda_,0);
801 
802  //if there is no state listener then do not attempt to send to monitorreceiver
803  if(rcms_==0) return false;
804  try{
805  if(trh_.getProcThisLumi()!=0U)
808  }
809  catch(...){return false;}
810  return true;
811  }
xdata::InfoSpace * monitorLegendaInfoSpace_
Definition: FWEPWrapper.h:169
void createAndSendScalersMessage()
xdata::UnsignedInteger32 & getProcThisLumi()
std::list< std::string > namesStatusLegenda_
Definition: FWEPWrapper.h:207
unsigned int scalersUpdateCounter_
Definition: FWEPWrapper.h:227
fuep::TriggerReportHelpers trh_
Definition: FWEPWrapper.h:157
xdaq::ApplicationDescriptor * rcms_
Definition: FWEPWrapper.h:233
unsigned int scalersUpdateAttempted_
Definition: FWEPWrapper.h:226
void evf::FWEPWrapper::forceInitEventProcessorMaybe ( )
inline

Definition at line 68 of file FWEPWrapper.h.

References epInitialized_.

Referenced by evf::FUEventProcessor::enabling().

68 {epInitialized_ = false;}
unsigned int evf::FWEPWrapper::getLumiSectionReferenceIndex ( )
inline

Definition at line 139 of file FWEPWrapper.h.

References evf::fuep::TriggerReportHelpers::getLumiSectionReferenceIndex(), and trh_.

Referenced by evf::FUEventProcessor::summarize().

fuep::TriggerReportHelpers trh_
Definition: FWEPWrapper.h:157
std::vector<std::string> const& evf::FWEPWrapper::getmicromap ( ) const
inline

Definition at line 141 of file FWEPWrapper.h.

References mapmod_.

Referenced by evf::FUEventProcessor::configuring(), and evf::FUEventProcessor::enabling().

141 { return mapmod_;}
std::vector< std::string > mapmod_
Definition: FWEPWrapper.h:176
ModuleWebRegistry * evf::FWEPWrapper::getModuleWebRegistry ( )

Definition at line 485 of file FWEPWrapper.cc.

References mwrRef_.

Referenced by evf::FUEventProcessor::configuring(), and evf::FUEventProcessor::enabling().

486  {
487  return mwrRef_;
488  }
ModuleWebRegistry * mwrRef_
Definition: FWEPWrapper.h:243
unsigned int evf::FWEPWrapper::getNumberOfMicrostates ( )
inline

Definition at line 140 of file FWEPWrapper.h.

References mapmod_.

Referenced by evf::FUEventProcessor::configuring(), and evf::FUEventProcessor::enabling().

140 {return mapmod_.size();}
std::vector< std::string > mapmod_
Definition: FWEPWrapper.h:176
MsgBuf& evf::FWEPWrapper::getPackedTriggerReport ( )
inline

Definition at line 114 of file FWEPWrapper.h.

References evf::fuep::TriggerReportHelpers::getPackedTriggerReport(), and trh_.

Referenced by evf::FUEventProcessor::scalers().

114 {return trh_.getPackedTriggerReport();}
fuep::TriggerReportHelpers trh_
Definition: FWEPWrapper.h:157
TriggerReportStatic* evf::FWEPWrapper::getPackedTriggerReportAsStruct ( )
inline
unsigned int evf::FWEPWrapper::getScalersUpdates ( )
inline

Definition at line 136 of file FWEPWrapper.h.

References scalersUpdateCounter_.

Referenced by evf::FUEventProcessor::microState().

136 {return scalersUpdateCounter_;}
unsigned int scalersUpdateCounter_
Definition: FWEPWrapper.h:227
ShmOutputModuleRegistry * evf::FWEPWrapper::getShmOutputModuleRegistry ( )

Definition at line 491 of file FWEPWrapper.cc.

References sorRef_.

Referenced by evf::FUEventProcessor::configuring(), and evf::FUEventProcessor::enabling().

492  {
493  return sorRef_;
494  }
ShmOutputModuleRegistry * sorRef_
Definition: FWEPWrapper.h:244
bool evf::FWEPWrapper::getTriggerReport ( bool  useLock)

Definition at line 694 of file FWEPWrapper.cc.

References evf::lsTriplet::acc, allPastLumiProcessed_, evf::fuep::TriggerReportHelpers::checkLumiSection(), evf::ModuleWebRegistry::closeBackDoor(), countDatasets_, descs_, evtProcessor_, evf::fuep::TriggerReportHelpers::formatReportTable(), evf::fuep::TriggerReportHelpers::getTableWithNames(), edm::EventProcessor::getTriggerReport(), edm::Service< T >::isAvailable(), lastLumiPrescaleIndex_, localLsIncludingTimeOuts_, log_, evf::lsTriplet::ls, python.rootplot.utilities::ls(), lst, lsTimeOut_, lumiSectionIndex_, lumiSectionsCtr_, evf::ModuleWebRegistry::openBackDoor(), cppFunctionSkipper::operator, evf::fuep::TriggerReportHelpers::packTriggerReport(), pathTable_, prescaleSetIndex_, prescaleSvc_, evf::lsTriplet::proc, psid_, rollingLsIndex_, rollingLsWrap_, scalersComplete_, serviceToken_, edm::service::PrescaleService::setIndex(), edm::EventProcessor::totalEvents(), edm::EventProcessor::totalEventsPassed(), trh_, evf::fuep::TriggerReportHelpers::triggerReportUpdate(), and waitingForLs_.

Referenced by evf::FUEventProcessor::scalers().

695  {
697  // Calling this method results in calling
698  // evtProcessor_->getTriggerReport, the value returned is encoded as
699  // a xdata::Table.
700 
701  LOG4CPLUS_DEBUG(log_,"getTriggerReport action invoked");
702 
703  //Get the trigger report.
704  ModuleWebRegistry *mwr = 0;
705  try{
706  if(edm::Service<ModuleWebRegistry>().isAvailable())
708  }
709  catch(...) {
710  LOG4CPLUS_INFO(log_,
711  "exception when trying to get service ModuleWebRegistry");
712  return false;
713  }
714  edm::TriggerReport tr;
715  if(mwr==0) return false;
716 
717  unsigned int ls = 0;
718  unsigned int ps = 0;
719  timeval tv;
720  if(useLock) {
721  gettimeofday(&tv,0);
722  // std::cout << getpid() << " calling openBackdoor " << std::endl;
723  //waitingForLs_ = true;//moving this behind mutex lock
724  mwr->openBackDoor("DaqSource",lsTimeOut_,&waitingForLs_);
725  // std::cout << getpid() << " opened Backdoor " << std::endl;
726  }
727 
728  xdata::Table::iterator it = scalersComplete_.begin();
729  ps = lastLumiPrescaleIndex_.value_;
730  // if(prescaleSvc_ != 0) prescaleSvc_->setIndex(ps);
731  it->setField("psid",lastLumiPrescaleIndex_);
732  psid_ = prescaleSetIndex_.value_;
734  ls = lumiSectionIndex_.value_;
735  localLsIncludingTimeOuts_.value_ = ls;
736  it->setField("lsid", localLsIncludingTimeOuts_);
737 
738  lsTriplet lst;
739  lst.ls = localLsIncludingTimeOuts_.value_;
741  lst.acc = evtProcessor_->totalEventsPassed()-
745 
746 
748 
749  if(useLock){
750  // std::cout << getpid() << " calling closeBackdoor " << std::endl;
751  mwr->closeBackDoor("DaqSource");
752  // std::cout << getpid() << " closed Backdoor " << std::endl;
753  }
754 
756 
757 
759  ShmOutputModuleRegistry *sor = 0;
760  try{
762  sor = edm::Service<ShmOutputModuleRegistry>().operator->();
763  }
764  catch(...) {
765  LOG4CPLUS_INFO(log_,
766  "exception when trying to get service ShmOutputModuleRegistry");
767  return false;
768  }
769 
770 
772  it->setField("triggerReport",trh_.getTableWithNames());
773  // std::cout << getpid() << " returning normally from gettriggerreport " << std::endl;
774  return true;
775  }
void setIndex(unsigned int lvl1Index)
xdata::UnsignedInteger32 localLsIncludingTimeOuts_
Definition: FWEPWrapper.h:215
xdata::UnsignedInteger32 lastLumiPrescaleIndex_
Definition: FWEPWrapper.h:221
int lst[30]
bool checkLumiSection(unsigned int ls)
edm::ServiceToken serviceToken_
Definition: FWEPWrapper.h:149
unsigned int psid_
Definition: FWEPWrapper.h:211
bool isAvailable() const
Definition: Service.h:47
xdata::Table scalersComplete_
Definition: FWEPWrapper.h:217
int totalEvents() const
unsigned int allPastLumiProcessed_
Definition: FWEPWrapper.h:205
std::vector< edm::ModuleDescription const * > descs_
Definition: FWEPWrapper.h:174
xdata::UnsignedInteger32 lumiSectionIndex_
Definition: FWEPWrapper.h:219
void formatReportTable(edm::TriggerReport &, std::vector< edm::ModuleDescription const * > &, std::string &pathIndexTable, bool noNukeLegenda)
log4cplus::Logger log_
Definition: FWEPWrapper.h:158
void packTriggerReport(edm::TriggerReport &, ShmOutputModuleRegistry *, bool)
edm::service::PrescaleService * prescaleSvc_
Definition: FWEPWrapper.h:155
xdata::UnsignedInteger32 prescaleSetIndex_
Definition: FWEPWrapper.h:220
unsigned int rollingLsIndex_
Definition: FWEPWrapper.h:230
std::vector< lsTriplet > lumiSectionsCtr_
Definition: FWEPWrapper.h:228
fuep::TriggerReportHelpers trh_
Definition: FWEPWrapper.h:157
edm::EventProcessor * evtProcessor_
Definition: FWEPWrapper.h:147
std::string pathTable_
Definition: FWEPWrapper.h:237
int totalEventsPassed() const
xdata::UnsignedInteger32 lsTimeOut_
Definition: FWEPWrapper.h:216
void triggerReportUpdate(edm::TriggerReport &, unsigned int, unsigned int, bool=true)
void getTriggerReport(TriggerReport &rep) const
void evf::FWEPWrapper::init ( unsigned short  serviceMap,
std::string &  configString 
)

Definition at line 193 of file FWEPWrapper.cc.

References applicationInfoSpace_, evf::ShmOutputModuleRegistry::clear(), evf::ModuleWebRegistry::clear(), configString_, configuration_, countDatasets_, edm::ServiceRegistry::createSet(), descs_, alignCSCRings::e, edm::EventProcessor::endJob(), ep_guard_lock_, epInitialized_, evtProcessor_, cppFunctionSkipper::exception, edm::hlt::Exception, cms::Exception::explainSelf(), evf::fuep::TriggerReportHelpers::formatReportTable(), ftsRef_, edm::EventProcessor::getAllModuleDescriptions(), evf::ParameterSetRetriever::getAsString(), edm::ParameterSet::getParameter(), evf::ParameterSetRetriever::getPathTableAsString(), edm::EventProcessor::getState(), edm::EventProcessor::getTriggerReport(), hasModuleWebRegistry_, hasPrescaleService_, hasServiceWebRegistry_, hasSubProcesses, i, evf::ShmOutputModuleRegistry::insertStreamAndDatasetInfo(), isPython_, j, edm::serviceregistry::kTokenOverrides, log_, mapmod_, micro_state_legend_, modmap_, monitorLegendaInfoSpace_, mwrRef_, namesScalersLegenda_, namesStatusLegenda_, cppFunctionSkipper::operator, pathTable_, prescaleSvc_, PythonProcessDesc::processDesc(), evf::ModuleWebRegistry::publish(), evf::ServiceWebRegistry::publish(), evf::ModuleWebRegistry::publishToXmas(), edm::service::PrescaleService::reconfigure(), evf::fuep::TriggerReportHelpers::resetFormat(), DQMStore::rmdir(), scalersInfoSpace_, scalersLegendaInfoSpace_, scalersUpdateCounter_, edm::event_processor::sDone, servicesDone_, serviceToken_, edm::event_processor::sJobReady, sorRef_, trh_, and evf::ShmOutputModuleRegistry::updateDatasetInfo().

Referenced by evf::FUEventProcessor::configuring(), and evf::FUEventProcessor::enabling().

194  {
195  hasPrescaleService_ = serviceMap & 0x1;
196  hasModuleWebRegistry_ = serviceMap & 0x2;
197  hasServiceWebRegistry_ = serviceMap & 0x4;
198  bool instanceZero = serviceMap & 0x8;
199  hasSubProcesses = serviceMap & 0x10;
200  countDatasets_ = (serviceMap&0x20)>0;
201  configString_ = configString;
202  trh_.resetFormat(); //reset the report table even if HLT didn't change
204  if (epInitialized_) {
205  LOG4CPLUS_INFO(log_,"CMSSW EventProcessor already initialized: skip!");
206  return;
207  }
208 
209  LOG4CPLUS_INFO(log_,"Initialize CMSSW EventProcessor.");
210  LOG4CPLUS_INFO(log_,"CMSSW_BASE:"<<getenv("CMSSW_BASE"));
211 
212  //end job of previous EP instance
213  if (0!=evtProcessor_) {
217  }
218  delete evtProcessor_;
219  evtProcessor_=0;
220  }
221 
222  // job configuration string
223  ParameterSetRetriever pr(configString_);
224  configuration_ = pr.getAsString();
225  pathTable_ = pr.getPathTableAsString();
226 
227  if (configString_.size() > 3 && configString_.substr(configString_.size()-3) == ".py") isPython_ = true;
228  boost::shared_ptr<edm::ParameterSet> params; // change this name!
229  boost::shared_ptr<std::vector<edm::ParameterSet> > pServiceSets;
230  boost::shared_ptr<edm::ProcessDesc> pdesc;
231  if(isPython_)
232  {
234  pdesc = ppdesc.processDesc();
235  }
236  else
237  pdesc = boost::shared_ptr<edm::ProcessDesc>(new edm::ProcessDesc(configuration_));
238  pServiceSets = pdesc->getServicesPSets();
239 
240  // add default set of services
241  if(!servicesDone_) {
242  //DQMStore should not be created in the Master (MP case) since this poses problems in the slave
243  if(!hasSubProcesses){
244  internal::addServiceMaybe(*pServiceSets,"DQMStore");
245  internal::addServiceMaybe(*pServiceSets,"DQM");
246  }
247  else{
248  internal::removeServiceMaybe(*pServiceSets,"DQMStore");
249  internal::removeServiceMaybe(*pServiceSets,"DQM");
250  }
251  internal::addServiceMaybe(*pServiceSets,"MLlog4cplus");
252  internal::addServiceMaybe(*pServiceSets,"MicroStateService");
253  internal::addServiceMaybe(*pServiceSets,"ShmOutputModuleRegistry");
254  if(hasPrescaleService_) internal::addServiceMaybe(*pServiceSets,"PrescaleService");
255  if(hasModuleWebRegistry_) internal::addServiceMaybe(*pServiceSets,"ModuleWebRegistry");
256  if(hasServiceWebRegistry_) internal::addServiceMaybe(*pServiceSets,"ServiceWebRegistry");
257 
258  try{
260  internal::addServiceMaybe(*pServiceSets,"DQMStore");
261  internal::addServiceMaybe(*pServiceSets,"DQM");
262  // slaveServiceToken_ = edm::ServiceRegistry::createSet(*pServiceSets);
263  }
264  catch(cms::Exception &e) {
265  LOG4CPLUS_ERROR(log_,e.explainSelf());
266  }
267  catch(std::exception &e) {
268  LOG4CPLUS_ERROR(log_,e.what());
269  }
270  catch(...) {
271  LOG4CPLUS_ERROR(log_,"Unknown Exception");
272  }
273  servicesDone_ = true;
274  }
275 
277 
278 
279  //test rerouting of fwk logging to log4cplus
280  edm::LogInfo("FWEPWrapper")<<"started MessageLogger Service.";
281  edm::LogInfo("FWEPWrapper")<<"Using config \n"<<configuration_;
282 
283  DQMStore *dqm = 0;
284  try{
285  if(edm::Service<DQMStore>().isAvailable())
286  dqm = edm::Service<DQMStore>().operator->();
287  }
288  catch(...) {
289  LOG4CPLUS_INFO(log_,
290  "exception when trying to get service DQMStore");
291  }
292  if(dqm!=0) dqm->rmdir("");
293 
294 
295  ModuleWebRegistry *mwr = 0;
296  try{
297  if(edm::Service<ModuleWebRegistry>().isAvailable())
299  }
300  catch(...) {
301  LOG4CPLUS_INFO(log_,
302  "exception when trying to get service ModuleWebRegistry");
303  }
304  mwrRef_=mwr;
305 
306  if(mwr) mwr->clear(); // in case we are coming from stop we need to clear the mwr
307 
308  ServiceWebRegistry *swr = 0;
309  try{
310  if(edm::Service<ServiceWebRegistry>().isAvailable())
312  }
313  catch(...) {
314  LOG4CPLUS_INFO(log_,
315  "exception when trying to get service ModuleWebRegistry");
316  }
317  ShmOutputModuleRegistry *sor = 0;
318  try{
319  if(edm::Service<ShmOutputModuleRegistry>().isAvailable())
321  }
322  catch(...) {
323  LOG4CPLUS_INFO(log_,
324  "exception when trying to get service ShmOutputModuleRegistry");
325  }
326  if(sor) sor->clear();
327  sorRef_=sor;
328  // if(swr) swr->clear(); // in case we are coming from stop we need to clear the swr
329 
330 
331  FastTimerService *fts = 0;
332  try{
333  if(edm::Service<FastTimerService>().isAvailable())
335  }
336  catch(...) {
337  LOG4CPLUS_INFO(log_,
338  "exception when trying to get service FastTimerService");
339  }
340  ftsRef_=fts;
341 
342  //get and copy streams and datasets PSet from the framework configuration
343  edm::ParameterSet streamsPSet;
344  edm::ParameterSet datasetsPSet;
345  if (countDatasets_)
346  try {
347  streamsPSet = pdesc->getProcessPSet()->getParameter<edm::ParameterSet>("streams");
348  datasetsPSet = pdesc->getProcessPSet()->getParameter<edm::ParameterSet>("datasets");
349  }
350  catch (...) {
351  streamsPSet = edm::ParameterSet();
352  datasetsPSet = edm::ParameterSet();
353  }
354 
355  // instantiate the event processor - fatal exceptions are caught in the main application
356 
357  std::vector<std::string> defaultServices;
358  std::vector<std::string> forcedServices;
359  defaultServices.push_back("MessageLogger");
360  defaultServices.push_back("InitRootHandlers");
361  defaultServices.push_back("JobReportService");
362  pdesc->addServices(defaultServices, forcedServices);
363  pthread_mutex_lock(&ep_guard_lock_);
364 
368  pthread_mutex_unlock(&ep_guard_lock_);
369  // evtProcessor_->setRunNumber(runNumber_.value_);
370  /* removed
371  if(!outPut_)
372  evtProcessor_->enableEndPaths(outPut_);
373  outprev_=outPut_;
374  */
375  // publish all module names to XDAQ infospace
376 
377  if(mwr)
378  {
379  mwr->publish(applicationInfoSpace_);
380  mwr->publishToXmas(scalersInfoSpace_);
381  }
382  if(swr)
383  {
384  swr->publish(applicationInfoSpace_);
385  }
386  if (sor && countDatasets_)
387  {
388  sor->insertStreamAndDatasetInfo(streamsPSet,datasetsPSet);
389  sor->updateDatasetInfo();
390  }
391  // get the prescale service
392  LOG4CPLUS_INFO(log_,
393  "Checking for edm::service::PrescaleService!");
394  try {
396  {
397  LOG4CPLUS_INFO(log_,
398  "edm::service::PrescaleService is available!");
400  LOG4CPLUS_INFO(log_,
401  "Obtained pointer to PrescaleService");
402  }
403  }
404  catch(...) {
405  LOG4CPLUS_INFO(log_,
406  "exception when trying to get service "
407  <<"edm::service::PrescaleService");
408  }
409  const edm::ParameterSet *prescaleSvcConfig = internal::findService(*pServiceSets,"PrescaleService");
410  if(prescaleSvc_ != 0 && prescaleSvcConfig !=0) prescaleSvc_->reconfigure(*prescaleSvcConfig);
411 
412  monitorLegendaInfoSpace_->lock();
413  //fill microstate legenda information
415 
416  std::stringstream oss2;
417  unsigned int outcount = 0;
418  oss2 << 0 << "=Invalid ";
419  oss2 << 1 << "=FwkOvh ";
420  oss2 << 2 << "=Input ";
421  modmap_["Invalid"]=0;
422  modmap_["FWKOVH"]=1;
423  modmap_["INPUT"]=2;
424  mapmod_.resize(descs_.size()+4); // all modules including output plus one input plus DQM plus the invalid state 0
425  mapmod_[0]="Invalid";
426  mapmod_[1]="FWKOVH";
427  mapmod_[2]="INPUT";
428  outcount+=2;
429  for(unsigned int j = 0; j < descs_.size(); j++)
430  {
431  if(descs_[j]->moduleName() == "ShmStreamConsumer") // find something better than hardcoding name
432  {
433  outcount++;
434  oss2 << outcount << "=" << descs_[j]->moduleLabel() << " ";
435  modmap_[descs_[j]->moduleLabel()]=outcount;
436  mapmod_[outcount] = descs_[j]->moduleLabel();
437  }
438  }
439  modmap_["DQM"]=outcount+1;
440  mapmod_[outcount+1]="DQM";
441  oss2 << outcount+1 << "=DQMHistograms ";
442  unsigned int modcount = 1;
443  for(unsigned int i = 0; i < descs_.size(); i++)
444  {
445  if(descs_[i]->moduleName() != "ShmStreamConsumer")
446  {
447  modcount++;
448  oss2 << outcount+modcount << "=" << descs_[i]->moduleLabel() << " ";
449  modmap_[descs_[i]->moduleLabel()]=outcount+modcount;
450  mapmod_[outcount+modcount] = descs_[i]->moduleLabel();
451  }
452  }
453 // std::cout << "*******************************microstate legend**************************" << std::endl;
454 // std::cout << oss2.str() << std::endl;
455 // std::cout << "*******************************microstate legend**************************" << std::endl;
456 
457  if(instanceZero){
458  micro_state_legend_ = oss2.str().c_str();
459  }
460  monitorLegendaInfoSpace_->unlock();
461  try{
462  monitorLegendaInfoSpace_->fireItemGroupChanged(namesStatusLegenda_,0);
463  scalersLegendaInfoSpace_->fireItemGroupChanged(namesScalersLegenda_,0);
464  ::usleep(10);
465  }
467  {
468  LOG4CPLUS_ERROR(log_, "Exception from fireItemGroupChanged: " << e.what());
469  }
470  LOG4CPLUS_INFO(log_," edm::EventProcessor configuration finished.");
473  trh_.formatReportTable(tr,descs_,pathTable_,instanceZero);
474  epInitialized_ = true;
475  return;
476  }
xdata::InfoSpace * monitorLegendaInfoSpace_
Definition: FWEPWrapper.h:169
T getParameter(std::string const &) const
ShmOutputModuleRegistry * sorRef_
Definition: FWEPWrapper.h:244
int i
Definition: DBlmapReader.cc:9
event_processor::State getState() const
void rmdir(const std::string &fullpath)
Definition: DQMStore.cc:2535
virtual std::string explainSelf() const
Definition: Exception.cc:146
std::string configString_
Definition: FWEPWrapper.h:152
xdata::InfoSpace * scalersInfoSpace_
Definition: FWEPWrapper.h:213
xdata::InfoSpace * scalersLegendaInfoSpace_
Definition: FWEPWrapper.h:214
std::vector< std::string > mapmod_
Definition: FWEPWrapper.h:176
ModuleWebRegistry * mwrRef_
Definition: FWEPWrapper.h:243
std::list< std::string > namesScalersLegenda_
Definition: FWEPWrapper.h:208
edm::ServiceToken serviceToken_
Definition: FWEPWrapper.h:149
void reconfigure(ParameterSet const &ps)
bool hasPrescaleService_
Definition: FWEPWrapper.h:160
int j
Definition: DBlmapReader.cc:9
std::list< std::string > namesStatusLegenda_
Definition: FWEPWrapper.h:207
xdata::String micro_state_legend_
Definition: FWEPWrapper.h:202
static ServiceToken createSet(std::vector< ParameterSet > &)
std::map< std::string, int > modmap_
Definition: FWEPWrapper.h:175
std::vector< edm::ModuleDescription const * > descs_
Definition: FWEPWrapper.h:174
boost::shared_ptr< edm::ProcessDesc > processDesc()
void formatReportTable(edm::TriggerReport &, std::vector< edm::ModuleDescription const * > &, std::string &pathIndexTable, bool noNukeLegenda)
log4cplus::Logger log_
Definition: FWEPWrapper.h:158
pthread_mutex_t ep_guard_lock_
Definition: FWEPWrapper.h:241
edm::service::PrescaleService * prescaleSvc_
Definition: FWEPWrapper.h:155
unsigned int scalersUpdateCounter_
Definition: FWEPWrapper.h:227
fuep::TriggerReportHelpers trh_
Definition: FWEPWrapper.h:157
edm::EventProcessor * evtProcessor_
Definition: FWEPWrapper.h:147
bool hasServiceWebRegistry_
Definition: FWEPWrapper.h:162
FastTimerService * ftsRef_
Definition: FWEPWrapper.h:245
std::vector< ModuleDescription const * > getAllModuleDescriptions() const
std::string pathTable_
Definition: FWEPWrapper.h:237
bool hasModuleWebRegistry_
Definition: FWEPWrapper.h:161
xdata::InfoSpace * applicationInfoSpace_
Definition: FWEPWrapper.h:165
std::string configuration_
Definition: FWEPWrapper.h:236
void getTriggerReport(TriggerReport &rep) const
bool evf::FWEPWrapper::isWaitingForLs ( )
inline
lsTriplet& evf::FWEPWrapper::lastLumi ( )
inline

Definition at line 133 of file FWEPWrapper.h.

References lumiSectionsCtr_, and rollingLsIndex_.

Referenced by evf::FUEventProcessor::updater().

unsigned int rollingLsIndex_
Definition: FWEPWrapper.h:230
std::vector< lsTriplet > lumiSectionsCtr_
Definition: FWEPWrapper.h:228
void evf::FWEPWrapper::lumiSumTable ( xgi::Output out)

Definition at line 1164 of file FWEPWrapper.cc.

References i, lumiSectionsCtr_, lumiSectionsTo_, proc, rollingLsIndex_, and rollingLsWrap_.

1165  {
1166  // lumisection summary table
1167  *out << " <table border=1 bgcolor=\"#CFCFCF\">" << std::endl;
1168  *out << " <tr>" << std::endl;
1169  *out << " <td> LS </td>";
1170  if(rollingLsWrap_)
1171  {
1172  for(unsigned int i = rollingLsIndex_; i < lumiSectionsCtr_.size(); i++)
1173  *out << "<td " << (lumiSectionsTo_[i] ? "bgcolor=\"red\"" : "")
1174  << ">" << lumiSectionsCtr_[i].ls << "</td>" << std::endl;
1175  for(unsigned int i = 0; i < rollingLsIndex_; i++)
1176  *out << "<td " << (lumiSectionsTo_[i] ? "bgcolor=\"red\"" : "")
1177  << ">" << lumiSectionsCtr_[i].ls << "</td>" << std::endl;
1178  }
1179  else
1180  for(unsigned int i = rollingLsIndex_; i < lumiSectionsCtr_.size(); i++)
1181  *out << "<td " << (lumiSectionsTo_[i] ? "bgcolor=\"red\"" : "")
1182  << ">" << lumiSectionsCtr_[i].ls << "</td>" << std::endl;
1183 
1184  *out << " </tr>" << std::endl;
1185  *out << " <tr>" << std::endl;
1186  *out << " <td> Ev </td>";
1187  if(rollingLsWrap_)
1188  {
1189  for(unsigned int i = rollingLsIndex_; i < lumiSectionsCtr_.size(); i++)
1190  *out << "<td>" << lumiSectionsCtr_[i].proc << "</td>" << std::endl;
1191  for(unsigned int i = 0; i < rollingLsIndex_; i++)
1192  *out << "<td>" << lumiSectionsCtr_[i].proc << "</td>" << std::endl;
1193  }
1194  else
1195  for(unsigned int i = rollingLsIndex_; i < lumiSectionsCtr_.size(); i++)
1196  *out << "<td>" << lumiSectionsCtr_[i].proc << "</td>" << std::endl;
1197  *out << " </tr>" << std::endl;
1198  *out << " <tr>" << std::endl;
1199  *out << " <td> Acc </td>";
1200  if(rollingLsWrap_)
1201  {
1202  for(unsigned int i = rollingLsIndex_; i < lumiSectionsCtr_.size(); i++)
1203  *out << "<td>" << lumiSectionsCtr_[i].acc << "</td>" << std::endl;
1204  for(unsigned int i = 0; i < rollingLsIndex_; i++)
1205  *out << "<td>" << lumiSectionsCtr_[i].acc << "</td>" << std::endl;
1206  }
1207  else
1208  for(unsigned int i = rollingLsIndex_; i < lumiSectionsCtr_.size(); i++)
1209  *out << "<td>" << lumiSectionsCtr_[i].acc << "</td>" << std::endl;
1210  *out << " </tr>" << std::endl;
1211  *out << "</table>" << std::endl;
1212  }
int i
Definition: DBlmapReader.cc:9
std::vector< bool > lumiSectionsTo_
Definition: FWEPWrapper.h:229
TrainProcessor *const proc
Definition: MVATrainer.cc:101
tuple out
Definition: dbtoconf.py:99
unsigned int rollingLsIndex_
Definition: FWEPWrapper.h:230
std::vector< lsTriplet > lumiSectionsCtr_
Definition: FWEPWrapper.h:228
void evf::FWEPWrapper::makeServicesOnly ( )

Definition at line 479 of file FWEPWrapper.cc.

References serviceToken_.

void evf::FWEPWrapper::microState ( xgi::Input in,
xgi::Output out 
)

Definition at line 1127 of file FWEPWrapper.cc.

References edm::EventProcessor::currentStateName(), ep_guard_lock_, epInitialized_, evtProcessor_, evf::MicroStateService::getMicroState2(), edm::EventProcessor::getState(), log_, lsid_, lsidTimedOutAsString_, nbAccepted_, nbProcessed_, cppFunctionSkipper::operator, psid_, serviceToken_, edm::event_processor::sInit, and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by evf::FUEventProcessor::microState(), and evf::FUEventProcessor::receivingAndMonitor().

1128  {
1130  MicroStateService *mss = 0;
1131  std::string micro1 = "unavailable";
1132  if(epInitialized_)
1133  micro1 = "initialized";
1134  std::string micro2 = "unavailable";
1136  {
1137  try{
1139  }
1140  catch(...) {
1141  LOG4CPLUS_INFO(log_,
1142  "exception when trying to get service MicroStateService");
1143  }
1144  pthread_mutex_lock(&ep_guard_lock_);
1145  if(evtProcessor_!=0) micro1 = evtProcessor_->currentStateName();
1146  pthread_mutex_unlock(&ep_guard_lock_);
1147  }
1148 
1149  if(mss) {
1150  micro2 = mss->getMicroState2();
1151  }
1152 
1153  // *out << fsm_.stateName()->toString() << std::endl;
1154  *out << "<td>" << micro1 << "</td>";
1155  *out << "<td>" << micro2 << "</td>";
1156  *out << "<td>" << nbAccepted_.value_ << "/" << nbProcessed_.value_
1157  << " (" << float(nbAccepted_.value_)/float(nbProcessed_.value_)*100. <<"%)" << "</td>";
1158  *out << "<td>" << lsid_ << "/" << lsidTimedOutAsString_ << "</td>";
1159  *out << "<td>" << psid_ << "</td>";
1160 
1161 
1162  }
event_processor::State getState() const
unsigned int lsid_
Definition: FWEPWrapper.h:210
edm::ServiceToken serviceToken_
Definition: FWEPWrapper.h:149
unsigned int psid_
Definition: FWEPWrapper.h:211
char const * currentStateName() const
tuple out
Definition: dbtoconf.py:99
xdata::UnsignedInteger32 nbProcessed_
Definition: FWEPWrapper.h:186
log4cplus::Logger log_
Definition: FWEPWrapper.h:158
pthread_mutex_t ep_guard_lock_
Definition: FWEPWrapper.h:241
edm::EventProcessor * evtProcessor_
Definition: FWEPWrapper.h:147
std::string lsidTimedOutAsString_
Definition: FWEPWrapper.h:209
xdata::UnsignedInteger32 nbAccepted_
Definition: FWEPWrapper.h:187
std::string const& evf::FWEPWrapper::moduleNameFromIndex ( unsigned int  i) const
inline

Definition at line 122 of file FWEPWrapper.h.

References mapmod_, and unknown.

Referenced by evf::FUEventProcessor::microState(), and evf::FUEventProcessor::supervisor().

123  {
124  if(i<mapmod_.size()) return mapmod_[i];
125  else return unknown;
126  }
int i
Definition: DBlmapReader.cc:9
std::vector< std::string > mapmod_
Definition: FWEPWrapper.h:176
static const std::string unknown
Definition: FWEPWrapper.h:146
void evf::FWEPWrapper::moduleWeb ( xgi::Input in,
xgi::Output out 
)

Definition at line 1070 of file FWEPWrapper.cc.

References evtProcessor_, edm::EventProcessor::getToken(), edm::Service< T >::isAvailable(), log_, mod(), and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by evf::FUEventProcessor::moduleWeb().

1071  {
1072  using namespace cgicc;
1073  Cgicc cgi(in);
1074  std::vector<FormEntry> el1;
1075  cgi.getElement("module",el1);
1076  if(evtProcessor_) {
1077  if(el1.size()!=0) {
1078  std::string mod = el1[0].getValue();
1080  ModuleWebRegistry *mwr = 0;
1081  try{
1083  mwr = edm::Service<ModuleWebRegistry>().operator->();
1084  }
1085  catch(...) {
1086  LOG4CPLUS_WARN(log_,
1087  "Exception when trying to get service ModuleWebRegistry");
1088  }
1089  mwr->invoke(in,out,mod);
1090  }
1091  }
1092  else {
1093  *out<<"EventProcessor just disappeared "<<std::endl;
1094  }
1095  }
bool isAvailable() const
Definition: Service.h:47
tuple out
Definition: dbtoconf.py:99
log4cplus::Logger log_
Definition: FWEPWrapper.h:158
ServiceToken getToken()
edm::EventProcessor * evtProcessor_
Definition: FWEPWrapper.h:147
T mod(const T &a, const T &b)
Definition: ecalDccMap.h:4
bool evf::FWEPWrapper::monitoring ( toolbox::task::WorkLoop *  wl)

Definition at line 647 of file FWEPWrapper.cc.

References edm::EventProcessor::currentStateName(), epMAltState_, epmAltState_, epMState_, epmState_, evtProcessor_, evf::MicroStateService::getMicroState2(), edm::EventProcessor::getState(), hasSubProcesses, log_, lsid_, lumiSectionIndex_, modmap_, monitorInfoSpace_, monSleepSec_, nbAccepted_, nbProcessed_, cppFunctionSkipper::operator, prescaleSetIndex_, psid_, serviceToken_, edm::event_processor::sInit, stor::utils::sleep(), edm::EventProcessor::totalEvents(), and edm::EventProcessor::totalEventsPassed().

Referenced by evf::FUEventProcessor::receivingAndMonitor(), and startMonitoringWorkLoop().

648  {
649 
650  struct timeval monEndTime;
651  struct timezone timezone;
652  gettimeofday(&monEndTime,&timezone);
654  MicroStateService *mss = 0;
655  if(!hasSubProcesses) monitorInfoSpace_->lock();
656  if(evtProcessor_)
657  {
660  }
661  else
662  {
663  epMState_ = "Off";
664  epMAltState_ = -1;
665  }
667  {
668  try{
670  }
671  catch(...) {
672  LOG4CPLUS_INFO(log_,
673  "exception when trying to get service MicroStateService");
674  }
675  lsid_ = lumiSectionIndex_.value_;
676  psid_ = prescaleSetIndex_.value_;
677  }
678  if(mss)
679  {
680  epmState_ = mss->getMicroState2();
681  epmAltState_ = modmap_[mss->getMicroState2()];
682  }
683  if(evtProcessor_)
684  {
687  }
688  if(!hasSubProcesses) monitorInfoSpace_->unlock();
689 
690  ::sleep(monSleepSec_.value_);
691  return true;
692  }
event_processor::State getState() const
xdata::String epMState_
Definition: FWEPWrapper.h:184
xdata::Integer epmAltState_
Definition: FWEPWrapper.h:197
void sleep(Duration_t)
Definition: Utils.h:163
unsigned int lsid_
Definition: FWEPWrapper.h:210
edm::ServiceToken serviceToken_
Definition: FWEPWrapper.h:149
xdata::String epmState_
Definition: FWEPWrapper.h:185
unsigned int psid_
Definition: FWEPWrapper.h:211
xdata::InfoSpace * monitorInfoSpace_
Definition: FWEPWrapper.h:168
int totalEvents() const
std::map< std::string, int > modmap_
Definition: FWEPWrapper.h:175
char const * currentStateName() const
xdata::UnsignedInteger32 lumiSectionIndex_
Definition: FWEPWrapper.h:219
xdata::UnsignedInteger32 nbProcessed_
Definition: FWEPWrapper.h:186
log4cplus::Logger log_
Definition: FWEPWrapper.h:158
xdata::UnsignedInteger32 monSleepSec_
Definition: FWEPWrapper.h:180
xdata::UnsignedInteger32 prescaleSetIndex_
Definition: FWEPWrapper.h:220
edm::EventProcessor * evtProcessor_
Definition: FWEPWrapper.h:147
xdata::Integer epMAltState_
Definition: FWEPWrapper.h:196
int totalEventsPassed() const
xdata::UnsignedInteger32 nbAccepted_
Definition: FWEPWrapper.h:187
int evf::FWEPWrapper::notstarted_state_code ( ) const
inline

Definition at line 132 of file FWEPWrapper.h.

References notstarted_state_code_.

Referenced by evf::FUEventProcessor::supervisor().

132 { return notstarted_state_code_;}
int notstarted_state_code_
Definition: FWEPWrapper.h:242
evf::FWEPWrapper::operator bool ( )
inline

Definition at line 63 of file FWEPWrapper.h.

References epInitialized_.

63 {return epInitialized_;}
edm::EventProcessor* evf::FWEPWrapper::operator-> ( )
inline

Definition at line 62 of file FWEPWrapper.h.

References evtProcessor_.

62 {return evtProcessor_;}
edm::EventProcessor * evtProcessor_
Definition: FWEPWrapper.h:147
void evf::FWEPWrapper::publishConfigAndMonitorItems ( bool  multi)

Definition at line 112 of file FWEPWrapper.cc.

References applicationInfoSpace_, epMState_, epmState_, evtProcessor_, evf::fuep::TriggerReportHelpers::getPathLegenda(), evf::fuep::TriggerReportHelpers::getTable(), i, instance_, lastLumiPrescaleIndex_, lastLumiUsingEol_, lsTimedOut_, lsTimeOut_, lsToBeRecovered_, lumiSectionIndex_, macro_state_legend_, mapmod_, micro_state_legend_, modmap_, monitorInfoSpace_, monitorLegendaInfoSpace_, monSleepSec_, notstarted_state_code_, prescaleSetIndex_, publishConfigAndMonitorItemsSP(), scalersComplete_, scalersInfoSpace_, scalersLegendaInfoSpace_, edm::event_processor::sInit, edm::event_processor::sInvalid, edm::EventProcessor::stateName(), statmod_, timeoutOnStop_, and trh_.

Referenced by evf::FUEventProcessor::FUEventProcessor().

113  {
114 
115  applicationInfoSpace_->fireItemAvailable("monSleepSec", &monSleepSec_);
116  applicationInfoSpace_->fireItemAvailable("timeoutOnStop", &timeoutOnStop_);
117  applicationInfoSpace_->fireItemAvailable("lsTimeOut", &lsTimeOut_);
118 
119  applicationInfoSpace_->fireItemAvailable("lumiSectionIndex", &lumiSectionIndex_);
120  applicationInfoSpace_->fireItemAvailable("prescaleSetIndex", &prescaleSetIndex_);
121  applicationInfoSpace_->fireItemAvailable("lastLumiPrescaleIndex", &lastLumiPrescaleIndex_);
122  applicationInfoSpace_->fireItemAvailable("lastLumiUsingEol", &lastLumiUsingEol_);
123  applicationInfoSpace_->fireItemAvailable("lsTimedOut", &lsTimedOut_);
124  applicationInfoSpace_->fireItemAvailable("lsToBeRecovered", &lsToBeRecovered_);
125 
126  monitorLegendaInfoSpace_->fireItemAvailable("macroStateLegenda", &macro_state_legend_);
127  monitorLegendaInfoSpace_->fireItemAvailable("microStateLegenda", &micro_state_legend_);
128 
129  monitorInfoSpace_->fireItemAvailable("epMacroState", &epMState_);
130  monitorInfoSpace_->fireItemAvailable("epMicroState", &epmState_);
131 
132  xdata::Table &stbl = trh_.getTable();
133  scalersInfoSpace_->fireItemAvailable("scalersTable", &stbl);
134  scalersInfoSpace_->fireItemAvailable("lumiSectionIndex", &lumiSectionIndex_);
135  scalersInfoSpace_->fireItemAvailable("prescaleSetIndex", &prescaleSetIndex_);
136  scalersInfoSpace_->fireItemAvailable("lastLumiPrescaleIndex", &lastLumiPrescaleIndex_);
137  scalersInfoSpace_->fireItemAvailable("lastLumiUsingEol", &lastLumiUsingEol_);
138  scalersLegendaInfoSpace_->fireItemAvailable("scalersLegenda", trh_.getPathLegenda());
139 
140  scalersComplete_.addColumn("instance", "unsigned int 32");
141  scalersComplete_.addColumn("lsid", "unsigned int 32");
142  scalersComplete_.addColumn("psid", "unsigned int 32");
143  scalersComplete_.addColumn("proc", "unsigned int 32");
144  scalersComplete_.addColumn("acc", "unsigned int 32");
145  scalersComplete_.addColumn("exprep", "unsigned int 32");
146  scalersComplete_.addColumn("effrep", "unsigned int 32");
147  scalersComplete_.addColumn("triggerReport", "table");
148 
149  xdata::Table::iterator it = scalersComplete_.begin();
150  if( it == scalersComplete_.end())
151  {
152  it = scalersComplete_.append();
153  it->setField("instance",instance_);
154  }
155 
156 
157  //fill initial macrostate legenda information
158  unsigned int i = 0;
159  std::stringstream oss;
160  for(i = (unsigned int)edm::event_processor::sInit; i < (unsigned int)edm::event_processor::sInvalid; i++)
161  {
162  oss << i << "=" << evtProcessor_->stateName((edm::event_processor::State) i) << " ";
164  }
165  oss << i << "=" << "NotStarted ";
166  statmod_.push_back("NotStarted");
168  std::stringstream oss2;
169  oss2 << 0 << "=Invalid ";
170  modmap_["Invalid"]=0;
171  mapmod_.resize(1);
172  mapmod_[0]="Invalid";
173 
174  monitorInfoSpace_->lock();
175  macro_state_legend_ = oss.str();
176  micro_state_legend_ = oss2.str();
177  monitorInfoSpace_->unlock();
178 
180 
181  }
xdata::InfoSpace * monitorLegendaInfoSpace_
Definition: FWEPWrapper.h:169
xdata::String macro_state_legend_
Definition: FWEPWrapper.h:201
int i
Definition: DBlmapReader.cc:9
xdata::String epMState_
Definition: FWEPWrapper.h:184
xdata::InfoSpace * scalersInfoSpace_
Definition: FWEPWrapper.h:213
xdata::UnsignedInteger32 lastLumiPrescaleIndex_
Definition: FWEPWrapper.h:221
xdata::Boolean lsToBeRecovered_
Definition: FWEPWrapper.h:224
xdata::InfoSpace * scalersLegendaInfoSpace_
Definition: FWEPWrapper.h:214
std::vector< std::string > mapmod_
Definition: FWEPWrapper.h:176
int notstarted_state_code_
Definition: FWEPWrapper.h:242
xdata::Boolean lsTimedOut_
Definition: FWEPWrapper.h:223
std::vector< std::string > statmod_
Definition: FWEPWrapper.h:177
xdata::String epmState_
Definition: FWEPWrapper.h:185
xdata::Table scalersComplete_
Definition: FWEPWrapper.h:217
xdata::String micro_state_legend_
Definition: FWEPWrapper.h:202
xdata::InfoSpace * monitorInfoSpace_
Definition: FWEPWrapper.h:168
std::map< std::string, int > modmap_
Definition: FWEPWrapper.h:175
char const * stateName(event_processor::State s) const
xdata::UnsignedInteger32 lumiSectionIndex_
Definition: FWEPWrapper.h:219
xdata::UnsignedInteger32 lastLumiUsingEol_
Definition: FWEPWrapper.h:222
xdata::UnsignedInteger32 instance_
Definition: FWEPWrapper.h:238
xdata::UnsignedInteger32 monSleepSec_
Definition: FWEPWrapper.h:180
void publishConfigAndMonitorItemsSP()
Definition: FWEPWrapper.cc:183
xdata::UnsignedInteger32 prescaleSetIndex_
Definition: FWEPWrapper.h:220
fuep::TriggerReportHelpers trh_
Definition: FWEPWrapper.h:157
edm::EventProcessor * evtProcessor_
Definition: FWEPWrapper.h:147
xdata::InfoSpace * applicationInfoSpace_
Definition: FWEPWrapper.h:165
xdata::UnsignedInteger32 lsTimeOut_
Definition: FWEPWrapper.h:216
xdata::UnsignedInteger32 timeoutOnStop_
Definition: FWEPWrapper.h:172
void evf::FWEPWrapper::publishConfigAndMonitorItemsSP ( )

Definition at line 183 of file FWEPWrapper.cc.

References epMAltState_, epmAltState_, monitorInfoSpace_, nbAccepted_, and nbProcessed_.

Referenced by publishConfigAndMonitorItems().

184  {
185  monitorInfoSpace_->fireItemAvailable("epSPMacroStateInt", &epMAltState_);
186  monitorInfoSpace_->fireItemAvailable("epSPMicroStateInt", &epmAltState_);
187 
188  monitorInfoSpace_->fireItemAvailable("nbProcessed", &nbProcessed_);
189  monitorInfoSpace_->fireItemAvailable("nbAccepted", &nbAccepted_);
190  }
xdata::Integer epmAltState_
Definition: FWEPWrapper.h:197
xdata::InfoSpace * monitorInfoSpace_
Definition: FWEPWrapper.h:168
xdata::UnsignedInteger32 nbProcessed_
Definition: FWEPWrapper.h:186
xdata::Integer epMAltState_
Definition: FWEPWrapper.h:196
xdata::UnsignedInteger32 nbAccepted_
Definition: FWEPWrapper.h:187
void evf::FWEPWrapper::resetLumiSectionReferenceIndex ( )
inline
void evf::FWEPWrapper::resetPackedTriggerReport ( )
inline
void evf::FWEPWrapper::resetTriggerReport ( )
inline

Definition at line 113 of file FWEPWrapper.h.

References evf::fuep::TriggerReportHelpers::resetTriggerReport(), and trh_.

fuep::TriggerReportHelpers trh_
Definition: FWEPWrapper.h:157
void evf::FWEPWrapper::resetWaiting ( )
inline

Definition at line 134 of file FWEPWrapper.h.

References waitingForLs_.

Referenced by evf::FUEventProcessor::enableForkInEDM(), and evf::FUEventProcessor::enableMPEPSlave().

134 {waitingForLs_ = false;}
void evf::FWEPWrapper::serviceWeb ( xgi::Input in,
xgi::Output out 
)

Definition at line 1099 of file FWEPWrapper.cc.

References evtProcessor_, edm::EventProcessor::getToken(), edm::Service< T >::isAvailable(), log_, and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by evf::FUEventProcessor::serviceWeb().

1100  {
1101  using namespace cgicc;
1102  Cgicc cgi(in);
1103  std::vector<FormEntry> el1;
1104  cgi.getElement("service",el1);
1105  if(evtProcessor_) {
1106  if(el1.size()!=0) {
1107  std::string ser = el1[0].getValue();
1109  ServiceWebRegistry *swr = 0;
1110  try{
1112  swr = edm::Service<ServiceWebRegistry>().operator->();
1113  }
1114  catch(...) {
1115  LOG4CPLUS_WARN(log_,
1116  "Exception when trying to get service ModuleWebRegistry");
1117  }
1118  swr->invoke(in,out,ser);
1119  }
1120  }
1121  else {
1122  *out<<"EventProcessor just disappeared "<<std::endl;
1123  }
1124  }
bool isAvailable() const
Definition: Service.h:47
tuple out
Definition: dbtoconf.py:99
log4cplus::Logger log_
Definition: FWEPWrapper.h:158
ServiceToken getToken()
edm::EventProcessor * evtProcessor_
Definition: FWEPWrapper.h:147
void evf::FWEPWrapper::setAppCtxt ( xdaq::ApplicationContext *  ctx)
inline

Definition at line 91 of file FWEPWrapper.h.

References xappCtxt_.

Referenced by evf::FUEventProcessor::FUEventProcessor().

91 {xappCtxt_ = ctx;}
xdaq::ApplicationContext * xappCtxt_
Definition: FWEPWrapper.h:235
void evf::FWEPWrapper::setAppDesc ( xdaq::ApplicationDescriptor *  ad)
inline

Definition at line 90 of file FWEPWrapper.h.

References xappDesc_.

Referenced by evf::FUEventProcessor::FUEventProcessor().

90 {xappDesc_ = ad;}
xdaq::ApplicationDescriptor * xappDesc_
Definition: FWEPWrapper.h:234
void evf::FWEPWrapper::setApplicationInfoSpace ( xdata::InfoSpace *  is)
inline

Definition at line 82 of file FWEPWrapper.h.

References applicationInfoSpace_.

Referenced by evf::FUEventProcessor::FUEventProcessor().

xdata::InfoSpace * applicationInfoSpace_
Definition: FWEPWrapper.h:165
void evf::FWEPWrapper::setMonitorInfoSpace ( xdata::InfoSpace *  mis,
xdata::InfoSpace *  mlis 
)
inline

Definition at line 83 of file FWEPWrapper.h.

References monitorInfoSpace_, and monitorLegendaInfoSpace_.

Referenced by evf::FUEventProcessor::FUEventProcessor().

84  {
85  monitorInfoSpace_ = mis;
87  }
xdata::InfoSpace * monitorLegendaInfoSpace_
Definition: FWEPWrapper.h:169
xdata::InfoSpace * monitorInfoSpace_
Definition: FWEPWrapper.h:168
void evf::FWEPWrapper::setMonitorInfoSpaceLegend ( xdata::InfoSpace *  is)
inline

Definition at line 88 of file FWEPWrapper.h.

References monitorInfoSpaceLegend_.

xdata::InfoSpace * monitorInfoSpaceLegend_
Definition: FWEPWrapper.h:170
void evf::FWEPWrapper::setRcms ( xdaq::ApplicationDescriptor *  rcms)
inline

Definition at line 89 of file FWEPWrapper.h.

References rcms_.

Referenced by evf::FUEventProcessor::FUEventProcessor().

89 {rcms_ = rcms;}
xdaq::ApplicationDescriptor * rcms_
Definition: FWEPWrapper.h:233
void evf::FWEPWrapper::setScalersInfoSpace ( xdata::InfoSpace *  sis,
xdata::InfoSpace *  slis 
)
inline

Definition at line 77 of file FWEPWrapper.h.

References scalersInfoSpace_, and scalersLegendaInfoSpace_.

Referenced by evf::FUEventProcessor::FUEventProcessor().

78  {
79  scalersInfoSpace_ = sis;
81  }
xdata::InfoSpace * scalersInfoSpace_
Definition: FWEPWrapper.h:213
xdata::InfoSpace * scalersLegendaInfoSpace_
Definition: FWEPWrapper.h:214
void evf::FWEPWrapper::setupFastTimerService ( unsigned int  nProcesses)

Definition at line 497 of file FWEPWrapper.cc.

References ftsRef_, and FastTimerService::setNumberOfProcesses().

Referenced by evf::FUEventProcessor::configuring(), and evf::FUEventProcessor::enabling().

498  {
499  if (ftsRef_) ftsRef_->setNumberOfProcesses( nProcesses );
500  }
void setNumberOfProcesses(unsigned int)
FastTimerService * ftsRef_
Definition: FWEPWrapper.h:245
void evf::FWEPWrapper::startMonitoringWorkLoop ( )
throw (evf::Exception
)

Definition at line 614 of file FWEPWrapper.cc.

References asMonitoring_, alignCSCRings::e, edm::hlt::Exception, monitoring(), monStartTime_, lumiQueryAPI::msg, nbAccepted_, nbProcessed_, evf::utils::pid, AlCaHLTBitMon_QueryRunRegistry::string, wlMonitoring_, and wlMonitoringActive_.

Referenced by evf::FUEventProcessor::configuring().

615  {
616  pid_t pid = getpid();
617  nbProcessed_.value_ = 0;
618  nbAccepted_.value_ = 0;
619  struct timezone timezone;
620  gettimeofday(&monStartTime_,&timezone);
621 
622  std::ostringstream ost;
623  ost << "Monitoring" << pid;
624  try {
626  toolbox::task::getWorkLoopFactory()->getWorkLoop(ost.str().c_str(),
627  "waiting");
628 
629  if (!wlMonitoring_->isActive()) wlMonitoring_->activate();
630  asMonitoring_ = toolbox::task::bind(this,&FWEPWrapper::monitoring,
631  ost.str().c_str());
632 
633  wlMonitoring_->submit(asMonitoring_);
634  wlMonitoringActive_ = true;
635 
636  }
637  catch (xcept::Exception& e) {
638  std::string msg = "Failed to start workloop 'Monitoring'.";
639 
640  XCEPT_RETHROW(evf::Exception,msg,e);
641  }
642  }
struct timeval monStartTime_
Definition: FWEPWrapper.h:181
toolbox::task::WorkLoop * wlMonitoring_
Definition: FWEPWrapper.h:190
bool monitoring(toolbox::task::WorkLoop *wl)
Definition: FWEPWrapper.cc:647
xdata::UnsignedInteger32 nbProcessed_
Definition: FWEPWrapper.h:186
toolbox::task::ActionSignature * asMonitoring_
Definition: FWEPWrapper.h:191
bool wlMonitoringActive_
Definition: FWEPWrapper.h:192
xdata::UnsignedInteger32 nbAccepted_
Definition: FWEPWrapper.h:187
std::string const& evf::FWEPWrapper::stateNameFromIndex ( unsigned int  i) const
inline

Definition at line 127 of file FWEPWrapper.h.

References statmod_, and unknown.

Referenced by evf::FUEventProcessor::microState(), and evf::FUEventProcessor::supervisor().

128  {
129  if(i<statmod_.size()) return statmod_[i];
130  else return unknown;
131  }
int i
Definition: DBlmapReader.cc:9
static const std::string unknown
Definition: FWEPWrapper.h:146
std::vector< std::string > statmod_
Definition: FWEPWrapper.h:177
edm::EventProcessor::StatusCode evf::FWEPWrapper::stop ( )

Definition at line 503 of file FWEPWrapper.cc.

References allPastLumiProcessed_, alignCSCRings::e, edm::IEventProcessor::epOther, edm::IEventProcessor::epSuccess, evtProcessor_, cppFunctionSkipper::exception, cms::Exception::explainSelf(), edm::EventProcessor::getState(), log_, edm::event_processor::sDone, edm::event_processor::sJobReady, edm::event_processor::sStopping, edm::EventProcessor::stateName(), timeoutOnStop_, edm::EventProcessor::waitTillDoneAsync(), and watching_.

Referenced by stopAndHalt(), and evf::FUEventProcessor::stopClassic().

504  {
506 
507  LOG4CPLUS_WARN(log_,"FUEventProcessor::stopEventProcessor.1 state "
508  << evtProcessor_->stateName(st));
510 
511  //total stopping time allowed before epTimeout/epOther
512  unsigned int stopTimeLeft = (timeoutOnStop_.value_+1)*1000000;
513  if (timeoutOnStop_.value_==0) stopTimeLeft=1500000;
514 
516  || st==edm::event_processor::sDone)) {
517  usleep(100000);
518  st = evtProcessor_->getState();
519  if (stopTimeLeft<500000) {
520  break;
521  }
522  stopTimeLeft-=100000;
523  }
524  //if already in stopped state
527 
528  //if not even in stopping state
530  LOG4CPLUS_WARN(log_,
531  "FUEventProcessor::stopEventProcessor.2 After 1s - state: "
532  << evtProcessor_->stateName(st));
534  }
535  LOG4CPLUS_WARN(log_,"FUEventProcessor::stopEventProcessor.3 state "
536  << evtProcessor_->stateName(st));
537 
538  //use remaining time left for the framework timeout
539  if (stopTimeLeft<1000000) stopTimeLeft=1000000;
540  stopTimeLeft/=1000000;
541  if (timeoutOnStop_.value_==0) stopTimeLeft=0;
542 
543  try {
544  rc = evtProcessor_->waitTillDoneAsync(stopTimeLeft);
545  watching_ = false;
546  }
547  catch(cms::Exception &e) {
548  XCEPT_RAISE(evf::Exception,e.explainSelf());
549  }
550  catch(std::exception &e) {
551  XCEPT_RAISE(evf::Exception,e.what());
552  }
553  catch(...) {
554  XCEPT_RAISE(evf::Exception,"Unknown Exception");
555  }
557  return rc;
558 
559  }
event_processor::State getState() const
virtual std::string explainSelf() const
Definition: Exception.cc:146
StatusCode waitTillDoneAsync(unsigned int timeout_seconds=0)
char const * stateName(event_processor::State s) const
unsigned int allPastLumiProcessed_
Definition: FWEPWrapper.h:205
log4cplus::Logger log_
Definition: FWEPWrapper.h:158
edm::EventProcessor * evtProcessor_
Definition: FWEPWrapper.h:147
xdata::UnsignedInteger32 timeoutOnStop_
Definition: FWEPWrapper.h:172
void evf::FWEPWrapper::stopAndHalt ( )

Definition at line 561 of file FWEPWrapper.cc.

References allPastLumiProcessed_, evf::ServiceWebRegistry::clear(), evf::ModuleWebRegistry::clear(), edm::EventProcessor::endJob(), ep_guard_lock_, epInitialized_, edm::IEventProcessor::epTimedOut, evtProcessor_, edm::EventProcessor::getState(), log_, cppFunctionSkipper::operator, edm::event_processor::sDone, serviceToken_, edm::event_processor::sJobReady, stop(), and watching_.

Referenced by evf::FUEventProcessor::halting().

562  {
564  ModuleWebRegistry *mwr = 0;
565  try{
566  if(edm::Service<ModuleWebRegistry>().isAvailable())
568  }
569  catch(...) {
570  LOG4CPLUS_INFO(log_,
571  "exception when trying to get service ModuleWebRegistry");
572  }
573 
574  if(mwr)
575  {
576  mwr->clear();
577  }
578 
579  ServiceWebRegistry *swr = 0;
580  try{
581  if(edm::Service<ServiceWebRegistry>().isAvailable())
583  }
584  catch(...) {
585  LOG4CPLUS_INFO(log_,
586  "exception when trying to get service ModuleWebRegistry");
587  }
588 
589  if(swr)
590  {
591  swr->clear();
592  }
593 
596  watching_ = false;
598  {
601  pthread_mutex_lock(&ep_guard_lock_);
602  delete evtProcessor_;
603  evtProcessor_ = 0;
604  pthread_mutex_unlock(&ep_guard_lock_);
605  epInitialized_ = false;
606  }
607  else
608  {
609  XCEPT_RAISE(evf::Exception,"EventProcessor stop timed out");
610  }
612  }
event_processor::State getState() const
edm::ServiceToken serviceToken_
Definition: FWEPWrapper.h:149
unsigned int allPastLumiProcessed_
Definition: FWEPWrapper.h:205
edm::EventProcessor::StatusCode stop()
Definition: FWEPWrapper.cc:503
log4cplus::Logger log_
Definition: FWEPWrapper.h:158
pthread_mutex_t ep_guard_lock_
Definition: FWEPWrapper.h:241
edm::EventProcessor * evtProcessor_
Definition: FWEPWrapper.h:147
void evf::FWEPWrapper::sumAndPackTriggerReport ( MsgBuf buf)

Definition at line 1215 of file FWEPWrapper.cc.

References evf::fuep::TriggerReportHelpers::sumAndPackTriggerReport(), and trh_.

Referenced by evf::FUEventProcessor::summarize().

1216  {
1218  }
fuep::TriggerReportHelpers trh_
Definition: FWEPWrapper.h:157
void evf::FWEPWrapper::summaryWebPage ( xgi::Input in,
xgi::Output out,
const std::string &  urn 
)

Definition at line 815 of file FWEPWrapper.cc.

References evf::fuep::TriggerReportHelpers::getaccept(), evf::fuep::TriggerReportHelpers::getexcept(), evf::fuep::TriggerReportHelpers::getfailed(), evf::fuep::TriggerReportHelpers::getl1pre(), evf::fuep::TriggerReportHelpers::getLumiSectionReferenceIndex(), evf::fuep::TriggerReportHelpers::getPackedTriggerReport(), i, trh_, and evf::TriggerReportStatic::trigPathsInMenu.

Referenced by evf::FUEventProcessor::spotlightWebPage().

816  {
817  // std::string urn = xappDesc_->getURN();
818 
819  *out << "<table>" << std::endl;
820 
821  *out << "<tr valign=\"top\">" << std::endl;
822  *out << "<td>" << std::endl;
823 
824  TriggerReportStatic *tr = (TriggerReportStatic *)(trh_.getPackedTriggerReport()->mtext);
825  // trigger summary table
826  *out << "<table border=1 bgcolor=\"#CFCFCF\">" << std::endl;
827  *out << " <tr>" << std::endl;
828  *out << " <th colspan=7>" << std::endl;
829  *out << " " << "Trigger Summary up to LS "
830  << trh_.getLumiSectionReferenceIndex()-1 << std::endl;
831  *out << " </th>" << std::endl;
832  *out << " </tr>" << std::endl;
833 
834  *out << " <tr >" << std::endl;
835  *out << " <th >Path</th>" << std::endl;
836  *out << " <th >Exec</th>" << std::endl;
837  *out << " <th >Pass</th>" << std::endl;
838  *out << " <th >Fail</th>" << std::endl;
839  *out << " <th >Except</th>" << std::endl;
840  *out << " </tr>" << std::endl;
841 
842 
843  for(int i=0; i<tr->trigPathsInMenu; i++) {
844  *out << " <tr>" << std::endl;
845  *out << " <td>"<< i << "</td>" << std::endl;
846  *out << " <td>" << trh_.getl1pre(i) << "</td>" << std::endl;
847  *out << " <td>" << trh_.getaccept(i) << "</td>" << std::endl;
848  *out << " <td >" << trh_.getfailed(i) << "</td>" << std::endl;
849  *out << " <td ";
850  if(trh_.getexcept(i) !=0)
851  *out << "bgcolor=\"red\"" << std::endl;
852  *out << ">" << trh_.getexcept(i) << "</td>" << std::endl;
853  *out << " </tr >" << std::endl;
854 
855  }
856  *out << " <tr><th colspan=7>EndPaths</th></tr>" << std::endl;
857 
858  for(int i=tr->trigPathsInMenu; i<tr->endPathsInMenu + tr->trigPathsInMenu; i++) {
859  *out << " <tr>" << std::endl;
860  *out << " <td>"<< i << "</td>" << std::endl;
861  *out << " <td>" << trh_.getl1pre(i) << "</td>" << std::endl;
862  *out << " <td>" << trh_.getaccept(i) << "</td>" << std::endl;
863  *out << " <td >" << trh_.getfailed(i) << "</td>" << std::endl;
864  *out << " <td ";
865  if(trh_.getexcept(i) !=0)
866  *out << "bgcolor=\"red\"" << std::endl;
867  *out << ">" << trh_.getexcept(i) << "</td>" << std::endl;
868  *out << " </tr >" << std::endl;
869 
870  }
871 
872 
873  *out << "</table>" << std::endl;
874  *out << "</td>" << std::endl;
875  *out << "</tr>" << std::endl;
876  *out << "</table>" << std::endl;
877  }
int i
Definition: DBlmapReader.cc:9
unsigned int getfailed(unsigned int ind)
unsigned int getexcept(unsigned int ind)
unsigned int getl1pre(unsigned int ind)
tuple out
Definition: dbtoconf.py:99
unsigned int getaccept(unsigned int ind)
fuep::TriggerReportHelpers trh_
Definition: FWEPWrapper.h:157
void evf::FWEPWrapper::taskWebPage ( xgi::Input in,
xgi::Output out,
const std::string &  urn 
)

Definition at line 881 of file FWEPWrapper.cc.

References applicationInfoSpace_, evf::ModuleWebRegistry::checkWeb(), descs_, alignCSCRings::e, edm::TriggerReport::endPathSummaries, evtProcessor_, edm::hlt::Exception, evf::fuep::TriggerReportHelpers::findLabelOfModuleTypeInEndPath(), evf::ShmOutputModuleRegistry::get(), evf::TimeProfilerService::getAve(), evf::OutputModule::getCounts(), evf::TimeProfilerService::getFirst(), evf::TimeProfilerService::getMax(), edm::service::PrescaleService::getPrescale(), edm::EventProcessor::getToken(), edm::EventProcessor::getTriggerReport(), i, edm::Service< T >::isAvailable(), log_, python.connectstrParser::o, cppFunctionSkipper::operator, prescaleSvc_, AlCaHLTBitMon_QueryRunRegistry::string, trh_, and edm::TriggerReport::trigPathSummaries.

Referenced by evf::FUEventProcessor::spotlightWebPage().

882  {
883  // std::string urn = xappDesc_->getURN();
884  ModuleWebRegistry *mwr = 0;
886  try{
888  mwr = edm::Service<ModuleWebRegistry>().operator->();
889  }
890  catch(...) {
891  LOG4CPLUS_WARN(log_,
892  "Exception when trying to get service ModuleWebRegistry");
893  }
894  TimeProfilerService *tpr = 0;
895  try{
896  if(edm::Service<TimeProfilerService>().isAvailable())
898  }
899  catch(...) {
900  }
901 
902  *out << "<table>" << std::endl;
903 
904  *out << "<tr valign=\"top\">" << std::endl;
905  *out << "<td>" << std::endl;
906 
907 
908  edm::TriggerReport tr;
910 
911  // trigger summary table
912  *out << "<table border=1 bgcolor=\"#CFCFCF\">" << std::endl;
913  *out << " <tr>" << std::endl;
914  *out << " <th colspan=7>" << std::endl;
915  *out << " " << "Trigger Summary" << std::endl;
916  *out << " </th>" << std::endl;
917  *out << " </tr>" << std::endl;
918 
919  *out << " <tr >" << std::endl;
920  *out << " <th >Path</th>" << std::endl;
921  *out << " <th >Exec</th>" << std::endl;
922  *out << " <th >Pass</th>" << std::endl;
923  *out << " <th >Fail</th>" << std::endl;
924  *out << " <th >Except</th>" << std::endl;
925  *out << " <th >TargetPF</th>" << std::endl;
926  *out << " </tr>" << std::endl;
927  xdata::Serializable *psid = 0;
928  try{
929  psid = applicationInfoSpace_->find("prescaleSetIndex");
930  }
932  }
933  ShmOutputModuleRegistry *sor = 0;
934  try{
935  if(edm::Service<ShmOutputModuleRegistry>().isAvailable())
937  }
938  catch(...) {
939  LOG4CPLUS_INFO(log_,
940  "exception when trying to get service ShmOutputModuleRegistry");
941  }
942 
943 
944  for(unsigned int i=0; i<tr.trigPathSummaries.size(); i++) {
945  *out << " <tr>" << std::endl;
946  *out << " <td>"<< tr.trigPathSummaries[i].name << "</td>" << std::endl;
947  *out << " <td>" << tr.trigPathSummaries[i].timesRun << "</td>" << std::endl;
948 
949  *out << " <td>" << tr.trigPathSummaries[i].timesPassed << "</td>" << std::endl;
950  *out << " <td >" << tr.trigPathSummaries[i].timesFailed << "</td>" << std::endl;
951 
952  *out << " <td ";
953  if(tr.trigPathSummaries[i].timesExcept !=0)
954  *out << "bgcolor=\"red\"" << std::endl;
955  *out << ">" << tr.trigPathSummaries[i].timesExcept << "</td>" << std::endl;
956  if(psid != 0)
957  {
958  *out << " <td>"
960  << "</td>" << std::endl;
961  }
962  else *out << " <td>N/A</td>" << std::endl;
963  *out << " </tr >" << std::endl;
964 
965  }
966 
967 
968 
969  for(unsigned int i=0; i<tr.endPathSummaries.size(); i++) {
971  i,"ShmStreamConsumer");
972  evf::OutputModule *o = sor->get(olab);
973  *out << " <tr>" << std::endl;
974  *out << " <td>"<< tr.endPathSummaries[i].name << "</td>" << std::endl;
975  *out << " <td>" << tr.endPathSummaries[i].timesRun << "</td>" << std::endl;
976  *out << " <td>" << (o ? o->getCounts() : -1) << "</td>" << std::endl;
977  *out << " <td >" << (o ? (tr.endPathSummaries[i].timesRun - o->getCounts()) : -1) << "</td>" << std::endl;
978  *out << " <td ";
979  if(tr.endPathSummaries[i].timesExcept !=0)
980  *out << "bgcolor=\"red\"" << std::endl;
981  *out << ">" << tr.endPathSummaries[i].timesExcept << "</td>" << std::endl;
982  *out << " <td>N/A</td>" << std::endl;
983  *out << " </tr >" << std::endl;
984 
985  }
986 
987  *out << "</table>" << std::endl;
988 
989  *out << "</td>" << std::endl;
990 
991 
992 
993  *out << "<td>" << std::endl;
994  //Process details table
995  *out << "<table frame=\"void\" rules=\"rows\" class=\"modules\">" << std::endl;
996  *out << " <tr>" << std::endl;
997  *out << " <th colspan=3>" << std::endl;
998  *out << " " << "HLT" << std::endl;
999  if(descs_.size()>0)
1000  *out << " (Process " << descs_[0]->processName() << ")" << std::endl;
1001  *out << " </th>" << std::endl;
1002  *out << " </tr>" << std::endl;
1003 
1004  *out << " <tr >" << std::endl;
1005  *out << " <th >" << std::endl;
1006  *out << " Module" << std::endl;
1007  *out << " </th>" << std::endl;
1008  *out << " <th >" << std::endl;
1009  *out << " Label" << std::endl;
1010  *out << " </th>" << std::endl;
1011  *out << " <th >" << std::endl;
1012  *out << " Version" << std::endl;
1013  *out << " </th>" << std::endl;
1014  if(tpr)
1015  {
1016  *out << " <th >" << std::endl;
1017  *out << " first" << std::endl;
1018  *out << " </th>" << std::endl;
1019  *out << " <th >" << std::endl;
1020  *out << " ave" << std::endl;
1021  *out << " </th>" << std::endl;
1022  *out << " <th >" << std::endl;
1023  *out << " max" << std::endl;
1024  *out << " </th>" << std::endl;
1025  }
1026  *out << " </tr>" << std::endl;
1027  if(mwr && mwr->checkWeb("DaqSource"))
1028  *out << " <tr><td ><a href=\"/" << urn
1029  << "module=DaqSource\">DaqSource</a> </td></tr>";
1030 
1031  for(unsigned int idesc = 0; idesc < descs_.size(); idesc++)
1032  {
1033  *out << " <tr>" << std::endl;
1034  *out << " <td >";
1035  if(mwr && mwr->checkWeb(descs_[idesc]->moduleName()))
1036  *out << "<a href=\"/" << urn
1037  << "module="
1038  << descs_[idesc]->moduleName() << "\">"
1039  << descs_[idesc]->moduleName() << "</a>";
1040  else
1041  *out << descs_[idesc]->moduleName();
1042  *out << "</td>" << std::endl;
1043  *out << " <td >";
1044  *out << descs_[idesc]->moduleLabel();
1045  *out << "</td>" << std::endl;
1046  *out << " <td >";
1047  *out << descs_[idesc]->releaseVersion();
1048  *out << "</td>" << std::endl;
1049  if(tpr)
1050  {
1051  *out << " <td align=\"right\">";
1052  *out << tpr->getFirst(descs_[idesc]->moduleLabel());
1053  *out << "</td>" << std::endl;
1054  *out << " <td align=\"right\"";
1055  *out << (tpr->getAve(descs_[idesc]->moduleLabel())>1. ? "bgcolor=\"red\"" : "")
1056  << ">";
1057  *out << tpr->getAve(descs_[idesc]->moduleLabel());
1058  *out << "</td>" << std::endl;
1059  *out << " <td align=\"right\">";
1060  *out << tpr->getMax(descs_[idesc]->moduleLabel());
1061  *out << "</td>" << std::endl;
1062  }
1063  *out << " </tr>" << std::endl;
1064  }
1065  *out << "</table>" << std::endl;
1066  *out << "</td>" << std::endl;
1067  }
std::vector< PathSummary > endPathSummaries
Definition: TriggerReport.h:65
int i
Definition: DBlmapReader.cc:9
std::string findLabelOfModuleTypeInEndPath(edm::TriggerReport &, std::vector< edm::ModuleDescription const * > &, unsigned int, std::string)
std::vector< PathSummary > trigPathSummaries
Definition: TriggerReport.h:64
bool isAvailable() const
Definition: Service.h:47
tuple out
Definition: dbtoconf.py:99
std::vector< edm::ModuleDescription const * > descs_
Definition: FWEPWrapper.h:174
log4cplus::Logger log_
Definition: FWEPWrapper.h:158
ServiceToken getToken()
edm::service::PrescaleService * prescaleSvc_
Definition: FWEPWrapper.h:155
fuep::TriggerReportHelpers trh_
Definition: FWEPWrapper.h:157
edm::EventProcessor * evtProcessor_
Definition: FWEPWrapper.h:147
virtual unsigned int getCounts()=0
xdata::InfoSpace * applicationInfoSpace_
Definition: FWEPWrapper.h:165
void getTriggerReport(TriggerReport &rep) const
unsigned int getPrescale(unsigned int lvl1Index, std::string const &prescaledPath)
void evf::FWEPWrapper::updateRollingReport ( )

Definition at line 1219 of file FWEPWrapper.cc.

References evf::lsTriplet::acc, applicationInfoSpace_, gather_cfg::cout, alignCSCRings::e, evf::TriggerReportStatic::eventSummary, edm::hlt::Exception, evf::fuep::TriggerReportHelpers::getAccThisLumi(), evf::fuep::TriggerReportHelpers::getPackedTriggerReportAsStruct(), evf::fuep::TriggerReportHelpers::getProcThisLumi(), evf::fuep::TriggerReportHelpers::getTableWithNames(), evf::lsTriplet::ls, lsid_, lsRollSize_, lst, evf::TriggerReportStatic::lumiSection, lumiSectionsCtr_, evf::fuep::TriggerReportHelpers::packedTriggerReportToTable(), evf::TriggerReportStatic::prescaleIndex, evf::lsTriplet::proc, rollingLsIndex_, rollingLsWrap_, scalersComplete_, edm::EventSummary::totalEvents, edm::EventSummary::totalEventsPassed, and trh_.

Referenced by evf::FUEventProcessor::summarize().

1220  {
1223  rollingLsIndex_--;
1224  xdata::UnsignedInteger32* lsp = 0;
1225  xdata::UnsignedInteger32* psp = 0;
1226  TriggerReportStatic *tr = trh_.getPackedTriggerReportAsStruct();
1227  lsTriplet lst;
1228  lst.ls = tr->lumiSection;
1229  lsid_ = tr->lumiSection;
1230  lst.proc = tr->eventSummary.totalEvents;
1231  lst.acc = tr->eventSummary.totalEventsPassed;
1232  xdata::Serializable *psid = 0;
1233  xdata::Serializable *lsid = 0;
1234  xdata::Serializable *nbs = 0;
1235  xdata::Serializable *nbsr = 0;
1236  try{
1237  lsid =applicationInfoSpace_->find("lumiSectionIndex");
1238  if(lsid!=0){
1239  lsp = ((xdata::UnsignedInteger32*)lsid);
1240  lsp->value_= tr->lumiSection;
1241  }
1242  psid = applicationInfoSpace_->find("lastLumiPrescaleIndex");
1243  if(psid!=0) {
1244  psp = ((xdata::UnsignedInteger32*)psid);
1245  if(tr->eventSummary.totalEvents != 0)
1246  psp->value_ = tr->prescaleIndex;
1247  }
1248  nbs = applicationInfoSpace_->find("nbSubProcesses");
1249  nbsr = applicationInfoSpace_->find("nbSubProcessesReporting");
1250  }
1252  }
1253 
1254  xdata::Table::iterator it = scalersComplete_.begin();
1255  if(lsp)
1256  it->setField("lsid", *lsp);
1257  if(psp)
1258  it->setField("psid", *psp);
1259  if(nbs)
1260  it->setField("exprep", *nbs);
1261  else
1262  std::cout << "nbSubProcesses item not found !!!" << std::endl;
1263  if(nbsr)
1264  it->setField("effrep", *nbsr);
1265  else
1266  std::cout << "nbSubProcessesReporting item not found !!!" << std::endl;
1267 
1268  it->setField("proc",trh_.getProcThisLumi());
1269  it->setField("acc",trh_.getAccThisLumi());
1270  it->setField("triggerReport",trh_.getTableWithNames());
1272 
1273  }
TriggerReportStatic * getPackedTriggerReportAsStruct()
int lst[30]
xdata::UnsignedInteger32 & getProcThisLumi()
static const unsigned int lsRollSize_
Definition: FWEPWrapper.h:232
unsigned int lsid_
Definition: FWEPWrapper.h:210
xdata::UnsignedInteger32 & getAccThisLumi()
xdata::Table scalersComplete_
Definition: FWEPWrapper.h:217
unsigned int rollingLsIndex_
Definition: FWEPWrapper.h:230
std::vector< lsTriplet > lumiSectionsCtr_
Definition: FWEPWrapper.h:228
fuep::TriggerReportHelpers trh_
Definition: FWEPWrapper.h:157
tuple cout
Definition: gather_cfg.py:121
xdata::InfoSpace * applicationInfoSpace_
Definition: FWEPWrapper.h:165
void evf::FWEPWrapper::withdrawLumiSectionIncrement ( )
inline
std::string evf::FWEPWrapper::wlMonitoring ( )
inline

Definition at line 98 of file FWEPWrapper.h.

References wlMonitoring_, and wlMonitoringActive_.

Referenced by evf::FUEventProcessor::updater().

98  {
99  if(wlMonitoring_!=0 && wlMonitoring_->isActive()) return (wlMonitoringActive_ ? "active" : "inactive");
100  else return "not initialized";
101  }
toolbox::task::WorkLoop * wlMonitoring_
Definition: FWEPWrapper.h:190
bool wlMonitoringActive_
Definition: FWEPWrapper.h:192

Friends And Related Function Documentation

friend class FUEventProcessor
friend

Definition at line 247 of file FWEPWrapper.h.

Member Data Documentation

unsigned int evf::FWEPWrapper::allPastLumiProcessed_
private

Definition at line 205 of file FWEPWrapper.h.

Referenced by getTriggerReport(), stop(), and stopAndHalt().

xdata::InfoSpace* evf::FWEPWrapper::applicationInfoSpace_
private
toolbox::task::ActionSignature* evf::FWEPWrapper::asMonitoring_
private

Definition at line 191 of file FWEPWrapper.h.

Referenced by startMonitoringWorkLoop().

std::string evf::FWEPWrapper::configString_
private

Definition at line 152 of file FWEPWrapper.h.

Referenced by init().

std::string evf::FWEPWrapper::configuration_
private

Definition at line 236 of file FWEPWrapper.h.

Referenced by configuration(), and init().

bool evf::FWEPWrapper::countDatasets_
private

Definition at line 246 of file FWEPWrapper.h.

Referenced by getTriggerReport(), and init().

std::vector<edm::ModuleDescription const*> evf::FWEPWrapper::descs_
private

Definition at line 174 of file FWEPWrapper.h.

Referenced by getTriggerReport(), init(), and taskWebPage().

pthread_mutex_t evf::FWEPWrapper::ep_guard_lock_
private

Definition at line 241 of file FWEPWrapper.h.

Referenced by FWEPWrapper(), init(), microState(), and stopAndHalt().

bool evf::FWEPWrapper::epInitialized_
private
xdata::Integer evf::FWEPWrapper::epMAltState_
private
xdata::Integer evf::FWEPWrapper::epmAltState_
private
xdata::String evf::FWEPWrapper::epMState_
private

Definition at line 184 of file FWEPWrapper.h.

Referenced by monitoring(), and publishConfigAndMonitorItems().

xdata::String evf::FWEPWrapper::epmState_
private

Definition at line 185 of file FWEPWrapper.h.

Referenced by monitoring(), and publishConfigAndMonitorItems().

edm::EventProcessor* evf::FWEPWrapper::evtProcessor_
private
FastTimerService* evf::FWEPWrapper::ftsRef_
private

Definition at line 245 of file FWEPWrapper.h.

Referenced by init(), and setupFastTimerService().

bool evf::FWEPWrapper::hasModuleWebRegistry_
private

Definition at line 161 of file FWEPWrapper.h.

Referenced by init().

bool evf::FWEPWrapper::hasPrescaleService_
private

Definition at line 160 of file FWEPWrapper.h.

Referenced by init().

bool evf::FWEPWrapper::hasServiceWebRegistry_
private

Definition at line 162 of file FWEPWrapper.h.

Referenced by init().

bool evf::FWEPWrapper::hasSubProcesses
private

Definition at line 239 of file FWEPWrapper.h.

Referenced by init(), and monitoring().

xdata::UnsignedInteger32 evf::FWEPWrapper::instance_
private

Definition at line 238 of file FWEPWrapper.h.

Referenced by publishConfigAndMonitorItems().

bool evf::FWEPWrapper::isPython_
private

Definition at line 159 of file FWEPWrapper.h.

Referenced by init().

xdata::UnsignedInteger32 evf::FWEPWrapper::lastLumiPrescaleIndex_
private

Definition at line 221 of file FWEPWrapper.h.

Referenced by getTriggerReport(), and publishConfigAndMonitorItems().

xdata::UnsignedInteger32 evf::FWEPWrapper::lastLumiUsingEol_
private
xdata::UnsignedInteger32 evf::FWEPWrapper::localLsIncludingTimeOuts_
private

Definition at line 215 of file FWEPWrapper.h.

Referenced by getTriggerReport().

log4cplus::Logger evf::FWEPWrapper::log_
private
unsigned int evf::FWEPWrapper::lsid_
private
std::string evf::FWEPWrapper::lsidTimedOutAsString_
private

Definition at line 209 of file FWEPWrapper.h.

Referenced by microState().

const unsigned int evf::FWEPWrapper::lsRollSize_ = 20
staticprivate

Definition at line 232 of file FWEPWrapper.h.

Referenced by updateRollingReport().

xdata::Boolean evf::FWEPWrapper::lsTimedOut_
private

Definition at line 223 of file FWEPWrapper.h.

Referenced by publishConfigAndMonitorItems().

xdata::UnsignedInteger32 evf::FWEPWrapper::lsTimeOut_
private

Definition at line 216 of file FWEPWrapper.h.

Referenced by getTriggerReport(), and publishConfigAndMonitorItems().

xdata::Boolean evf::FWEPWrapper::lsToBeRecovered_
private

Definition at line 224 of file FWEPWrapper.h.

Referenced by publishConfigAndMonitorItems().

xdata::UnsignedInteger32 evf::FWEPWrapper::lumiSectionIndex_
private

Definition at line 219 of file FWEPWrapper.h.

Referenced by getTriggerReport(), monitoring(), and publishConfigAndMonitorItems().

std::vector<lsTriplet> evf::FWEPWrapper::lumiSectionsCtr_
private

Definition at line 228 of file FWEPWrapper.h.

Referenced by getTriggerReport(), lastLumi(), lumiSumTable(), and updateRollingReport().

std::vector<bool> evf::FWEPWrapper::lumiSectionsTo_
private

Definition at line 229 of file FWEPWrapper.h.

Referenced by lumiSumTable().

xdata::String evf::FWEPWrapper::macro_state_legend_
private

Definition at line 201 of file FWEPWrapper.h.

Referenced by publishConfigAndMonitorItems().

std::vector<std::string> evf::FWEPWrapper::mapmod_
private
xdata::String evf::FWEPWrapper::micro_state_legend_
private

Definition at line 202 of file FWEPWrapper.h.

Referenced by init(), and publishConfigAndMonitorItems().

std::map<std::string,int> evf::FWEPWrapper::modmap_
private

Definition at line 175 of file FWEPWrapper.h.

Referenced by init(), monitoring(), and publishConfigAndMonitorItems().

xdata::InfoSpace* evf::FWEPWrapper::monitorInfoSpace_
private
xdata::InfoSpace* evf::FWEPWrapper::monitorInfoSpaceLegend_
private

Definition at line 170 of file FWEPWrapper.h.

Referenced by setMonitorInfoSpaceLegend().

xdata::InfoSpace* evf::FWEPWrapper::monitorLegendaInfoSpace_
private
xdata::UnsignedInteger32 evf::FWEPWrapper::monSleepSec_
private

Definition at line 180 of file FWEPWrapper.h.

Referenced by monitoring(), and publishConfigAndMonitorItems().

struct timeval evf::FWEPWrapper::monStartTime_
private

Definition at line 181 of file FWEPWrapper.h.

Referenced by startMonitoringWorkLoop().

ModuleWebRegistry* evf::FWEPWrapper::mwrRef_
private

Definition at line 243 of file FWEPWrapper.h.

Referenced by getModuleWebRegistry(), and init().

std::list<std::string> evf::FWEPWrapper::names_
private

Definition at line 206 of file FWEPWrapper.h.

Referenced by FWEPWrapper().

std::list<std::string> evf::FWEPWrapper::namesScalersLegenda_
private

Definition at line 208 of file FWEPWrapper.h.

Referenced by FWEPWrapper(), and init().

std::list<std::string> evf::FWEPWrapper::namesStatusLegenda_
private

Definition at line 207 of file FWEPWrapper.h.

Referenced by fireScalersUpdate(), FWEPWrapper(), and init().

xdata::UnsignedInteger32 evf::FWEPWrapper::nbAccepted_
private
xdata::UnsignedInteger32 evf::FWEPWrapper::nbProcessed_
private
int evf::FWEPWrapper::notstarted_state_code_
private

Definition at line 242 of file FWEPWrapper.h.

Referenced by notstarted_state_code(), and publishConfigAndMonitorItems().

std::string evf::FWEPWrapper::pathTable_
private

Definition at line 237 of file FWEPWrapper.h.

Referenced by getTriggerReport(), and init().

xdata::UnsignedInteger32 evf::FWEPWrapper::prescaleSetIndex_
private

Definition at line 220 of file FWEPWrapper.h.

Referenced by getTriggerReport(), monitoring(), and publishConfigAndMonitorItems().

edm::service::PrescaleService* evf::FWEPWrapper::prescaleSvc_
private

Definition at line 155 of file FWEPWrapper.h.

Referenced by getTriggerReport(), init(), and taskWebPage().

unsigned int evf::FWEPWrapper::psid_
private
xdaq::ApplicationDescriptor* evf::FWEPWrapper::rcms_
private

Definition at line 233 of file FWEPWrapper.h.

Referenced by createAndSendScalersMessage(), fireScalersUpdate(), and setRcms().

unsigned int evf::FWEPWrapper::rollingLsIndex_
private

Definition at line 230 of file FWEPWrapper.h.

Referenced by getTriggerReport(), lastLumi(), lumiSumTable(), and updateRollingReport().

bool evf::FWEPWrapper::rollingLsWrap_
private

Definition at line 231 of file FWEPWrapper.h.

Referenced by getTriggerReport(), lumiSumTable(), and updateRollingReport().

xdata::Table evf::FWEPWrapper::scalersComplete_
private
xdata::InfoSpace* evf::FWEPWrapper::scalersInfoSpace_
private

Definition at line 213 of file FWEPWrapper.h.

Referenced by init(), publishConfigAndMonitorItems(), and setScalersInfoSpace().

xdata::InfoSpace* evf::FWEPWrapper::scalersLegendaInfoSpace_
private

Definition at line 214 of file FWEPWrapper.h.

Referenced by init(), publishConfigAndMonitorItems(), and setScalersInfoSpace().

unsigned int evf::FWEPWrapper::scalersUpdateAttempted_
private

Definition at line 226 of file FWEPWrapper.h.

Referenced by fireScalersUpdate().

unsigned int evf::FWEPWrapper::scalersUpdateCounter_
private

Definition at line 227 of file FWEPWrapper.h.

Referenced by fireScalersUpdate(), getScalersUpdates(), and init().

bool evf::FWEPWrapper::servicesDone_
private

Definition at line 150 of file FWEPWrapper.h.

Referenced by init().

edm::ServiceToken evf::FWEPWrapper::serviceToken_
private
ShmOutputModuleRegistry* evf::FWEPWrapper::sorRef_
private

Definition at line 244 of file FWEPWrapper.h.

Referenced by getShmOutputModuleRegistry(), and init().

std::vector<std::string> evf::FWEPWrapper::statmod_
private

Definition at line 177 of file FWEPWrapper.h.

Referenced by publishConfigAndMonitorItems(), and stateNameFromIndex().

xdata::UnsignedInteger32 evf::FWEPWrapper::timeoutOnStop_
private

Definition at line 172 of file FWEPWrapper.h.

Referenced by publishConfigAndMonitorItems(), and stop().

fuep::TriggerReportHelpers evf::FWEPWrapper::trh_
private
const std::string evf::FWEPWrapper::unknown = "unknown"
staticprivate

Definition at line 146 of file FWEPWrapper.h.

Referenced by moduleNameFromIndex(), and stateNameFromIndex().

bool evf::FWEPWrapper::waitingForLs_
private

Definition at line 240 of file FWEPWrapper.h.

Referenced by getTriggerReport(), isWaitingForLs(), and resetWaiting().

bool evf::FWEPWrapper::watching_
private

Definition at line 193 of file FWEPWrapper.h.

Referenced by stop(), and stopAndHalt().

toolbox::task::WorkLoop* evf::FWEPWrapper::wlMonitoring_
private

Definition at line 190 of file FWEPWrapper.h.

Referenced by startMonitoringWorkLoop(), and wlMonitoring().

bool evf::FWEPWrapper::wlMonitoringActive_
private

Definition at line 192 of file FWEPWrapper.h.

Referenced by startMonitoringWorkLoop(), and wlMonitoring().

xdaq::ApplicationContext* evf::FWEPWrapper::xappCtxt_
private

Definition at line 235 of file FWEPWrapper.h.

Referenced by createAndSendScalersMessage(), and setAppCtxt().

xdaq::ApplicationDescriptor* evf::FWEPWrapper::xappDesc_
private

Definition at line 234 of file FWEPWrapper.h.

Referenced by createAndSendScalersMessage(), and setAppDesc().