Project
Loading...
Searching...
No Matches
o2::tpc::utils Namespace Reference

Functions

const std::vector< std::string > tokenize (const std::string_view input, const std::string_view pattern)
 
TH1 * getBinInfoXY (int &binx, int &biny, float &bincx, float &bincy)
 
void addFECInfo ()
 
void saveCanvases (TObjArray &arr, std::string_view outDir, std::string_view types="png,pdf", std::string_view rootFileName="", std::string nameAdd="")
 
void saveCanvases (std::vector< TCanvas * > &canvases, std::string_view outDir, std::string_view types="png,pdf", std::string_view rootFileName="", std::string nameAdd="")
 
void saveCanvas (TCanvas &c, std::string_view outDir, std::string_view types, std::string nameAdd="")
 
std::vector< CalPad * > readCalPads (const std::string_view fileName, const std::vector< std::string > &calPadNames)
 
std::vector< CalPad * > readCalPads (const std::string_view fileName, const std::string_view calPadNames)
 
void mergeCalPads (std::string_view outputFileName, std::string_view inputFileNames, std::string_view calPadNames, bool average=false)
 
TChain * buildChain (std::string_view command, std::string_view treeName, std::string_view treeTitle="", bool checkSubDir=false)
 
template<typename Iterator >
std::string elementsToString (Iterator begin, Iterator end, const std::string separator=", ")
 
template<typename T >
std::string elementsToString (const T &val, const std::string separator=", ")
 

Function Documentation

◆ addFECInfo()

void o2::tpc::utils::addFECInfo ( )

Definition at line 78 of file Utils.cxx.

◆ buildChain()

TChain * o2::tpc::utils::buildChain ( std::string_view  command,
std::string_view  treeName,
std::string_view  treeTitle = "",
bool  checkSubDir = false 
)

Build a chain interpreting a command line argument

Comman line argument can e.g. be ls *.root cat fileWithRootFiles.txt

Parameters
commandcommand to run
treeNamename of the tree in the chain
treeTitletitle of the tree

Definition at line 278 of file Utils.cxx.

◆ elementsToString() [1/2]

template<typename T >
std::string o2::tpc::utils::elementsToString ( const T &  val,
const std::string  separator = ", " 
)

Definition at line 81 of file Utils.h.

◆ elementsToString() [2/2]

template<typename Iterator >
std::string o2::tpc::utils::elementsToString ( Iterator  begin,
Iterator  end,
const std::string  separator = ", " 
)

Definition at line 74 of file Utils.h.

◆ getBinInfoXY()

TH1 * o2::tpc::utils::getBinInfoXY ( int binx,
int biny,
float &  bincx,
float &  bincy 
)

Definition at line 50 of file Utils.cxx.

◆ mergeCalPads()

void o2::tpc::utils::mergeCalPads ( std::string_view  outputFileName,
std::string_view  inputFileNames,
std::string_view  calPadNames,
bool  average = false 
)

Merge cal pad objects from different files

Requires that all objects have the same name in the differnet files. Objects are simply added.

Parameters
outputFileNamename of the output file
inputFileNamesinput file names. Perforams file system 'ls' in case the string includes '.root'. Otherwise it assumes a text input file with line by line file names.
calPadNamescomma separated list of names of the CalPad objects as stored in the file.

Definition at line 226 of file Utils.cxx.

◆ readCalPads() [1/2]

std::vector< CalPad * > o2::tpc::utils::readCalPads ( const std::string_view  fileName,
const std::string_view  calPadNames 
)

Definition at line 219 of file Utils.cxx.

◆ readCalPads() [2/2]

std::vector< CalPad * > o2::tpc::utils::readCalPads ( const std::string_view  fileName,
const std::vector< std::string > &  calPadNames 
)

Definition at line 190 of file Utils.cxx.

◆ saveCanvas()

void o2::tpc::utils::saveCanvas ( TCanvas &  c,
std::string_view  outDir,
std::string_view  types,
std::string  nameAdd = "" 
)

Definition at line 179 of file Utils.cxx.

◆ saveCanvases() [1/2]

void o2::tpc::utils::saveCanvases ( std::vector< TCanvas * > &  canvases,
std::string_view  outDir,
std::string_view  types = "png,pdf",
std::string_view  rootFileName = "",
std::string  nameAdd = "" 
)

Definition at line 169 of file Utils.cxx.

◆ saveCanvases() [2/2]

void o2::tpc::utils::saveCanvases ( TObjArray &  arr,
std::string_view  outDir,
std::string_view  types = "png,pdf",
std::string_view  rootFileName = "",
std::string  nameAdd = "" 
)

Definition at line 136 of file Utils.cxx.

◆ tokenize()

const std::vector< std::string > o2::tpc::utils::tokenize ( const std::string_view  input,
const std::string_view  pattern 
)