ATLAS Offline Software
Loading...
Searching...
No Matches
SettingsInfo Class Reference
Inheritance diagram for SettingsInfo:
Collaboration diagram for SettingsInfo:

Public Member Functions

 SettingsInfo (char *)

Public Attributes

map< string, stringset

Detailed Description

Definition at line 3771 of file TRTCalib_makeplots.cxx.

Constructor & Destructor Documentation

◆ SettingsInfo()

SettingsInfo::SettingsInfo ( char * filename)

Definition at line 3780 of file TRTCalib_makeplots.cxx.

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

Member Data Documentation

◆ set

map<string, string> SettingsInfo::set

Definition at line 3775 of file TRTCalib_makeplots.cxx.


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