CMS 3D CMS Logo

CSCDQM Framework Guide

Introduction

CSCDQM Framework provides common services for both Local and Global CSC DQM. It includes analysis module, caching, etc. And should be extended in the nearest future.

The rationale in creating this framework/library is being sick in constantly changing Local and Global DQM code and being not efficient in both places. And having no spare time for hobbies. After starting to program this framework found myself even more busy.

Murphys Law: Everything done to improve it only makes it worse.

Quick Start Guide

Below are some steps that are necessary to go throught while trying to run the library.

Step 1: Implement cscdqm::MonitorObject

One should implement/extend cscdqm::MonitorObject interface which is the main (and only) Monitoring Object that goes into the library and is beinf manipulated uppon. Example:

class MyMonitorObject : public cscdqm::MonitorObject {
public:
// Implement virtual methods
};

Step 2: Implement cscdqm::MonitorObjectProvider

cscdqm::MonitorObjectProvider is the object which receives cscdqm::HistoBookRequest to get cscdqm::MonitorObject. Note that particular Monitor Object is being requested only once. After that received pointer to MonitorObject will be held in framework cache efficiently. Example:

class MyMonitorObjectProvider : public cscdqm::MonitorObjectProvider {
public:
// Your code
}
// Other methods, etc.
};

Step 3: Rock & Roll

In your code create cscdqm::Configuration object, supply whatever parameters you need (or load XML configuration file, or edm::ParameterSet), create your cscdqm::MonitorObjectProvider and then create cscdqm::Dispatcher object. Thats it. Now you can supply events to Dispatcher by calling appropriate method. Note that event processing methods differ in Local and Global DQM! You can call a methof to update fractional and efficiency histograms as well. Example:

class MyApplication {
private:
MyMonitorObjectProvider provider;
cscdqm::Dispatcher dispatcher;
public:
MyApplication() : dispatcher(&config, &provider) {
// do whatever with config object, i.e.
// config.setPARAMETER(x);
dispatcher.init();
}
~MyApplication() {
}
void processEvent(const char* data, const int32_t* dataSize, const uint32_t errorStat, const int32_t nodeNumber) {
dispatcher.processEvent(data, dataSize, errorStat, nodeNumber);
}
};