CMS 3D CMS Logo

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 44 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 66 of file CSCDQM_Dispatcher.h.

66  : processor(p_config) {
67  config = p_config;
68  fullStandbyProcessed = false;
69  }
Definition: config.py:1

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 92 of file CSCDQM_Dispatcher.h.

References cscdqm::EventProcessor::maskHWElements().

Referenced by cscdqm::Dispatcher::maskHWElements(), and cscdqm::Dispatcher::~Dispatcher().

92  {
93  return processor.maskHWElements(tokens);
94  }
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 101 of file CSCDQM_Dispatcher.h.

References cscdqm::EventProcessor::standbyEfficiencyHistos(), and cscdqm::EventProcessor::writeShifterHistograms().

Referenced by cscdqm::Dispatcher::processStandby(), and cscdqm::Dispatcher::~Dispatcher().

101  {
102  if (lastStandby != standby) {
104  if (config->getIN_FULL_STANDBY()) {
105  // Lets mark CSCs as BAD - have not ever ever been in !STANDBY
106  if (!fullStandbyProcessed) {
109  fullStandbyProcessed = true;
110  }
111  }
112  lastStandby = standby;
113  }
114  }
Definition: config.py:1
void standbyEfficiencyHistos(HWStandbyType &standby)
apply standby flags/parameters
void cscdqm::EventProcessorMutex::updateFractionAndEfficiencyHistos ( )
inline

Update Fraction and Efficiency histograms.

Returns

Definition at line 75 of file CSCDQM_Dispatcher.h.

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

Referenced by cscdqm::Dispatcher::updateFractionAndEfficiencyHistos(), and cscdqm::Dispatcher::~Dispatcher().

75  {
76  LockType lock(mutex);
77  config->updateFraTimer(true);
79  config->updateFraTimer(false);
80  if (config->getPROCESS_EFF_HISTOS()) {
81  config->updateEffTimer(true);
83  config->updateEffTimer(false);
84  }
85  }
void updateEfficiencyHistos()
Update Efficiency MOs.
Definition: config.py:1
void updateFractionHistos()
Update Fractional MOs.

Member Data Documentation

Configuration* cscdqm::EventProcessorMutex::config
private

Global Configuration

Definition at line 52 of file CSCDQM_Dispatcher.h.

bool cscdqm::EventProcessorMutex::fullStandbyProcessed
private

If full standby was already processed?

Definition at line 55 of file CSCDQM_Dispatcher.h.

HWStandbyType cscdqm::EventProcessorMutex::lastStandby
private

Last standby value. To be checked for HV changes

Definition at line 58 of file CSCDQM_Dispatcher.h.

EventProcessor cscdqm::EventProcessorMutex::processor
private

Local (wrapped) event processor

Definition at line 49 of file CSCDQM_Dispatcher.h.