Project
Loading...
Searching...
No Matches
test_cmv_generator.cxx File Reference

DPL source workflow that generates dummy CMV data for testing the CMV FLP pipeline. More...

#include "Framework/DataProcessorSpec.h"
#include "Framework/Task.h"
#include "Framework/ControlService.h"
#include "Framework/ConfigParamRegistry.h"
#include "Framework/ConfigParamSpec.h"
#include "Framework/Logger.h"
#include "Headers/DataHeader.h"
#include "Algorithm/RangeTokenizer.h"
#include "TPCBase/CRU.h"
#include "DataFormatsTPC/CMV.h"
#include "TPCCalibration/CMVHelper.h"
#include "TPCCalibration/CMVContainer.h"
#include "TPCWorkflow/ProcessingHelpers.h"
#include "CommonUtils/TreeStreamRedirector.h"
#include "CommonUtils/ConfigurableParam.h"
#include "DetectorsRaw/HBFUtilsInitializer.h"
#include "DetectorsRaw/HBFUtils.h"
#include <fmt/format.h>
#include <fmt/ranges.h>
#include <vector>
#include <chrono>
#include <thread>
#include <cmath>
#include <memory>
#include <limits>
#include <random>
#include <stdexcept>
#include <string>
#include <unordered_set>
#include "Framework/runDataProcessing.h"

Go to the source code of this file.

Classes

class  CMVGeneratorDevice
 

Functions

void customize (std::vector< ConfigParamSpec > &workflowOptions)
 
DataProcessorSpec generateCMVsCRU (const std::vector< uint32_t > &crus, const std::unordered_set< uint32_t > &delayCRUs, unsigned int maxTFs, bool delay, int delayTime, int delayEveryN, int delayTimeCRUs, int dropTFsRandom, const std::vector< int > &rangeTFsDrop, float tfLength, float amplitude, float noise, int seed, const std::string &inputFile, long long inputEntry)
 
WorkflowSpec defineDataProcessing (ConfigContext const &config)
 This function hooks up the the workflow specifications into the DPL driver.
 

Detailed Description

DPL source workflow that generates dummy CMV data for testing the CMV FLP pipeline.

Replaces o2-tpc-cmv-to-vector in tests; directly emits CMVVECTOR and CMVORBITS messages per CRU per TF so the workflow can be piped straight into o2-tpc-cmv-flp:

o2-tpc-cmv-test-generator –crus 0-359 –timeframes 100 \ | o2-tpc-cmv-flp –crus 0-359 –n-TFs-buffer 10 \ | o2-dpl-output-proxy –dataspec "downstream:TPC/CMVGROUP;downstream:TPC/CMVORBITINFO" ...

Author
Ernst Hellbar ernst.nosp@m..hel.nosp@m.lbar@.nosp@m.cern.nosp@m..ch

Definition in file test_cmv_generator.cxx.

Function Documentation

◆ customize()

void customize ( std::vector< ConfigParamSpec > &  workflowOptions)

Definition at line 61 of file test_cmv_generator.cxx.

◆ defineDataProcessing()

WorkflowSpec defineDataProcessing ( ConfigContext const &  config)

This function hooks up the the workflow specifications into the DPL driver.

To be implemented by the user to specify one or more DataProcessorSpec.

Use the ConfigContext context in input to get the value of global configuration properties like command line options, number of available CPUs or whatever can affect the creation of the actual workflow.

Returns
a std::vector of DataProcessorSpec which represents the actual workflow to be executed

The workflow executable for the stand alone CPV reconstruction workflow The basic workflow for CPV reconstruction is defined in RecoWorkflow.cxx and contains the following default processors

  • digit reader
  • clusterer

The default workflow can be customized by specifying input and output types e.g. digits, raw, tracks.

MC info is processed by default, disabled by using command line option --disable-mc

This function hooks up the the workflow specifications into the DPL driver.

The workflow executable for the stand alone CTP reconstruction workflow

  • digit and lumi reader This function hooks up the the workflow specifications into the DPL driver.

The workflow executable for the stand alone EMCAL reconstruction workflow The basic workflow for EMCAL reconstruction is defined in RecoWorkflow.cxx and contains the following default processors

  • digit reader
  • clusterer

The default workflow can be customized by specifying input and output types e.g. digits, raw, tracks.

MC info is processed by default, disabled by using command line option --disable-mc

This function hooks up the the workflow specifications into the DPL driver.

The workflow executable for the stand alone TOF reconstruction workflow The basic workflow for TOF reconstruction is defined in RecoWorkflow.cxx and contains the following default processors

  • digit reader
  • clusterer
  • cluster raw decoder
  • track-TOF matcher

The default workflow can be customized by specifying input and output types e.g. digits, raw, clusters.

MC info is processed by default, disabled by using command line option --disable-mc

This function hooks up the the workflow specifications into the DPL driver.

DPL Workflow to process MCH or MID DCS data points.

The expected input is a vector of DataPointCompositeObject containing only MCH (or only MID) data points.

Those datapoints are accumulated into DPMAPs (map from alias names to vector of DataPointValue).

The accumulated DPMAPs are sent to the output whenever :

  • they reach a given size (–xx-max-size option(s))
  • they span a given duration (–xx-max-duration option(s))
  • the workflow is ended

DPL workflow which generates fake random MCH DCS data points.

Data points are generated for HV (currents and voltages) as well as for LV (DualSampa analog and digital voltages, and SOLAR voltages).

DPL workflow which generates fake random MID DCS data points.

Data points are generated for HV (currents and voltages).

The workflow executable for the stand alone PHOS reconstruction workflow The basic workflow for PHOS reconstruction is defined in RecoWorkflow.cxx and contains the following default processors

  • digit reader
  • clusterer

The default workflow can be customized by specifying input and output types e.g. digits, raw, tracks.

MC info is processed by default, disabled by using command line option --disable-mc

This function hooks up the the workflow specifications into the DPL driver.

MC info is processed by default, disabled by using command line option --disable-mc

This function hooks up the the workflow specifications into the DPL driver.

The workflow executable for the stand alone TPC reconstruction workflow The basic workflow for TPC reconstruction is defined in RecoWorkflow.cxx and contains the following default processors

  • digit reader
  • clusterer
  • ClusterHardware Decoder
  • CA tracker

The default workflow can be customized by specifying input and output types e.g. digits, clustershw, tracks.

MC info is processed by default, disabled by using command line option --disable-mc

This function hooks up the the workflow specifications into the DPL driver.

We define at run time the number of devices to be attached to the workflow and the input matching string of the device. This is is done with a configuration string like the following one, where the input matching for each device is provide in comma-separated strings. For instance

A:TOF/RAWDATA/768;B:TOF/RAWDATA/1024,C:TOF/RAWDATA/1280;D:TOF/RAWDATA/1536

will lead to a workflow with 2 devices which will input match

tof-compressor-0 --> A:TOF/RAWDATA/768;B:TOF/RAWDATA/1024 tof-compressor-1 --> C:TOF/RAWDATA/1280;D:TOF/RAWDATA/1536

Definition at line 384 of file test_cmv_generator.cxx.

◆ generateCMVsCRU()

DataProcessorSpec generateCMVsCRU ( const std::vector< uint32_t > &  crus,
const std::unordered_set< uint32_t > &  delayCRUs,
unsigned int  maxTFs,
bool  delay,
int  delayTime,
int  delayEveryN,
int  delayTimeCRUs,
int  dropTFsRandom,
const std::vector< int > &  rangeTFsDrop,
float  tfLength,
float  amplitude,
float  noise,
int  seed,
const std::string inputFile,
long long  inputEntry 
)

Definition at line 348 of file test_cmv_generator.cxx.