MiniballSort
Loading...
Searching...
No Matches
MiniballMbsConverter Class Reference

#include <MbsConverter.hh>

Inheritance diagram for MiniballMbsConverter:
MiniballConverter

Public Member Functions

 MiniballMbsConverter (std::shared_ptr< MiniballSettings > myset)
 
 ~MiniballMbsConverter ()
 
int ConvertFile (std::string input_file_name, unsigned long start_block=0, long end_block=-1)
 
void ProcessBlock (unsigned long nblock)
 
void ProcessFebexData (UInt_t &pos)
 
bool GetFebexChanID (unsigned int x)
 
void FinishFebexData ()
 
void SetMBSEvent (const MBSEvent *myev)
 
void MakeHists ()
 
void NewBuffer ()
 
void ResetHists ()
 
void MakeTree ()
 
void StartFile ()
 
void BuildMbsIndex ()
 
void SortDataVector ()
 
void SortDataMap ()
 
unsigned long long int SortTree (bool do_sort=true)
 
void SetOutput (std::string output_file_name)
 
void SetOutputDirectory (std::string output_dir)
 
void CloseOutput ()
 
void PurgeOutput ()
 
TFile * GetFile ()
 
TTree * GetTree ()
 
TTree * GetMbsInfo ()
 
TTree * GetSortedTree ()
 
void AddCalibration (std::shared_ptr< MiniballCalibration > mycal)
 
void SourceOnly ()
 
void EBISOnly ()
 
bool EBISWindow (long long int t)
 
void AddProgressBar (std::shared_ptr< TGProgressBar > myprog)
 

Static Public Member Functions

static bool TimeComparator (const std::shared_ptr< MiniballDataPackets > &lhs, const std::shared_ptr< MiniballDataPackets > &rhs)
 
static bool MapComparator (const std::pair< unsigned long, double > &lhs, const std::pair< unsigned long, double > &rhs)
 

Protected Attributes

bool flag_source
 
bool flag_ebis
 
std::stringstream sslogs
 
bool flag_febex_data0
 
bool flag_febex_data1
 
bool flag_febex_data2
 
bool flag_febex_data3
 
bool flag_febex_trace
 
bool flag_febex_info
 
unsigned long long my_good_tm_stp = 0
 
unsigned long long my_tm_stp = 0
 
unsigned long long sync_tm_stp = 0
 
long long ebis_tm_stp = 0
 
unsigned long long my_event_id
 
unsigned long my_tm_stp_lsb = 0
 
unsigned long my_tm_stp_msb = 0
 
unsigned long my_tm_stp_hsb = 0
 
unsigned long sync_tm_stp_msb = 0
 
unsigned long sync_tm_stp_hsb = 0
 
unsigned int my_info_field
 
unsigned int ebis_period = 0
 
unsigned int ebis_first = 0
 
unsigned char my_info_code
 
unsigned char my_type
 
unsigned short my_tdiff_data
 
unsigned short my_adc_data
 
unsigned short my_adc_data_lsb
 
unsigned short my_adc_data_hsb
 
unsigned int my_adc_data_int
 
unsigned char my_tag_id
 
unsigned char my_sfp_id
 
unsigned char my_board_id
 
unsigned char my_ch_id
 
unsigned char my_data_id
 
unsigned char my_trig_id
 
long my_hit_time
 
bool my_pileup
 
bool my_clip
 
bool my_flagbit
 
float my_energy
 
unsigned int nsamples
 
bool mbs_data
 
bool midas_data
 
bool med_data
 
bool buffer_full = false
 
bool buffer_part = false
 
unsigned long long qmax_default
 
std::shared_ptr< MBSInfoPacketsmbsinfo_packet = nullptr
 
std::shared_ptr< MiniballDataPacketswrite_packet = nullptr
 
std::shared_ptr< DgfDatadgf_data
 
std::shared_ptr< AdcDataadc_data
 
std::shared_ptr< FebexDatafebex_data
 
std::shared_ptr< InfoDatainfo_data
 
std::vector< std::shared_ptr< MiniballDataPackets > > data_vector
 
std::vector< std::pair< unsigned long, double > > data_map
 
std::string output_dir_name
 
TFile * output_file
 
TTree * sorted_tree
 
TTree * mbsinfo_tree
 
std::vector< unsigned long int > ctr_dgf_hit
 
std::vector< unsigned long int > ctr_madc_hit
 
std::vector< unsigned long int > ctr_caen_hit
 
std::vector< std::vector< unsigned long int > > ctr_febex_hit
 
std::vector< std::vector< unsigned long int > > ctr_febex_pause
 
std::vector< std::vector< unsigned long int > > ctr_febex_resume
 
std::vector< std::vector< unsigned long int > > ctr_febex_sync
 
unsigned long int jump_ctr
 
unsigned long int warp_ctr
 
unsigned long int mash_ctr
 
unsigned long int data_ctr
 
unsigned long int reject_ctr
 
std::vector< std::vector< TProfile * > > hfebex_hit
 
std::vector< std::vector< TProfile * > > hfebex_pause
 
std::vector< std::vector< TProfile * > > hfebex_resume
 
std::vector< std::vector< TProfile * > > hfebex_sync
 
std::vector< std::vector< TH1F * > > hdgf_qshort
 
std::vector< std::vector< TH1F * > > hdgf_cal
 
std::vector< std::vector< TH1F * > > hadc_qshort
 
std::vector< std::vector< TH1F * > > hadc_cal
 
std::vector< std::vector< std::vector< TH1F * > > > hfebex_qint
 
std::vector< std::vector< std::vector< TH1F * > > > hfebex_qshort
 
std::vector< std::vector< std::vector< TH1F * > > > hfebex_cal
 
std::vector< std::vector< std::vector< TH1F * > > > hfebex_mwd
 
TH1F * hhit_time
 
std::vector< bool > first_data
 
std::vector< long long int > tm_stp_read
 
std::vector< std::vector< long long int > > tm_stp_febex
 
std::vector< std::vector< std::vector< long long int > > > tm_stp_febex_ch
 
std::shared_ptr< MiniballSettingsset
 
std::shared_ptr< MiniballCalibrationcal
 
bool _prog_
 
std::shared_ptr< TGProgressBar > prog
 
TList * histlist
 

Private Attributes

const MBSEventev
 
const UInt_t * data
 
size_t ndata
 
unsigned long n_single_hits
 
unsigned long n_double_hits
 

Detailed Description

Definition at line 19 of file MbsConverter.hh.

Constructor & Destructor Documentation

◆ MiniballMbsConverter()

MiniballMbsConverter::MiniballMbsConverter ( std::shared_ptr< MiniballSettings > myset)
inline

Definition at line 23 of file MbsConverter.hh.

◆ ~MiniballMbsConverter()

MiniballMbsConverter::~MiniballMbsConverter ( )
inline

Definition at line 33 of file MbsConverter.hh.

Member Function Documentation

◆ AddCalibration()

void MiniballConverter::AddCalibration ( std::shared_ptr< MiniballCalibration > mycal)
inlineinherited

Definition at line 79 of file Converter.hh.

Referenced by do_convert(), and MiniballGUI::gui_convert().

◆ AddProgressBar()

void MiniballConverter::AddProgressBar ( std::shared_ptr< TGProgressBar > myprog)
inlineinherited

Definition at line 92 of file Converter.hh.

Referenced by MiniballGUI::gui_convert().

◆ BuildMbsIndex()

void MiniballConverter::BuildMbsIndex ( )
inherited

Definition at line 452 of file Converter.cc.

Referenced by do_convert(), and MiniballGUI::gui_convert().

◆ CloseOutput()

void MiniballConverter::CloseOutput ( )
inlineinherited

Definition at line 65 of file Converter.hh.

Referenced by do_convert(), and MiniballGUI::gui_convert().

◆ ConvertFile()

int MiniballMbsConverter::ConvertFile ( std::string input_file_name,
unsigned long start_block = 0,
long end_block = -1 )

Definition at line 501 of file MbsConverter.cc.

Referenced by do_convert(), and MiniballGUI::gui_convert().

◆ EBISOnly()

void MiniballConverter::EBISOnly ( )
inlineinherited

Definition at line 81 of file Converter.hh.

Referenced by do_convert(), and MiniballGUI::gui_convert().

◆ EBISWindow()

bool MiniballConverter::EBISWindow ( long long int t)
inlineinherited

Definition at line 82 of file Converter.hh.

Referenced by MiniballMidasConverter::FinishFebexData().

◆ FinishFebexData()

void MiniballMbsConverter::FinishFebexData ( )

Definition at line 374 of file MbsConverter.cc.

Referenced by ProcessFebexData().

◆ GetFebexChanID()

bool MiniballMbsConverter::GetFebexChanID ( unsigned int x)

Definition at line 331 of file MbsConverter.cc.

Referenced by ProcessFebexData().

◆ GetFile()

TFile * MiniballConverter::GetFile ( )
inlineinherited

Definition at line 74 of file Converter.hh.

◆ GetMbsInfo()

TTree * MiniballConverter::GetMbsInfo ( )
inlineinherited

Definition at line 76 of file Converter.hh.

◆ GetSortedTree()

TTree * MiniballConverter::GetSortedTree ( )
inlineinherited

Definition at line 77 of file Converter.hh.

Referenced by MiniballConverter::GetTree().

◆ GetTree()

TTree * MiniballConverter::GetTree ( )
inlineinherited

Definition at line 75 of file Converter.hh.

◆ MakeHists()

void MiniballConverter::MakeHists ( )
inherited

Definition at line 150 of file Converter.cc.

Referenced by do_convert(), and MiniballGUI::gui_convert().

◆ MakeTree()

void MiniballConverter::MakeTree ( )
inherited

Definition at line 121 of file Converter.cc.

Referenced by do_convert(), and MiniballGUI::gui_convert().

◆ MapComparator()

bool MiniballConverter::MapComparator ( const std::pair< unsigned long, double > & lhs,
const std::pair< unsigned long, double > & rhs )
staticinherited

Definition at line 468 of file Converter.cc.

Referenced by MiniballConverter::SortDataMap().

◆ NewBuffer()

void MiniballConverter::NewBuffer ( )
inherited

Definition at line 54 of file Converter.cc.

Referenced by MiniballMidasConverter::ProcessBlockData().

◆ ProcessBlock()

void MiniballMbsConverter::ProcessBlock ( unsigned long nblock)

Definition at line 4 of file MbsConverter.cc.

Referenced by ConvertFile().

◆ ProcessFebexData()

void MiniballMbsConverter::ProcessFebexData ( UInt_t & pos)

Definition at line 54 of file MbsConverter.cc.

Referenced by ProcessBlock().

◆ PurgeOutput()

void MiniballConverter::PurgeOutput ( )
inlineinherited

Definition at line 71 of file Converter.hh.

Referenced by MiniballConverter::CloseOutput().

◆ ResetHists()

void MiniballConverter::ResetHists ( )
inherited

Definition at line 437 of file Converter.cc.

◆ SetMBSEvent()

void MiniballMbsConverter::SetMBSEvent ( const MBSEvent * myev)
inline

Definition at line 45 of file MbsConverter.hh.

◆ SetOutput()

void MiniballConverter::SetOutput ( std::string output_file_name)
inherited

Definition at line 111 of file Converter.cc.

Referenced by do_convert(), and MiniballGUI::gui_convert().

◆ SetOutputDirectory()

void MiniballConverter::SetOutputDirectory ( std::string output_dir)
inlineinherited

Definition at line 63 of file Converter.hh.

◆ SortDataMap()

void MiniballConverter::SortDataMap ( )
inherited

Definition at line 482 of file Converter.cc.

Referenced by MiniballConverter::SortTree().

◆ SortDataVector()

void MiniballConverter::SortDataVector ( )
inherited

Definition at line 475 of file Converter.cc.

◆ SortTree()

unsigned long long int MiniballConverter::SortTree ( bool do_sort = true)
inherited

Definition at line 489 of file Converter.cc.

Referenced by do_convert(), and MiniballGUI::gui_convert().

◆ SourceOnly()

void MiniballConverter::SourceOnly ( )
inlineinherited

Definition at line 80 of file Converter.hh.

Referenced by do_convert(), and MiniballGUI::gui_convert().

◆ StartFile()

void MiniballConverter::StartFile ( )
inherited

◆ TimeComparator()

bool MiniballConverter::TimeComparator ( const std::shared_ptr< MiniballDataPackets > & lhs,
const std::shared_ptr< MiniballDataPackets > & rhs )
staticinherited

Definition at line 461 of file Converter.cc.

Referenced by MiniballConverter::SortDataVector().

Member Data Documentation

◆ _prog_

◆ adc_data

std::shared_ptr<AdcData> MiniballConverter::adc_data
protectedinherited

◆ buffer_full

bool MiniballConverter::buffer_full = false
protectedinherited

◆ buffer_part

bool MiniballConverter::buffer_part = false
protectedinherited

Definition at line 156 of file Converter.hh.

Referenced by MiniballMidasConverter::ProcessBlockData().

◆ cal

◆ ctr_caen_hit

std::vector<unsigned long int> MiniballConverter::ctr_caen_hit
protectedinherited

Definition at line 182 of file Converter.hh.

◆ ctr_dgf_hit

std::vector<unsigned long int> MiniballConverter::ctr_dgf_hit
protectedinherited

Definition at line 180 of file Converter.hh.

◆ ctr_febex_hit

std::vector<std::vector<unsigned long int> > MiniballConverter::ctr_febex_hit
protectedinherited

◆ ctr_febex_pause

std::vector<std::vector<unsigned long int> > MiniballConverter::ctr_febex_pause
protectedinherited

◆ ctr_febex_resume

std::vector<std::vector<unsigned long int> > MiniballConverter::ctr_febex_resume
protectedinherited

◆ ctr_febex_sync

std::vector<std::vector<unsigned long int> > MiniballConverter::ctr_febex_sync
protectedinherited

◆ ctr_madc_hit

std::vector<unsigned long int> MiniballConverter::ctr_madc_hit
protectedinherited

Definition at line 181 of file Converter.hh.

◆ data

const UInt_t* MiniballMbsConverter::data
private

Definition at line 52 of file MbsConverter.hh.

Referenced by MiniballMbsConverter(), ProcessBlock(), and ProcessFebexData().

◆ data_ctr

unsigned long int MiniballConverter::data_ctr
protectedinherited

◆ data_map

◆ data_vector

◆ dgf_data

std::shared_ptr<DgfData> MiniballConverter::dgf_data
protectedinherited

◆ ebis_first

unsigned int MiniballConverter::ebis_first = 0
protectedinherited

Definition at line 128 of file Converter.hh.

Referenced by MiniballMidasConverter::FinishFebexData().

◆ ebis_period

unsigned int MiniballConverter::ebis_period = 0
protectedinherited

◆ ebis_tm_stp

long long MiniballConverter::ebis_tm_stp = 0
protectedinherited

◆ ev

const MBSEvent* MiniballMbsConverter::ev
private

Definition at line 51 of file MbsConverter.hh.

Referenced by ConvertFile(), MiniballMbsConverter(), ProcessBlock(), and SetMBSEvent().

◆ febex_data

◆ first_data

◆ flag_ebis

bool MiniballConverter::flag_ebis
protectedinherited

◆ flag_febex_data0

◆ flag_febex_data1

bool MiniballConverter::flag_febex_data1
protectedinherited

◆ flag_febex_data2

bool MiniballConverter::flag_febex_data2
protectedinherited

◆ flag_febex_data3

bool MiniballConverter::flag_febex_data3
protectedinherited

◆ flag_febex_info

bool MiniballConverter::flag_febex_info
protectedinherited

Definition at line 113 of file Converter.hh.

Referenced by FinishFebexData(), and MiniballMidasConverter::FinishFebexData().

◆ flag_febex_trace

bool MiniballConverter::flag_febex_trace
protectedinherited

◆ flag_source

◆ hadc_cal

std::vector<std::vector<TH1F*> > MiniballConverter::hadc_cal
protectedinherited

◆ hadc_qshort

std::vector<std::vector<TH1F*> > MiniballConverter::hadc_qshort
protectedinherited

◆ hdgf_cal

std::vector<std::vector<TH1F*> > MiniballConverter::hdgf_cal
protectedinherited

◆ hdgf_qshort

std::vector<std::vector<TH1F*> > MiniballConverter::hdgf_qshort
protectedinherited

◆ hfebex_cal

std::vector<std::vector<std::vector<TH1F*> > > MiniballConverter::hfebex_cal
protectedinherited

◆ hfebex_hit

std::vector<std::vector<TProfile*> > MiniballConverter::hfebex_hit
protectedinherited

◆ hfebex_mwd

std::vector<std::vector<std::vector<TH1F*> > > MiniballConverter::hfebex_mwd
protectedinherited

◆ hfebex_pause

std::vector<std::vector<TProfile*> > MiniballConverter::hfebex_pause
protectedinherited

◆ hfebex_qint

std::vector<std::vector<std::vector<TH1F*> > > MiniballConverter::hfebex_qint
protectedinherited

◆ hfebex_qshort

std::vector<std::vector<std::vector<TH1F*> > > MiniballConverter::hfebex_qshort
protectedinherited

◆ hfebex_resume

std::vector<std::vector<TProfile*> > MiniballConverter::hfebex_resume
protectedinherited

◆ hfebex_sync

std::vector<std::vector<TProfile*> > MiniballConverter::hfebex_sync
protectedinherited

◆ hhit_time

TH1F* MiniballConverter::hhit_time
protectedinherited

Definition at line 207 of file Converter.hh.

Referenced by MiniballConverter::MakeHists(), and ProcessFebexData().

◆ histlist

TList* MiniballConverter::histlist
protectedinherited

◆ info_data

◆ jump_ctr

unsigned long int MiniballConverter::jump_ctr
protectedinherited

◆ mash_ctr

unsigned long int MiniballConverter::mash_ctr
protectedinherited

◆ mbs_data

bool MiniballConverter::mbs_data
protectedinherited

◆ mbsinfo_packet

std::shared_ptr<MBSInfoPackets> MiniballConverter::mbsinfo_packet = nullptr
protectedinherited

◆ mbsinfo_tree

TTree* MiniballConverter::mbsinfo_tree
protectedinherited

◆ med_data

bool MiniballConverter::med_data
protectedinherited

◆ midas_data

bool MiniballConverter::midas_data
protectedinherited

◆ my_adc_data

unsigned short MiniballConverter::my_adc_data
protectedinherited

Definition at line 132 of file Converter.hh.

Referenced by MiniballMidasConverter::ProcessFebexData().

◆ my_adc_data_hsb

unsigned short MiniballConverter::my_adc_data_hsb
protectedinherited

◆ my_adc_data_int

unsigned int MiniballConverter::my_adc_data_int
protectedinherited

Definition at line 135 of file Converter.hh.

Referenced by MiniballMidasConverter::FinishFebexData(), and ProcessFebexData().

◆ my_adc_data_lsb

unsigned short MiniballConverter::my_adc_data_lsb
protectedinherited

◆ my_board_id

◆ my_ch_id

unsigned char MiniballConverter::my_ch_id
protectedinherited

◆ my_clip

bool MiniballConverter::my_clip
protectedinherited

Definition at line 144 of file Converter.hh.

Referenced by MiniballMidasConverter::ProcessFebexData().

◆ my_data_id

unsigned char MiniballConverter::my_data_id
protectedinherited

◆ my_energy

float MiniballConverter::my_energy
protectedinherited

Definition at line 146 of file Converter.hh.

Referenced by FinishFebexData(), and MiniballMidasConverter::FinishFebexData().

◆ my_event_id

◆ my_flagbit

bool MiniballConverter::my_flagbit
protectedinherited

◆ my_good_tm_stp

unsigned long long MiniballConverter::my_good_tm_stp = 0
protectedinherited

◆ my_hit_time

long MiniballConverter::my_hit_time
protectedinherited

Definition at line 142 of file Converter.hh.

Referenced by ProcessFebexData().

◆ my_info_code

unsigned char MiniballConverter::my_info_code
protectedinherited

◆ my_info_field

unsigned int MiniballConverter::my_info_field
protectedinherited

Definition at line 126 of file Converter.hh.

Referenced by MiniballMidasConverter::ProcessInfoData().

◆ my_pileup

bool MiniballConverter::my_pileup
protectedinherited

Definition at line 143 of file Converter.hh.

Referenced by MiniballMidasConverter::ProcessFebexData().

◆ my_sfp_id

◆ my_tag_id

unsigned char MiniballConverter::my_tag_id
protectedinherited

Definition at line 136 of file Converter.hh.

Referenced by GetFebexChanID().

◆ my_tdiff_data

unsigned short MiniballConverter::my_tdiff_data
protectedinherited

Definition at line 131 of file Converter.hh.

Referenced by MiniballMidasConverter::ProcessFebexData().

◆ my_tm_stp

◆ my_tm_stp_hsb

unsigned long MiniballConverter::my_tm_stp_hsb = 0
protectedinherited

◆ my_tm_stp_lsb

unsigned long MiniballConverter::my_tm_stp_lsb = 0
protectedinherited

◆ my_tm_stp_msb

unsigned long MiniballConverter::my_tm_stp_msb = 0
protectedinherited

◆ my_trig_id

unsigned char MiniballConverter::my_trig_id
protectedinherited

Definition at line 141 of file Converter.hh.

Referenced by GetFebexChanID().

◆ my_type

unsigned char MiniballConverter::my_type
protectedinherited

Definition at line 130 of file Converter.hh.

Referenced by MiniballMidasConverter::ProcessBlockData().

◆ n_double_hits

unsigned long MiniballMbsConverter::n_double_hits
private

Definition at line 57 of file MbsConverter.hh.

Referenced by ConvertFile(), MiniballMbsConverter(), and ProcessFebexData().

◆ n_single_hits

unsigned long MiniballMbsConverter::n_single_hits
private

Definition at line 56 of file MbsConverter.hh.

Referenced by ConvertFile(), MiniballMbsConverter(), and ProcessFebexData().

◆ ndata

size_t MiniballMbsConverter::ndata
private

Definition at line 53 of file MbsConverter.hh.

Referenced by ProcessBlock(), and ProcessFebexData().

◆ nsamples

unsigned int MiniballConverter::nsamples
protectedinherited

Definition at line 149 of file Converter.hh.

Referenced by ProcessFebexData(), and MiniballMidasConverter::ProcessTraceData().

◆ output_dir_name

std::string MiniballConverter::output_dir_name
protectedinherited

Definition at line 174 of file Converter.hh.

Referenced by MiniballConverter::SetOutputDirectory().

◆ output_file

◆ prog

std::shared_ptr<TGProgressBar> MiniballConverter::prog
protectedinherited

◆ qmax_default

unsigned long long MiniballConverter::qmax_default
protectedinherited

Definition at line 159 of file Converter.hh.

Referenced by MiniballConverter::MakeHists().

◆ reject_ctr

unsigned long int MiniballConverter::reject_ctr
protectedinherited

◆ set

◆ sorted_tree

TTree* MiniballConverter::sorted_tree
protectedinherited

◆ sslogs

std::stringstream MiniballConverter::sslogs
protectedinherited

◆ sync_tm_stp

unsigned long long MiniballConverter::sync_tm_stp = 0
protectedinherited

Definition at line 118 of file Converter.hh.

Referenced by MiniballMidasConverter::ProcessInfoData().

◆ sync_tm_stp_hsb

unsigned long MiniballConverter::sync_tm_stp_hsb = 0
protectedinherited

Definition at line 125 of file Converter.hh.

Referenced by MiniballMidasConverter::ProcessInfoData().

◆ sync_tm_stp_msb

unsigned long MiniballConverter::sync_tm_stp_msb = 0
protectedinherited

Definition at line 124 of file Converter.hh.

Referenced by MiniballMidasConverter::ProcessInfoData().

◆ tm_stp_febex

std::vector<std::vector<long long int> > MiniballConverter::tm_stp_febex
protectedinherited

◆ tm_stp_febex_ch

std::vector<std::vector<std::vector<long long int> > > MiniballConverter::tm_stp_febex_ch
protectedinherited

◆ tm_stp_read

std::vector<long long int> MiniballConverter::tm_stp_read
protectedinherited

◆ warp_ctr

unsigned long int MiniballConverter::warp_ctr
protectedinherited

◆ write_packet

std::shared_ptr<MiniballDataPackets> MiniballConverter::write_packet = nullptr
protectedinherited

The documentation for this class was generated from the following files: