BmnRoot 26.10.0-210-gc52d34b0
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 ParseGeometryTag (TString &geometry_tag, TString &local_settings)
static double GetMagneticFieldByEnergy (const TString &beam, double energy)
static double GetFieldScaleCorrection (double energy)
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 21 of file BmnFunctionSet.h.

Constructor & Destructor Documentation

◆ BmnFunctionSet()

BmnFunctionSet::BmnFunctionSet ( )
inlineprivate

Definition at line 81 of file BmnFunctionSet.h.

◆ ~BmnFunctionSet()

BmnFunctionSet::~BmnFunctionSet ( )
inlineprivate

Definition at line 82 of file BmnFunctionSet.h.

Member Function Documentation

◆ CheckDirectoryExist()

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

Definition at line 44 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 25 of file BmnFunctionSet.cxx.

References TString::Data().

Referenced by dump_hits(), eventdisplay(), GetInputFileList(), ParseGeometryTag(), 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 65 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:

◆ GetFieldScaleCorrection()

double BmnFunctionSet::GetFieldScaleCorrection ( double energy)
static

Definition at line 345 of file BmnFunctionSet.cxx.

References TMath::Abs().

Referenced by 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 100 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 286 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 223 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 589 of file BmnFunctionSet.cxx.

References FileStat_t::fMode.

Referenced by mdst_converter().

Here is the caller graph for this function:

◆ isSimulationFile()

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

Definition at line 169 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 272 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 368 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 445 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:

◆ ParseGeometryTag()

Int_t BmnFunctionSet::ParseGeometryTag ( TString & geometry_tag,
TString & local_settings )
static

Definition at line 391 of file BmnFunctionSet.cxx.

References TObjArray::At(), CheckFileExist(), TString::Contains(), TString::EndsWith(), TObjArray::GetEntriesFast(), i, TString::IsNull(), TString::kBoth, TString::kIgnoreCase, TString::Strip(), and TString::Tokenize().

Referenced by run_sim_bmn().

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 613 of file BmnFunctionSet.cxx.

References TimePoint2String().

Here is the call graph for this function:

◆ TDatime2GMT()

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

Definition at line 629 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 606 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: