BmnRoot 26.10.0-233-gb9bbe585
Software framework of the BM@N experiment
Loading...
Searching...
No Matches
BmnFunctionSet Class Reference

Class with static common functions to simplify experiment code. More...

#include <BmnFunctionSet.h>

Static Public Member Functions

static bool isDirectory (TString path)
static int CheckFileExist (TString &fileName, int iVerbose=0, EAccessMode mode=kFileExists)
static int CheckDirectoryExist (TString &fileName, int iVerbose=0, EAccessMode mode=kFileExists)
static int CreateDirectoryTree (TString &fileName, int iVerbose=0, EAccessMode mode=kWritePermission)
static int GetInputFileList (TString inputFileName, std::vector< TString > &fileList)
static int isSimulationFile (TString fileName="")
static int GetPeriodNumber (TFile *root_file, int method_number=0)
static Int_t ParseFileName (const TString &file_name, TString &beam, TString &target, Double_t &energy)
static Int_t GetBeamByIonGenerator (FairPrimaryGenerator *primary_generator, TString &beam, Double_t &energy)
static double GetMagneticFieldByEnergy (const TString &beam, double energy)
static double GetFieldScaleCorrection (double energy)
static bool SetFieldScale (FairField *field, double scale)
static TTimeStamp TimePoint2TS (SysPoint p)
static SysPoint TimeStamp2TP (TTimeStamp p)
static void PrintTimePoint (SysPoint p)
static std::string TimePoint2String (SysPoint p)
static SysPoint TDatime2GMT (TDatime &tdatime, Int_t timezoneOffsetHours=0)

Private Member Functions

 BmnFunctionSet ()
 ~BmnFunctionSet ()

Static Private Member Functions

static TString JoinKeys (const std::vector< std::pair< TString, TString > > &dict)
static Int_t ParseFileNameBySeparator (const TString &file_name, const TString &separator, TString &beam, TString &target, Double_t &energy)

Detailed Description

Definition at line 25 of file BmnFunctionSet.h.

Constructor & Destructor Documentation

◆ BmnFunctionSet()

BmnFunctionSet::BmnFunctionSet ( )
inlineprivate

Definition at line 88 of file BmnFunctionSet.h.

◆ ~BmnFunctionSet()

BmnFunctionSet::~BmnFunctionSet ( )
inlineprivate

Definition at line 89 of file BmnFunctionSet.h.

Member Function Documentation

◆ CheckDirectoryExist()

int BmnFunctionSet::CheckDirectoryExist ( TString & fileName,
int iVerbose = 0,
EAccessMode mode = kFileExists )
static

Definition at line 50 of file BmnFunctionSet.cxx.

References TString::Data().

Referenced by CreateDirectoryTree().

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

◆ CheckFileExist()

int BmnFunctionSet::CheckFileExist ( TString & fileName,
int iVerbose = 0,
EAccessMode mode = kFileExists )
static

Definition at line 31 of file BmnFunctionSet.cxx.

References TString::Data().

Referenced by dump_hits(), eventdisplay(), GetInputFileList(), rc_rlerr(), readDst(), readSim(), run8_reco_bmn(), run8_sim_bmn(), run_ana_bmn(), run_mon_custom(), run_mon_reco(), run_qa_exp(), run_reco_aln(), run_reco_bmn(), run_reco_bmn(), run_reco_bmn(), run_reco_bmn(), run_reco_bmn(), run_reco_noa(), run_reco_src(), run_sim_bmn(), run_sim_bmn(), run_sim_bmn(), run_sim_filter(), run_sim_src(), and SetupOffline().

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

◆ CreateDirectoryTree()

int BmnFunctionSet::CreateDirectoryTree ( TString & fileName,
int iVerbose = 0,
EAccessMode mode = kWritePermission )
static

Definition at line 71 of file BmnFunctionSet.cxx.

References CheckDirectoryExist(), CreateDirectoryTree(), and TString::Data().

Referenced by CreateDirectoryTree(), dump_hits(), mdst_converter(), PairCreation(), rc_rlerr(), run8_reco_bmn(), run8_sim_bmn(), run_ana_bmn(), run_ana_bmn(), run_mon_reco(), run_qa_exp(), run_reco_aln(), run_reco_bmn(), run_reco_bmn(), run_reco_bmn(), run_reco_bmn(), run_reco_noa(), run_reco_src(), run_sim_bmn(), run_sim_bmn(), and run_sim_bmn().

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

◆ GetBeamByIonGenerator()

Int_t BmnFunctionSet::GetBeamByIonGenerator ( FairPrimaryGenerator * primary_generator,
TString & beam,
Double_t & energy )
static

Definition at line 432 of file BmnFunctionSet.cxx.

References TGeoElementTable::BuildDefaultElements(), TObject::Class(), TClass::DynamicCast(), TClass::GetClass(), TClass::GetDataMemberOffset(), TGeoElementTable::GetElement(), TNamed::GetName(), TMath::Sqrt(), TString::ToLower(), and z.

Referenced by run_sim_bmn().

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

◆ GetFieldScaleCorrection()

double BmnFunctionSet::GetFieldScaleCorrection ( double energy)
static

Definition at line 351 of file BmnFunctionSet.cxx.

References TMath::Abs().

Referenced by rc_rlerr(), run_reco_aln(), run_reco_bmn(), run_reco_bmn(), and run_reco_noa().

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

◆ GetInputFileList()

int BmnFunctionSet::GetInputFileList ( TString inputFileName,
std::vector< TString > & fileList )
static

Definition at line 106 of file BmnFunctionSet.cxx.

References CheckFileExist(), TFile::Close(), TString::Data(), TString::EndsWith(), TDirectoryFile::Get(), TKey::GetClassName(), TChain::GetListOfFiles(), TDirectoryFile::GetListOfKeys(), TNamed::GetName(), TNamed::GetTitle(), TObject::IsZombie(), and TFile::Open().

Referenced by run_ana_bmn().

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

◆ GetMagneticFieldByEnergy()

double BmnFunctionSet::GetMagneticFieldByEnergy ( const TString & beam,
double energy )
static

Definition at line 292 of file BmnFunctionSet.cxx.

References TMath::Abs(), i, and TMath::Sqrt().

Referenced by run_sim_bmn().

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

◆ GetPeriodNumber()

int BmnFunctionSet::GetPeriodNumber ( TFile * root_file,
int method_number = 0 )
static

Definition at line 229 of file BmnFunctionSet.cxx.

References TString::Atoi(), TDirectoryFile::Get(), TKey::GetClassName(), TDirectoryFile::GetListOfKeys(), TNamed::GetName(), TString::IsDigit(), and TObject::IsZombie().

Referenced by rc_rlerr(), run_reco_aln(), run_reco_bmn(), run_reco_bmn(), and run_reco_noa().

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

◆ isDirectory()

bool BmnFunctionSet::isDirectory ( TString path)
static

Definition at line 651 of file BmnFunctionSet.cxx.

References TString::Data(), and FileStat_t::fMode.

Referenced by mdst_converter().

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

◆ isSimulationFile()

int BmnFunctionSet::isSimulationFile ( TString fileName = "")
static

Definition at line 175 of file BmnFunctionSet.cxx.

References TFile::Close(), TString::Data(), TObject::FindObject(), TDirectoryFile::Get(), TTree::GetCurrentFile(), TObject::IsZombie(), and TFile::Open().

Referenced by dump_hits(), rc_rlerr(), run8_reco_bmn(), run_ana_bmn(), run_ana_bmn(), run_digi_task(), run_qa_exp(), run_reco_aln(), run_reco_bmn(), run_reco_bmn(), run_reco_bmn(), run_reco_bmn(), run_reco_bmn(), run_reco_noa(), run_reco_src(), and SetupOffline().

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

◆ JoinKeys()

TString BmnFunctionSet::JoinKeys ( const std::vector< std::pair< TString, TString > > & dict)
staticprivate

Definition at line 278 of file BmnFunctionSet.cxx.

References i.

Referenced by ParseFileNameBySeparator().

Here is the caller graph for this function:

◆ ParseFileName()

Int_t BmnFunctionSet::ParseFileName ( const TString & file_name,
TString & beam,
TString & target,
Double_t & energy )
static

Definition at line 407 of file BmnFunctionSet.cxx.

References ParseFileNameBySeparator().

Referenced by run_sim_bmn().

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

◆ ParseFileNameBySeparator()

Int_t BmnFunctionSet::ParseFileNameBySeparator ( const TString & file_name,
const TString & separator,
TString & beam,
TString & target,
Double_t & energy )
staticprivate

Definition at line 507 of file BmnFunctionSet.cxx.

References TObjArray::At(), TString::Atof(), TString::Contains(), TString::Format(), TObjArray::GetEntriesFast(), TObjString::GetString(), i, JoinKeys(), TPRegexp::MatchS(), TString::Tokenize(), and TString::ToLower().

Referenced by ParseFileName().

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

◆ PrintTimePoint()

void BmnFunctionSet::PrintTimePoint ( SysPoint p)
static

Definition at line 675 of file BmnFunctionSet.cxx.

References TimePoint2String().

Here is the call graph for this function:

◆ SetFieldScale()

bool BmnFunctionSet::SetFieldScale ( FairField * field,
double scale )
static

Definition at line 370 of file BmnFunctionSet.cxx.

References SetFieldScale().

Referenced by dump_hits(), rc_rlerr(), run_reco_aln(), run_reco_bmn(), run_reco_bmn(), run_reco_bmn(), run_reco_noa(), run_sim_bmn(), and SetFieldScale().

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

◆ TDatime2GMT()

SysPoint BmnFunctionSet::TDatime2GMT ( TDatime & tdatime,
Int_t timezoneOffsetHours = 0 )
static

Definition at line 691 of file BmnFunctionSet.cxx.

References TDatime::GetDay(), TDatime::GetHour(), TDatime::GetMinute(), TDatime::GetMonth(), TDatime::GetSecond(), and TDatime::GetYear().

Here is the call graph for this function:

◆ TimePoint2String()

◆ TimePoint2TS()

◆ TimeStamp2TP()

SysPoint BmnFunctionSet::TimeStamp2TP ( TTimeStamp p)
static

Definition at line 668 of file BmnFunctionSet.cxx.

References TTimeStamp::GetNanoSec(), and TTimeStamp::GetSec().

Referenced by BmnConverterThread::FillVirtualDevice(), BmnRawSource::FillVirtualDevice(), BmnEventHeader::GetEventTimeTP(), BmnSpillHeader::GetFirstEventTime(), BmnSpillHeader::GetLastEventTime(), DigiRunHeader::GetRunEndTP(), DigiRunHeader::GetRunStartTP(), BmnConverter::GetSpillNumber(), BmnSpillHeader::GetStartTime(), BmnSpillHeader::GetStopTime(), BmnMSCDigit< IntType >::GetTime(), BmnMSCZSDigit< IntType >::GetTime(), BmnT0Raw::GetTime(), BmnMetadataDecoder::ProcessSpillTree(), and BmnMSCMatrix< IntType >::SetTS().

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

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