BmnRoot
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)
 
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< ProfiMapchannel_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, and channel_maps.

Referenced by main().

◆ can()

◆ can2d()

TCanvas * can2d ( nullptr  )

Referenced by DrawAll(), and main().

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

◆ Draw() [1/2]

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

Definition at line 343 of file BmnMonProf.cxx.

References i.

◆ Draw() [2/2]

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

Definition at line 332 of file BmnMonProf.cxx.

References i.

Referenced by DrawAll(), HDraw(), and BmnLambdaEmbeddingDrawHistos::ProcessHistos().

◆ DrawAll()

int DrawAll ( )

Definition at line 354 of file BmnMonProf.cxx.

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

Referenced by main().

◆ 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, and thr.

Referenced by main().

◆ 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.

◆ main()

◆ MapStrip()

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

◆ ProcessBuffer()

int ProcessBuffer ( uint32_t *  word,
size_t  len 
)

◆ ReadMap()

int ReadMap ( string  name)

Definition at line 65 of file BmnMonProf.cxx.

References channel_maps, ProfiMap::ChannelName, m, and v.

Referenced by BmnGemRaw2Digit::BmnGemRaw2Digit(), and main().

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

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