ATLAS Offline Software
Public Member Functions | Public Attributes | List of all members
SettingsInfo Class Reference
Inheritance diagram for SettingsInfo:
Collaboration diagram for SettingsInfo:

Public Member Functions

 SettingsInfo (char *)
 

Public Attributes

map< string, string > set
 

Detailed Description

Definition at line 3765 of file TRTCalib_makeplots.cxx.

Constructor & Destructor Documentation

◆ SettingsInfo()

SettingsInfo::SettingsInfo ( char *  filename)

Definition at line 3774 of file TRTCalib_makeplots.cxx.

3775 {
3776 
3777  this->cd();
3778 
3779  TPaveText *pt = new TPaveText(.1, .1, 0.9, 0.9);
3780  pt->SetTextAlign(11);
3781  pt->AddText(" ");
3782  pt->AddText(" ");
3783  pt->SetLabel(Form("TRT calibration Main Settings"));
3784 
3785  string line;
3786  ifstream myfile(filename);
3787  if (myfile.is_open())
3788  {
3789  while (!myfile.eof())
3790  {
3791  getline(myfile, line);
3792  auto notfirst = [&line](const std::string & sub)->bool{
3793  return line.find(sub)!=0;
3794  };
3795  if (notfirst("#") && notfirst("Clean") && notfirst("Submit") && notfirst("Relink") && notfirst("JobPrefix") && notfirst("Tag") && notfirst("WWW"))
3796  {
3797  int space = line.find_first_of(" ");
3798  if (space != -1)
3799  {
3800  // pt->AddText(line.c_str());
3801  set[trim(line.substr(0, line.find("=") - 1))] = trim(line.substr(line.find("=") + 1, line.size()));
3802  }
3803  }
3804  }
3805  for (const auto & [txt1,txt2]:set)
3806  {
3807  pt->AddText((string(txt1 + " . . . . . . . . . . . . " + txt2)).c_str());
3808  }
3809  myfile.close();
3810  }
3811  else
3812  throw(string("config file not found: ") + string(filename));
3813 
3814  pt->Draw();
3815 }

Member Data Documentation

◆ set

map<string, string> SettingsInfo::set

Definition at line 3769 of file TRTCalib_makeplots.cxx.


The documentation for this class was generated from the following file:
checkFileSG.line
line
Definition: checkFileSG.py:75
trim
string trim(string s)
Definition: TRTCalib_makeplots.cxx:76
test_pyathena.pt
pt
Definition: test_pyathena.py:11
SettingsInfo::set
map< string, string > set
Definition: TRTCalib_makeplots.cxx:3769
CaloCellTimeCorrFiller.filename
filename
Definition: CaloCellTimeCorrFiller.py:24
calibdata.cd
cd
Definition: calibdata.py:51