CMS 3D CMS Logo

Public Member Functions | Private Member Functions | Private Attributes

stor::Configuration Class Reference

#include <Configuration.h>

List of all members.

Public Member Functions

virtual void actionPerformed (xdata::Event &isEvt)
 Configuration (xdata::InfoSpace *infoSpace, unsigned long instanceNumber)
struct AlarmParams getAlarmParams () const
ErrStrConfigListPtr getCurrentErrorStreamConfig () const
EvtStrConfigListPtr getCurrentEventStreamConfig () const
struct DiskWritingParams getDiskWritingParams () const
struct DQMProcessingParams getDQMProcessingParams () const
struct EventServingParams getEventServingParams () const
struct QueueConfigurationParams getQueueConfigurationParams () const
struct ResourceMonitorParams getResourceMonitorParams () const
unsigned int getRunNumber () const
struct WorkerThreadParams getWorkerThreadParams () const
void setCurrentErrorStreamConfig (ErrStrConfigListPtr cfgList)
void setCurrentEventStreamConfig (EvtStrConfigListPtr cfgList)
bool streamConfigurationHasChanged () const
void updateAllParams ()
void updateDiskWritingParams ()
void updateRunParams ()
virtual ~Configuration ()

Private Member Functions

void setAlarmDefaults ()
void setDiskWritingDefaults (unsigned long instanceNumber)
void setDQMProcessingDefaults ()
void setEventServingDefaults ()
void setQueueConfigurationDefaults ()
void setResourceMonitorDefaults ()
void setupAlarmInfoSpaceParams (xdata::InfoSpace *infoSpace)
void setupDiskWritingInfoSpaceParams (xdata::InfoSpace *infoSpace)
void setupDQMProcessingInfoSpaceParams (xdata::InfoSpace *infoSpace)
void setupEventServingInfoSpaceParams (xdata::InfoSpace *infoSpace)
void setupQueueConfigurationInfoSpaceParams (xdata::InfoSpace *infoSpace)
void setupResourceMonitorInfoSpaceParams (xdata::InfoSpace *infoSpace)
void setupWorkerThreadInfoSpaceParams (xdata::InfoSpace *infoSpace)
void setWorkerThreadDefaults ()
void updateLocalAlarmData ()
void updateLocalDiskWritingData ()
void updateLocalDQMProcessingData ()
void updateLocalEventServingData ()
void updateLocalQueueConfigurationData ()
void updateLocalResourceMonitorData ()
void updateLocalRunNumberData ()
void updateLocalWorkerThreadData ()

Private Attributes

xdata::Integer _DQMactiveConsumerTimeout
xdata::String _DQMconsumerQueuePolicy
xdata::Integer _DQMconsumerQueueSize
xdata::Integer activeConsumerTimeout_
struct AlarmParams alarmParamCopy_
xdata::Boolean checkAdler32_
xdata::Boolean collateDQM_
xdata::UnsignedInteger32 commandQueueSize_
xdata::Integer compressionLevelDQM_
xdata::String consumerQueuePolicy_
xdata::Integer consumerQueueSize_
xdata::String copyWorkersCommand_
xdata::String copyWorkersUser_
ErrStrConfigListPtr currentErrorStreamConfig_
EvtStrConfigListPtr currentEventStreamConfig_
xdata::String dbFilePath_
xdata::UnsignedInteger32 discardDQMUpdatesForOlderLS_
struct DiskWritingParams diskWriteParamCopy_
xdata::Double DQMEPdeqWaitTime_
xdata::UnsignedInteger32 dqmEventQueueMemoryLimitMB_
xdata::UnsignedInteger32 dqmEventQueueSize_
struct DQMProcessingParams dqmParamCopy_
xdata::Double DWdeqWaitTime_
xdata::UnsignedInteger32 errorEvents_
boost::mutex errStrCfgMutex_
struct EventServingParams eventServeParamCopy_
boost::mutex evtStrCfgMutex_
xdata::Double failHighWaterMark_
xdata::String faultyEventsStream_
xdata::Integer fileClosingTestInterval_
xdata::String fileName_
xdata::String filePath_
xdata::Double fileSizeTolerance_
xdata::Double FPdeqWaitTime_
xdata::UnsignedInteger32 fragmentQueueMemoryLimitMB_
xdata::UnsignedInteger32 fragmentQueueSize_
xdata::UnsignedInteger32 fragmentStoreMemoryLimitMB_
boost::mutex generalMutex_
xdata::Double highWaterMark_
xdata::UnsignedInteger32 infospaceRunNumber_
xdata::String injectWorkersCommand_
xdata::String injectWorkersUser_
xdata::Boolean isProductionSystem_
unsigned int localRunNumber_
xdata::Double lumiSectionTimeOut_
xdata::Integer maxFileSize_
xdata::Double monitoringSleepSec_
xdata::Integer nCopyWorkers_
xdata::Integer nInjectWorkers_
xdata::Integer nLogicalDisk_
xdata::Vector< xdata::String > otherDiskPaths_
std::string previousStreamCfg_
struct QueueConfigurationParams queueConfigParamCopy_
xdata::Integer readyTimeDQM_
xdata::UnsignedInteger32 registrationQueueSize_
struct ResourceMonitorParams resourceMonitorParamCopy_
xdata::String sataUser_
xdata::String setupLabel_
xdata::Double staleFragmentTimeOut_
xdata::String streamConfiguration_
bool streamConfigurationChanged_
xdata::UnsignedInteger32 streamQueueMemoryLimitMB_
xdata::UnsignedInteger32 streamQueueSize_
xdata::UnsignedInteger32 throuphputAveragingCycles_
xdata::UnsignedInteger32 unwantedEvents_
xdata::Boolean useCompressionDQM_
struct WorkerThreadParams workerThreadParamCopy_

Detailed Description

Class for managing configuration information from the infospace and providing local copies of that information that are updated only at requested times.

Author:
mommsen
Revision:
1.31
Date:
2011/07/05 13:25:43

Definition at line 167 of file Configuration.h.


Constructor & Destructor Documentation

stor::Configuration::Configuration ( xdata::InfoSpace *  infoSpace,
unsigned long  instanceNumber 
)
virtual stor::Configuration::~Configuration ( ) [inline, virtual]

Destructor.

Definition at line 180 of file Configuration.h.

    {
      // should we detach from the infospace???
    }

Member Function Documentation

void stor::Configuration::actionPerformed ( xdata::Event &  isEvt) [virtual]

Gets invoked when a operation is performed on the infospace that we are interested in knowing about.

Definition at line 122 of file Configuration.cc.

References generalMutex_, evf::ParameterSetRetriever::getAsString(), previousStreamCfg_, streamConfiguration_, and streamConfigurationChanged_.

  {
    boost::mutex::scoped_lock sl(generalMutex_);

    if (ispaceEvent.type() == "ItemChangedEvent")
      {
        std::string item =
          dynamic_cast<xdata::ItemChangedEvent&>(ispaceEvent).itemName();
        if (item == "STparameterSet")
          {
            evf::ParameterSetRetriever smpset(streamConfiguration_);
            std::string tmpStreamConfiguration = smpset.getAsString();

            if (tmpStreamConfiguration != previousStreamCfg_)
              {
                streamConfigurationChanged_ = true;
                previousStreamCfg_ = tmpStreamConfiguration;
              }
          }
      }
  }
struct AlarmParams stor::Configuration::getAlarmParams ( ) const [read]

Returns a copy of the alarm parameters. These values will be current as of the most recent global update of the local cache from the infospace (see the updateAllParams() method).

Definition at line 80 of file Configuration.cc.

  {
    boost::mutex::scoped_lock sl(generalMutex_);
    return alarmParamCopy_;
  }
ErrStrConfigListPtr stor::Configuration::getCurrentErrorStreamConfig ( ) const

Retrieves the current list of error stream configuration info objects.

Definition at line 162 of file Configuration.cc.

References currentErrorStreamConfig_, and errStrCfgMutex_.

  {
    boost::mutex::scoped_lock sl(errStrCfgMutex_);
    return currentErrorStreamConfig_;
  }
EvtStrConfigListPtr stor::Configuration::getCurrentEventStreamConfig ( ) const

Retrieves the current list of event stream configuration info objects.

Definition at line 156 of file Configuration.cc.

References currentEventStreamConfig_, and evtStrCfgMutex_.

  {
    boost::mutex::scoped_lock sl(evtStrCfgMutex_);
    return currentEventStreamConfig_;
  }
struct DiskWritingParams stor::Configuration::getDiskWritingParams ( ) const [read]

Returns a copy of the disk writing parameters. These values will be current as of the most recent global update of the local cache from the infospace (see the updateAllParams() method) or the most recent update of only the disk writing parameters (see the updateDiskWritingParams() method).

Definition at line 44 of file Configuration.cc.

  {
    boost::mutex::scoped_lock sl(generalMutex_);
    return diskWriteParamCopy_;
  }
struct DQMProcessingParams stor::Configuration::getDQMProcessingParams ( ) const [read]

Returns a copy of the DQM processing parameters. These values will be current as of the most recent global update of the local cache from the infospace (see the updateAllParams() method).

Definition at line 50 of file Configuration.cc.

  {
    boost::mutex::scoped_lock sl(generalMutex_);
    return dqmParamCopy_;
  }
struct EventServingParams stor::Configuration::getEventServingParams ( ) const [read]

Returns a copy of the event serving parameters. These values will be current as of the most recent global update of the local cache from the infospace (see the updateAllParams() method).

Definition at line 56 of file Configuration.cc.

  {
    boost::mutex::scoped_lock sl(generalMutex_);
    return eventServeParamCopy_;
  }
struct QueueConfigurationParams stor::Configuration::getQueueConfigurationParams ( ) const [read]

Returns a copy of the queue configuration parameters. These values will be current as of the most recent global update of the local cache from the infospace (see the updateAllParams() method).

Definition at line 62 of file Configuration.cc.

  {
    boost::mutex::scoped_lock sl(generalMutex_);
    return queueConfigParamCopy_;
  }
struct ResourceMonitorParams stor::Configuration::getResourceMonitorParams ( ) const [read]

Returns a copy of the resouce monitor parameters. These values will be current as of the most recent global update of the local cache from the infospace (see the updateAllParams() method).

Definition at line 74 of file Configuration.cc.

  {
    boost::mutex::scoped_lock sl(generalMutex_);
    return resourceMonitorParamCopy_;
  }
unsigned int stor::Configuration::getRunNumber ( ) const

Get run number:

Definition at line 99 of file Configuration.cc.

References localRunNumber_.

  {
    return localRunNumber_;
  }
struct WorkerThreadParams stor::Configuration::getWorkerThreadParams ( ) const [read]

Returns a copy of the worker thread parameters. These values will be current as of the most recent global update of the local cache from the infospace (see the updateAllParams() method).

Definition at line 68 of file Configuration.cc.

  {
    boost::mutex::scoped_lock sl(generalMutex_);
    return workerThreadParamCopy_;
  }
void stor::Configuration::setAlarmDefaults ( ) [private]

Definition at line 260 of file Configuration.cc.

References alarmParamCopy_, stor::AlarmParams::errorEvents_, stor::AlarmParams::isProductionSystem_, and stor::AlarmParams::unwantedEvents_.

Referenced by Configuration().

  {
    // set defaults
    alarmParamCopy_.isProductionSystem_ = false;
    alarmParamCopy_.errorEvents_ = 10;
    alarmParamCopy_.unwantedEvents_ = 10000;
  }
void stor::Configuration::setCurrentErrorStreamConfig ( ErrStrConfigListPtr  cfgList)

Sets the current list of error stream configuration info objects.

Definition at line 150 of file Configuration.cc.

References currentErrorStreamConfig_, and errStrCfgMutex_.

  {
    boost::mutex::scoped_lock sl(errStrCfgMutex_);
    currentErrorStreamConfig_ = cfgList;
  }
void stor::Configuration::setCurrentEventStreamConfig ( EvtStrConfigListPtr  cfgList)

Sets the current list of event stream configuration info objects.

Definition at line 144 of file Configuration.cc.

References currentEventStreamConfig_, and evtStrCfgMutex_.

  {
    boost::mutex::scoped_lock sl(evtStrCfgMutex_);
    currentEventStreamConfig_ = cfgList;
  }
void stor::Configuration::setDiskWritingDefaults ( unsigned long  instanceNumber) [private]

Definition at line 168 of file Configuration.cc.

References stor::DiskWritingParams::checkAdler32_, stor::DiskWritingParams::dbFilePath_, diskWriteParamCopy_, stor::DiskWritingParams::failHighWaterMark_, stor::DiskWritingParams::faultyEventsStream_, stor::DiskWritingParams::fileClosingTestInterval_, stor::DiskWritingParams::fileName_, stor::DiskWritingParams::filePath_, stor::DiskWritingParams::fileSizeTolerance_, stor::DiskWritingParams::highWaterMark_, stor::DiskWritingParams::hostName_, stor::DiskWritingParams::initialSafetyLevel_, stor::DiskWritingParams::lumiSectionTimeOut_, stor::DiskWritingParams::maxFileSizeMB_, stor::DiskWritingParams::nLogicalDisk_, stor::DiskWritingParams::otherDiskPaths_, pos, previousStreamCfg_, seconds(), stor::DiskWritingParams::setupLabel_, stor::DiskWritingParams::smInstanceString_, and stor::DiskWritingParams::streamConfiguration_.

Referenced by Configuration().

  {
    diskWriteParamCopy_.streamConfiguration_ = "";
    diskWriteParamCopy_.fileName_ = "storageManager";
    diskWriteParamCopy_.filePath_ = "/tmp";
    diskWriteParamCopy_.dbFilePath_ = ""; // use default filePath_+"/log"
    diskWriteParamCopy_.otherDiskPaths_.clear();
    diskWriteParamCopy_.setupLabel_ = "Data";
    diskWriteParamCopy_.nLogicalDisk_ = 0;
    diskWriteParamCopy_.maxFileSizeMB_ = 0;
    diskWriteParamCopy_.highWaterMark_ = 90;
    diskWriteParamCopy_.failHighWaterMark_ = 95;
    diskWriteParamCopy_.lumiSectionTimeOut_ = boost::posix_time::seconds(45);
    diskWriteParamCopy_.fileClosingTestInterval_ = boost::posix_time::seconds(5);
    diskWriteParamCopy_.fileSizeTolerance_ = 0.0;
    diskWriteParamCopy_.faultyEventsStream_ = "";
    diskWriteParamCopy_.checkAdler32_ = false;

    previousStreamCfg_ = diskWriteParamCopy_.streamConfiguration_;

    std::ostringstream oss;
    oss << instanceNumber;
    diskWriteParamCopy_.smInstanceString_ = oss.str();

    std::string tmpString(toolbox::net::getHostName());
    // strip domainame
    std::string::size_type pos = tmpString.find('.');  
    if (pos != std::string::npos) {  
      std::string basename = tmpString.substr(0,pos);  
      tmpString = basename;
    }
    diskWriteParamCopy_.hostName_ = tmpString;

    diskWriteParamCopy_.initialSafetyLevel_ = 0;
  }
void stor::Configuration::setDQMProcessingDefaults ( ) [private]
void stor::Configuration::setEventServingDefaults ( ) [private]
void stor::Configuration::setQueueConfigurationDefaults ( ) [private]
void stor::Configuration::setResourceMonitorDefaults ( ) [private]

Definition at line 248 of file Configuration.cc.

References stor::ResourceMonitorParams::copyWorkers_, stor::ResourceMonitorParams::injectWorkers_, resourceMonitorParamCopy_, and stor::ResourceMonitorParams::sataUser_.

Referenced by Configuration().

  {
    // set defaults
    resourceMonitorParamCopy_.sataUser_ = "";
    resourceMonitorParamCopy_.injectWorkers_.user_ = "smpro";
    resourceMonitorParamCopy_.injectWorkers_.command_ = "/InjectWorker.pl /store/global";
    resourceMonitorParamCopy_.injectWorkers_.expectedCount_ = -1;
    resourceMonitorParamCopy_.copyWorkers_.user_ = "cmsprod";
    resourceMonitorParamCopy_.copyWorkers_.command_ = "CopyManager/CopyWorker.pl";
    resourceMonitorParamCopy_.copyWorkers_.expectedCount_ = -1;
  }
void stor::Configuration::setupAlarmInfoSpaceParams ( xdata::InfoSpace *  infoSpace) [private]

Definition at line 425 of file Configuration.cc.

References alarmParamCopy_, errorEvents_, stor::AlarmParams::errorEvents_, isProductionSystem_, stor::AlarmParams::isProductionSystem_, unwantedEvents_, and stor::AlarmParams::unwantedEvents_.

Referenced by Configuration().

  {
    // copy the initial defaults to the xdata variables
    isProductionSystem_ = alarmParamCopy_.isProductionSystem_;
    errorEvents_ = alarmParamCopy_.errorEvents_;
    unwantedEvents_ = alarmParamCopy_.unwantedEvents_;
 
    // bind the local xdata variables to the infospace
    infoSpace->fireItemAvailable("isProductionSystem", &isProductionSystem_);
    infoSpace->fireItemAvailable("errorEvents", &errorEvents_);
    infoSpace->fireItemAvailable("unwantedEvents", &unwantedEvents_);
  }
void stor::Configuration::setupDiskWritingInfoSpaceParams ( xdata::InfoSpace *  infoSpace) [private]

Definition at line 269 of file Configuration.cc.

References stor::DiskWritingParams::checkAdler32_, checkAdler32_, stor::DiskWritingParams::dbFilePath_, dbFilePath_, diskWriteParamCopy_, stor::utils::durationToSeconds(), stor::DiskWritingParams::failHighWaterMark_, failHighWaterMark_, faultyEventsStream_, stor::DiskWritingParams::faultyEventsStream_, fileClosingTestInterval_, stor::DiskWritingParams::fileClosingTestInterval_, fileName_, stor::DiskWritingParams::fileName_, filePath_, stor::DiskWritingParams::filePath_, fileSizeTolerance_, stor::DiskWritingParams::fileSizeTolerance_, stor::utils::getXdataVector(), highWaterMark_, stor::DiskWritingParams::highWaterMark_, lumiSectionTimeOut_, stor::DiskWritingParams::lumiSectionTimeOut_, maxFileSize_, stor::DiskWritingParams::maxFileSizeMB_, stor::DiskWritingParams::nLogicalDisk_, nLogicalDisk_, otherDiskPaths_, stor::DiskWritingParams::otherDiskPaths_, stor::DiskWritingParams::setupLabel_, setupLabel_, streamConfiguration_, and stor::DiskWritingParams::streamConfiguration_.

Referenced by Configuration().

  {
    // copy the initial defaults into the xdata variables
    streamConfiguration_ = diskWriteParamCopy_.streamConfiguration_;
    fileName_ = diskWriteParamCopy_.fileName_;
    filePath_ = diskWriteParamCopy_.filePath_;
    dbFilePath_ = diskWriteParamCopy_.dbFilePath_;
    setupLabel_ = diskWriteParamCopy_.setupLabel_;
    nLogicalDisk_ = diskWriteParamCopy_.nLogicalDisk_;
    maxFileSize_ = diskWriteParamCopy_.maxFileSizeMB_;
    highWaterMark_ = diskWriteParamCopy_.highWaterMark_;
    failHighWaterMark_ = diskWriteParamCopy_.failHighWaterMark_;
    lumiSectionTimeOut_ = utils::durationToSeconds(diskWriteParamCopy_.lumiSectionTimeOut_);
    fileClosingTestInterval_ = diskWriteParamCopy_.fileClosingTestInterval_.total_seconds();
    fileSizeTolerance_ = diskWriteParamCopy_.fileSizeTolerance_;
    faultyEventsStream_ = diskWriteParamCopy_.faultyEventsStream_;
    checkAdler32_ = diskWriteParamCopy_.checkAdler32_;

    utils::getXdataVector(diskWriteParamCopy_.otherDiskPaths_, otherDiskPaths_);


    // bind the local xdata variables to the infospace
    infoSpace->fireItemAvailable("STparameterSet", &streamConfiguration_);
    infoSpace->fireItemAvailable("fileName", &fileName_);
    infoSpace->fireItemAvailable("filePath", &filePath_);
    infoSpace->fireItemAvailable("dbFilePath", &dbFilePath_);
    infoSpace->fireItemAvailable("otherDiskPaths", &otherDiskPaths_);
    infoSpace->fireItemAvailable("setupLabel", &setupLabel_);
    infoSpace->fireItemAvailable("nLogicalDisk", &nLogicalDisk_);
    infoSpace->fireItemAvailable("maxFileSize", &maxFileSize_);
    infoSpace->fireItemAvailable("highWaterMark", &highWaterMark_);
    infoSpace->fireItemAvailable("failHighWaterMark", &failHighWaterMark_);
    infoSpace->fireItemAvailable("lumiSectionTimeOut", &lumiSectionTimeOut_);
    infoSpace->fireItemAvailable("fileClosingTestInterval",
                                 &fileClosingTestInterval_);
    infoSpace->fireItemAvailable("fileSizeTolerance", &fileSizeTolerance_);
    infoSpace->fireItemAvailable("faultyEventsStream", &faultyEventsStream_);
    infoSpace->fireItemAvailable("checkAdler32", &checkAdler32_);

    // special handling for the stream configuration string (we
    // want to note when it changes to see if we need to reconfigure
    // between runs)
    infoSpace->addItemChangedListener("STparameterSet", this);
  }
void stor::Configuration::setupDQMProcessingInfoSpaceParams ( xdata::InfoSpace *  infoSpace) [private]

Definition at line 315 of file Configuration.cc.

References collateDQM_, stor::DQMProcessingParams::collateDQM_, compressionLevelDQM_, stor::DQMProcessingParams::compressionLevelDQM_, stor::DQMProcessingParams::discardDQMUpdatesForOlderLS_, discardDQMUpdatesForOlderLS_, dqmParamCopy_, readyTimeDQM_, stor::DQMProcessingParams::readyTimeDQM_, useCompressionDQM_, and stor::DQMProcessingParams::useCompressionDQM_.

Referenced by Configuration().

  {
    // copy the initial defaults to the xdata variables
    collateDQM_ = dqmParamCopy_.collateDQM_;
    readyTimeDQM_ = dqmParamCopy_.readyTimeDQM_.total_seconds();
    useCompressionDQM_ = dqmParamCopy_.useCompressionDQM_;
    compressionLevelDQM_ = dqmParamCopy_.compressionLevelDQM_;
    discardDQMUpdatesForOlderLS_ = dqmParamCopy_.discardDQMUpdatesForOlderLS_;

    // bind the local xdata variables to the infospace
    infoSpace->fireItemAvailable("collateDQM", &collateDQM_);
    infoSpace->fireItemAvailable("readyTimeDQM", &readyTimeDQM_);
    infoSpace->fireItemAvailable("useCompressionDQM", &useCompressionDQM_);
    infoSpace->fireItemAvailable("compressionLevelDQM", &compressionLevelDQM_);
    infoSpace->fireItemAvailable("discardDQMUpdatesForOlderLS", &discardDQMUpdatesForOlderLS_);
  }
void stor::Configuration::setupEventServingInfoSpaceParams ( xdata::InfoSpace *  infoSpace) [private]

Definition at line 333 of file Configuration.cc.

References _DQMactiveConsumerTimeout, stor::EventServingParams::_DQMactiveConsumerTimeout, _DQMconsumerQueuePolicy, stor::EventServingParams::_DQMconsumerQueuePolicy, stor::EventServingParams::_DQMconsumerQueueSize, _DQMconsumerQueueSize, activeConsumerTimeout_, stor::EventServingParams::activeConsumerTimeout_, stor::EventServingParams::consumerQueuePolicy_, consumerQueuePolicy_, stor::EventServingParams::consumerQueueSize_, consumerQueueSize_, eventServeParamCopy_, and infospaceRunNumber_.

Referenced by Configuration().

  {
    // copy the initial defaults to the xdata variables
    activeConsumerTimeout_ = eventServeParamCopy_.activeConsumerTimeout_.total_seconds();
    consumerQueueSize_ = eventServeParamCopy_.consumerQueueSize_;
    consumerQueuePolicy_ = eventServeParamCopy_.consumerQueuePolicy_;
    _DQMactiveConsumerTimeout = eventServeParamCopy_._DQMactiveConsumerTimeout.total_seconds();
    _DQMconsumerQueueSize = eventServeParamCopy_._DQMconsumerQueueSize;
    _DQMconsumerQueuePolicy = eventServeParamCopy_._DQMconsumerQueuePolicy;

    // bind the local xdata variables to the infospace
    infoSpace->fireItemAvailable("runNumber", &infospaceRunNumber_);
    infoSpace->fireItemAvailable("activeConsumerTimeout",
                                 &activeConsumerTimeout_);
    infoSpace->fireItemAvailable("consumerQueueSize",&consumerQueueSize_);
    infoSpace->fireItemAvailable("consumerQueuePolicy",&consumerQueuePolicy_);
    infoSpace->fireItemAvailable("DQMactiveConsumerTimeout",
                              &_DQMactiveConsumerTimeout);
    infoSpace->fireItemAvailable("DQMconsumerQueueSize",
                                 &_DQMconsumerQueueSize);
    infoSpace->fireItemAvailable("DQMconsumerQueuePolicy",&_DQMconsumerQueuePolicy);
  }
void stor::Configuration::setupQueueConfigurationInfoSpaceParams ( xdata::InfoSpace *  infoSpace) [private]

Definition at line 357 of file Configuration.cc.

References stor::QueueConfigurationParams::commandQueueSize_, commandQueueSize_, stor::QueueConfigurationParams::dqmEventQueueMemoryLimitMB_, dqmEventQueueMemoryLimitMB_, dqmEventQueueSize_, stor::QueueConfigurationParams::dqmEventQueueSize_, fragmentQueueMemoryLimitMB_, stor::QueueConfigurationParams::fragmentQueueMemoryLimitMB_, stor::QueueConfigurationParams::fragmentQueueSize_, fragmentQueueSize_, stor::QueueConfigurationParams::fragmentStoreMemoryLimitMB_, fragmentStoreMemoryLimitMB_, queueConfigParamCopy_, registrationQueueSize_, stor::QueueConfigurationParams::registrationQueueSize_, stor::QueueConfigurationParams::streamQueueMemoryLimitMB_, streamQueueMemoryLimitMB_, stor::QueueConfigurationParams::streamQueueSize_, and streamQueueSize_.

Referenced by Configuration().

  {
    // copy the initial defaults to the xdata variables
    commandQueueSize_ = queueConfigParamCopy_.commandQueueSize_;
    dqmEventQueueSize_ = queueConfigParamCopy_.dqmEventQueueSize_;
    dqmEventQueueMemoryLimitMB_ = queueConfigParamCopy_.dqmEventQueueMemoryLimitMB_;
    fragmentQueueSize_ = queueConfigParamCopy_.fragmentQueueSize_;
    fragmentQueueMemoryLimitMB_ = queueConfigParamCopy_.fragmentQueueMemoryLimitMB_;
    registrationQueueSize_ = queueConfigParamCopy_.registrationQueueSize_;
    streamQueueSize_ = queueConfigParamCopy_.streamQueueSize_;
    streamQueueMemoryLimitMB_ = queueConfigParamCopy_.streamQueueMemoryLimitMB_;
    fragmentStoreMemoryLimitMB_ = queueConfigParamCopy_.fragmentStoreMemoryLimitMB_;

    // bind the local xdata variables to the infospace
    infoSpace->fireItemAvailable("commandQueueSize", &commandQueueSize_);
    infoSpace->fireItemAvailable("dqmEventQueueSize", &dqmEventQueueSize_);
    infoSpace->fireItemAvailable("dqmEventQueueMemoryLimitMB", &dqmEventQueueMemoryLimitMB_);
    infoSpace->fireItemAvailable("fragmentQueueSize", &fragmentQueueSize_);
    infoSpace->fireItemAvailable("fragmentQueueMemoryLimitMB", &fragmentQueueMemoryLimitMB_);
    infoSpace->fireItemAvailable("registrationQueueSize", &registrationQueueSize_);
    infoSpace->fireItemAvailable("streamQueueSize", &streamQueueSize_);
    infoSpace->fireItemAvailable("streamQueueMemoryLimitMB", &streamQueueMemoryLimitMB_);
    infoSpace->fireItemAvailable("fragmentStoreMemoryLimitMB", &fragmentStoreMemoryLimitMB_);
  }
void stor::Configuration::setupResourceMonitorInfoSpaceParams ( xdata::InfoSpace *  infoSpace) [private]

Definition at line 403 of file Configuration.cc.

References stor::ResourceMonitorParams::copyWorkers_, copyWorkersCommand_, copyWorkersUser_, stor::ResourceMonitorParams::injectWorkers_, injectWorkersCommand_, injectWorkersUser_, nCopyWorkers_, nInjectWorkers_, resourceMonitorParamCopy_, stor::ResourceMonitorParams::sataUser_, and sataUser_.

Referenced by Configuration().

  {
    // copy the initial defaults to the xdata variables
    sataUser_ = resourceMonitorParamCopy_.sataUser_;
    injectWorkersUser_ = resourceMonitorParamCopy_.injectWorkers_.user_;
    injectWorkersCommand_ = resourceMonitorParamCopy_.injectWorkers_.command_;
    nInjectWorkers_ = resourceMonitorParamCopy_.injectWorkers_.expectedCount_;
    copyWorkersUser_ = resourceMonitorParamCopy_.copyWorkers_.user_;
    copyWorkersCommand_ = resourceMonitorParamCopy_.copyWorkers_.command_;
    nCopyWorkers_ = resourceMonitorParamCopy_.copyWorkers_.expectedCount_;
 
    // bind the local xdata variables to the infospace
    infoSpace->fireItemAvailable("sataUser", &sataUser_);
    infoSpace->fireItemAvailable("injectWorkersUser", &injectWorkersUser_);
    infoSpace->fireItemAvailable("injectWorkersCommand", &injectWorkersCommand_);
    infoSpace->fireItemAvailable("nInjectWorkers", &nInjectWorkers_);
    infoSpace->fireItemAvailable("copyWorkersUser", &copyWorkersUser_);
    infoSpace->fireItemAvailable("copyWorkersCommand", &copyWorkersCommand_);
    infoSpace->fireItemAvailable("nCopyWorkers", &nCopyWorkers_);
  }
void stor::Configuration::setupWorkerThreadInfoSpaceParams ( xdata::InfoSpace *  infoSpace) [private]

Definition at line 383 of file Configuration.cc.

References stor::WorkerThreadParams::DQMEPdeqWaitTime_, DQMEPdeqWaitTime_, stor::utils::durationToSeconds(), stor::WorkerThreadParams::DWdeqWaitTime_, DWdeqWaitTime_, FPdeqWaitTime_, stor::WorkerThreadParams::FPdeqWaitTime_, stor::WorkerThreadParams::monitoringSleepSec_, monitoringSleepSec_, staleFragmentTimeOut_, stor::WorkerThreadParams::staleFragmentTimeOut_, throuphputAveragingCycles_, stor::WorkerThreadParams::throuphputAveragingCycles_, and workerThreadParamCopy_.

Referenced by Configuration().

  {
    // copy the initial defaults to the xdata variables
    FPdeqWaitTime_ = utils::durationToSeconds(workerThreadParamCopy_.FPdeqWaitTime_);
    DWdeqWaitTime_ = utils::durationToSeconds(workerThreadParamCopy_.DWdeqWaitTime_);
    DQMEPdeqWaitTime_ = utils::durationToSeconds(workerThreadParamCopy_.DQMEPdeqWaitTime_);
    staleFragmentTimeOut_ = utils::durationToSeconds(workerThreadParamCopy_.staleFragmentTimeOut_);
    monitoringSleepSec_ = utils::durationToSeconds(workerThreadParamCopy_.monitoringSleepSec_);
    throuphputAveragingCycles_ = workerThreadParamCopy_.throuphputAveragingCycles_;

    // bind the local xdata variables to the infospace
    infoSpace->fireItemAvailable("FPdeqWaitTime", &FPdeqWaitTime_);
    infoSpace->fireItemAvailable("DWdeqWaitTime", &DWdeqWaitTime_);
    infoSpace->fireItemAvailable("DQMEPdeqWaitTime", &DQMEPdeqWaitTime_);
    infoSpace->fireItemAvailable("staleFragmentTimeOut", &staleFragmentTimeOut_);
    infoSpace->fireItemAvailable("monitoringSleepSec", &monitoringSleepSec_);
    infoSpace->fireItemAvailable("throuphputAveragingCycles", &throuphputAveragingCycles_);
  }
void stor::Configuration::setWorkerThreadDefaults ( ) [private]

Definition at line 236 of file Configuration.cc.

References stor::WorkerThreadParams::DQMEPdeqWaitTime_, stor::WorkerThreadParams::DWdeqWaitTime_, stor::WorkerThreadParams::FPdeqWaitTime_, stor::WorkerThreadParams::monitoringSleepSec_, seconds(), stor::WorkerThreadParams::staleFragmentTimeOut_, stor::WorkerThreadParams::throuphputAveragingCycles_, and workerThreadParamCopy_.

Referenced by Configuration().

  {
    // set defaults
    workerThreadParamCopy_.FPdeqWaitTime_ = boost::posix_time::millisec(250);
    workerThreadParamCopy_.DWdeqWaitTime_ = boost::posix_time::millisec(500);
    workerThreadParamCopy_.DQMEPdeqWaitTime_ = boost::posix_time::millisec(500);
  
    workerThreadParamCopy_.staleFragmentTimeOut_ = boost::posix_time::seconds(60);
    workerThreadParamCopy_.monitoringSleepSec_ = boost::posix_time::seconds(1);
    workerThreadParamCopy_.throuphputAveragingCycles_ = 10;
  }
bool stor::Configuration::streamConfigurationHasChanged ( ) const

Tests whether the stream configuration string has changed in the infospace. Returns true if it has changed, false if not.

Definition at line 116 of file Configuration.cc.

References generalMutex_, and streamConfigurationChanged_.

  {
    boost::mutex::scoped_lock sl(generalMutex_);
    return streamConfigurationChanged_;
  }
void stor::Configuration::updateAllParams ( )
void stor::Configuration::updateDiskWritingParams ( )

Updates the local copy of the disk writing configuration parameters from the infospace.

Definition at line 104 of file Configuration.cc.

References generalMutex_, and updateLocalDiskWritingData().

  {
    boost::mutex::scoped_lock sl(generalMutex_);
    updateLocalDiskWritingData();
  }
void stor::Configuration::updateLocalAlarmData ( ) [private]
void stor::Configuration::updateLocalDiskWritingData ( ) [private]

Definition at line 438 of file Configuration.cc.

References stor::DiskWritingParams::checkAdler32_, checkAdler32_, stor::DiskWritingParams::dbFilePath_, dbFilePath_, diskWriteParamCopy_, stor::DiskWritingParams::failHighWaterMark_, failHighWaterMark_, faultyEventsStream_, stor::DiskWritingParams::faultyEventsStream_, fileClosingTestInterval_, stor::DiskWritingParams::fileClosingTestInterval_, fileName_, stor::DiskWritingParams::fileName_, filePath_, stor::DiskWritingParams::filePath_, fileSizeTolerance_, stor::DiskWritingParams::fileSizeTolerance_, evf::ParameterSetRetriever::getAsString(), stor::utils::getStdVector(), highWaterMark_, stor::DiskWritingParams::highWaterMark_, lumiSectionTimeOut_, stor::DiskWritingParams::lumiSectionTimeOut_, maxFileSize_, stor::DiskWritingParams::maxFileSizeMB_, stor::DiskWritingParams::nLogicalDisk_, nLogicalDisk_, otherDiskPaths_, stor::DiskWritingParams::otherDiskPaths_, seconds(), stor::utils::secondsToDuration(), stor::DiskWritingParams::setupLabel_, setupLabel_, streamConfiguration_, stor::DiskWritingParams::streamConfiguration_, and streamConfigurationChanged_.

Referenced by updateAllParams(), and updateDiskWritingParams().

  {
    evf::ParameterSetRetriever smpset(streamConfiguration_);
    diskWriteParamCopy_.streamConfiguration_ = smpset.getAsString();

    diskWriteParamCopy_.fileName_ = fileName_;
    diskWriteParamCopy_.filePath_ = filePath_;
    if ( dbFilePath_.value_.empty() )
      diskWriteParamCopy_.dbFilePath_ = filePath_.value_ + "/log";
    else
      diskWriteParamCopy_.dbFilePath_ = dbFilePath_;
    diskWriteParamCopy_.setupLabel_ = setupLabel_;
    diskWriteParamCopy_.nLogicalDisk_ = nLogicalDisk_;
    diskWriteParamCopy_.maxFileSizeMB_ = maxFileSize_;
    diskWriteParamCopy_.highWaterMark_ = highWaterMark_;
    diskWriteParamCopy_.failHighWaterMark_ = failHighWaterMark_;
    diskWriteParamCopy_.lumiSectionTimeOut_ = utils::secondsToDuration(lumiSectionTimeOut_);
    diskWriteParamCopy_.fileClosingTestInterval_ =
      boost::posix_time::seconds( static_cast<int>(fileClosingTestInterval_) );
    diskWriteParamCopy_.fileSizeTolerance_ = fileSizeTolerance_;
    diskWriteParamCopy_.faultyEventsStream_ = faultyEventsStream_;
    diskWriteParamCopy_.checkAdler32_ = checkAdler32_;

    utils::getStdVector(otherDiskPaths_, diskWriteParamCopy_.otherDiskPaths_);


    streamConfigurationChanged_ = false;
  }
void stor::Configuration::updateLocalDQMProcessingData ( ) [private]
void stor::Configuration::updateLocalEventServingData ( ) [private]
void stor::Configuration::updateLocalQueueConfigurationData ( ) [private]
void stor::Configuration::updateLocalResourceMonitorData ( ) [private]
void stor::Configuration::updateLocalRunNumberData ( ) [private]

Definition at line 541 of file Configuration.cc.

References infospaceRunNumber_, and localRunNumber_.

Referenced by updateAllParams(), and updateRunParams().

void stor::Configuration::updateLocalWorkerThreadData ( ) [private]
void stor::Configuration::updateRunParams ( )

Updates the local copy of run-based configuration parameter from the infospace.

Definition at line 110 of file Configuration.cc.

References generalMutex_, and updateLocalRunNumberData().

  {
    boost::mutex::scoped_lock sl(generalMutex_);
    updateLocalRunNumberData();
  }

Member Data Documentation

xdata::Boolean stor::Configuration::checkAdler32_ [private]

Definition at line 352 of file Configuration.h.

Referenced by setupDiskWritingInfoSpaceParams(), and updateLocalDiskWritingData().

xdata::Boolean stor::Configuration::collateDQM_ [private]
xdata::UnsignedInteger32 stor::Configuration::commandQueueSize_ [private]
xdata::Integer stor::Configuration::consumerQueueSize_ [private]
xdata::String stor::Configuration::copyWorkersUser_ [private]

Definition at line 400 of file Configuration.h.

Referenced by getCurrentErrorStreamConfig(), and setCurrentErrorStreamConfig().

Definition at line 399 of file Configuration.h.

Referenced by getCurrentEventStreamConfig(), and setCurrentEventStreamConfig().

xdata::String stor::Configuration::dbFilePath_ [private]

Definition at line 341 of file Configuration.h.

Referenced by setupDiskWritingInfoSpaceParams(), and updateLocalDiskWritingData().

xdata::UnsignedInteger32 stor::Configuration::discardDQMUpdatesForOlderLS_ [private]
xdata::Double stor::Configuration::DQMEPdeqWaitTime_ [private]
xdata::UnsignedInteger32 stor::Configuration::dqmEventQueueMemoryLimitMB_ [private]
xdata::UnsignedInteger32 stor::Configuration::dqmEventQueueSize_ [private]
xdata::Double stor::Configuration::DWdeqWaitTime_ [private]
xdata::UnsignedInteger32 stor::Configuration::errorEvents_ [private]

Definition at line 393 of file Configuration.h.

Referenced by setupAlarmInfoSpaceParams(), and updateLocalAlarmData().

Definition at line 397 of file Configuration.h.

Referenced by getCurrentErrorStreamConfig(), and setCurrentErrorStreamConfig().

Definition at line 396 of file Configuration.h.

Referenced by getCurrentEventStreamConfig(), and setCurrentEventStreamConfig().

xdata::Double stor::Configuration::failHighWaterMark_ [private]

Definition at line 347 of file Configuration.h.

Referenced by setupDiskWritingInfoSpaceParams(), and updateLocalDiskWritingData().

Definition at line 351 of file Configuration.h.

Referenced by setupDiskWritingInfoSpaceParams(), and updateLocalDiskWritingData().

Definition at line 349 of file Configuration.h.

Referenced by setupDiskWritingInfoSpaceParams(), and updateLocalDiskWritingData().

xdata::String stor::Configuration::fileName_ [private]

Definition at line 339 of file Configuration.h.

Referenced by setupDiskWritingInfoSpaceParams(), and updateLocalDiskWritingData().

xdata::String stor::Configuration::filePath_ [private]

Definition at line 340 of file Configuration.h.

Referenced by setupDiskWritingInfoSpaceParams(), and updateLocalDiskWritingData().

xdata::Double stor::Configuration::fileSizeTolerance_ [private]

Definition at line 350 of file Configuration.h.

Referenced by setupDiskWritingInfoSpaceParams(), and updateLocalDiskWritingData().

xdata::Double stor::Configuration::FPdeqWaitTime_ [private]
xdata::UnsignedInteger32 stor::Configuration::fragmentQueueMemoryLimitMB_ [private]
xdata::UnsignedInteger32 stor::Configuration::fragmentQueueSize_ [private]
xdata::UnsignedInteger32 stor::Configuration::fragmentStoreMemoryLimitMB_ [private]
xdata::Double stor::Configuration::highWaterMark_ [private]

Definition at line 346 of file Configuration.h.

Referenced by setupDiskWritingInfoSpaceParams(), and updateLocalDiskWritingData().

xdata::UnsignedInteger32 stor::Configuration::infospaceRunNumber_ [private]

Definition at line 335 of file Configuration.h.

Referenced by setupEventServingInfoSpaceParams(), and updateLocalRunNumberData().

xdata::String stor::Configuration::injectWorkersUser_ [private]
xdata::Boolean stor::Configuration::isProductionSystem_ [private]

Definition at line 392 of file Configuration.h.

Referenced by setupAlarmInfoSpaceParams(), and updateLocalAlarmData().

unsigned int stor::Configuration::localRunNumber_ [private]

Definition at line 336 of file Configuration.h.

Referenced by getRunNumber(), and updateLocalRunNumberData().

Definition at line 348 of file Configuration.h.

Referenced by setupDiskWritingInfoSpaceParams(), and updateLocalDiskWritingData().

xdata::Integer stor::Configuration::maxFileSize_ [private]

Definition at line 345 of file Configuration.h.

Referenced by setupDiskWritingInfoSpaceParams(), and updateLocalDiskWritingData().

xdata::Integer stor::Configuration::nCopyWorkers_ [private]
xdata::Integer stor::Configuration::nInjectWorkers_ [private]
xdata::Integer stor::Configuration::nLogicalDisk_ [private]

Definition at line 344 of file Configuration.h.

Referenced by setupDiskWritingInfoSpaceParams(), and updateLocalDiskWritingData().

Definition at line 342 of file Configuration.h.

Referenced by setupDiskWritingInfoSpaceParams(), and updateLocalDiskWritingData().

Definition at line 332 of file Configuration.h.

Referenced by actionPerformed(), and setDiskWritingDefaults().

xdata::Integer stor::Configuration::readyTimeDQM_ [private]
xdata::UnsignedInteger32 stor::Configuration::registrationQueueSize_ [private]
xdata::String stor::Configuration::sataUser_ [private]
xdata::String stor::Configuration::setupLabel_ [private]

Definition at line 343 of file Configuration.h.

Referenced by setupDiskWritingInfoSpaceParams(), and updateLocalDiskWritingData().

xdata::UnsignedInteger32 stor::Configuration::streamQueueMemoryLimitMB_ [private]
xdata::UnsignedInteger32 stor::Configuration::streamQueueSize_ [private]
xdata::UnsignedInteger32 stor::Configuration::throuphputAveragingCycles_ [private]
xdata::UnsignedInteger32 stor::Configuration::unwantedEvents_ [private]

Definition at line 394 of file Configuration.h.

Referenced by setupAlarmInfoSpaceParams(), and updateLocalAlarmData().

xdata::Boolean stor::Configuration::useCompressionDQM_ [private]