CMS 3D CMS Logo

Public Member Functions | Private Attributes | Static Private Attributes | Friends

evf::FWEPWrapper Class Reference

#include <FWEPWrapper.h>

List of all members.

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 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_
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 46 of file FWEPWrapper.h.


Constructor & Destructor Documentation

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

Definition at line 52 of file FWEPWrapper.cc.

    : evtProcessor_(0)
    , serviceToken_()
    , servicesDone_(false)
    , epInitialized_(false)
    , prescaleSvc_(0)
    , log_(log)
    , isPython_(true)
    , hasPrescaleService_(false)
    , hasModuleWebRegistry_(false)
    , hasServiceWebRegistry_(false)
    , monitorInfoSpace_(0) 
    , monitorInfoSpaceLegend_(0) 
    , timeoutOnStop_(3)
    , monSleepSec_(1)
    , nbProcessed_(0)
    , nbAccepted_(0)
    , wlMonitoring_(0)
    , asMonitoring_(0)
    , wlMonitoringActive_(false)
    , watching_(false)
    , allPastLumiProcessed_(0)
    , lsid_(0)
    , psid_(0)
    , lsTimeOut_(100000000)
    , lumiSectionIndex_(1)
    , prescaleSetIndex_(0)
    , lastLumiPrescaleIndex_(0)
    , lastLumiUsingEol_(0)
    , lsTimedOut_(false)
    , lsToBeRecovered_(true)
    , scalersUpdateAttempted_(0)
    , scalersUpdateCounter_(0)
    , lumiSectionsCtr_(lsRollSize_+1)
    , lumiSectionsTo_(lsRollSize_)
    , rollingLsIndex_(lsRollSize_-1)
    , rollingLsWrap_(false)
    , rcms_(0)
    , instance_(instance)
    , waitingForLs_(false)
    , mwrRef_(nullptr)
    , sorRef_(nullptr)
  {
    //list of variables for scalers flashlist
    names_.push_back("lumiSectionIndex");
    names_.push_back("prescaleSetIndex");
    names_.push_back("scalersTable");
    namesStatusLegenda_.push_back("macroStateLegenda");
    namesStatusLegenda_.push_back("microStateLegenda");
    namesScalersLegenda_.push_back("scalersLegenda");
    //some initialization of state data
    epMAltState_ = -1;
    epmAltState_ = -1;
    pthread_mutex_init(&ep_guard_lock_,0);
  }

evf::FWEPWrapper::~FWEPWrapper ( ) [virtual]

Definition at line 108 of file FWEPWrapper.cc.


Member Function Documentation

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

Definition at line 100 of file FWEPWrapper.h.

References configuration_.

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

{return configuration_;}
void evf::FWEPWrapper::createAndSendScalersMessage ( )

Definition at line 1207 of file FWEPWrapper.cc.

References asciidump::at, alignCSCRings::e, Exception, log_, python::rootplot::argparse::message, lumiQueryAPI::msg, rcms_, scalersComplete_, corrections_cfg::tagName, xappCtxt_, and xappDesc_.

Referenced by fireScalersUpdate().

  {
    toolbox::net::URL url(rcms_->getContextDescriptor()->getURL());
    toolbox::net::URL at(xappDesc_->getContextDescriptor()->getURL() + "/" + xappDesc_->getURN());
    toolbox::net::URL properurl(url.getProtocol(),url.getHost(),url.getPort(),"");
    xdaq::ContextDescriptor *ctxdsc = new xdaq::ContextDescriptor(properurl.toString());
    xdaq::ApplicationDescriptor *appdesc = new xdaq::ApplicationDescriptorImpl(ctxdsc,rcms_->getClassName(),rcms_->getLocalId(), "pippo");
    
    appdesc->setAttribute("path","/rcms/servlet/monitorreceiver");

    xoap::MessageReference msg = xoap::createMessage();
    xoap::SOAPEnvelope envelope = msg->getSOAPPart().getEnvelope();
    xoap::SOAPName responseName = envelope.createName( "report", xmas::NamespacePrefix, xmas::NamespaceUri);
    (void) envelope.getBody().addBodyElement ( responseName );          
    xoap::SOAPName reportName ("report", xmas::NamespacePrefix, xmas::NamespaceUri);
    xoap::SOAPElement reportElement = envelope.getBody().getChildElements(reportName)[0];
    reportElement.addNamespaceDeclaration (xmas::sensor::NamespacePrefix, xmas::sensor::NamespaceUri);
    xoap::SOAPName sampleName = envelope.createName( "sample", xmas::NamespacePrefix, xmas::NamespaceUri);
    xoap::SOAPElement sampleElement = reportElement.addChildElement(sampleName);
    xoap::SOAPName flashListName = envelope.createName( "flashlist", "", "");
    sampleElement.addAttribute(flashListName,"urn:xdaq-flashlist:scalers");
    xoap::SOAPName tagName = envelope.createName( "tag", "", "");
    sampleElement.addAttribute(tagName,"tag");
    xoap::MimeHeaders* headers = msg->getMimeHeaders();
    headers->removeHeader("x-xdaq-tags");
    headers->addHeader("x-xdaq-tags", "tag");
    tagName = envelope.createName( "originator", "", "");
    sampleElement.addAttribute(tagName,at.toString());

    xdata::exdr::AutoSizeOutputStreamBuffer outBuffer;
    xdata::exdr::Serializer serializer;
    try
      {
        serializer.exportAll( &scalersComplete_, &outBuffer );
      }
    catch(xdata::exception::Exception & e)
      {
        LOG4CPLUS_WARN(log_,
                       "Exception in serialization of scalers table");      
        //      localLog("-W- Exception in serialization of scalers table");      
        throw;
      }
  
    xoap::AttachmentPart * attachment = msg->createAttachmentPart(outBuffer.getBuffer(), outBuffer.tellp(), "application/x-xdata+exdr");
    attachment->setContentEncoding("binary");
    tagName = envelope.createName( "tag", "", "");
    sampleElement.addAttribute(tagName,"tag");
    std::stringstream contentId;

    contentId << "<" <<  "urn:xdaq-flashlist:scalers" << "@" << at.getHost() << ">";
    attachment->setContentId(contentId.str());
    std::stringstream contentLocation;
    contentId << at.toString();
    attachment->setContentLocation(contentLocation.str());
  
    std::stringstream disposition;
    disposition << "attachment; filename=" << "urn:xdaq-flashlist:scalers" << ".exdr; creation-date=" << "\"" << "dummy" << "\"";
    attachment->addMimeHeader("Content-Disposition",disposition.str());
    msg->addAttachmentPart(attachment);

    try{
      xappCtxt_->postSOAP(msg,*(xappDesc_),*appdesc);
    }
    catch(xdaq::exception::Exception &ex)
      {
        std::string message = "exception when posting SOAP message to MonitorReceiver";
        message += ex.what();
        LOG4CPLUS_WARN(log_,message.c_str());
        std::string lmessage = "-W- "+message;
        delete appdesc; 
        delete ctxdsc;
        throw;
        //      localLog(lmessage);
      }
    delete appdesc; 
    delete ctxdsc;
  }
}
bool evf::FWEPWrapper::fireScalersUpdate ( )

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

  {
    //    trh_.printReportTable();
    scalersUpdateAttempted_++;
    //@@EM commented out on
    // @@EM 21.06.2011 - this flashlist is too big to be handled by LAS 
    /*
    try{
      //      scalersInfoSpace_->unlock();
      // scalersInfoSpace_->fireItemGroupChanged(names_,0); 
      ::usleep(10);
      //      scalersInfoSpace_->lock();
    }
    catch(xdata::exception::Exception &e)
      {
        LOG4CPLUS_ERROR(log_, "Exception from fireItemGroupChanged: " << e.what());
        //      localLog(e.what());
        return false;
      }
    */
    //@@EM added on 21.06.2011 
    // refresh the microstate legenda every 10 lumisections
    if(scalersUpdateAttempted_%10 == 0)
      monitorLegendaInfoSpace_->fireItemGroupChanged(namesStatusLegenda_,0);
    
    //if there is no state listener then do not attempt to send to monitorreceiver
    if(rcms_==0) return false;
    try{
      if(trh_.getProcThisLumi()!=0U)
        createAndSendScalersMessage();
      scalersUpdateCounter_++;
    }
    catch(...){return false;}
    return true;
  }

void evf::FWEPWrapper::forceInitEventProcessorMaybe ( ) [inline]

Definition at line 67 of file FWEPWrapper.h.

References epInitialized_.

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

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

Definition at line 137 of file FWEPWrapper.h.

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

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

{return trh_.getLumiSectionReferenceIndex();}
std::vector<std::string> const& evf::FWEPWrapper::getmicromap ( ) const [inline]

Definition at line 139 of file FWEPWrapper.h.

References mapmod_.

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

{ return mapmod_;}
ModuleWebRegistry * evf::FWEPWrapper::getModuleWebRegistry ( )
unsigned int evf::FWEPWrapper::getNumberOfMicrostates ( ) [inline]

Definition at line 138 of file FWEPWrapper.h.

References mapmod_.

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

{return mapmod_.size();}
MsgBuf& evf::FWEPWrapper::getPackedTriggerReport ( ) [inline]

Definition at line 112 of file FWEPWrapper.h.

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

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

{return trh_.getPackedTriggerReport();}
TriggerReportStatic* evf::FWEPWrapper::getPackedTriggerReportAsStruct ( ) [inline]

Definition at line 113 of file FWEPWrapper.h.

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

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

{return trh_.getPackedTriggerReportAsStruct();}
unsigned int evf::FWEPWrapper::getScalersUpdates ( ) [inline]

Definition at line 134 of file FWEPWrapper.h.

References scalersUpdateCounter_.

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

ShmOutputModuleRegistry * evf::FWEPWrapper::getShmOutputModuleRegistry ( )
bool evf::FWEPWrapper::getTriggerReport ( bool  useLock)

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

  {
    edm::ServiceRegistry::Operate operate(serviceToken_);
    // Calling this method results in calling 
    // evtProcessor_->getTriggerReport, the value returned is encoded as
    // a xdata::Table.

    LOG4CPLUS_DEBUG(log_,"getTriggerReport action invoked");

    //Get the trigger report.
    ModuleWebRegistry *mwr = 0;
    try{
      if(edm::Service<ModuleWebRegistry>().isAvailable())
        mwr = edm::Service<ModuleWebRegistry>().operator->();
    }
    catch(...) { 
      LOG4CPLUS_INFO(log_,
                     "exception when trying to get service ModuleWebRegistry");
      return false;
    }
    edm::TriggerReport tr; 
    if(mwr==0) return false;

    unsigned int ls = 0;
    unsigned int ps = 0;
    timeval tv;
    if(useLock) {
      gettimeofday(&tv,0);
      //      std::cout << getpid() << " calling openBackdoor " << std::endl;
      //waitingForLs_ = true;//moving this behind mutex lock
      mwr->openBackDoor("DaqSource",lsTimeOut_,&waitingForLs_);
      //      std::cout << getpid() << " opened Backdoor " << std::endl;
    }

    xdata::Table::iterator it = scalersComplete_.begin();
    ps = lastLumiPrescaleIndex_.value_;
    //  if(prescaleSvc_ != 0) prescaleSvc_->setIndex(ps);
    it->setField("psid",lastLumiPrescaleIndex_);
    psid_ = prescaleSetIndex_.value_;
    if(prescaleSvc_ != 0) prescaleSvc_->setIndex(psid_);
    ls = lumiSectionIndex_.value_;
    localLsIncludingTimeOuts_.value_ = ls;
    it->setField("lsid", localLsIncludingTimeOuts_);

    lsTriplet lst;
    lst.ls = localLsIncludingTimeOuts_.value_;
    lst.proc = evtProcessor_->totalEvents()-allPastLumiProcessed_;
    lst.acc = evtProcessor_->totalEventsPassed()-
      (rollingLsWrap_ ? lumiSectionsCtr_[0].acc : lumiSectionsCtr_[rollingLsIndex_+1].acc);
       lumiSectionsCtr_[rollingLsIndex_] = lst;
    allPastLumiProcessed_ = evtProcessor_->totalEvents();


    evtProcessor_->getTriggerReport(tr);

    if(useLock){
      //      std::cout << getpid() << " calling closeBackdoor " << std::endl;
      mwr->closeBackDoor("DaqSource");
      //      std::cout << getpid() << " closed Backdoor " << std::endl;
    }  

    trh_.formatReportTable(tr,descs_,pathTable_,false);


    trh_.triggerReportUpdate(tr,ls,ps,trh_.checkLumiSection(ls));
    ShmOutputModuleRegistry *sor = 0;
    try{
      if(edm::Service<ShmOutputModuleRegistry>().isAvailable())
        sor = edm::Service<ShmOutputModuleRegistry>().operator->();
    }
    catch(...) { 
      LOG4CPLUS_INFO(log_,
                     "exception when trying to get service ShmOutputModuleRegistry");
      return false;
    }


    trh_.packTriggerReport(tr,sor);
    it->setField("triggerReport",trh_.getTableWithNames());
    //    std::cout << getpid() << " returning normally from gettriggerreport " << std::endl;
    return true;
  }

void evf::FWEPWrapper::init ( unsigned short  serviceMap,
std::string &  configString 
)

Definition at line 191 of file FWEPWrapper.cc.

References applicationInfoSpace_, evf::ModuleWebRegistry::clear(), evf::ShmOutputModuleRegistry::clear(), configString_, configuration_, edm::ServiceRegistry::createSet(), descs_, alignCSCRings::e, ep_guard_lock_, epInitialized_, evtProcessor_, exception, 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_, mwrRef_, 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_, sorRef_, and trh_.

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

  {
    hasPrescaleService_ = serviceMap & 0x1;
    hasModuleWebRegistry_ = serviceMap & 0x2;
    hasServiceWebRegistry_ = serviceMap & 0x4;
    bool instanceZero = serviceMap & 0x8;
    hasSubProcesses = serviceMap & 0x10;
    configString_ = configString;
    trh_.resetFormat(); //reset the report table even if HLT didn't change
    scalersUpdateCounter_ = 0;
    if (epInitialized_) {
      LOG4CPLUS_INFO(log_,"CMSSW EventProcessor already initialized: skip!");
      return;
    }
      
    LOG4CPLUS_INFO(log_,"Initialize CMSSW EventProcessor.");
    LOG4CPLUS_INFO(log_,"CMSSW_BASE:"<<getenv("CMSSW_BASE"));
  

    // job configuration string
    ParameterSetRetriever pr(configString_);
    configuration_ = pr.getAsString();
    pathTable_     = pr.getPathTableAsString();
    
    if (configString_.size() > 3 && configString_.substr(configString_.size()-3) == ".py") isPython_ = true;
    boost::shared_ptr<edm::ParameterSet> params; // change this name!
    boost::shared_ptr<std::vector<edm::ParameterSet> > pServiceSets;
    boost::shared_ptr<edm::ProcessDesc> pdesc;
    if(isPython_)
      {
        PythonProcessDesc ppdesc = PythonProcessDesc(configuration_);
        pdesc = ppdesc.processDesc();
      }
    else
      pdesc = boost::shared_ptr<edm::ProcessDesc>(new edm::ProcessDesc(configuration_));
    pServiceSets = pdesc->getServicesPSets();
    // add default set of services
    if(!servicesDone_) {
      //DQMStore should not be created in the Master (MP case) since this poses problems in the slave
      if(!hasSubProcesses){
        internal::addServiceMaybe(*pServiceSets,"DQMStore");
        internal::addServiceMaybe(*pServiceSets,"DQM");
      }
      else{
        internal::removeServiceMaybe(*pServiceSets,"DQMStore");
        internal::removeServiceMaybe(*pServiceSets,"DQM");
      }
      internal::addServiceMaybe(*pServiceSets,"MLlog4cplus");
      internal::addServiceMaybe(*pServiceSets,"MicroStateService");
      internal::addServiceMaybe(*pServiceSets,"ShmOutputModuleRegistry");
      if(hasPrescaleService_) internal::addServiceMaybe(*pServiceSets,"PrescaleService");
      if(hasModuleWebRegistry_) internal::addServiceMaybe(*pServiceSets,"ModuleWebRegistry");
      if(hasServiceWebRegistry_) internal::addServiceMaybe(*pServiceSets,"ServiceWebRegistry");
    
      try{
        serviceToken_ = edm::ServiceRegistry::createSet(*pServiceSets);
        internal::addServiceMaybe(*pServiceSets,"DQMStore");
        internal::addServiceMaybe(*pServiceSets,"DQM");
        //      slaveServiceToken_ = edm::ServiceRegistry::createSet(*pServiceSets);
      }
      catch(cms::Exception &e) {
        LOG4CPLUS_ERROR(log_,e.explainSelf());
      }    
      catch(std::exception &e) {
        LOG4CPLUS_ERROR(log_,e.what());
      }
      catch(...) {
        LOG4CPLUS_ERROR(log_,"Unknown Exception");
      }
      servicesDone_ = true;
    }
  
    edm::ServiceRegistry::Operate operate(serviceToken_);


    //test rerouting of fwk logging to log4cplus
    edm::LogInfo("FWEPWrapper")<<"started MessageLogger Service.";
    edm::LogInfo("FWEPWrapper")<<"Using config \n"<<configuration_;

    DQMStore *dqm = 0;
    try{
      if(edm::Service<DQMStore>().isAvailable())
        dqm = edm::Service<DQMStore>().operator->();
    }
    catch(...) { 
      LOG4CPLUS_INFO(log_,
                     "exception when trying to get service DQMStore");
    }
    if(dqm!=0) dqm->rmdir("");
  

    ModuleWebRegistry *mwr = 0;
    try{
      if(edm::Service<ModuleWebRegistry>().isAvailable())
        mwr = edm::Service<ModuleWebRegistry>().operator->();
    }
    catch(...) { 
      LOG4CPLUS_INFO(log_,
                     "exception when trying to get service ModuleWebRegistry");
    }
    mwrRef_=mwr;

    if(mwr) mwr->clear(); // in case we are coming from stop we need to clear the mwr

    ServiceWebRegistry *swr = 0;
    try{
      if(edm::Service<ServiceWebRegistry>().isAvailable())
        swr = edm::Service<ServiceWebRegistry>().operator->();
    }
    catch(...) { 
      LOG4CPLUS_INFO(log_,
                     "exception when trying to get service ModuleWebRegistry");
    }
    ShmOutputModuleRegistry *sor = 0;
    try{
      if(edm::Service<ShmOutputModuleRegistry>().isAvailable())
        sor = edm::Service<ShmOutputModuleRegistry>().operator->();
    }
    catch(...) { 
      LOG4CPLUS_INFO(log_,
                     "exception when trying to get service ShmOutputModuleRegistry");
    }
    sorRef_=sor;

    if(sor) sor->clear();
    //  if(swr) swr->clear(); // in case we are coming from stop we need to clear the swr


    // instantiate the event processor - fatal exceptions are caught in the main application

    std::vector<std::string> defaultServices;
    std::vector<std::string> forcedServices;
    defaultServices.push_back("MessageLogger");
    defaultServices.push_back("InitRootHandlers");
    defaultServices.push_back("JobReportService");
    pdesc->addServices(defaultServices, forcedServices);
    pthread_mutex_lock(&ep_guard_lock_);
    if (0!=evtProcessor_) delete evtProcessor_;
    
    evtProcessor_ = new edm::EventProcessor(pdesc,
                                            serviceToken_,
                                            edm::serviceregistry::kTokenOverrides);
    pthread_mutex_unlock(&ep_guard_lock_);
    //    evtProcessor_->setRunNumber(runNumber_.value_);
    /* removed     
    if(!outPut_)
      evtProcessor_->enableEndPaths(outPut_);    
    outprev_=outPut_;
    */
    // publish all module names to XDAQ infospace
    
    if(mwr) 
      {
        mwr->publish(applicationInfoSpace_);
        mwr->publishToXmas(scalersInfoSpace_);
      }
    if(swr) 
      {
        swr->publish(applicationInfoSpace_);
      }
    // get the prescale service
    LOG4CPLUS_INFO(log_,
                   "Checking for edm::service::PrescaleService!");
    try {
      if(edm::Service<edm::service::PrescaleService>().isAvailable())
        {
          LOG4CPLUS_INFO(log_,
                         "edm::service::PrescaleService is available!");
          prescaleSvc_ = edm::Service<edm::service::PrescaleService>().operator->();
          LOG4CPLUS_INFO(log_,
                         "Obtained pointer to PrescaleService");
        }
    }
    catch(...) {
      LOG4CPLUS_INFO(log_,
                     "exception when trying to get service "
                     <<"edm::service::PrescaleService");
    }
    const edm::ParameterSet *prescaleSvcConfig = internal::findService(*pServiceSets,"PrescaleService");
    if(prescaleSvc_ != 0 && prescaleSvcConfig !=0) prescaleSvc_->reconfigure(*prescaleSvcConfig);
  
    monitorLegendaInfoSpace_->lock();
    //fill microstate legenda information
    descs_ = evtProcessor_->getAllModuleDescriptions();

    std::stringstream oss2;
    unsigned int outcount = 0;
    oss2 << 0 << "=Invalid ";
    oss2 << 1 << "=FwkOvh ";
    oss2 << 2 << "=Input ";
    modmap_["Invalid"]=0;
    modmap_["FWKOVH"]=1;
    modmap_["INPUT"]=2;
    mapmod_.resize(descs_.size()+4); // all modules including output plus one input plus DQM plus the invalid state 0
    mapmod_[0]="Invalid";
    mapmod_[1]="FWKOVH";
    mapmod_[2]="INPUT";
    outcount+=2;
    for(unsigned int j = 0; j < descs_.size(); j++)
      {
        if(descs_[j]->moduleName() == "ShmStreamConsumer") // find something better than hardcoding name
          { 
            outcount++;
            oss2 << outcount << "=" << descs_[j]->moduleLabel() << " ";
            modmap_[descs_[j]->moduleLabel()]=outcount;
            mapmod_[outcount] = descs_[j]->moduleLabel();
          }
      }
    modmap_["DQM"]=outcount+1;
    mapmod_[outcount+1]="DQM";
    oss2 << outcount+1 << "=DQMHistograms ";
    unsigned int modcount = 1;
    for(unsigned int i = 0; i < descs_.size(); i++)
      {
        if(descs_[i]->moduleName() != "ShmStreamConsumer")
          {
            modcount++;
            oss2 << outcount+modcount << "=" << descs_[i]->moduleLabel() << " ";
            modmap_[descs_[i]->moduleLabel()]=outcount+modcount;
            mapmod_[outcount+modcount] = descs_[i]->moduleLabel();
          }
      }
//     std::cout << "*******************************microstate legend**************************" << std::endl;
//     std::cout << oss2.str() << std::endl;
//     std::cout << "*******************************microstate legend**************************" << std::endl;

    if(instanceZero){
      micro_state_legend_ = oss2.str().c_str();
    }
    monitorLegendaInfoSpace_->unlock();
    try{
      monitorLegendaInfoSpace_->fireItemGroupChanged(namesStatusLegenda_,0);
      scalersLegendaInfoSpace_->fireItemGroupChanged(namesScalersLegenda_,0);
      ::usleep(10);
    }
    catch(xdata::exception::Exception &e)
      {
        LOG4CPLUS_ERROR(log_, "Exception from fireItemGroupChanged: " << e.what());
      }
    LOG4CPLUS_INFO(log_," edm::EventProcessor configuration finished.");
    edm::TriggerReport tr;
    evtProcessor_->getTriggerReport(tr);
    trh_.formatReportTable(tr,descs_,pathTable_,instanceZero);
    epInitialized_ = true;
    return;
  }

bool evf::FWEPWrapper::isWaitingForLs ( ) [inline]
lsTriplet& evf::FWEPWrapper::lastLumi ( ) [inline]

Definition at line 131 of file FWEPWrapper.h.

References lumiSectionsCtr_, and rollingLsIndex_.

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

void evf::FWEPWrapper::lumiSumTable ( xgi::Output *  out)

Definition at line 1095 of file FWEPWrapper.cc.

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

  {
    // lumisection summary table
    *out << "   <table border=1 bgcolor=\"#CFCFCF\">" << std::endl;
    *out << "     <tr>"                                                 << std::endl;
    *out << "       <td> LS </td>";
    if(rollingLsWrap_)
      {
        for(unsigned int i = rollingLsIndex_; i < lumiSectionsCtr_.size(); i++)
          *out << "<td " << (lumiSectionsTo_[i] ? "bgcolor=\"red\"" : "")
               << ">" << lumiSectionsCtr_[i].ls << "</td>" << std::endl;
        for(unsigned int i = 0; i < rollingLsIndex_; i++)
          *out << "<td " << (lumiSectionsTo_[i] ? "bgcolor=\"red\"" : "")
               << ">" << lumiSectionsCtr_[i].ls << "</td>" << std::endl;
      }
    else
      for(unsigned int i = rollingLsIndex_; i < lumiSectionsCtr_.size(); i++)
        *out << "<td  " << (lumiSectionsTo_[i] ? "bgcolor=\"red\"" : "")
             << ">" << lumiSectionsCtr_[i].ls << "</td>" << std::endl;
    
    *out << "     </tr>"                                                        << std::endl;    
    *out << "     <tr>"                                                 << std::endl;
    *out << "       <td> Ev </td>";
    if(rollingLsWrap_)
      {
        for(unsigned int i = rollingLsIndex_; i < lumiSectionsCtr_.size(); i++)
          *out << "<td>" << lumiSectionsCtr_[i].proc << "</td>" << std::endl;
        for(unsigned int i = 0; i < rollingLsIndex_; i++)
          *out << "<td>" << lumiSectionsCtr_[i].proc << "</td>" << std::endl;
      }
    else
      for(unsigned int i = rollingLsIndex_; i < lumiSectionsCtr_.size(); i++)
        *out << "<td>" << lumiSectionsCtr_[i].proc << "</td>" << std::endl;
    *out << "     </tr>"                                                        << std::endl;    
    *out << "     <tr>"                                                 << std::endl;
    *out << "       <td> Acc </td>";
    if(rollingLsWrap_)
      {
        for(unsigned int i = rollingLsIndex_; i < lumiSectionsCtr_.size(); i++)
          *out << "<td>" << lumiSectionsCtr_[i].acc << "</td>" << std::endl;
        for(unsigned int i = 0; i < rollingLsIndex_; i++)
          *out << "<td>" << lumiSectionsCtr_[i].acc << "</td>" << std::endl;
      }
    else
      for(unsigned int i = rollingLsIndex_; i < lumiSectionsCtr_.size(); i++)
        *out << "<td>" << lumiSectionsCtr_[i].acc << "</td>" << std::endl;
    *out << "     </tr>"                                                        << std::endl;    
    *out << "</table>" << std::endl;
  }

void evf::FWEPWrapper::makeServicesOnly ( )

Definition at line 438 of file FWEPWrapper.cc.

References serviceToken_.

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

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

  {
    edm::ServiceRegistry::Operate operate(serviceToken_);
    MicroStateService *mss = 0;
    std::string micro1 = "unavailable";
    if(epInitialized_)
      micro1 = "initialized";
    std::string micro2 = "unavailable";
    if(evtProcessor_!=0 && evtProcessor_->getState() != edm::event_processor::sInit)
      {
        try{
        mss = edm::Service<MicroStateService>().operator->();
        }
        catch(...) { 
          LOG4CPLUS_INFO(log_,
                         "exception when trying to get service MicroStateService");
        }
        pthread_mutex_lock(&ep_guard_lock_);
        if(evtProcessor_!=0) micro1 = evtProcessor_->currentStateName();
        pthread_mutex_unlock(&ep_guard_lock_);
      }

    if(mss) {
      micro2 = mss->getMicroState2();
    }

    //    *out << fsm_.stateName()->toString() << std::endl;   
    *out << "<td>" << micro1 << "</td>";
    *out << "<td>" << micro2 << "</td>";
    *out << "<td>" << nbAccepted_.value_ << "/" << nbProcessed_.value_  
         << " (" << float(nbAccepted_.value_)/float(nbProcessed_.value_)*100. <<"%)" << "</td>";
    *out << "<td>" << lsid_ << "/" << lsidTimedOutAsString_ << "</td>";
    *out << "<td>" << psid_ << "</td>";
    

  }
  
std::string const& evf::FWEPWrapper::moduleNameFromIndex ( unsigned int  i) const [inline]

Definition at line 120 of file FWEPWrapper.h.

References mapmod_, and unknown.

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

      {
        if(i<mapmod_.size()) return mapmod_[i];
        else return unknown;
      }
void evf::FWEPWrapper::moduleWeb ( xgi::Input *  in,
xgi::Output *  out 
)

Definition at line 1001 of file FWEPWrapper.cc.

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

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

  {
    using namespace cgicc;
    Cgicc cgi(in);
    std::vector<FormEntry> el1;
    cgi.getElement("module",el1);
    if(evtProcessor_)  {
      if(el1.size()!=0) {
        std::string mod = el1[0].getValue();
        edm::ServiceRegistry::Operate operate(evtProcessor_->getToken());
        ModuleWebRegistry *mwr = 0;
        try{
          if(edm::Service<ModuleWebRegistry>().isAvailable())
            mwr = edm::Service<ModuleWebRegistry>().operator->();
        }
        catch(...) { 
          LOG4CPLUS_WARN(log_,
                         "Exception when trying to get service ModuleWebRegistry");
        }
        mwr->invoke(in,out,mod);
      }
    }
    else {
      *out<<"EventProcessor just disappeared "<<std::endl;
    }
  }
  
bool evf::FWEPWrapper::monitoring ( toolbox::task::WorkLoop *  wl)

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

  {
  
    struct timeval  monEndTime;
    struct timezone timezone;
    gettimeofday(&monEndTime,&timezone);
    edm::ServiceRegistry::Operate operate(serviceToken_);
    MicroStateService *mss = 0;
    if(!hasSubProcesses) monitorInfoSpace_->lock();
    if(evtProcessor_)
      {
        epMState_ = evtProcessor_->currentStateName();
        epMAltState_ = (int) evtProcessor_->getState();
      }
    else
      {
        epMState_ = "Off";
        epMAltState_ = -1;
      }
    if(0 != evtProcessor_ && evtProcessor_->getState() != edm::event_processor::sInit)
      {
        try{
          mss = edm::Service<MicroStateService>().operator->();
        }
        catch(...) { 
          LOG4CPLUS_INFO(log_,
                         "exception when trying to get service MicroStateService");
        }
        lsid_ = lumiSectionIndex_.value_;
        psid_ = prescaleSetIndex_.value_;
      }
    if(mss) 
      {
        epmState_  = mss->getMicroState2();
        epmAltState_ = modmap_[mss->getMicroState2()];
      }
    if(evtProcessor_)
      {
        nbProcessed_ = evtProcessor_->totalEvents();
        nbAccepted_  = evtProcessor_->totalEventsPassed(); 
      }
    if(!hasSubProcesses) monitorInfoSpace_->unlock();  

    ::sleep(monSleepSec_.value_);
    return true;
  }

int evf::FWEPWrapper::notstarted_state_code ( ) const [inline]

Definition at line 130 of file FWEPWrapper.h.

References notstarted_state_code_.

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

evf::FWEPWrapper::operator bool ( ) [inline]

Definition at line 62 of file FWEPWrapper.h.

References epInitialized_.

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

Definition at line 61 of file FWEPWrapper.h.

References evtProcessor_.

{return evtProcessor_;}
void evf::FWEPWrapper::publishConfigAndMonitorItems ( bool  multi)

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

  {

    applicationInfoSpace_->fireItemAvailable("monSleepSec",             &monSleepSec_);
    applicationInfoSpace_->fireItemAvailable("timeoutOnStop",           &timeoutOnStop_);
    applicationInfoSpace_->fireItemAvailable("lsTimeOut",               &lsTimeOut_);

    applicationInfoSpace_->fireItemAvailable("lumiSectionIndex",        &lumiSectionIndex_);
    applicationInfoSpace_->fireItemAvailable("prescaleSetIndex",        &prescaleSetIndex_);
    applicationInfoSpace_->fireItemAvailable("lastLumiPrescaleIndex",   &lastLumiPrescaleIndex_);
    applicationInfoSpace_->fireItemAvailable("lastLumiUsingEol",        &lastLumiUsingEol_);
    applicationInfoSpace_->fireItemAvailable("lsTimedOut",              &lsTimedOut_);
    applicationInfoSpace_->fireItemAvailable("lsToBeRecovered",         &lsToBeRecovered_);

    monitorLegendaInfoSpace_->fireItemAvailable("macroStateLegenda",           &macro_state_legend_);
    monitorLegendaInfoSpace_->fireItemAvailable("microStateLegenda",           &micro_state_legend_);

    monitorInfoSpace_->fireItemAvailable("epMacroState",                &epMState_);
    monitorInfoSpace_->fireItemAvailable("epMicroState",                &epmState_);

    xdata::Table &stbl = trh_.getTable(); 
    scalersInfoSpace_->fireItemAvailable("scalersTable", &stbl);
    scalersInfoSpace_->fireItemAvailable("lumiSectionIndex",      &lumiSectionIndex_);
    scalersInfoSpace_->fireItemAvailable("prescaleSetIndex",      &prescaleSetIndex_);
    scalersInfoSpace_->fireItemAvailable("lastLumiPrescaleIndex", &lastLumiPrescaleIndex_);
    scalersInfoSpace_->fireItemAvailable("lastLumiUsingEol",      &lastLumiUsingEol_);
    scalersLegendaInfoSpace_->fireItemAvailable("scalersLegenda", trh_.getPathLegenda());    

    scalersComplete_.addColumn("instance", "unsigned int 32");
    scalersComplete_.addColumn("lsid", "unsigned int 32");
    scalersComplete_.addColumn("psid", "unsigned int 32");
    scalersComplete_.addColumn("proc", "unsigned int 32");
    scalersComplete_.addColumn("acc",  "unsigned int 32");
    scalersComplete_.addColumn("exprep",  "unsigned int 32");
    scalersComplete_.addColumn("effrep",  "unsigned int 32");
    scalersComplete_.addColumn("triggerReport", "table");  

    xdata::Table::iterator it = scalersComplete_.begin();
    if( it == scalersComplete_.end())
      {
        it = scalersComplete_.append();
        it->setField("instance",instance_);
      }


    //fill initial macrostate legenda information
    unsigned int i = 0;
    std::stringstream oss;
    for(i = (unsigned int)edm::event_processor::sInit; i < (unsigned int)edm::event_processor::sInvalid; i++)
      {
        oss << i << "=" << evtProcessor_->stateName((edm::event_processor::State) i) << " ";
        statmod_.push_back(evtProcessor_->stateName((edm::event_processor::State) i));
      }
    oss << i << "=" << "NotStarted ";
    statmod_.push_back("NotStarted");
    notstarted_state_code_ = i;
    std::stringstream oss2;
    oss2 << 0 << "=Invalid ";
    modmap_["Invalid"]=0;
    mapmod_.resize(1); 
    mapmod_[0]="Invalid";

    monitorInfoSpace_->lock();
    macro_state_legend_ = oss.str();
    micro_state_legend_ = oss2.str();
    monitorInfoSpace_->unlock();

    if(!multi) publishConfigAndMonitorItemsSP();

  }

void evf::FWEPWrapper::publishConfigAndMonitorItemsSP ( )

Definition at line 181 of file FWEPWrapper.cc.

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

Referenced by publishConfigAndMonitorItems().

  {
    monitorInfoSpace_->fireItemAvailable("epSPMacroStateInt",             &epMAltState_);
    monitorInfoSpace_->fireItemAvailable("epSPMicroStateInt",             &epmAltState_);

    monitorInfoSpace_->fireItemAvailable("nbProcessed",                 &nbProcessed_);
    monitorInfoSpace_->fireItemAvailable("nbAccepted",                  &nbAccepted_);
  }

void evf::FWEPWrapper::resetLumiSectionReferenceIndex ( ) [inline]

Definition at line 135 of file FWEPWrapper.h.

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

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

{trh_.resetLumiSectionReferenceIndex();}
void evf::FWEPWrapper::resetPackedTriggerReport ( ) [inline]
void evf::FWEPWrapper::resetTriggerReport ( ) [inline]

Definition at line 111 of file FWEPWrapper.h.

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

{trh_.resetTriggerReport();}
void evf::FWEPWrapper::resetWaiting ( ) [inline]
void evf::FWEPWrapper::serviceWeb ( xgi::Input *  in,
xgi::Output *  out 
)

Definition at line 1030 of file FWEPWrapper.cc.

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

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

  {
    using namespace cgicc;
    Cgicc cgi(in);
    std::vector<FormEntry> el1;
    cgi.getElement("service",el1);
    if(evtProcessor_)  {
      if(el1.size()!=0) {
        std::string ser = el1[0].getValue();
        edm::ServiceRegistry::Operate operate(evtProcessor_->getToken());
        ServiceWebRegistry *swr = 0;
        try{
          if(edm::Service<ServiceWebRegistry>().isAvailable())
            swr = edm::Service<ServiceWebRegistry>().operator->();
        }
        catch(...) { 
          LOG4CPLUS_WARN(log_,
                         "Exception when trying to get service ModuleWebRegistry");
        }
        swr->invoke(in,out,ser);
      }
    }
    else {
      *out<<"EventProcessor just disappeared "<<std::endl;
    }
  }

void evf::FWEPWrapper::setAppCtxt ( xdaq::ApplicationContext *  ctx) [inline]

Definition at line 90 of file FWEPWrapper.h.

References xappCtxt_.

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

{xappCtxt_ = ctx;}
void evf::FWEPWrapper::setAppDesc ( xdaq::ApplicationDescriptor *  ad) [inline]

Definition at line 89 of file FWEPWrapper.h.

References xappDesc_.

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

{xappDesc_ = ad;}
void evf::FWEPWrapper::setApplicationInfoSpace ( xdata::InfoSpace *  is) [inline]

Definition at line 81 of file FWEPWrapper.h.

References applicationInfoSpace_.

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

void evf::FWEPWrapper::setMonitorInfoSpace ( xdata::InfoSpace *  mis,
xdata::InfoSpace *  mlis 
) [inline]
void evf::FWEPWrapper::setMonitorInfoSpaceLegend ( xdata::InfoSpace *  is) [inline]

Definition at line 87 of file FWEPWrapper.h.

References monitorInfoSpaceLegend_.

void evf::FWEPWrapper::setRcms ( xdaq::ApplicationDescriptor *  rcms) [inline]

Definition at line 88 of file FWEPWrapper.h.

References rcms_.

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

{rcms_ = rcms;}
void evf::FWEPWrapper::setScalersInfoSpace ( xdata::InfoSpace *  sis,
xdata::InfoSpace *  slis 
) [inline]
void evf::FWEPWrapper::startMonitoringWorkLoop ( ) throw (evf::Exception)

Definition at line 545 of file FWEPWrapper.cc.

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

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

  {
    pid_t pid = getpid();
    nbProcessed_.value_ = 0;
    nbAccepted_.value_ = 0;
    struct timezone timezone;
    gettimeofday(&monStartTime_,&timezone);

    std::ostringstream ost;
    ost << "Monitoring" << pid;
    try {
      wlMonitoring_=
        toolbox::task::getWorkLoopFactory()->getWorkLoop(ost.str().c_str(),
                                                         "waiting");

      if (!wlMonitoring_->isActive()) wlMonitoring_->activate();
      asMonitoring_ = toolbox::task::bind(this,&FWEPWrapper::monitoring,
                                          ost.str().c_str());

      wlMonitoring_->submit(asMonitoring_);
      wlMonitoringActive_ = true;

    }
    catch (xcept::Exception& e) {
      std::string msg = "Failed to start workloop 'Monitoring'.";

      XCEPT_RETHROW(evf::Exception,msg,e);
    }
  }

std::string const& evf::FWEPWrapper::stateNameFromIndex ( unsigned int  i) const [inline]

Definition at line 125 of file FWEPWrapper.h.

References statmod_, and unknown.

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

      {
        if(i<statmod_.size()) return statmod_[i];
        else return unknown;
      }
edm::EventProcessor::StatusCode evf::FWEPWrapper::stop ( )

Definition at line 452 of file FWEPWrapper.cc.

References allPastLumiProcessed_, alignCSCRings::e, edm::IEventProcessor::epOther, edm::IEventProcessor::epSuccess, evtProcessor_, 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().

  {
    edm::event_processor::State st = evtProcessor_->getState();
    
    LOG4CPLUS_WARN(log_,"FUEventProcessor::stopEventProcessor.1 state "
                   << evtProcessor_->stateName(st));
    edm::EventProcessor::StatusCode rc = edm::EventProcessor::epSuccess;
    if(!(st==edm::event_processor::sStopping || st==edm::event_processor::sJobReady
         || st==edm::event_processor::sDone)){
      ::sleep(1);
      st = evtProcessor_->getState();
      if(st!=edm::event_processor::sStopping) {
        LOG4CPLUS_WARN(log_,
                       "FUEventProcessor::stopEventProcessor.2 After 1s - state: "
                       << evtProcessor_->stateName(st)); 
        return edm::EventProcessor::epOther;
        }
    }
    LOG4CPLUS_WARN(log_,"FUEventProcessor::stopEventProcessor.3 state "
                   << evtProcessor_->stateName(st));

    try  {
      rc = evtProcessor_->waitTillDoneAsync(timeoutOnStop_.value_);
      watching_ = false;
    }
    catch(cms::Exception &e) {
      XCEPT_RAISE(evf::Exception,e.explainSelf());
    }    
    catch(std::exception &e) {
      XCEPT_RAISE(evf::Exception,e.what());
    }
    catch(...) {
      XCEPT_RAISE(evf::Exception,"Unknown Exception");
    }
    allPastLumiProcessed_ = 0;
    return rc;
    
  }

void evf::FWEPWrapper::stopAndHalt ( )

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

  {
    edm::ServiceRegistry::Operate operate(serviceToken_);
    ModuleWebRegistry *mwr = 0;
    try{
      if(edm::Service<ModuleWebRegistry>().isAvailable())
        mwr = edm::Service<ModuleWebRegistry>().operator->();
    }
    catch(...) { 
      LOG4CPLUS_INFO(log_,
                     "exception when trying to get service ModuleWebRegistry");
    }
    
    if(mwr) 
      {
        mwr->clear();
      }
    
    ServiceWebRegistry *swr = 0;
    try{
      if(edm::Service<ServiceWebRegistry>().isAvailable())
        swr = edm::Service<ServiceWebRegistry>().operator->();
    }
    catch(...) { 
      LOG4CPLUS_INFO(log_,
                     "exception when trying to get service ModuleWebRegistry");
    }
    
    if(swr) 
      {
        swr->clear();
      }

    edm::event_processor::State st = evtProcessor_->getState();
    edm::EventProcessor::StatusCode rc = stop();
    watching_ = false;
    if(rc != edm::EventProcessor::epTimedOut)
      {
        
        if(st == edm::event_processor::sJobReady || st == edm::event_processor::sDone)
          evtProcessor_->endJob();
        pthread_mutex_lock(&ep_guard_lock_);
        delete evtProcessor_;
        evtProcessor_ = 0;
        pthread_mutex_unlock(&ep_guard_lock_);
        epInitialized_ = false;
      }
    else
      {
        XCEPT_RAISE(evf::Exception,"EventProcessor stop timed out");
      }
    allPastLumiProcessed_ = 0;    
  }
    
void evf::FWEPWrapper::sumAndPackTriggerReport ( MsgBuf buf)

Definition at line 1146 of file FWEPWrapper.cc.

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

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

  {
    trh_.sumAndPackTriggerReport(buf);
  }
  void FWEPWrapper::updateRollingReport()
void evf::FWEPWrapper::summaryWebPage ( xgi::Input *  in,
xgi::Output *  out,
const std::string &  urn 
)

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

  {
    //    std::string urn = xappDesc_->getURN();

    *out << "<table>"                                                  << std::endl;
    
    *out << "<tr valign=\"top\">"                                      << std::endl;
    *out << "<td>" << std::endl;
    
    TriggerReportStatic *tr = (TriggerReportStatic *)(trh_.getPackedTriggerReport()->mtext);
    // trigger summary table
    *out << "<table border=1 bgcolor=\"#CFCFCF\">" << std::endl;
    *out << "  <tr>"                                                    << std::endl;
    *out << "    <th colspan=7>"                                                << std::endl;
    *out << "      " << "Trigger Summary up to LS "
         << trh_.getLumiSectionReferenceIndex()-1 << std::endl;
    *out << "    </th>"                                                 << std::endl;
    *out << "  </tr>"                                                   << std::endl;
    
    *out << "  <tr >"                                                   << std::endl;
    *out << "    <th >Path</th>"                                                << std::endl;
    *out << "    <th >Exec</th>"                                                << std::endl;
    *out << "    <th >Pass</th>"                                                << std::endl;
    *out << "    <th >Fail</th>"                                                << std::endl;
    *out << "    <th >Except</th>"                                      << std::endl;
    *out << "  </tr>"                                                   << std::endl;
    
    
    for(int i=0; i<tr->trigPathsInMenu; i++) {
      *out << "  <tr>" << std::endl;
      *out << "    <td>"<< i << "</td>"         << std::endl;
      *out << "    <td>" << trh_.getl1pre(i) << "</td>"         << std::endl;
      *out << "    <td>" << trh_.getaccept(i) << "</td>"        << std::endl;
      *out << "    <td >" << trh_.getfailed(i) << "</td>"       << std::endl;
      *out << "    <td ";
      if(trh_.getexcept(i) !=0)
        *out << "bgcolor=\"red\""                                                       << std::endl;
      *out << ">" << trh_.getexcept(i) << "</td>"               << std::endl;
      *out << "  </tr >"                                                                << std::endl;
      
      }
    *out << "  <tr><th colspan=7>EndPaths</th></tr>"            << std::endl;

    for(int i=tr->trigPathsInMenu; i<tr->endPathsInMenu + tr->trigPathsInMenu; i++) {
      *out << "  <tr>" << std::endl;
      *out << "    <td>"<< i << "</td>"         << std::endl;
      *out << "    <td>" << trh_.getl1pre(i) << "</td>"         << std::endl;
      *out << "    <td>" << trh_.getaccept(i) << "</td>"        << std::endl;
      *out << "    <td >" << trh_.getfailed(i) << "</td>"       << std::endl;
      *out << "    <td ";
      if(trh_.getexcept(i) !=0)
        *out << "bgcolor=\"red\""                                                       << std::endl;
      *out << ">" << trh_.getexcept(i) << "</td>"               << std::endl;
      *out << "  </tr >"                                                                << std::endl;
      
      }


    *out << "</table>" << std::endl;
    *out << "</td>" << std::endl;
    *out << "</tr>" << std::endl;
    *out << "</table>" << std::endl;
  }

void evf::FWEPWrapper::taskWebPage ( xgi::Input *  in,
xgi::Output *  out,
const std::string &  urn 
)

Definition at line 812 of file FWEPWrapper.cc.

References applicationInfoSpace_, evf::ModuleWebRegistry::checkWeb(), descs_, alignCSCRings::e, edm::TriggerReport::endPathSummaries, evtProcessor_, 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, cmsCodeRules::cppFunctionSkipper::operator, prescaleSvc_, trh_, and edm::TriggerReport::trigPathSummaries.

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

  {
    //    std::string urn = xappDesc_->getURN();
    ModuleWebRegistry *mwr = 0;
    edm::ServiceRegistry::Operate operate(evtProcessor_->getToken());
    try{
      if(edm::Service<ModuleWebRegistry>().isAvailable())
        mwr = edm::Service<ModuleWebRegistry>().operator->();
    }
    catch(...) {
      LOG4CPLUS_WARN(log_,
                     "Exception when trying to get service ModuleWebRegistry");
    }
    TimeProfilerService *tpr = 0;
    try{
      if(edm::Service<TimeProfilerService>().isAvailable())
        tpr = edm::Service<TimeProfilerService>().operator->();
    }
    catch(...) { 
    }

    *out << "<table>"                                                  << std::endl;
    
    *out << "<tr valign=\"top\">"                                      << std::endl;
    *out << "<td>" << std::endl;
    
    
    edm::TriggerReport tr; 
    evtProcessor_->getTriggerReport(tr);
    
    // trigger summary table
    *out << "<table border=1 bgcolor=\"#CFCFCF\">" << std::endl;
    *out << "  <tr>"                                                    << std::endl;
    *out << "    <th colspan=7>"                                                << std::endl;
    *out << "      " << "Trigger Summary"                                       << std::endl;
    *out << "    </th>"                                                 << std::endl;
    *out << "  </tr>"                                                   << std::endl;
        
    *out << "  <tr >"                                                   << std::endl;
    *out << "    <th >Path</th>"                                                << std::endl;
    *out << "    <th >Exec</th>"                                                << std::endl;
    *out << "    <th >Pass</th>"                                                << std::endl;
    *out << "    <th >Fail</th>"                                                << std::endl;
    *out << "    <th >Except</th>"                                      << std::endl;
    *out << "    <th >TargetPF</th>"                                    << std::endl;
    *out << "  </tr>"                                                   << std::endl;
    xdata::Serializable *psid = 0;
    try{
      psid = applicationInfoSpace_->find("prescaleSetIndex");
    }
    catch(xdata::exception::Exception e){
    }
    ShmOutputModuleRegistry *sor = 0;
    try{
      if(edm::Service<ShmOutputModuleRegistry>().isAvailable())
        sor = edm::Service<ShmOutputModuleRegistry>().operator->();
    }
    catch(...) { 
      LOG4CPLUS_INFO(log_,
                     "exception when trying to get service ShmOutputModuleRegistry");
    }

    
    for(unsigned int i=0; i<tr.trigPathSummaries.size(); i++) {
      *out << "  <tr>" << std::endl;
      *out << "    <td>"<< tr.trigPathSummaries[i].name << "</td>"              << std::endl;
      *out << "    <td>" << tr.trigPathSummaries[i].timesRun << "</td>"         << std::endl;

      *out << "    <td>" << tr.trigPathSummaries[i].timesPassed << "</td>"      << std::endl;
      *out << "    <td >" << tr.trigPathSummaries[i].timesFailed << "</td>"     << std::endl;

      *out << "    <td ";
      if(tr.trigPathSummaries[i].timesExcept !=0)
        *out << "bgcolor=\"red\""                                                       << std::endl;
      *out << ">" << tr.trigPathSummaries[i].timesExcept << "</td>"             << std::endl;
      if(psid != 0)
        {
          *out << "    <td>"
               << prescaleSvc_->getPrescale(tr.trigPathSummaries[i].name) 
               << "</td>"               << std::endl;
        }
      else      *out << "    <td>N/A</td>"                                      << std::endl;
      *out << "  </tr >"                                                                << std::endl;
      
    }



    for(unsigned int i=0; i<tr.endPathSummaries.size(); i++) {
      std::string olab = trh_.findLabelOfModuleTypeInEndPath(tr,descs_,
                                                             i,"ShmStreamConsumer");
      evf::OutputModule *o = sor->get(olab);
      *out << "  <tr>" << std::endl;
      *out << "    <td>"<< tr.endPathSummaries[i].name << "</td>"               << std::endl;
      *out << "    <td>" << tr.endPathSummaries[i].timesRun << "</td>"          << std::endl;
      *out << "    <td>" << (o ? o->getCounts() : -1) << "</td>"        << std::endl;
      *out << "    <td >" << (o ? (tr.endPathSummaries[i].timesRun - o->getCounts()) : -1) << "</td>"   << std::endl;
      *out << "    <td ";
      if(tr.endPathSummaries[i].timesExcept !=0)
        *out << "bgcolor=\"red\""                                                       << std::endl;
      *out << ">" << tr.endPathSummaries[i].timesExcept << "</td>"              << std::endl;
      *out << "    <td>N/A</td>"                                        << std::endl;
      *out << "  </tr >"                                                                << std::endl;
      
    }
  
    *out << "</table>" << std::endl;
    
    *out << "</td>" << std::endl;
    

    
    *out << "<td>" << std::endl;
    //Process details table
    *out << "<table frame=\"void\" rules=\"rows\" class=\"modules\">"   << std::endl;
    *out << "  <tr>"                                                    << std::endl;
    *out << "    <th colspan=3>"                                                << std::endl;
    *out << "      " << "HLT"                                           << std::endl;
    if(descs_.size()>0)
      *out << " (Process " << descs_[0]->processName() << ")"           << std::endl;
    *out << "    </th>"                                                 << std::endl;
    *out << "  </tr>"                                                   << std::endl;

    *out << "  <tr >"                                                   << std::endl;
    *out << "    <th >"                                                 << std::endl;
    *out << "       Module"                                             << std::endl;
    *out << "    </th>"                                                 << std::endl;
    *out << "    <th >"                                                 << std::endl;
    *out << "       Label"                                              << std::endl;
    *out << "    </th>"                                                 << std::endl;
    *out << "    <th >"                                                 << std::endl;
    *out << "       Version"                                            << std::endl;
    *out << "    </th>"                                                 << std::endl;
    if(tpr)
      {
        *out << "    <th >"                                                       << std::endl;
        *out << "       first"                                            << std::endl;
        *out << "    </th>"                                                       << std::endl;
        *out << "    <th >"                                                       << std::endl;
        *out << "       ave"                                              << std::endl;
        *out << "    </th>"                                                       << std::endl;
        *out << "    <th >"                                                       << std::endl;
        *out << "       max"                                              << std::endl;
        *out << "    </th>"                                                       << std::endl;
      }
    *out << "  </tr>"                                                   << std::endl;
    if(mwr && mwr->checkWeb("DaqSource"))
      *out << "    <tr><td ><a href=\"/" << urn 
           << "module=DaqSource\">DaqSource</a> </td></tr>";
    
    for(unsigned int idesc = 0; idesc < descs_.size(); idesc++)
      {
        *out << "  <tr>"                                                        << std::endl;
        *out << "    <td >";
        if(mwr && mwr->checkWeb(descs_[idesc]->moduleName()))
          *out << "<a href=\"/" << urn 
               << "module=" 
               << descs_[idesc]->moduleName() << "\">" 
               << descs_[idesc]->moduleName() << "</a>";
        else
          *out << descs_[idesc]->moduleName();
        *out << "</td>"                                                 << std::endl;
        *out << "    <td >";
        *out << descs_[idesc]->moduleLabel();
        *out << "</td>"                                                 << std::endl;
        *out << "    <td >";
        *out << descs_[idesc]->releaseVersion();
        *out << "</td>"                                                 << std::endl;
        if(tpr)
          {
            *out << "    <td align=\"right\">";
            *out << tpr->getFirst(descs_[idesc]->moduleLabel());
            *out << "</td>"                                                       << std::endl;
            *out << "    <td align=\"right\"";
            *out << (tpr->getAve(descs_[idesc]->moduleLabel())>1. ? "bgcolor=\"red\"" : "") 
                 << ">";
            *out << tpr->getAve(descs_[idesc]->moduleLabel());
            *out << "</td>"                                                       << std::endl;
            *out << "    <td align=\"right\">";
            *out << tpr->getMax(descs_[idesc]->moduleLabel());
            *out << "</td>"                                                       << std::endl;
          }
        *out << "  </tr>" << std::endl;
      }
    *out << "</table>" << std::endl;
    *out << "</td>" << std::endl;
  }

void evf::FWEPWrapper::updateRollingReport ( )

Definition at line 1150 of file FWEPWrapper.cc.

References evf::lsTriplet::acc, applicationInfoSpace_, gather_cfg::cout, alignCSCRings::e, evf::TriggerReportStatic::eventSummary, 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().

  {
    trh_.packedTriggerReportToTable();
    if(rollingLsIndex_==0){rollingLsIndex_=lsRollSize_; rollingLsWrap_ = true;}
    rollingLsIndex_--;
    xdata::UnsignedInteger32* lsp = 0;
    xdata::UnsignedInteger32* psp = 0;
    TriggerReportStatic *tr = trh_.getPackedTriggerReportAsStruct();
    lsTriplet lst;
    lst.ls = tr->lumiSection;
    lsid_ = tr->lumiSection;
    lst.proc = tr->eventSummary.totalEvents;
    lst.acc = tr->eventSummary.totalEventsPassed;
    xdata::Serializable *psid = 0;
    xdata::Serializable *lsid = 0;
    xdata::Serializable *nbs = 0;
    xdata::Serializable *nbsr = 0;
    try{
      lsid =applicationInfoSpace_->find("lumiSectionIndex");
      if(lsid!=0){
        lsp = ((xdata::UnsignedInteger32*)lsid); 
        lsp->value_= tr->lumiSection;
      }
      psid = applicationInfoSpace_->find("lastLumiPrescaleIndex");
      if(psid!=0) {
        psp = ((xdata::UnsignedInteger32*)psid);
        if(tr->eventSummary.totalEvents != 0)
          psp->value_ = tr->prescaleIndex;
      }
      nbs  = applicationInfoSpace_->find("nbSubProcesses");
      nbsr = applicationInfoSpace_->find("nbSubProcessesReporting");
    }
    catch(xdata::exception::Exception e){
    }

    xdata::Table::iterator it = scalersComplete_.begin();
    if(lsp)
      it->setField("lsid", *lsp);
    if(psp)
      it->setField("psid", *psp);
    if(nbs)
      it->setField("exprep", *nbs);
    else
      std::cout << "nbSubProcesses item not found !!!" << std::endl;
    if(nbsr)
      it->setField("effrep", *nbsr);
    else
      std::cout << "nbSubProcessesReporting item not found !!!" << std::endl;

    it->setField("proc",trh_.getProcThisLumi());
    it->setField("acc",trh_.getAccThisLumi());
    it->setField("triggerReport",trh_.getTableWithNames());
    lumiSectionsCtr_[rollingLsIndex_] = lst;

  }

void evf::FWEPWrapper::withdrawLumiSectionIncrement ( ) [inline]

Definition at line 136 of file FWEPWrapper.h.

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

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

{trh_.withdrawLumiSectionIncrement();}
std::string evf::FWEPWrapper::wlMonitoring ( ) [inline]

Definition at line 96 of file FWEPWrapper.h.

References wlMonitoring_, and wlMonitoringActive_.

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

                            {
      if(wlMonitoring_!=0 && wlMonitoring_->isActive()) return (wlMonitoringActive_ ? "active" : "inactive");
      else return "not initialized"; 
    }

Friends And Related Function Documentation

friend class FUEventProcessor [friend]

Definition at line 244 of file FWEPWrapper.h.


Member Data Documentation

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

Referenced by startMonitoringWorkLoop().

std::string evf::FWEPWrapper::configString_ [private]

Definition at line 150 of file FWEPWrapper.h.

Referenced by init().

std::string evf::FWEPWrapper::configuration_ [private]

Definition at line 235 of file FWEPWrapper.h.

Referenced by configuration(), and init().

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

Definition at line 173 of file FWEPWrapper.h.

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

pthread_mutex_t evf::FWEPWrapper::ep_guard_lock_ [private]

Definition at line 240 of file FWEPWrapper.h.

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

xdata::Integer evf::FWEPWrapper::epmAltState_ [private]
xdata::Integer evf::FWEPWrapper::epMAltState_ [private]
xdata::String evf::FWEPWrapper::epMState_ [private]

Definition at line 183 of file FWEPWrapper.h.

Referenced by monitoring(), and publishConfigAndMonitorItems().

xdata::String evf::FWEPWrapper::epmState_ [private]

Definition at line 184 of file FWEPWrapper.h.

Referenced by monitoring(), and publishConfigAndMonitorItems().

Definition at line 160 of file FWEPWrapper.h.

Referenced by init().

Definition at line 159 of file FWEPWrapper.h.

Referenced by init().

Definition at line 161 of file FWEPWrapper.h.

Referenced by init().

Definition at line 238 of file FWEPWrapper.h.

Referenced by init(), and monitoring().

xdata::UnsignedInteger32 evf::FWEPWrapper::instance_ [private]

Definition at line 237 of file FWEPWrapper.h.

Referenced by publishConfigAndMonitorItems().

Definition at line 158 of file FWEPWrapper.h.

Referenced by init().

xdata::UnsignedInteger32 evf::FWEPWrapper::lastLumiPrescaleIndex_ [private]

Definition at line 220 of file FWEPWrapper.h.

Referenced by getTriggerReport(), and publishConfigAndMonitorItems().

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

Definition at line 214 of file FWEPWrapper.h.

Referenced by getTriggerReport().

log4cplus::Logger evf::FWEPWrapper::log_ [private]
unsigned int evf::FWEPWrapper::lsid_ [private]

Definition at line 208 of file FWEPWrapper.h.

Referenced by microState().

const unsigned int evf::FWEPWrapper::lsRollSize_ = 20 [static, private]

Definition at line 231 of file FWEPWrapper.h.

Referenced by updateRollingReport().

xdata::Boolean evf::FWEPWrapper::lsTimedOut_ [private]

Definition at line 222 of file FWEPWrapper.h.

Referenced by publishConfigAndMonitorItems().

xdata::UnsignedInteger32 evf::FWEPWrapper::lsTimeOut_ [private]

Definition at line 215 of file FWEPWrapper.h.

Referenced by getTriggerReport(), and publishConfigAndMonitorItems().

xdata::Boolean evf::FWEPWrapper::lsToBeRecovered_ [private]

Definition at line 223 of file FWEPWrapper.h.

Referenced by publishConfigAndMonitorItems().

xdata::UnsignedInteger32 evf::FWEPWrapper::lumiSectionIndex_ [private]

Definition at line 218 of file FWEPWrapper.h.

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

Definition at line 227 of file FWEPWrapper.h.

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

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

Definition at line 228 of file FWEPWrapper.h.

Referenced by lumiSumTable().

xdata::String evf::FWEPWrapper::macro_state_legend_ [private]

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

Referenced by init(), and publishConfigAndMonitorItems().

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

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

Referenced by setMonitorInfoSpaceLegend().

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

Definition at line 179 of file FWEPWrapper.h.

Referenced by monitoring(), and publishConfigAndMonitorItems().

struct timeval evf::FWEPWrapper::monStartTime_ [private]

Definition at line 180 of file FWEPWrapper.h.

Referenced by startMonitoringWorkLoop().

Definition at line 242 of file FWEPWrapper.h.

Referenced by init().

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

Definition at line 205 of file FWEPWrapper.h.

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

Definition at line 207 of file FWEPWrapper.h.

Referenced by init().

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

Definition at line 206 of file FWEPWrapper.h.

Referenced by fireScalersUpdate(), and init().

xdata::UnsignedInteger32 evf::FWEPWrapper::nbAccepted_ [private]
xdata::UnsignedInteger32 evf::FWEPWrapper::nbProcessed_ [private]

Definition at line 241 of file FWEPWrapper.h.

Referenced by notstarted_state_code(), and publishConfigAndMonitorItems().

std::string evf::FWEPWrapper::pathTable_ [private]

Definition at line 236 of file FWEPWrapper.h.

Referenced by getTriggerReport(), and init().

xdata::UnsignedInteger32 evf::FWEPWrapper::prescaleSetIndex_ [private]

Definition at line 219 of file FWEPWrapper.h.

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

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

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

unsigned int evf::FWEPWrapper::rollingLsIndex_ [private]

Definition at line 229 of file FWEPWrapper.h.

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

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

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

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

Definition at line 213 of file FWEPWrapper.h.

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

Definition at line 225 of file FWEPWrapper.h.

Referenced by fireScalersUpdate().

Definition at line 226 of file FWEPWrapper.h.

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

Definition at line 148 of file FWEPWrapper.h.

Referenced by init().

Definition at line 243 of file FWEPWrapper.h.

Referenced by init().

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

Definition at line 176 of file FWEPWrapper.h.

Referenced by publishConfigAndMonitorItems(), and stateNameFromIndex().

xdata::UnsignedInteger32 evf::FWEPWrapper::timeoutOnStop_ [private]

Definition at line 171 of file FWEPWrapper.h.

Referenced by publishConfigAndMonitorItems(), and stop().

data refman pasoursint CMSSW_5_3_1 src EventFilter Processor src FWEPWrapper cc const std::string evf::FWEPWrapper::unknown = "unknown" [static, private]

Definition at line 144 of file FWEPWrapper.h.

Referenced by moduleNameFromIndex(), and stateNameFromIndex().

Definition at line 239 of file FWEPWrapper.h.

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

Definition at line 192 of file FWEPWrapper.h.

Referenced by stop(), and stopAndHalt().

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

Definition at line 189 of file FWEPWrapper.h.

Referenced by startMonitoringWorkLoop(), and wlMonitoring().

Definition at line 191 of file FWEPWrapper.h.

Referenced by startMonitoringWorkLoop(), and wlMonitoring().

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

Definition at line 234 of file FWEPWrapper.h.

Referenced by createAndSendScalersMessage(), and setAppCtxt().

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

Definition at line 233 of file FWEPWrapper.h.

Referenced by createAndSendScalersMessage(), and setAppDesc().