BmnRoot 26.10.0-18-g4e3414f9
Software framework of the BM@N experiment
Loading...
Searching...
No Matches
BmnMonProf.cxx File Reference
#include <stdio.h>
#include <boost/circular_buffer.hpp>
#include <boost/exception/all.hpp>
#include <boost/property_tree/json_parser.hpp>
#include <boost/property_tree/ptree.hpp>
#include <zmq.h>
#include <TBufferFile.h>
#include <TCanvas.h>
#include <TH2F.h>
#include <THttpServer.h>
#include <TSystem.h>
#include <root/TH1.h>
#include "BmnDataReceiver.h"
#include "BmnProfRawTools.h"
Include dependency graph for BmnMonProf.cxx:

Go to the source code of this file.

Classes

struct  ProfiMap

Macros

#define PAD_WIDTH   1920
#define PAD_HEIGHT   2600

Functions

TCanvas * can2d (nullptr)
TCanvas * can (nullptr)
int ReadMap (string name)
static vector< float > MeanVector (vector< vector< int > > &vec)
int ProcessBuffer (uint32_t *word, size_t len)
int ReorderBits ()
int CalcMean ()
int GetCluster (vector< int > &input, vector< float > &mean, float &sig)
int MapStrip (size_t &iChar, size_t &iCh)
int FillSpill ()
void ClearAllVectors ()
int Draw (TCanvas *c, vector< TH1 * > hv, vector< string > optV)
int Draw (TCanvas *c, vector< TH1 * > hv)
int DrawAll ()
int main (int argc, char **argv)

Variables

const size_t ASIC_channel = 32
const size_t NChannels_run9 = 64
const string DataHeader = "DAT"
const string DataTrailer = "SPILLEND"
uint32_t temp_cntr = 0
const size_t SpillCount = 10
vector< boost::circular_buffer< vector< float > > > cb
vector< boost::circular_buffer< size_t > > cb_event_count
vector< TH1 * > hVec
vector< string > hVecOpt
vector< TH1 * > hVec2D
vector< vector< int > > adc1_word_char
vector< vector< vector< int > > > adc1_ch
vector< vector< float > > adc1_ch_mean
vector< vector< bitset< ASIC_channel > > > adc1
vector< vector< bitset< ASIC_channel > > > adc2
vector< bitset< ASIC_channel > > adc1_word
vector< bitset< ASIC_channel > > adc2_word
uint32_t spill_cntr = 0
size_t NChars = 0
const int NBins = 200
const int ADCLimit = 2050
const float thr = 0
const int NCols = 2
const int NGenHists = 4
vector< ProfiMap > channel_maps

Macro Definition Documentation

◆ PAD_HEIGHT

#define PAD_HEIGHT   2600

Definition at line 22 of file BmnMonProf.cxx.

◆ PAD_WIDTH

#define PAD_WIDTH   1920

Definition at line 21 of file BmnMonProf.cxx.

Function Documentation

◆ CalcMean()

int CalcMean ( )

Definition at line 185 of file BmnMonProf.cxx.

References adc1_ch, adc1_ch_mean, channel_maps, and MeanVector().

Referenced by main().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ can()

TCanvas * can ( nullptr )

Referenced by DrawAll(), BmnHist::DrawRef(), DrawSpill(), DrawSpillEvents(), BmnEmbedding::Embed(), EmbedStagesView(), EmbEffView(), EmbEventView(), EventView(), BmnRescale::GetCanvas(), HistGenTest(), main(), readScalers(), BmnMetadataDecoder::ReadSpillStat(), BmnReport::Register(), rescaleAmplitude(), and Spill().

Here is the caller graph for this function:

◆ can2d()

TCanvas * can2d ( nullptr )

Referenced by DrawAll(), and main().

Here is the caller graph for this function:

◆ ClearAllVectors()

void ClearAllVectors ( )

Definition at line 319 of file BmnMonProf.cxx.

References adc1, adc1_ch, adc1_ch_mean, adc1_word, adc1_word_char, adc2, adc2_word, i, and NChars.

Referenced by main().

Here is the caller graph for this function:

◆ Draw() [1/2]

int Draw ( TCanvas * c,
vector< TH1 * > hv )

Definition at line 343 of file BmnMonProf.cxx.

References TCanvas::cd(), TVirtualPad::Draw(), i, TPad::Modified(), and TCanvas::Update().

Here is the call graph for this function:

◆ Draw() [2/2]

int Draw ( TCanvas * c,
vector< TH1 * > hv,
vector< string > optV )

Definition at line 332 of file BmnMonProf.cxx.

References TCanvas::cd(), TVirtualPad::Draw(), i, TPad::Modified(), and TCanvas::Update().

Referenced by DrawAll().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ DrawAll()

int DrawAll ( )

Definition at line 354 of file BmnMonProf.cxx.

References can(), can2d(), Draw(), hVec, hVec2D, and hVecOpt.

Referenced by main().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ FillSpill()

int FillSpill ( )

Definition at line 239 of file BmnMonProf.cxx.

References adc1_ch, adc1_ch_mean, ASIC_channel, cb, cb_event_count, channel_maps, hVec, hVec2D, iX, iY, MapStrip(), NChannels_run9, NChars, thr, x, and y.

Referenced by main().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetCluster()

int GetCluster ( vector< int > & input,
vector< float > & mean,
float & sig )

Definition at line 193 of file BmnMonProf.cxx.

References ASIC_channel, max(), and thr.

Here is the call graph for this function:

◆ main()

int main ( int argc,
char ** argv )

Definition at line 361 of file BmnMonProf.cxx.

References adc1_ch, adc1_ch_mean, adc1_word_char, ADCLimit, ASIC_channel, CalcMean(), can(), can2d(), cb, cb_event_count, channel_maps, ClearAllVectors(), TString::Data(), DataHeader, DataTrailer, DBGERR, DrawAll(), FillSpill(), hVec, hVec2D, hVecOpt, TBuffer::kRead, NBins, NChannels_run9, NChars, NGenHists, PAD_HEIGHT, PAD_WIDTH, ProcessBuffer(), ReadMap(), THttpServer::Register(), ReorderBits(), TBuffer::SetReadMode(), and SpillCount.

Here is the call graph for this function:

◆ MapStrip()

int MapStrip ( size_t & iChar,
size_t & iCh )
inline

Definition at line 234 of file BmnMonProf.cxx.

References channel_maps.

Referenced by FillSpill().

Here is the caller graph for this function:

◆ MeanVector()

vector< float > MeanVector ( vector< vector< int > > & vec)
static

Definition at line 98 of file BmnMonProf.cxx.

References ASIC_channel, and i.

Referenced by CalcMean().

Here is the caller graph for this function:

◆ ProcessBuffer()

int ProcessBuffer ( uint32_t * word,
size_t len )

Definition at line 114 of file BmnMonProf.cxx.

References adc1, adc1_word, adc2, adc2_word, BmnProfRawTools::adc_num(), ASIC_channel, BmnProfRawTools::data_or_trig(), BmnProfRawTools::holdb_cntr(), and i.

Referenced by main().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ReadMap()

int ReadMap ( string name)

Definition at line 65 of file BmnMonProf.cxx.

References channel_maps, m, and v.

Referenced by main().

Here is the caller graph for this function:

◆ ReorderBits()

int ReorderBits ( )

Definition at line 163 of file BmnMonProf.cxx.

References adc1, adc1_ch, adc1_word_char, BmnProfRawTools::adc_ch(), channel_maps, and i.

Referenced by main().

Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ adc1

vector<vector<bitset<ASIC_channel> > > adc1

◆ adc1_ch

vector<vector<vector<int> > > adc1_ch

Definition at line 39 of file BmnMonProf.cxx.

Referenced by CalcMean(), ClearAllVectors(), FillSpill(), main(), and ReorderBits().

◆ adc1_ch_mean

vector<vector<float> > adc1_ch_mean

Definition at line 40 of file BmnMonProf.cxx.

Referenced by CalcMean(), ClearAllVectors(), FillSpill(), and main().

◆ adc1_word

vector<bitset<ASIC_channel> > adc1_word

Definition at line 43 of file BmnMonProf.cxx.

Referenced by ClearAllVectors(), and ProcessBuffer().

◆ adc1_word_char

vector<vector<int> > adc1_word_char

Definition at line 38 of file BmnMonProf.cxx.

Referenced by ClearAllVectors(), main(), and ReorderBits().

◆ adc2

vector<vector<bitset<ASIC_channel> > > adc2

Definition at line 42 of file BmnMonProf.cxx.

Referenced by ClearAllVectors(), ProcessBuffer(), and DstEventHeader::SetADC2().

◆ adc2_word

vector<bitset<ASIC_channel> > adc2_word

Definition at line 43 of file BmnMonProf.cxx.

Referenced by ClearAllVectors(), and ProcessBuffer().

◆ ADCLimit

const int ADCLimit = 2050

Definition at line 48 of file BmnMonProf.cxx.

Referenced by main().

◆ ASIC_channel

const size_t ASIC_channel = 32

Definition at line 23 of file BmnMonProf.cxx.

Referenced by FillSpill(), GetCluster(), main(), MeanVector(), and ProcessBuffer().

◆ cb

◆ cb_event_count

vector<boost::circular_buffer<size_t> > cb_event_count

Definition at line 33 of file BmnMonProf.cxx.

Referenced by FillSpill(), and main().

◆ channel_maps

vector<ProfiMap> channel_maps

Definition at line 63 of file BmnMonProf.cxx.

Referenced by CalcMean(), FillSpill(), main(), MapStrip(), ReadMap(), and ReorderBits().

◆ DataHeader

const string DataHeader = "DAT"

Definition at line 26 of file BmnMonProf.cxx.

Referenced by main().

◆ DataTrailer

const string DataTrailer = "SPILLEND"

Definition at line 27 of file BmnMonProf.cxx.

Referenced by main().

◆ hVec

vector<TH1*> hVec

Definition at line 35 of file BmnMonProf.cxx.

Referenced by DrawAll(), FillSpill(), and main().

◆ hVec2D

vector<TH1*> hVec2D

Definition at line 37 of file BmnMonProf.cxx.

Referenced by DrawAll(), FillSpill(), and main().

◆ hVecOpt

vector<string> hVecOpt

Definition at line 36 of file BmnMonProf.cxx.

Referenced by DrawAll(), and main().

◆ NBins

const int NBins = 200

Definition at line 47 of file BmnMonProf.cxx.

Referenced by CbmL1::Init(), and main().

◆ NChannels_run9

const size_t NChannels_run9 = 64

Definition at line 24 of file BmnMonProf.cxx.

Referenced by FillSpill(), and main().

◆ NChars

size_t NChars = 0

Definition at line 46 of file BmnMonProf.cxx.

Referenced by ClearAllVectors(), FillSpill(), and main().

◆ NCols

const int NCols = 2

Definition at line 50 of file BmnMonProf.cxx.

◆ NGenHists

const int NGenHists = 4

Definition at line 51 of file BmnMonProf.cxx.

Referenced by main().

◆ spill_cntr

uint32_t spill_cntr = 0

Definition at line 45 of file BmnMonProf.cxx.

◆ SpillCount

const size_t SpillCount = 10

Definition at line 30 of file BmnMonProf.cxx.

Referenced by main().

◆ temp_cntr

uint32_t temp_cntr = 0

Definition at line 29 of file BmnMonProf.cxx.

◆ thr