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

#include <MedConverter.hh>

Inheritance diagram for MiniballMedConverter:
MiniballConverter

Public Member Functions

 MiniballMedConverter (std::shared_ptr< MiniballSettings > myset)
 
 ~MiniballMedConverter ()
 
int ConvertFile (std::string input_file_name, unsigned long start_block=0, long end_block=-1)
 
void ProcessEvent (unsigned long nblock)
 
void ProcessMesytecAdcData ()
 
void ProcessCaenAdcData ()
 
void ProcessDgfData ()
 
void ProcessDgfScaler ()
 
void ProcessPatternUnitData ()
 
void ProcessScalerData ()
 
void ClearDataBuffer ()
 
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 MBSSubEventmbs_sevt
 
size_t ndata
 
std::vector< MiniballDataPacketsoutput_buffer
 

Detailed Description

Definition at line 19 of file MedConverter.hh.

Constructor & Destructor Documentation

◆ MiniballMedConverter()

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

Definition at line 23 of file MedConverter.hh.

◆ ~MiniballMedConverter()

MiniballMedConverter::~MiniballMedConverter ( )
inline

Definition at line 31 of file MedConverter.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().

◆ ClearDataBuffer()

void MiniballMedConverter::ClearDataBuffer ( )

◆ CloseOutput()

void MiniballConverter::CloseOutput ( )
inlineinherited

Definition at line 65 of file Converter.hh.

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

◆ ConvertFile()

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

Definition at line 754 of file MedConverter.cc.

Referenced by do_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().

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

◆ ProcessCaenAdcData()

void MiniballMedConverter::ProcessCaenAdcData ( )

Definition at line 242 of file MedConverter.cc.

Referenced by ProcessEvent().

◆ ProcessDgfData()

void MiniballMedConverter::ProcessDgfData ( )

Definition at line 475 of file MedConverter.cc.

Referenced by ProcessEvent().

◆ ProcessDgfScaler()

void MiniballMedConverter::ProcessDgfScaler ( )

Definition at line 355 of file MedConverter.cc.

Referenced by ProcessEvent().

◆ ProcessEvent()

void MiniballMedConverter::ProcessEvent ( unsigned long nblock)

Definition at line 4 of file MedConverter.cc.

Referenced by ConvertFile().

◆ ProcessMesytecAdcData()

void MiniballMedConverter::ProcessMesytecAdcData ( )

Definition at line 79 of file MedConverter.cc.

Referenced by ProcessEvent().

◆ ProcessPatternUnitData()

void MiniballMedConverter::ProcessPatternUnitData ( )

Definition at line 251 of file MedConverter.cc.

Referenced by ProcessEvent().

◆ ProcessScalerData()

void MiniballMedConverter::ProcessScalerData ( )

Definition at line 312 of file MedConverter.cc.

Referenced by ProcessEvent().

◆ 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 MiniballMedConverter::SetMBSEvent ( const MBSEvent * myev)
inline

Definition at line 47 of file MedConverter.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

Definition at line 165 of file Converter.hh.

Referenced by MiniballConverter::MakeTree(), and ProcessMesytecAdcData().

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

unsigned long int MiniballConverter::data_ctr
protectedinherited

◆ data_map

◆ data_vector

◆ dgf_data

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

Definition at line 164 of file Converter.hh.

Referenced by MiniballConverter::MakeTree(), and ProcessDgfData().

◆ 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* MiniballMedConverter::ev
private

Definition at line 53 of file MedConverter.hh.

Referenced by ConvertFile(), MiniballMedConverter(), ProcessEvent(), 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

◆ flag_febex_trace

◆ flag_source

◆ hadc_cal

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

Definition at line 201 of file Converter.hh.

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

◆ hadc_qshort

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

Definition at line 200 of file Converter.hh.

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

◆ hdgf_cal

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

Definition at line 199 of file Converter.hh.

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

◆ hdgf_qshort

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

Definition at line 198 of file Converter.hh.

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

◆ 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

◆ 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

◆ mbs_sevt

const MBSSubEvent* MiniballMedConverter::mbs_sevt
private

◆ 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

◆ my_adc_data_lsb

unsigned short MiniballConverter::my_adc_data_lsb
protectedinherited

◆ my_board_id

◆ my_ch_id

◆ 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

◆ my_event_id

unsigned long long MiniballConverter::my_event_id
protectedinherited

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

◆ my_type

unsigned char MiniballConverter::my_type
protectedinherited

Definition at line 130 of file Converter.hh.

Referenced by MiniballMidasConverter::ProcessBlockData().

◆ ndata

size_t MiniballMedConverter::ndata
private

Definition at line 55 of file MedConverter.hh.

Referenced by ProcessEvent().

◆ nsamples

unsigned int MiniballConverter::nsamples
protectedinherited

◆ output_buffer

std::vector<MiniballDataPackets> MiniballMedConverter::output_buffer
private

Definition at line 58 of file MedConverter.hh.

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