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 = false
 

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

◆ EventProcessorMutex()

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

Constructor.

Parameters
p_configPointer to Global Configuration

Definition at line 63 of file CSCDQM_Dispatcher.h.

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

References fullStandbyProcessed.

Member Function Documentation

◆ maskHWElements()

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

89 { return processor.maskHWElements(tokens); }

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

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

◆ processStandby()

void cscdqm::EventProcessorMutex::processStandby ( HWStandbyType standby)
inline

Process standby information.

Parameters
standbyStandby information

Definition at line 95 of file CSCDQM_Dispatcher.h.

95  {
96  if (lastStandby != standby) {
98  if (config->getIN_FULL_STANDBY()) {
99  // Lets mark CSCs as BAD - have not ever ever been in !STANDBY
100  if (!fullStandbyProcessed) {
103  fullStandbyProcessed = true;
104  }
105  }
106  lastStandby = standby;
107  }
108  }

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

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

◆ updateFractionAndEfficiencyHistos()

void cscdqm::EventProcessorMutex::updateFractionAndEfficiencyHistos ( )
inline

Update Fraction and Efficiency histograms.

Returns

Definition at line 72 of file CSCDQM_Dispatcher.h.

72  {
73  LockType lock(mutex);
74  config->updateFraTimer(true);
76  config->updateFraTimer(false);
77  if (config->getPROCESS_EFF_HISTOS()) {
78  config->updateEffTimer(true);
80  config->updateEffTimer(false);
81  }
82  }

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

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

Member Data Documentation

◆ config

Configuration* cscdqm::EventProcessorMutex::config
private

◆ fullStandbyProcessed

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().

◆ lastStandby

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().

◆ processor

EventProcessor cscdqm::EventProcessorMutex::processor
private

Local (wrapped) event processor

Definition at line 47 of file CSCDQM_Dispatcher.h.

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

cscdqm::EventProcessor::standbyEfficiencyHistos
void standbyEfficiencyHistos(HWStandbyType &standby)
apply standby flags/parameters
Definition: CSCDQM_EventProcessor_updateEffHistos.cc:348
cscdqm::EventProcessor::writeShifterHistograms
void writeShifterHistograms()
Definition: CSCDQM_EventProcessor_updateEffHistos.cc:231
cscdqm::EventProcessorMutex::lastStandby
HWStandbyType lastStandby
Definition: CSCDQM_Dispatcher.h:56
cscdqm::EventProcessor::updateEfficiencyHistos
void updateEfficiencyHistos()
Update Efficiency MOs.
Definition: CSCDQM_EventProcessor_updateEffHistos.cc:26
config
Definition: config.py:1
CommonMethods.lock
def lock()
Definition: CommonMethods.py:82
cscdqm::EventProcessor::updateFractionHistos
void updateFractionHistos()
Update Fractional MOs.
Definition: CSCDQM_EventProcessor_updateFracHistos.cc:26
cscdqm::EventProcessorMutex::processor
EventProcessor processor
Definition: CSCDQM_Dispatcher.h:47
cscdqm::EventProcessorMutex::fullStandbyProcessed
bool fullStandbyProcessed
Definition: CSCDQM_Dispatcher.h:53
cscdqm::EventProcessor::maskHWElements
unsigned int maskHWElements(std::vector< std::string > &tokens)
Mask HW elements from the efficiency calculations. Can be applied on runtime!
Definition: CSCDQM_EventProcessor.cc:202
cscdqm::Lock::mutex
bool mutex
Definition: CSCDQM_Lock.h:48