CMS 3D CMS Logo

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

Locking object (wrapper) that holds a separate EventProcessor. This object can be used (theoretically) in separate thread. More...

#include <CSCDQM_Dispatcher.h>

Inheritance diagram for cscdqm::EventProcessorMutex:
cscdqm::Lock

Public Member Functions

 EventProcessorMutex (Configuration *const p_config)
 Constructor. More...
 
unsigned int maskHWElements (std::vector< std::string > &tokens)
 Mask HW elements from the efficiency calculations. Can be applied on runtime! More...
 
void processStandby (HWStandbyType &standby)
 Process standby information. More...
 
void updateFractionAndEfficiencyHistos ()
 Update Fraction and Efficiency histograms. More...
 
- Public Member Functions inherited from cscdqm::Lock
 Lock ()
 Constructor. More...
 
virtual ~Lock ()
 Destructor. More...
 

Private Attributes

Configurationconfig
 
bool fullStandbyProcessed
 
HWStandbyType lastStandby
 
EventProcessor processor
 

Additional Inherited Members

- Public Attributes inherited from cscdqm::Lock
bool mutex
 

Detailed Description

Locking object (wrapper) that holds a separate EventProcessor. This object can be used (theoretically) in separate thread.

Definition at line 42 of file CSCDQM_Dispatcher.h.

Constructor & Destructor Documentation

cscdqm::EventProcessorMutex::EventProcessorMutex ( Configuration *const  p_config)
inline

Constructor.

Parameters
p_configPointer to Global Configuration

Definition at line 64 of file CSCDQM_Dispatcher.h.

References config, and fullStandbyProcessed.

64  : processor(p_config) {
65  config = p_config;
66  fullStandbyProcessed = false;
67  }

Member Function Documentation

unsigned int cscdqm::EventProcessorMutex::maskHWElements ( std::vector< std::string > &  tokens)
inline

Mask HW elements from the efficiency calculations. Can be applied on runtime!

Parameters
tokensString tokens of the HW elements
Returns
elements masked

Definition at line 90 of file CSCDQM_Dispatcher.h.

References cscdqm::EventProcessor::maskHWElements(), and processor.

Referenced by cscdqm::Dispatcher::maskHWElements().

90  {
91  return processor.maskHWElements(tokens);
92  }
unsigned int maskHWElements(std::vector< std::string > &tokens)
Mask HW elements from the efficiency calculations. Can be applied on runtime!
void cscdqm::EventProcessorMutex::processStandby ( HWStandbyType standby)
inline

Process standby information.

Parameters
standbyStandby information

Definition at line 99 of file CSCDQM_Dispatcher.h.

References config, fullStandbyProcessed, lastStandby, processor, cscdqm::EventProcessor::standbyEfficiencyHistos(), and cscdqm::EventProcessor::writeShifterHistograms().

Referenced by cscdqm::Dispatcher::processStandby().

99  {
100  if (lastStandby != standby) {
102  if (config->getIN_FULL_STANDBY()) {
103  // Lets mark CSCs as BAD - have not ever ever been in !STANDBY
104  if (!fullStandbyProcessed) {
107  fullStandbyProcessed = true;
108  }
109  }
110  lastStandby = standby;
111  }
112  }
void standbyEfficiencyHistos(HWStandbyType &standby)
apply standby flags/parameters
void cscdqm::EventProcessorMutex::updateFractionAndEfficiencyHistos ( )
inline

Update Fraction and Efficiency histograms.

Returns

Definition at line 73 of file CSCDQM_Dispatcher.h.

References config, CommonMethods::lock(), cscdqm::Lock::mutex, processor, cscdqm::EventProcessor::updateEfficiencyHistos(), cscdqm::Configuration::updateEffTimer(), cscdqm::EventProcessor::updateFractionHistos(), and cscdqm::Configuration::updateFraTimer().

Referenced by cscdqm::Dispatcher::updateFractionAndEfficiencyHistos().

73  {
74  LockType lock(mutex);
75  config->updateFraTimer(true);
77  config->updateFraTimer(false);
78  if (config->getPROCESS_EFF_HISTOS()) {
79  config->updateEffTimer(true);
81  config->updateEffTimer(false);
82  }
83  }
void updateFraTimer(const bool start)
Switch on/off fractional MO processing timer.
void updateEfficiencyHistos()
Update Efficiency MOs.
void updateEffTimer(const bool start)
Switch on/off efficiency MO processing timer.
void updateFractionHistos()
Update Fractional MOs.

Member Data Documentation

Configuration* cscdqm::EventProcessorMutex::config
private
bool cscdqm::EventProcessorMutex::fullStandbyProcessed
private

If full standby was already processed?

Definition at line 53 of file CSCDQM_Dispatcher.h.

Referenced by EventProcessorMutex(), and processStandby().

HWStandbyType cscdqm::EventProcessorMutex::lastStandby
private

Last standby value. To be checked for HV changes

Definition at line 56 of file CSCDQM_Dispatcher.h.

Referenced by processStandby().

EventProcessor cscdqm::EventProcessorMutex::processor
private

Local (wrapped) event processor

Definition at line 47 of file CSCDQM_Dispatcher.h.

Referenced by maskHWElements(), processStandby(), and updateFractionAndEfficiencyHistos().