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
 
unsigned int getNumberOfMicrostates ()
 
MsgBufgetPackedTriggerReport ()
 
TriggerReportStaticgetPackedTriggerReportAsStruct ()
 
unsigned int getScalersUpdates ()
 
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 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_
 
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_
 
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_
 
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_
 
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 44 of file FWEPWrapper.h.

Constructor & Destructor Documentation

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

Definition at line 51 of file FWEPWrapper.cc.

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

52  : evtProcessor_(0)
53  , serviceToken_()
54  , servicesDone_(false)
55  , epInitialized_(false)
56  , prescaleSvc_(0)
57  , log_(log)
58  , isPython_(true)
59  , hasPrescaleService_(false)
60  , hasModuleWebRegistry_(false)
61  , hasServiceWebRegistry_(false)
62  , monitorInfoSpace_(0)
64  , timeoutOnStop_(10)
65  , monSleepSec_(1)
66  , nbProcessed_(0)
67  , nbAccepted_(0)
68  , wlMonitoring_(0)
69  , asMonitoring_(0)
70  , wlMonitoringActive_(false)
71  , watching_(false)
73  , lsid_(0)
74  , psid_(0)
75  , lsTimeOut_(100000000)
80  , lsTimedOut_(false)
81  , lsToBeRecovered_(true)
87  , rollingLsWrap_(false)
88  , rcms_(0)
89  , instance_(instance)
90  , waitingForLs_(false)
91  {
92  //list of variables for scalers flashlist
93  names_.push_back("lumiSectionIndex");
94  names_.push_back("prescaleSetIndex");
95  names_.push_back("scalersTable");
96  namesStatusLegenda_.push_back("macroStateLegenda");
97  namesStatusLegenda_.push_back("microStateLegenda");
98  namesScalersLegenda_.push_back("scalersLegenda");
99  //some initialization of state data
100  epMAltState_ = -1;
101  epmAltState_ = -1;
102  pthread_mutex_init(&ep_guard_lock_,0);
103  }
std::vector< bool > lumiSectionsTo_
Definition: FWEPWrapper.h:223
xdata::Integer epmAltState_
Definition: FWEPWrapper.h:191
xdata::UnsignedInteger32 lastLumiPrescaleIndex_
Definition: FWEPWrapper.h:215
xdata::Boolean lsToBeRecovered_
Definition: FWEPWrapper.h:218
toolbox::task::WorkLoop * wlMonitoring_
Definition: FWEPWrapper.h:184
std::list< std::string > namesScalersLegenda_
Definition: FWEPWrapper.h:202
xdata::Boolean lsTimedOut_
Definition: FWEPWrapper.h:217
static const unsigned int lsRollSize_
Definition: FWEPWrapper.h:226
unsigned int lsid_
Definition: FWEPWrapper.h:204
edm::ServiceToken serviceToken_
Definition: FWEPWrapper.h:142
unsigned int psid_
Definition: FWEPWrapper.h:205
bool hasPrescaleService_
Definition: FWEPWrapper.h:154
std::list< std::string > namesStatusLegenda_
Definition: FWEPWrapper.h:201
std::list< std::string > names_
Definition: FWEPWrapper.h:200
xdata::InfoSpace * monitorInfoSpaceLegend_
Definition: FWEPWrapper.h:164
xdata::InfoSpace * monitorInfoSpace_
Definition: FWEPWrapper.h:162
unsigned int allPastLumiProcessed_
Definition: FWEPWrapper.h:199
xdata::UnsignedInteger32 lumiSectionIndex_
Definition: FWEPWrapper.h:213
Log< T >::type log(const T &t)
Definition: Log.h:22
xdata::UnsignedInteger32 nbProcessed_
Definition: FWEPWrapper.h:180
log4cplus::Logger log_
Definition: FWEPWrapper.h:152
xdata::UnsignedInteger32 lastLumiUsingEol_
Definition: FWEPWrapper.h:216
pthread_mutex_t ep_guard_lock_
Definition: FWEPWrapper.h:235
edm::service::PrescaleService * prescaleSvc_
Definition: FWEPWrapper.h:148
xdata::UnsignedInteger32 instance_
Definition: FWEPWrapper.h:232
xdata::UnsignedInteger32 monSleepSec_
Definition: FWEPWrapper.h:174
unsigned int scalersUpdateCounter_
Definition: FWEPWrapper.h:221
toolbox::task::ActionSignature * asMonitoring_
Definition: FWEPWrapper.h:185
xdata::UnsignedInteger32 prescaleSetIndex_
Definition: FWEPWrapper.h:214
unsigned int rollingLsIndex_
Definition: FWEPWrapper.h:224
std::vector< lsTriplet > lumiSectionsCtr_
Definition: FWEPWrapper.h:222
edm::EventProcessor * evtProcessor_
Definition: FWEPWrapper.h:140
xdata::Integer epMAltState_
Definition: FWEPWrapper.h:190
bool hasServiceWebRegistry_
Definition: FWEPWrapper.h:156
xdaq::ApplicationDescriptor * rcms_
Definition: FWEPWrapper.h:227
bool hasModuleWebRegistry_
Definition: FWEPWrapper.h:155
unsigned int scalersUpdateAttempted_
Definition: FWEPWrapper.h:220
xdata::UnsignedInteger32 lsTimeOut_
Definition: FWEPWrapper.h:210
bool wlMonitoringActive_
Definition: FWEPWrapper.h:186
xdata::UnsignedInteger32 timeoutOnStop_
Definition: FWEPWrapper.h:166
xdata::UnsignedInteger32 nbAccepted_
Definition: FWEPWrapper.h:181
evf::FWEPWrapper::~FWEPWrapper ( )
virtual

Definition at line 105 of file FWEPWrapper.cc.

References evtProcessor_.

105 {delete evtProcessor_; evtProcessor_=0;}
edm::EventProcessor * evtProcessor_
Definition: FWEPWrapper.h:140

Member Function Documentation

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

Definition at line 98 of file FWEPWrapper.h.

References configuration_.

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

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

Definition at line 1196 of file FWEPWrapper.cc.

References asciidump::at, edm::hlt::Exception, log_, argparse::message, runTheMatrix::msg, rcms_, scalersComplete_, corrections_cfg::tagName, xappCtxt_, and xappDesc_.

Referenced by fireScalersUpdate().

1197  {
1198  toolbox::net::URL url(rcms_->getContextDescriptor()->getURL());
1199  toolbox::net::URL at(xappDesc_->getContextDescriptor()->getURL() + "/" + xappDesc_->getURN());
1200  toolbox::net::URL properurl(url.getProtocol(),url.getHost(),url.getPort(),"");
1201  xdaq::ContextDescriptor *ctxdsc = new xdaq::ContextDescriptor(properurl.toString());
1202  xdaq::ApplicationDescriptor *appdesc = new xdaq::ApplicationDescriptorImpl(ctxdsc,rcms_->getClassName(),rcms_->getLocalId(), "pippo");
1203 
1204  appdesc->setAttribute("path","/rcms/servlet/monitorreceiver");
1205 
1206  xoap::MessageReference msg = xoap::createMessage();
1207  xoap::SOAPEnvelope envelope = msg->getSOAPPart().getEnvelope();
1208  xoap::SOAPName responseName = envelope.createName( "report", xmas::NamespacePrefix, xmas::NamespaceUri);
1209  (void) envelope.getBody().addBodyElement ( responseName );
1210  xoap::SOAPName reportName ("report", xmas::NamespacePrefix, xmas::NamespaceUri);
1211  xoap::SOAPElement reportElement = envelope.getBody().getChildElements(reportName)[0];
1212  reportElement.addNamespaceDeclaration (xmas::sensor::NamespacePrefix, xmas::sensor::NamespaceUri);
1213  xoap::SOAPName sampleName = envelope.createName( "sample", xmas::NamespacePrefix, xmas::NamespaceUri);
1214  xoap::SOAPElement sampleElement = reportElement.addChildElement(sampleName);
1215  xoap::SOAPName flashListName = envelope.createName( "flashlist", "", "");
1216  sampleElement.addAttribute(flashListName,"urn:xdaq-flashlist:scalers");
1217  xoap::SOAPName tagName = envelope.createName( "tag", "", "");
1218  sampleElement.addAttribute(tagName,"tag");
1219  xoap::MimeHeaders* headers = msg->getMimeHeaders();
1220  headers->removeHeader("x-xdaq-tags");
1221  headers->addHeader("x-xdaq-tags", "tag");
1222  tagName = envelope.createName( "originator", "", "");
1223  sampleElement.addAttribute(tagName,at.toString());
1224 
1225  xdata::exdr::AutoSizeOutputStreamBuffer outBuffer;
1226  xdata::exdr::Serializer serializer;
1227  try
1228  {
1229  serializer.exportAll( &scalersComplete_, &outBuffer );
1230  }
1231  catch(xdata::exception::Exception & e)
1232  {
1233  LOG4CPLUS_WARN(log_,
1234  "Exception in serialization of scalers table");
1235  // localLog("-W- Exception in serialization of scalers table");
1236  throw;
1237  }
1238 
1239  xoap::AttachmentPart * attachment = msg->createAttachmentPart(outBuffer.getBuffer(), outBuffer.tellp(), "application/x-xdata+exdr");
1240  attachment->setContentEncoding("binary");
1241  tagName = envelope.createName( "tag", "", "");
1242  sampleElement.addAttribute(tagName,"tag");
1243  std::stringstream contentId;
1244 
1245  contentId << "<" << "urn:xdaq-flashlist:scalers" << "@" << at.getHost() << ">";
1246  attachment->setContentId(contentId.str());
1247  std::stringstream contentLocation;
1248  contentId << at.toString();
1249  attachment->setContentLocation(contentLocation.str());
1250 
1251  std::stringstream disposition;
1252  disposition << "attachment; filename=" << "urn:xdaq-flashlist:scalers" << ".exdr; creation-date=" << "\"" << "dummy" << "\"";
1253  attachment->addMimeHeader("Content-Disposition",disposition.str());
1254  msg->addAttachmentPart(attachment);
1255 
1256  try{
1257  xappCtxt_->postSOAP(msg,*(xappDesc_),*appdesc);
1258  }
1259  catch(xdaq::exception::Exception &ex)
1260  {
1261  std::string message = "exception when posting SOAP message to MonitorReceiver";
1262  message += ex.what();
1263  LOG4CPLUS_WARN(log_,message.c_str());
1264  std::string lmessage = "-W- "+message;
1265  delete appdesc;
1266  delete ctxdsc;
1267  throw;
1268  // localLog(lmessage);
1269  }
1270  delete appdesc;
1271  delete ctxdsc;
1272  }
xdaq::ApplicationContext * xappCtxt_
Definition: FWEPWrapper.h:229
xdata::Table scalersComplete_
Definition: FWEPWrapper.h:211
log4cplus::Logger log_
Definition: FWEPWrapper.h:152
string message
Definition: argparse.py:126
xdaq::ApplicationDescriptor * rcms_
Definition: FWEPWrapper.h:227
xdaq::ApplicationDescriptor * xappDesc_
Definition: FWEPWrapper.h:228
list at
Definition: asciidump.py:428
bool evf::FWEPWrapper::fireScalersUpdate ( )

Definition at line 697 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().

698  {
699  // trh_.printReportTable();
701  //@@EM commented out on
702  // @@EM 21.06.2011 - this flashlist is too big to be handled by LAS
703  /*
704  try{
705  // scalersInfoSpace_->unlock();
706  // scalersInfoSpace_->fireItemGroupChanged(names_,0);
707  ::usleep(10);
708  // scalersInfoSpace_->lock();
709  }
710  catch(xdata::exception::Exception &e)
711  {
712  LOG4CPLUS_ERROR(log_, "Exception from fireItemGroupChanged: " << e.what());
713  // localLog(e.what());
714  return false;
715  }
716  */
717  //@@EM added on 21.06.2011
718  // refresh the microstate legenda every 10 lumisections
719  if(scalersUpdateAttempted_%10 == 0)
720  monitorLegendaInfoSpace_->fireItemGroupChanged(namesStatusLegenda_,0);
721 
722  //if there is no state listener then do not attempt to send to monitorreceiver
723  if(rcms_==0) return false;
724  try{
725  if(trh_.getProcThisLumi()!=0U)
728  }
729  catch(...){return false;}
730  return true;
731  }
xdata::InfoSpace * monitorLegendaInfoSpace_
Definition: FWEPWrapper.h:163
void createAndSendScalersMessage()
xdata::UnsignedInteger32 & getProcThisLumi()
std::list< std::string > namesStatusLegenda_
Definition: FWEPWrapper.h:201
unsigned int scalersUpdateCounter_
Definition: FWEPWrapper.h:221
fuep::TriggerReportHelpers trh_
Definition: FWEPWrapper.h:151
xdaq::ApplicationDescriptor * rcms_
Definition: FWEPWrapper.h:227
unsigned int scalersUpdateAttempted_
Definition: FWEPWrapper.h:220
void evf::FWEPWrapper::forceInitEventProcessorMaybe ( )
inline

Definition at line 65 of file FWEPWrapper.h.

References epInitialized_.

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

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

Definition at line 135 of file FWEPWrapper.h.

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

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

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

Definition at line 137 of file FWEPWrapper.h.

References mapmod_.

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

137 { return mapmod_;}
std::vector< std::string > mapmod_
Definition: FWEPWrapper.h:170
unsigned int evf::FWEPWrapper::getNumberOfMicrostates ( )
inline

Definition at line 136 of file FWEPWrapper.h.

References mapmod_.

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

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

Definition at line 110 of file FWEPWrapper.h.

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

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

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

Definition at line 132 of file FWEPWrapper.h.

References scalersUpdateCounter_.

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

132 {return scalersUpdateCounter_;}
unsigned int scalersUpdateCounter_
Definition: FWEPWrapper.h:221
bool evf::FWEPWrapper::getTriggerReport ( bool  useLock)

Definition at line 614 of file FWEPWrapper.cc.

References evf::lsTriplet::acc, allPastLumiProcessed_, evf::fuep::TriggerReportHelpers::checkLumiSection(), evf::ModuleWebRegistry::closeBackDoor(), 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(), CommonUtil::lst, lsTimeOut_, lumiSectionIndex_, lumiSectionsCtr_, evf::ModuleWebRegistry::openBackDoor(), cmsCodeRules.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().

615  {
617  // Calling this method results in calling
618  // evtProcessor_->getTriggerReport, the value returned is encoded as
619  // a xdata::Table.
620 
621  LOG4CPLUS_DEBUG(log_,"getTriggerReport action invoked");
622 
623  //Get the trigger report.
624  ModuleWebRegistry *mwr = 0;
625  try{
626  if(edm::Service<ModuleWebRegistry>().isAvailable())
628  }
629  catch(...) {
630  LOG4CPLUS_INFO(log_,
631  "exception when trying to get service ModuleWebRegistry");
632  return false;
633  }
634  edm::TriggerReport tr;
635  if(mwr==0) return false;
636 
637  unsigned int ls = 0;
638  unsigned int ps = 0;
639  timeval tv;
640  if(useLock) {
641  gettimeofday(&tv,0);
642  // std::cout << getpid() << " calling openBackdoor " << std::endl;
643  waitingForLs_ = true;
644  mwr->openBackDoor("DaqSource",lsTimeOut_);
645  // std::cout << getpid() << " opened Backdoor " << std::endl;
646  }
647 
648  xdata::Table::iterator it = scalersComplete_.begin();
649  ps = lastLumiPrescaleIndex_.value_;
650  // if(prescaleSvc_ != 0) prescaleSvc_->setIndex(ps);
651  it->setField("psid",lastLumiPrescaleIndex_);
652  psid_ = prescaleSetIndex_.value_;
654  ls = lumiSectionIndex_.value_;
655  localLsIncludingTimeOuts_.value_ = ls;
656  it->setField("lsid", localLsIncludingTimeOuts_);
657 
658  lsTriplet lst;
659  lst.ls = localLsIncludingTimeOuts_.value_;
661  lst.acc = evtProcessor_->totalEventsPassed()-
665 
666 
668 
669  if(useLock){
670  // std::cout << getpid() << " calling closeBackdoor " << std::endl;
671  mwr->closeBackDoor("DaqSource");
672  // std::cout << getpid() << " closed Backdoor " << std::endl;
673  }
674 
676 
677 
679  ShmOutputModuleRegistry *sor = 0;
680  try{
682  sor = edm::Service<ShmOutputModuleRegistry>().operator->();
683  }
684  catch(...) {
685  LOG4CPLUS_INFO(log_,
686  "exception when trying to get service ShmOutputModuleRegistry");
687  return false;
688  }
689 
690 
691  trh_.packTriggerReport(tr,sor);
692  it->setField("triggerReport",trh_.getTableWithNames());
693  // std::cout << getpid() << " returning normally from gettriggerreport " << std::endl;
694  return true;
695  }
void setIndex(unsigned int lvl1Index)
xdata::UnsignedInteger32 localLsIncludingTimeOuts_
Definition: FWEPWrapper.h:209
xdata::UnsignedInteger32 lastLumiPrescaleIndex_
Definition: FWEPWrapper.h:215
bool checkLumiSection(unsigned int ls)
edm::ServiceToken serviceToken_
Definition: FWEPWrapper.h:142
unsigned int psid_
Definition: FWEPWrapper.h:205
bool isAvailable() const
Definition: Service.h:47
xdata::Table scalersComplete_
Definition: FWEPWrapper.h:211
int totalEvents() const
unsigned int allPastLumiProcessed_
Definition: FWEPWrapper.h:199
std::vector< edm::ModuleDescription const * > descs_
Definition: FWEPWrapper.h:168
xdata::UnsignedInteger32 lumiSectionIndex_
Definition: FWEPWrapper.h:213
void formatReportTable(edm::TriggerReport &, std::vector< edm::ModuleDescription const * > &, std::string &pathIndexTable, bool noNukeLegenda)
log4cplus::Logger log_
Definition: FWEPWrapper.h:152
edm::service::PrescaleService * prescaleSvc_
Definition: FWEPWrapper.h:148
xdata::UnsignedInteger32 prescaleSetIndex_
Definition: FWEPWrapper.h:214
unsigned int rollingLsIndex_
Definition: FWEPWrapper.h:224
std::vector< lsTriplet > lumiSectionsCtr_
Definition: FWEPWrapper.h:222
fuep::TriggerReportHelpers trh_
Definition: FWEPWrapper.h:151
edm::EventProcessor * evtProcessor_
Definition: FWEPWrapper.h:140
void packTriggerReport(edm::TriggerReport &, ShmOutputModuleRegistry *)
std::string pathTable_
Definition: FWEPWrapper.h:231
int totalEventsPassed() const
xdata::UnsignedInteger32 lsTimeOut_
Definition: FWEPWrapper.h:210
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 188 of file FWEPWrapper.cc.

References applicationInfoSpace_, evf::ShmOutputModuleRegistry::clear(), evf::ModuleWebRegistry::clear(), configString_, configuration_, edm::ServiceRegistry::createSet(), descs_, ep_guard_lock_, epInitialized_, evtProcessor_, cmsCodeRules.cppFunctionSkipper::exception, edm::hlt::Exception, cms::Exception::explainSelf(), evf::fuep::TriggerReportHelpers::formatReportTable(), edm::EventProcessor::getAllModuleDescriptions(), evf::ParameterSetRetriever::getAsString(), evf::ParameterSetRetriever::getPathTableAsString(), edm::EventProcessor::getTriggerReport(), hasModuleWebRegistry_, hasPrescaleService_, hasServiceWebRegistry_, hasSubProcesses, i, isPython_, j, edm::serviceregistry::kTokenOverrides, log_, mapmod_, micro_state_legend_, modmap_, monitorLegendaInfoSpace_, namesScalersLegenda_, namesStatusLegenda_, cmsCodeRules.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_, servicesDone_, serviceToken_, and trh_.

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

189  {
190  hasPrescaleService_ = serviceMap & 0x1;
191  hasModuleWebRegistry_ = serviceMap & 0x2;
192  hasServiceWebRegistry_ = serviceMap & 0x4;
193  bool instanceZero = serviceMap & 0x8;
194  hasSubProcesses = serviceMap & 0x10;
195  configString_ = configString;
196  trh_.resetFormat(); //reset the report table even if HLT didn't change
198  if (epInitialized_) {
199  LOG4CPLUS_INFO(log_,"CMSSW EventProcessor already initialized: skip!");
200  return;
201  }
202 
203  LOG4CPLUS_INFO(log_,"Initialize CMSSW EventProcessor.");
204  LOG4CPLUS_INFO(log_,"CMSSW_BASE:"<<getenv("CMSSW_BASE"));
205 
206 
207  // job configuration string
208  ParameterSetRetriever pr(configString_);
209  configuration_ = pr.getAsString();
210  pathTable_ = pr.getPathTableAsString();
211 
212  if (configString_.size() > 3 && configString_.substr(configString_.size()-3) == ".py") isPython_ = true;
213  boost::shared_ptr<edm::ParameterSet> params; // change this name!
214  boost::shared_ptr<std::vector<edm::ParameterSet> > pServiceSets;
215  boost::shared_ptr<edm::ProcessDesc> pdesc;
216  if(isPython_)
217  {
219  pdesc = ppdesc.processDesc();
220  }
221  else
222  pdesc = boost::shared_ptr<edm::ProcessDesc>(new edm::ProcessDesc(configuration_));
223  pServiceSets = pdesc->getServicesPSets();
224  // add default set of services
225  if(!servicesDone_) {
226  //DQMStore should not be created in the Master (MP case) since this poses problems in the slave
227  if(!hasSubProcesses){
228  internal::addServiceMaybe(*pServiceSets,"DQMStore");
229  internal::addServiceMaybe(*pServiceSets,"DQM");
230  }
231  else{
232  internal::removeServiceMaybe(*pServiceSets,"DQMStore");
233  internal::removeServiceMaybe(*pServiceSets,"DQM");
234  }
235  internal::addServiceMaybe(*pServiceSets,"MLlog4cplus");
236  internal::addServiceMaybe(*pServiceSets,"MicroStateService");
237  internal::addServiceMaybe(*pServiceSets,"ShmOutputModuleRegistry");
238  if(hasPrescaleService_) internal::addServiceMaybe(*pServiceSets,"PrescaleService");
239  if(hasModuleWebRegistry_) internal::addServiceMaybe(*pServiceSets,"ModuleWebRegistry");
240  if(hasServiceWebRegistry_) internal::addServiceMaybe(*pServiceSets,"ServiceWebRegistry");
241 
242  try{
244  internal::addServiceMaybe(*pServiceSets,"DQMStore");
245  internal::addServiceMaybe(*pServiceSets,"DQM");
246  // slaveServiceToken_ = edm::ServiceRegistry::createSet(*pServiceSets);
247  }
248  catch(cms::Exception &e) {
249  LOG4CPLUS_ERROR(log_,e.explainSelf());
250  }
251  catch(std::exception &e) {
252  LOG4CPLUS_ERROR(log_,e.what());
253  }
254  catch(...) {
255  LOG4CPLUS_ERROR(log_,"Unknown Exception");
256  }
257  servicesDone_ = true;
258  }
259 
261 
262 
263  //test rerouting of fwk logging to log4cplus
264  edm::LogInfo("FWEPWrapper")<<"started MessageLogger Service.";
265  edm::LogInfo("FWEPWrapper")<<"Using config \n"<<configuration_;
266 
267  DQMStore *dqm = 0;
268  try{
269  if(edm::Service<DQMStore>().isAvailable())
270  dqm = edm::Service<DQMStore>().operator->();
271  }
272  catch(...) {
273  LOG4CPLUS_INFO(log_,
274  "exception when trying to get service DQMStore");
275  }
276  if(dqm!=0) dqm->rmdir("");
277 
278 
279  ModuleWebRegistry *mwr = 0;
280  try{
281  if(edm::Service<ModuleWebRegistry>().isAvailable())
283  }
284  catch(...) {
285  LOG4CPLUS_INFO(log_,
286  "exception when trying to get service ModuleWebRegistry");
287  }
288 
289  if(mwr) mwr->clear(); // in case we are coming from stop we need to clear the mwr
290 
291  ServiceWebRegistry *swr = 0;
292  try{
293  if(edm::Service<ServiceWebRegistry>().isAvailable())
295  }
296  catch(...) {
297  LOG4CPLUS_INFO(log_,
298  "exception when trying to get service ModuleWebRegistry");
299  }
300 
301  ShmOutputModuleRegistry *sor = 0;
302  try{
303  if(edm::Service<ShmOutputModuleRegistry>().isAvailable())
305  }
306  catch(...) {
307  LOG4CPLUS_INFO(log_,
308  "exception when trying to get service ShmOutputModuleRegistry");
309  }
310 
311  if(sor) sor->clear();
312  // if(swr) swr->clear(); // in case we are coming from stop we need to clear the swr
313 
314 
315  // instantiate the event processor - fatal exceptions are caught in the main application
316 
317  std::vector<std::string> defaultServices;
318  std::vector<std::string> forcedServices;
319  defaultServices.push_back("MessageLogger");
320  defaultServices.push_back("InitRootHandlers");
321  defaultServices.push_back("JobReportService");
322  pdesc->addServices(defaultServices, forcedServices);
323  pthread_mutex_lock(&ep_guard_lock_);
324  if (0!=evtProcessor_) delete evtProcessor_;
325 
329  pthread_mutex_unlock(&ep_guard_lock_);
330  // evtProcessor_->setRunNumber(runNumber_.value_);
331  /* removed
332  if(!outPut_)
333  evtProcessor_->enableEndPaths(outPut_);
334  outprev_=outPut_;
335  */
336  // publish all module names to XDAQ infospace
337 
338  if(mwr)
339  {
340  mwr->publish(applicationInfoSpace_);
341  mwr->publishToXmas(scalersInfoSpace_);
342  }
343  if(swr)
344  {
345  swr->publish(applicationInfoSpace_);
346  }
347  // get the prescale service
348  LOG4CPLUS_INFO(log_,
349  "Checking for edm::service::PrescaleService!");
350  try {
352  {
353  LOG4CPLUS_INFO(log_,
354  "edm::service::PrescaleService is available!");
356  LOG4CPLUS_INFO(log_,
357  "Obtained pointer to PrescaleService");
358  }
359  }
360  catch(...) {
361  LOG4CPLUS_INFO(log_,
362  "exception when trying to get service "
363  <<"edm::service::PrescaleService");
364  }
365  const edm::ParameterSet *prescaleSvcConfig = internal::findService(*pServiceSets,"PrescaleService");
366  if(prescaleSvc_ != 0 && prescaleSvcConfig !=0) prescaleSvc_->reconfigure(*prescaleSvcConfig);
367 
368  monitorLegendaInfoSpace_->lock();
369  //fill microstate legenda information
371 
372  std::stringstream oss2;
373  unsigned int outcount = 0;
374  oss2 << 0 << "=Invalid ";
375  oss2 << 1 << "=FwkOvh ";
376  oss2 << 2 << "=Input ";
377  modmap_["Invalid"]=0;
378  modmap_["FWKOVH"]=1;
379  modmap_["INPUT"]=2;
380  mapmod_.resize(descs_.size()+4); // all modules including output plus one input plus DQM plus the invalid state 0
381  mapmod_[0]="Invalid";
382  mapmod_[1]="FWKOVH";
383  mapmod_[2]="INPUT";
384  outcount+=2;
385  for(unsigned int j = 0; j < descs_.size(); j++)
386  {
387  if(descs_[j]->moduleName() == "ShmStreamConsumer") // find something better than hardcoding name
388  {
389  outcount++;
390  oss2 << outcount << "=" << descs_[j]->moduleLabel() << " ";
391  modmap_[descs_[j]->moduleLabel()]=outcount;
392  mapmod_[outcount] = descs_[j]->moduleLabel();
393  }
394  }
395  modmap_["DQM"]=outcount+1;
396  mapmod_[outcount+1]="DQM";
397  oss2 << outcount+1 << "=DQMHistograms ";
398  unsigned int modcount = 1;
399  for(unsigned int i = 0; i < descs_.size(); i++)
400  {
401  if(descs_[i]->moduleName() != "ShmStreamConsumer")
402  {
403  modcount++;
404  oss2 << outcount+modcount << "=" << descs_[i]->moduleLabel() << " ";
405  modmap_[descs_[i]->moduleLabel()]=outcount+modcount;
406  mapmod_[outcount+modcount] = descs_[i]->moduleLabel();
407  }
408  }
409 // std::cout << "*******************************microstate legend**************************" << std::endl;
410 // std::cout << oss2.str() << std::endl;
411 // std::cout << "*******************************microstate legend**************************" << std::endl;
412 
413  if(instanceZero){
414  micro_state_legend_ = oss2.str().c_str();
415  }
416  monitorLegendaInfoSpace_->unlock();
417  try{
418  monitorLegendaInfoSpace_->fireItemGroupChanged(namesStatusLegenda_,0);
419  scalersLegendaInfoSpace_->fireItemGroupChanged(namesScalersLegenda_,0);
420  ::usleep(10);
421  }
423  {
424  LOG4CPLUS_ERROR(log_, "Exception from fireItemGroupChanged: " << e.what());
425  }
426  LOG4CPLUS_INFO(log_," edm::EventProcessor configuration finished.");
429  trh_.formatReportTable(tr,descs_,pathTable_,instanceZero);
430  epInitialized_ = true;
431  return;
432  }
xdata::InfoSpace * monitorLegendaInfoSpace_
Definition: FWEPWrapper.h:163
int i
Definition: DBlmapReader.cc:9
void rmdir(const std::string &fullpath)
Definition: DQMStore.cc:2311
virtual std::string explainSelf() const
Definition: Exception.cc:56
std::string configString_
Definition: FWEPWrapper.h:145
xdata::InfoSpace * scalersInfoSpace_
Definition: FWEPWrapper.h:207
xdata::InfoSpace * scalersLegendaInfoSpace_
Definition: FWEPWrapper.h:208
std::vector< std::string > mapmod_
Definition: FWEPWrapper.h:170
std::list< std::string > namesScalersLegenda_
Definition: FWEPWrapper.h:202
edm::ServiceToken serviceToken_
Definition: FWEPWrapper.h:142
void reconfigure(ParameterSet const &ps)
bool hasPrescaleService_
Definition: FWEPWrapper.h:154
int j
Definition: DBlmapReader.cc:9
std::list< std::string > namesStatusLegenda_
Definition: FWEPWrapper.h:201
xdata::String micro_state_legend_
Definition: FWEPWrapper.h:196
static ServiceToken createSet(std::vector< ParameterSet > &)
std::map< std::string, int > modmap_
Definition: FWEPWrapper.h:169
std::vector< edm::ModuleDescription const * > descs_
Definition: FWEPWrapper.h:168
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:152
pthread_mutex_t ep_guard_lock_
Definition: FWEPWrapper.h:235
edm::service::PrescaleService * prescaleSvc_
Definition: FWEPWrapper.h:148
unsigned int scalersUpdateCounter_
Definition: FWEPWrapper.h:221
fuep::TriggerReportHelpers trh_
Definition: FWEPWrapper.h:151
edm::EventProcessor * evtProcessor_
Definition: FWEPWrapper.h:140
bool hasServiceWebRegistry_
Definition: FWEPWrapper.h:156
std::vector< ModuleDescription const * > getAllModuleDescriptions() const
std::string pathTable_
Definition: FWEPWrapper.h:231
bool hasModuleWebRegistry_
Definition: FWEPWrapper.h:155
xdata::InfoSpace * applicationInfoSpace_
Definition: FWEPWrapper.h:159
std::string configuration_
Definition: FWEPWrapper.h:230
void getTriggerReport(TriggerReport &rep) const
bool evf::FWEPWrapper::isWaitingForLs ( )
inline

Definition at line 131 of file FWEPWrapper.h.

References waitingForLs_.

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

131 {return waitingForLs_;}
lsTriplet& evf::FWEPWrapper::lastLumi ( )
inline

Definition at line 129 of file FWEPWrapper.h.

References lumiSectionsCtr_, and rollingLsIndex_.

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

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

Definition at line 1084 of file FWEPWrapper.cc.

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

1085  {
1086  // lumisection summary table
1087  *out << " <table border=1 bgcolor=\"#CFCFCF\">" << std::endl;
1088  *out << " <tr>" << std::endl;
1089  *out << " <td> LS </td>";
1090  if(rollingLsWrap_)
1091  {
1092  for(unsigned int i = rollingLsIndex_; i < lumiSectionsCtr_.size(); i++)
1093  *out << "<td " << (lumiSectionsTo_[i] ? "bgcolor=\"red\"" : "")
1094  << ">" << lumiSectionsCtr_[i].ls << "</td>" << std::endl;
1095  for(unsigned int i = 0; i < rollingLsIndex_; i++)
1096  *out << "<td " << (lumiSectionsTo_[i] ? "bgcolor=\"red\"" : "")
1097  << ">" << lumiSectionsCtr_[i].ls << "</td>" << std::endl;
1098  }
1099  else
1100  for(unsigned int i = rollingLsIndex_; i < lumiSectionsCtr_.size(); i++)
1101  *out << "<td " << (lumiSectionsTo_[i] ? "bgcolor=\"red\"" : "")
1102  << ">" << lumiSectionsCtr_[i].ls << "</td>" << std::endl;
1103 
1104  *out << " </tr>" << std::endl;
1105  *out << " <tr>" << std::endl;
1106  *out << " <td> Ev </td>";
1107  if(rollingLsWrap_)
1108  {
1109  for(unsigned int i = rollingLsIndex_; i < lumiSectionsCtr_.size(); i++)
1110  *out << "<td>" << lumiSectionsCtr_[i].proc << "</td>" << std::endl;
1111  for(unsigned int i = 0; i < rollingLsIndex_; i++)
1112  *out << "<td>" << lumiSectionsCtr_[i].proc << "</td>" << std::endl;
1113  }
1114  else
1115  for(unsigned int i = rollingLsIndex_; i < lumiSectionsCtr_.size(); i++)
1116  *out << "<td>" << lumiSectionsCtr_[i].proc << "</td>" << std::endl;
1117  *out << " </tr>" << std::endl;
1118  *out << " <tr>" << std::endl;
1119  *out << " <td> Acc </td>";
1120  if(rollingLsWrap_)
1121  {
1122  for(unsigned int i = rollingLsIndex_; i < lumiSectionsCtr_.size(); i++)
1123  *out << "<td>" << lumiSectionsCtr_[i].acc << "</td>" << std::endl;
1124  for(unsigned int i = 0; i < rollingLsIndex_; i++)
1125  *out << "<td>" << lumiSectionsCtr_[i].acc << "</td>" << std::endl;
1126  }
1127  else
1128  for(unsigned int i = rollingLsIndex_; i < lumiSectionsCtr_.size(); i++)
1129  *out << "<td>" << lumiSectionsCtr_[i].acc << "</td>" << std::endl;
1130  *out << " </tr>" << std::endl;
1131  *out << "</table>" << std::endl;
1132  }
int i
Definition: DBlmapReader.cc:9
std::vector< bool > lumiSectionsTo_
Definition: FWEPWrapper.h:223
TrainProcessor *const proc
Definition: MVATrainer.cc:101
tuple out
Definition: dbtoconf.py:99
unsigned int rollingLsIndex_
Definition: FWEPWrapper.h:224
std::vector< lsTriplet > lumiSectionsCtr_
Definition: FWEPWrapper.h:222
void evf::FWEPWrapper::makeServicesOnly ( )

Definition at line 434 of file FWEPWrapper.cc.

References serviceToken_.

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

Definition at line 1047 of file FWEPWrapper.cc.

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

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

1048  {
1050  MicroStateService *mss = 0;
1051  std::string micro1 = "unavailable";
1052  if(epInitialized_)
1053  micro1 = "initialized";
1054  std::string micro2 = "unavailable";
1056  {
1057  try{
1059  }
1060  catch(...) {
1061  LOG4CPLUS_INFO(log_,
1062  "exception when trying to get service MicroStateService");
1063  }
1064  pthread_mutex_lock(&ep_guard_lock_);
1065  if(evtProcessor_!=0) micro1 = evtProcessor_->currentStateName();
1066  pthread_mutex_unlock(&ep_guard_lock_);
1067  }
1068 
1069  if(mss) {
1070  micro2 = mss->getMicroState2();
1071  }
1072 
1073  // *out << fsm_.stateName()->toString() << std::endl;
1074  *out << "<td>" << micro1 << "</td>";
1075  *out << "<td>" << micro2 << "</td>";
1076  *out << "<td>" << nbAccepted_.value_ << "/" << nbProcessed_.value_
1077  << " (" << float(nbAccepted_.value_)/float(nbProcessed_.value_)*100. <<"%)" << "</td>";
1078  *out << "<td>" << lsid_ << "/" << lsidTimedOutAsString_ << "</td>";
1079  *out << "<td>" << psid_ << "</td>";
1080 
1081 
1082  }
event_processor::State getState() const
unsigned int lsid_
Definition: FWEPWrapper.h:204
edm::ServiceToken serviceToken_
Definition: FWEPWrapper.h:142
unsigned int psid_
Definition: FWEPWrapper.h:205
char const * currentStateName() const
tuple out
Definition: dbtoconf.py:99
xdata::UnsignedInteger32 nbProcessed_
Definition: FWEPWrapper.h:180
log4cplus::Logger log_
Definition: FWEPWrapper.h:152
pthread_mutex_t ep_guard_lock_
Definition: FWEPWrapper.h:235
edm::EventProcessor * evtProcessor_
Definition: FWEPWrapper.h:140
std::string lsidTimedOutAsString_
Definition: FWEPWrapper.h:203
xdata::UnsignedInteger32 nbAccepted_
Definition: FWEPWrapper.h:181
std::string const& evf::FWEPWrapper::moduleNameFromIndex ( unsigned int  i) const
inline

Definition at line 118 of file FWEPWrapper.h.

References mapmod_, and unknown.

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

119  {
120  if(i<mapmod_.size()) return mapmod_[i];
121  else return unknown;
122  }
int i
Definition: DBlmapReader.cc:9
std::vector< std::string > mapmod_
Definition: FWEPWrapper.h:170
static const std::string unknown
Definition: FWEPWrapper.h:139
void evf::FWEPWrapper::moduleWeb ( xgi::Input in,
xgi::Output out 
)

Definition at line 990 of file FWEPWrapper.cc.

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

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

991  {
992  using namespace cgicc;
993  Cgicc cgi(in);
994  std::vector<FormEntry> el1;
995  cgi.getElement("module",el1);
996  if(evtProcessor_) {
997  if(el1.size()!=0) {
998  std::string mod = el1[0].getValue();
1000  ModuleWebRegistry *mwr = 0;
1001  try{
1003  mwr = edm::Service<ModuleWebRegistry>().operator->();
1004  }
1005  catch(...) {
1006  LOG4CPLUS_WARN(log_,
1007  "Exception when trying to get service ModuleWebRegistry");
1008  }
1009  mwr->invoke(in,out,mod);
1010  }
1011  }
1012  else {
1013  *out<<"EventProcessor just disappeared "<<std::endl;
1014  }
1015  }
bool isAvailable() const
Definition: Service.h:47
tuple out
Definition: dbtoconf.py:99
log4cplus::Logger log_
Definition: FWEPWrapper.h:152
ServiceToken getToken()
edm::EventProcessor * evtProcessor_
Definition: FWEPWrapper.h:140
T mod(const T &a, const T &b)
Definition: ecalDccMap.h:4
bool evf::FWEPWrapper::monitoring ( toolbox::task::WorkLoop *  wl)

Definition at line 567 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_, cmsCodeRules.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().

568  {
569 
570  struct timeval monEndTime;
571  struct timezone timezone;
572  gettimeofday(&monEndTime,&timezone);
574  MicroStateService *mss = 0;
575  if(!hasSubProcesses) monitorInfoSpace_->lock();
576  if(evtProcessor_)
577  {
580  }
581  else
582  {
583  epMState_ = "Off";
584  epMAltState_ = -1;
585  }
587  {
588  try{
590  }
591  catch(...) {
592  LOG4CPLUS_INFO(log_,
593  "exception when trying to get service MicroStateService");
594  }
595  lsid_ = lumiSectionIndex_.value_;
596  psid_ = prescaleSetIndex_.value_;
597  }
598  if(mss)
599  {
600  epmState_ = mss->getMicroState2();
601  epmAltState_ = modmap_[mss->getMicroState2()];
602  }
603  if(evtProcessor_)
604  {
607  }
608  if(!hasSubProcesses) monitorInfoSpace_->unlock();
609 
610  ::sleep(monSleepSec_.value_);
611  return true;
612  }
event_processor::State getState() const
xdata::String epMState_
Definition: FWEPWrapper.h:178
xdata::Integer epmAltState_
Definition: FWEPWrapper.h:191
void sleep(Duration_t)
Definition: Utils.h:163
unsigned int lsid_
Definition: FWEPWrapper.h:204
edm::ServiceToken serviceToken_
Definition: FWEPWrapper.h:142
xdata::String epmState_
Definition: FWEPWrapper.h:179
unsigned int psid_
Definition: FWEPWrapper.h:205
xdata::InfoSpace * monitorInfoSpace_
Definition: FWEPWrapper.h:162
int totalEvents() const
std::map< std::string, int > modmap_
Definition: FWEPWrapper.h:169
char const * currentStateName() const
xdata::UnsignedInteger32 lumiSectionIndex_
Definition: FWEPWrapper.h:213
xdata::UnsignedInteger32 nbProcessed_
Definition: FWEPWrapper.h:180
log4cplus::Logger log_
Definition: FWEPWrapper.h:152
xdata::UnsignedInteger32 monSleepSec_
Definition: FWEPWrapper.h:174
xdata::UnsignedInteger32 prescaleSetIndex_
Definition: FWEPWrapper.h:214
edm::EventProcessor * evtProcessor_
Definition: FWEPWrapper.h:140
xdata::Integer epMAltState_
Definition: FWEPWrapper.h:190
int totalEventsPassed() const
xdata::UnsignedInteger32 nbAccepted_
Definition: FWEPWrapper.h:181
int evf::FWEPWrapper::notstarted_state_code ( ) const
inline

Definition at line 128 of file FWEPWrapper.h.

References notstarted_state_code_.

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

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

Definition at line 60 of file FWEPWrapper.h.

References epInitialized_.

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

Definition at line 59 of file FWEPWrapper.h.

References evtProcessor_.

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

Definition at line 107 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().

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

Definition at line 178 of file FWEPWrapper.cc.

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

Referenced by publishConfigAndMonitorItems().

179  {
180  monitorInfoSpace_->fireItemAvailable("epSPMacroStateInt", &epMAltState_);
181  monitorInfoSpace_->fireItemAvailable("epSPMicroStateInt", &epmAltState_);
182 
183  monitorInfoSpace_->fireItemAvailable("nbProcessed", &nbProcessed_);
184  monitorInfoSpace_->fireItemAvailable("nbAccepted", &nbAccepted_);
185  }
xdata::Integer epmAltState_
Definition: FWEPWrapper.h:191
xdata::InfoSpace * monitorInfoSpace_
Definition: FWEPWrapper.h:162
xdata::UnsignedInteger32 nbProcessed_
Definition: FWEPWrapper.h:180
xdata::Integer epMAltState_
Definition: FWEPWrapper.h:190
xdata::UnsignedInteger32 nbAccepted_
Definition: FWEPWrapper.h:181
void evf::FWEPWrapper::resetLumiSectionReferenceIndex ( )
inline
void evf::FWEPWrapper::resetPackedTriggerReport ( )
inline
void evf::FWEPWrapper::resetTriggerReport ( )
inline

Definition at line 109 of file FWEPWrapper.h.

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

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

Definition at line 130 of file FWEPWrapper.h.

References waitingForLs_.

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

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

Definition at line 1019 of file FWEPWrapper.cc.

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

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

1020  {
1021  using namespace cgicc;
1022  Cgicc cgi(in);
1023  std::vector<FormEntry> el1;
1024  cgi.getElement("service",el1);
1025  if(evtProcessor_) {
1026  if(el1.size()!=0) {
1027  std::string ser = el1[0].getValue();
1029  ServiceWebRegistry *swr = 0;
1030  try{
1032  swr = edm::Service<ServiceWebRegistry>().operator->();
1033  }
1034  catch(...) {
1035  LOG4CPLUS_WARN(log_,
1036  "Exception when trying to get service ModuleWebRegistry");
1037  }
1038  swr->invoke(in,out,ser);
1039  }
1040  }
1041  else {
1042  *out<<"EventProcessor just disappeared "<<std::endl;
1043  }
1044  }
bool isAvailable() const
Definition: Service.h:47
tuple out
Definition: dbtoconf.py:99
log4cplus::Logger log_
Definition: FWEPWrapper.h:152
ServiceToken getToken()
edm::EventProcessor * evtProcessor_
Definition: FWEPWrapper.h:140
void evf::FWEPWrapper::setAppCtxt ( xdaq::ApplicationContext *  ctx)
inline

Definition at line 88 of file FWEPWrapper.h.

References xappCtxt_.

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

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

Definition at line 87 of file FWEPWrapper.h.

References xappDesc_.

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

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

Definition at line 79 of file FWEPWrapper.h.

References applicationInfoSpace_.

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

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

Definition at line 80 of file FWEPWrapper.h.

References monitorInfoSpace_, and monitorLegendaInfoSpace_.

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

81  {
82  monitorInfoSpace_ = mis;
84  }
xdata::InfoSpace * monitorLegendaInfoSpace_
Definition: FWEPWrapper.h:163
xdata::InfoSpace * monitorInfoSpace_
Definition: FWEPWrapper.h:162
void evf::FWEPWrapper::setMonitorInfoSpaceLegend ( xdata::InfoSpace *  is)
inline

Definition at line 85 of file FWEPWrapper.h.

References monitorInfoSpaceLegend_.

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

Definition at line 86 of file FWEPWrapper.h.

References rcms_.

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

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

Definition at line 74 of file FWEPWrapper.h.

References scalersInfoSpace_, and scalersLegendaInfoSpace_.

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

75  {
76  scalersInfoSpace_ = sis;
78  }
xdata::InfoSpace * scalersInfoSpace_
Definition: FWEPWrapper.h:207
xdata::InfoSpace * scalersLegendaInfoSpace_
Definition: FWEPWrapper.h:208
void evf::FWEPWrapper::startMonitoringWorkLoop ( )
throw (evf::Exception
)

Definition at line 534 of file FWEPWrapper.cc.

References asMonitoring_, edm::hlt::Exception, monitoring(), monStartTime_, runTheMatrix::msg, nbAccepted_, nbProcessed_, evf::utils::pid, wlMonitoring_, and wlMonitoringActive_.

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

535  {
536  pid_t pid = getpid();
537  nbProcessed_.value_ = 0;
538  nbAccepted_.value_ = 0;
539  struct timezone timezone;
540  gettimeofday(&monStartTime_,&timezone);
541 
542  std::ostringstream ost;
543  ost << "Monitoring" << pid;
544  try {
546  toolbox::task::getWorkLoopFactory()->getWorkLoop(ost.str().c_str(),
547  "waiting");
548 
549  if (!wlMonitoring_->isActive()) wlMonitoring_->activate();
550  asMonitoring_ = toolbox::task::bind(this,&FWEPWrapper::monitoring,
551  ost.str().c_str());
552 
553  wlMonitoring_->submit(asMonitoring_);
554  wlMonitoringActive_ = true;
555 
556  }
557  catch (xcept::Exception& e) {
558  std::string msg = "Failed to start workloop 'Monitoring'.";
559 
560  XCEPT_RETHROW(evf::Exception,msg,e);
561  }
562  }
struct timeval monStartTime_
Definition: FWEPWrapper.h:175
toolbox::task::WorkLoop * wlMonitoring_
Definition: FWEPWrapper.h:184
bool monitoring(toolbox::task::WorkLoop *wl)
Definition: FWEPWrapper.cc:567
xdata::UnsignedInteger32 nbProcessed_
Definition: FWEPWrapper.h:180
toolbox::task::ActionSignature * asMonitoring_
Definition: FWEPWrapper.h:185
bool wlMonitoringActive_
Definition: FWEPWrapper.h:186
xdata::UnsignedInteger32 nbAccepted_
Definition: FWEPWrapper.h:181
std::string const& evf::FWEPWrapper::stateNameFromIndex ( unsigned int  i) const
inline

Definition at line 123 of file FWEPWrapper.h.

References statmod_, and unknown.

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

124  {
125  if(i<statmod_.size()) return statmod_[i];
126  else return unknown;
127  }
int i
Definition: DBlmapReader.cc:9
static const std::string unknown
Definition: FWEPWrapper.h:139
std::vector< std::string > statmod_
Definition: FWEPWrapper.h:171
edm::EventProcessor::StatusCode evf::FWEPWrapper::stop ( )

Definition at line 441 of file FWEPWrapper.cc.

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

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

442  {
444 
445  LOG4CPLUS_WARN(log_,"FUEventProcessor::stopEventProcessor.1 state "
446  << evtProcessor_->stateName(st));
450  ::sleep(1);
451  st = evtProcessor_->getState();
453  LOG4CPLUS_WARN(log_,
454  "FUEventProcessor::stopEventProcessor.2 After 1s - state: "
455  << evtProcessor_->stateName(st));
457  }
458  }
459  LOG4CPLUS_WARN(log_,"FUEventProcessor::stopEventProcessor.3 state "
460  << evtProcessor_->stateName(st));
461 
462  try {
464  watching_ = false;
465  }
466  catch(cms::Exception &e) {
467  XCEPT_RAISE(evf::Exception,e.explainSelf());
468  }
469  catch(std::exception &e) {
470  XCEPT_RAISE(evf::Exception,e.what());
471  }
472  catch(...) {
473  XCEPT_RAISE(evf::Exception,"Unknown Exception");
474  }
476  return rc;
477 
478  }
event_processor::State getState() const
virtual std::string explainSelf() const
Definition: Exception.cc:56
void sleep(Duration_t)
Definition: Utils.h:163
StatusCode waitTillDoneAsync(unsigned int timeout_seconds=0)
char const * stateName(event_processor::State s) const
unsigned int allPastLumiProcessed_
Definition: FWEPWrapper.h:199
log4cplus::Logger log_
Definition: FWEPWrapper.h:152
edm::EventProcessor * evtProcessor_
Definition: FWEPWrapper.h:140
xdata::UnsignedInteger32 timeoutOnStop_
Definition: FWEPWrapper.h:166
void evf::FWEPWrapper::stopAndHalt ( )

Definition at line 480 of file FWEPWrapper.cc.

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

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

481  {
483  ModuleWebRegistry *mwr = 0;
484  try{
485  if(edm::Service<ModuleWebRegistry>().isAvailable())
487  }
488  catch(...) {
489  LOG4CPLUS_INFO(log_,
490  "exception when trying to get service ModuleWebRegistry");
491  }
492 
493  if(mwr)
494  {
495  mwr->clear();
496  }
497 
498  ServiceWebRegistry *swr = 0;
499  try{
500  if(edm::Service<ServiceWebRegistry>().isAvailable())
502  }
503  catch(...) {
504  LOG4CPLUS_INFO(log_,
505  "exception when trying to get service ModuleWebRegistry");
506  }
507 
508  if(swr)
509  {
510  swr->clear();
511  }
512 
515  watching_ = false;
517  {
518 
521  pthread_mutex_lock(&ep_guard_lock_);
522  delete evtProcessor_;
523  evtProcessor_ = 0;
524  pthread_mutex_unlock(&ep_guard_lock_);
525  epInitialized_ = false;
526  }
527  else
528  {
529  XCEPT_RAISE(evf::Exception,"EventProcessor stop timed out");
530  }
532  }
event_processor::State getState() const
edm::ServiceToken serviceToken_
Definition: FWEPWrapper.h:142
unsigned int allPastLumiProcessed_
Definition: FWEPWrapper.h:199
edm::EventProcessor::StatusCode stop()
Definition: FWEPWrapper.cc:441
log4cplus::Logger log_
Definition: FWEPWrapper.h:152
pthread_mutex_t ep_guard_lock_
Definition: FWEPWrapper.h:235
edm::EventProcessor * evtProcessor_
Definition: FWEPWrapper.h:140
void evf::FWEPWrapper::sumAndPackTriggerReport ( MsgBuf buf)

Definition at line 1135 of file FWEPWrapper.cc.

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

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

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

Definition at line 735 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().

736  {
737  // std::string urn = xappDesc_->getURN();
738 
739  *out << "<table>" << std::endl;
740 
741  *out << "<tr valign=\"top\">" << std::endl;
742  *out << "<td>" << std::endl;
743 
744  TriggerReportStatic *tr = (TriggerReportStatic *)(trh_.getPackedTriggerReport()->mtext);
745  // trigger summary table
746  *out << "<table border=1 bgcolor=\"#CFCFCF\">" << std::endl;
747  *out << " <tr>" << std::endl;
748  *out << " <th colspan=7>" << std::endl;
749  *out << " " << "Trigger Summary up to LS "
750  << trh_.getLumiSectionReferenceIndex()-1 << std::endl;
751  *out << " </th>" << std::endl;
752  *out << " </tr>" << std::endl;
753 
754  *out << " <tr >" << std::endl;
755  *out << " <th >Path</th>" << std::endl;
756  *out << " <th >Exec</th>" << std::endl;
757  *out << " <th >Pass</th>" << std::endl;
758  *out << " <th >Fail</th>" << std::endl;
759  *out << " <th >Except</th>" << std::endl;
760  *out << " </tr>" << std::endl;
761 
762 
763  for(int i=0; i<tr->trigPathsInMenu; i++) {
764  *out << " <tr>" << std::endl;
765  *out << " <td>"<< i << "</td>" << std::endl;
766  *out << " <td>" << trh_.getl1pre(i) << "</td>" << std::endl;
767  *out << " <td>" << trh_.getaccept(i) << "</td>" << std::endl;
768  *out << " <td >" << trh_.getfailed(i) << "</td>" << std::endl;
769  *out << " <td ";
770  if(trh_.getexcept(i) !=0)
771  *out << "bgcolor=\"red\"" << std::endl;
772  *out << ">" << trh_.getexcept(i) << "</td>" << std::endl;
773  *out << " </tr >" << std::endl;
774 
775  }
776  *out << " <tr><th colspan=7>EndPaths</th></tr>" << std::endl;
777 
778  for(int i=tr->trigPathsInMenu; i<tr->endPathsInMenu + tr->trigPathsInMenu; i++) {
779  *out << " <tr>" << std::endl;
780  *out << " <td>"<< i << "</td>" << std::endl;
781  *out << " <td>" << trh_.getl1pre(i) << "</td>" << std::endl;
782  *out << " <td>" << trh_.getaccept(i) << "</td>" << std::endl;
783  *out << " <td >" << trh_.getfailed(i) << "</td>" << std::endl;
784  *out << " <td ";
785  if(trh_.getexcept(i) !=0)
786  *out << "bgcolor=\"red\"" << std::endl;
787  *out << ">" << trh_.getexcept(i) << "</td>" << std::endl;
788  *out << " </tr >" << std::endl;
789 
790  }
791 
792 
793  *out << "</table>" << std::endl;
794  *out << "</td>" << std::endl;
795  *out << "</tr>" << std::endl;
796  *out << "</table>" << std::endl;
797  }
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:151
void evf::FWEPWrapper::taskWebPage ( xgi::Input in,
xgi::Output out,
const std::string &  urn 
)

Definition at line 801 of file FWEPWrapper.cc.

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

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

802  {
803  // std::string urn = xappDesc_->getURN();
804  ModuleWebRegistry *mwr = 0;
806  try{
808  mwr = edm::Service<ModuleWebRegistry>().operator->();
809  }
810  catch(...) {
811  LOG4CPLUS_WARN(log_,
812  "Exception when trying to get service ModuleWebRegistry");
813  }
814  TimeProfilerService *tpr = 0;
815  try{
816  if(edm::Service<TimeProfilerService>().isAvailable())
818  }
819  catch(...) {
820  }
821 
822  *out << "<table>" << std::endl;
823 
824  *out << "<tr valign=\"top\">" << std::endl;
825  *out << "<td>" << std::endl;
826 
827 
828  edm::TriggerReport tr;
830 
831  // trigger summary table
832  *out << "<table border=1 bgcolor=\"#CFCFCF\">" << std::endl;
833  *out << " <tr>" << std::endl;
834  *out << " <th colspan=7>" << std::endl;
835  *out << " " << "Trigger Summary" << std::endl;
836  *out << " </th>" << std::endl;
837  *out << " </tr>" << std::endl;
838 
839  *out << " <tr >" << std::endl;
840  *out << " <th >Path</th>" << std::endl;
841  *out << " <th >Exec</th>" << std::endl;
842  *out << " <th >Pass</th>" << std::endl;
843  *out << " <th >Fail</th>" << std::endl;
844  *out << " <th >Except</th>" << std::endl;
845  *out << " <th >TargetPF</th>" << std::endl;
846  *out << " </tr>" << std::endl;
847  xdata::Serializable *psid = 0;
848  try{
849  psid = applicationInfoSpace_->find("prescaleSetIndex");
850  }
852  }
853  ShmOutputModuleRegistry *sor = 0;
854  try{
855  if(edm::Service<ShmOutputModuleRegistry>().isAvailable())
857  }
858  catch(...) {
859  LOG4CPLUS_INFO(log_,
860  "exception when trying to get service ShmOutputModuleRegistry");
861  }
862 
863 
864  for(unsigned int i=0; i<tr.trigPathSummaries.size(); i++) {
865  *out << " <tr>" << std::endl;
866  *out << " <td>"<< tr.trigPathSummaries[i].name << "</td>" << std::endl;
867  *out << " <td>" << tr.trigPathSummaries[i].timesRun << "</td>" << std::endl;
868 
869  *out << " <td>" << tr.trigPathSummaries[i].timesPassed << "</td>" << std::endl;
870  *out << " <td >" << tr.trigPathSummaries[i].timesFailed << "</td>" << std::endl;
871 
872  *out << " <td ";
873  if(tr.trigPathSummaries[i].timesExcept !=0)
874  *out << "bgcolor=\"red\"" << std::endl;
875  *out << ">" << tr.trigPathSummaries[i].timesExcept << "</td>" << std::endl;
876  if(psid != 0)
877  {
878  *out << " <td>"
880  << "</td>" << std::endl;
881  }
882  else *out << " <td>N/A</td>" << std::endl;
883  *out << " </tr >" << std::endl;
884 
885  }
886 
887 
888 
889  for(unsigned int i=0; i<tr.endPathSummaries.size(); i++) {
890  std::string olab = trh_.findLabelOfModuleTypeInEndPath(tr,descs_,
891  i,"ShmStreamConsumer");
892  edm::FUShmOutputModule *o = sor->get(olab);
893  *out << " <tr>" << std::endl;
894  *out << " <td>"<< tr.endPathSummaries[i].name << "</td>" << std::endl;
895  *out << " <td>" << tr.endPathSummaries[i].timesRun << "</td>" << std::endl;
896  *out << " <td>" << (o ? o->getCounts() : -1) << "</td>" << std::endl;
897  *out << " <td >" << (o ? (tr.endPathSummaries[i].timesRun - o->getCounts()) : -1) << "</td>" << std::endl;
898  *out << " <td ";
899  if(tr.endPathSummaries[i].timesExcept !=0)
900  *out << "bgcolor=\"red\"" << std::endl;
901  *out << ">" << tr.endPathSummaries[i].timesExcept << "</td>" << std::endl;
902  *out << " <td>N/A</td>" << std::endl;
903  *out << " </tr >" << std::endl;
904 
905  }
906 
907  *out << "</table>" << std::endl;
908 
909  *out << "</td>" << std::endl;
910 
911 
912 
913  *out << "<td>" << std::endl;
914  //Process details table
915  *out << "<table frame=\"void\" rules=\"rows\" class=\"modules\">" << std::endl;
916  *out << " <tr>" << std::endl;
917  *out << " <th colspan=3>" << std::endl;
918  *out << " " << "HLT" << std::endl;
919  if(descs_.size()>0)
920  *out << " (Process " << descs_[0]->processName() << ")" << std::endl;
921  *out << " </th>" << std::endl;
922  *out << " </tr>" << std::endl;
923 
924  *out << " <tr >" << std::endl;
925  *out << " <th >" << std::endl;
926  *out << " Module" << std::endl;
927  *out << " </th>" << std::endl;
928  *out << " <th >" << std::endl;
929  *out << " Label" << std::endl;
930  *out << " </th>" << std::endl;
931  *out << " <th >" << std::endl;
932  *out << " Version" << std::endl;
933  *out << " </th>" << std::endl;
934  if(tpr)
935  {
936  *out << " <th >" << std::endl;
937  *out << " first" << std::endl;
938  *out << " </th>" << std::endl;
939  *out << " <th >" << std::endl;
940  *out << " ave" << std::endl;
941  *out << " </th>" << std::endl;
942  *out << " <th >" << std::endl;
943  *out << " max" << std::endl;
944  *out << " </th>" << std::endl;
945  }
946  *out << " </tr>" << std::endl;
947  if(mwr && mwr->checkWeb("DaqSource"))
948  *out << " <tr><td ><a href=\"/" << urn
949  << "module=DaqSource\">DaqSource</a> </td></tr>";
950 
951  for(unsigned int idesc = 0; idesc < descs_.size(); idesc++)
952  {
953  *out << " <tr>" << std::endl;
954  *out << " <td >";
955  if(mwr && mwr->checkWeb(descs_[idesc]->moduleName()))
956  *out << "<a href=\"/" << urn
957  << "module="
958  << descs_[idesc]->moduleName() << "\">"
959  << descs_[idesc]->moduleName() << "</a>";
960  else
961  *out << descs_[idesc]->moduleName();
962  *out << "</td>" << std::endl;
963  *out << " <td >";
964  *out << descs_[idesc]->moduleLabel();
965  *out << "</td>" << std::endl;
966  *out << " <td >";
967  *out << descs_[idesc]->releaseVersion();
968  *out << "</td>" << std::endl;
969  if(tpr)
970  {
971  *out << " <td align=\"right\">";
972  *out << tpr->getFirst(descs_[idesc]->moduleLabel());
973  *out << "</td>" << std::endl;
974  *out << " <td align=\"right\"";
975  *out << (tpr->getAve(descs_[idesc]->moduleLabel())>1. ? "bgcolor=\"red\"" : "")
976  << ">";
977  *out << tpr->getAve(descs_[idesc]->moduleLabel());
978  *out << "</td>" << std::endl;
979  *out << " <td align=\"right\">";
980  *out << tpr->getMax(descs_[idesc]->moduleLabel());
981  *out << "</td>" << std::endl;
982  }
983  *out << " </tr>" << std::endl;
984  }
985  *out << "</table>" << std::endl;
986  *out << "</td>" << std::endl;
987  }
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:168
log4cplus::Logger log_
Definition: FWEPWrapper.h:152
ServiceToken getToken()
edm::service::PrescaleService * prescaleSvc_
Definition: FWEPWrapper.h:148
fuep::TriggerReportHelpers trh_
Definition: FWEPWrapper.h:151
edm::EventProcessor * evtProcessor_
Definition: FWEPWrapper.h:140
xdata::InfoSpace * applicationInfoSpace_
Definition: FWEPWrapper.h:159
const std::string * moduleLabel() const
Definition: HLTadd.h:40
void getTriggerReport(TriggerReport &rep) const
unsigned int getPrescale(unsigned int lvl1Index, std::string const &prescaledPath)
void evf::FWEPWrapper::updateRollingReport ( )

Definition at line 1139 of file FWEPWrapper.cc.

References evf::lsTriplet::acc, applicationInfoSpace_, gather_cfg::cout, 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_, CommonUtil::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().

1140  {
1143  rollingLsIndex_--;
1144  xdata::UnsignedInteger32* lsp = 0;
1145  xdata::UnsignedInteger32* psp = 0;
1146  TriggerReportStatic *tr = trh_.getPackedTriggerReportAsStruct();
1147  lsTriplet lst;
1148  lst.ls = tr->lumiSection;
1149  lsid_ = tr->lumiSection;
1150  lst.proc = tr->eventSummary.totalEvents;
1151  lst.acc = tr->eventSummary.totalEventsPassed;
1152  xdata::Serializable *psid = 0;
1153  xdata::Serializable *lsid = 0;
1154  xdata::Serializable *nbs = 0;
1155  xdata::Serializable *nbsr = 0;
1156  try{
1157  lsid =applicationInfoSpace_->find("lumiSectionIndex");
1158  if(lsid!=0){
1159  lsp = ((xdata::UnsignedInteger32*)lsid);
1160  lsp->value_= tr->lumiSection;
1161  }
1162  psid = applicationInfoSpace_->find("lastLumiPrescaleIndex");
1163  if(psid!=0) {
1164  psp = ((xdata::UnsignedInteger32*)psid);
1165  if(tr->eventSummary.totalEvents != 0)
1166  psp->value_ = tr->prescaleIndex;
1167  }
1168  nbs = applicationInfoSpace_->find("nbSubProcesses");
1169  nbsr = applicationInfoSpace_->find("nbSubProcessesReporting");
1170  }
1171  catch(xdata::exception::Exception e){
1172  }
1173 
1174  xdata::Table::iterator it = scalersComplete_.begin();
1175  if(lsp)
1176  it->setField("lsid", *lsp);
1177  if(psp)
1178  it->setField("psid", *psp);
1179  if(nbs)
1180  it->setField("exprep", *nbs);
1181  else
1182  std::cout << "nbSubProcesses item not found !!!" << std::endl;
1183  if(nbsr)
1184  it->setField("effrep", *nbsr);
1185  else
1186  std::cout << "nbSubProcessesReporting item not found !!!" << std::endl;
1187 
1188  it->setField("proc",trh_.getProcThisLumi());
1189  it->setField("acc",trh_.getAccThisLumi());
1190  it->setField("triggerReport",trh_.getTableWithNames());
1192 
1193  }
TriggerReportStatic * getPackedTriggerReportAsStruct()
xdata::UnsignedInteger32 & getProcThisLumi()
static const unsigned int lsRollSize_
Definition: FWEPWrapper.h:226
unsigned int lsid_
Definition: FWEPWrapper.h:204
xdata::UnsignedInteger32 & getAccThisLumi()
xdata::Table scalersComplete_
Definition: FWEPWrapper.h:211
unsigned int rollingLsIndex_
Definition: FWEPWrapper.h:224
std::vector< lsTriplet > lumiSectionsCtr_
Definition: FWEPWrapper.h:222
fuep::TriggerReportHelpers trh_
Definition: FWEPWrapper.h:151
tuple cout
Definition: gather_cfg.py:41
xdata::InfoSpace * applicationInfoSpace_
Definition: FWEPWrapper.h:159
void evf::FWEPWrapper::withdrawLumiSectionIncrement ( )
inline
std::string evf::FWEPWrapper::wlMonitoring ( )
inline

Definition at line 94 of file FWEPWrapper.h.

References wlMonitoring_, and wlMonitoringActive_.

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

94  {
95  if(wlMonitoring_!=0 && wlMonitoring_->isActive()) return (wlMonitoringActive_ ? "active" : "inactive");
96  else return "not initialized";
97  }
toolbox::task::WorkLoop * wlMonitoring_
Definition: FWEPWrapper.h:184
bool wlMonitoringActive_
Definition: FWEPWrapper.h:186

Friends And Related Function Documentation

friend class FUEventProcessor
friend

Definition at line 237 of file FWEPWrapper.h.

Member Data Documentation

unsigned int evf::FWEPWrapper::allPastLumiProcessed_
private

Definition at line 199 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 185 of file FWEPWrapper.h.

Referenced by startMonitoringWorkLoop().

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

Definition at line 145 of file FWEPWrapper.h.

Referenced by init().

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

Definition at line 230 of file FWEPWrapper.h.

Referenced by configuration(), and init().

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

Definition at line 168 of file FWEPWrapper.h.

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

pthread_mutex_t evf::FWEPWrapper::ep_guard_lock_
private

Definition at line 235 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 178 of file FWEPWrapper.h.

Referenced by monitoring(), and publishConfigAndMonitorItems().

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

Definition at line 179 of file FWEPWrapper.h.

Referenced by monitoring(), and publishConfigAndMonitorItems().

edm::EventProcessor* evf::FWEPWrapper::evtProcessor_
private
bool evf::FWEPWrapper::hasModuleWebRegistry_
private

Definition at line 155 of file FWEPWrapper.h.

Referenced by init().

bool evf::FWEPWrapper::hasPrescaleService_
private

Definition at line 154 of file FWEPWrapper.h.

Referenced by init().

bool evf::FWEPWrapper::hasServiceWebRegistry_
private

Definition at line 156 of file FWEPWrapper.h.

Referenced by init().

bool evf::FWEPWrapper::hasSubProcesses
private

Definition at line 233 of file FWEPWrapper.h.

Referenced by init(), and monitoring().

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

Definition at line 232 of file FWEPWrapper.h.

Referenced by publishConfigAndMonitorItems().

bool evf::FWEPWrapper::isPython_
private

Definition at line 153 of file FWEPWrapper.h.

Referenced by init().

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

Definition at line 215 of file FWEPWrapper.h.

Referenced by getTriggerReport(), and publishConfigAndMonitorItems().

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

Definition at line 209 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 203 of file FWEPWrapper.h.

Referenced by microState().

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

Definition at line 226 of file FWEPWrapper.h.

Referenced by updateRollingReport().

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

Definition at line 217 of file FWEPWrapper.h.

Referenced by publishConfigAndMonitorItems().

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

Definition at line 210 of file FWEPWrapper.h.

Referenced by getTriggerReport(), and publishConfigAndMonitorItems().

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

Definition at line 218 of file FWEPWrapper.h.

Referenced by publishConfigAndMonitorItems().

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

Definition at line 213 of file FWEPWrapper.h.

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

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

Definition at line 222 of file FWEPWrapper.h.

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

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

Definition at line 223 of file FWEPWrapper.h.

Referenced by lumiSumTable().

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

Definition at line 195 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 196 of file FWEPWrapper.h.

Referenced by init(), and publishConfigAndMonitorItems().

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

Definition at line 169 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 164 of file FWEPWrapper.h.

Referenced by setMonitorInfoSpaceLegend().

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

Definition at line 174 of file FWEPWrapper.h.

Referenced by monitoring(), and publishConfigAndMonitorItems().

struct timeval evf::FWEPWrapper::monStartTime_
private

Definition at line 175 of file FWEPWrapper.h.

Referenced by startMonitoringWorkLoop().

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

Definition at line 200 of file FWEPWrapper.h.

Referenced by FWEPWrapper().

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

Definition at line 202 of file FWEPWrapper.h.

Referenced by FWEPWrapper(), and init().

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

Definition at line 201 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 236 of file FWEPWrapper.h.

Referenced by notstarted_state_code(), and publishConfigAndMonitorItems().

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

Definition at line 231 of file FWEPWrapper.h.

Referenced by getTriggerReport(), and init().

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

Definition at line 214 of file FWEPWrapper.h.

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

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

Definition at line 148 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 227 of file FWEPWrapper.h.

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

unsigned int evf::FWEPWrapper::rollingLsIndex_
private

Definition at line 224 of file FWEPWrapper.h.

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

bool evf::FWEPWrapper::rollingLsWrap_
private

Definition at line 225 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 207 of file FWEPWrapper.h.

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

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

Definition at line 208 of file FWEPWrapper.h.

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

unsigned int evf::FWEPWrapper::scalersUpdateAttempted_
private

Definition at line 220 of file FWEPWrapper.h.

Referenced by fireScalersUpdate().

unsigned int evf::FWEPWrapper::scalersUpdateCounter_
private

Definition at line 221 of file FWEPWrapper.h.

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

bool evf::FWEPWrapper::servicesDone_
private

Definition at line 143 of file FWEPWrapper.h.

Referenced by init().

edm::ServiceToken evf::FWEPWrapper::serviceToken_
private
std::vector<std::string> evf::FWEPWrapper::statmod_
private

Definition at line 171 of file FWEPWrapper.h.

Referenced by publishConfigAndMonitorItems(), and stateNameFromIndex().

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

Definition at line 166 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 139 of file FWEPWrapper.h.

Referenced by moduleNameFromIndex(), and stateNameFromIndex().

bool evf::FWEPWrapper::waitingForLs_
private

Definition at line 234 of file FWEPWrapper.h.

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

bool evf::FWEPWrapper::watching_
private

Definition at line 187 of file FWEPWrapper.h.

Referenced by stop(), and stopAndHalt().

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

Definition at line 184 of file FWEPWrapper.h.

Referenced by startMonitoringWorkLoop(), and wlMonitoring().

bool evf::FWEPWrapper::wlMonitoringActive_
private

Definition at line 186 of file FWEPWrapper.h.

Referenced by startMonitoringWorkLoop(), and wlMonitoring().

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

Definition at line 229 of file FWEPWrapper.h.

Referenced by createAndSendScalersMessage(), and setAppCtxt().

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

Definition at line 228 of file FWEPWrapper.h.

Referenced by createAndSendScalersMessage(), and setAppDesc().