33 return StatusCode::SUCCESS;
40 for (
const auto& currentFileName : InputFiles) {
42 std::ifstream currentFile(currentFileName);
43 if (not currentFile.is_open()) {
49 currentFile.ignore(std::numeric_limits<std::streamsize>::max(),
'\n');
52 for (std::string line; std::getline(currentFile, line); ) {
53 std::stringstream input_line(line);
56 input_line >> help.dsid;
57 input_line >> help.containerName;
58 input_line >> help.amiXSec;
59 input_line >> help.filterEff;
60 input_line >> help.kFactor;
61 input_line >> help.XSecUncUP;
62 input_line >> help.XSecUncDOWN;
70 etag = etag.substr(1);
71 help.etag = std::stoi(etag);
77 if (input_line.fail()) {
ATH_MSG_ERROR(
"cannot parse line '" << line <<
"' from file " << currentFileName);
continue; }
84 if (nfound == 0) {
ATH_MSG_WARNING(
"no sample read from file " << currentFileName); }
99 TString mydir = inputDir;
100 gSystem->ExpandPathName (mydir);
103 std::vector<std::string> inFiles = {};
107 dirp = gSystem->OpenDirectory (mydir.Data());
108 const char *
file = 0;
109 while ((
file = gSystem->GetDirEntry (dirp)))
111 std::string myfile = inputDir +
"/" +
file;
112 if (myfile.size() > 4 && myfile.substr (myfile.size() - 4) ==
".txt")
113 inFiles.push_back(std::move(myfile));
115 gSystem->FreeDirectory (dirp);
119 gSystem->FreeDirectory (dirp);
134 ATH_MSG_ERROR(
"Sample with DSID " << dsid <<
" and e-tag " << etag <<
" has no info stored!!!");
144 ATH_MSG_ERROR(
"Sample with DSID " << dsid <<
" and e-tag " << etag <<
" has no info stored!!!");
145 return std::string(
"");
154 ATH_MSG_ERROR(
"Sample with DSID " << dsid <<
" and e-tag " << etag <<
" has no info stored!!!");
176 ATH_MSG_ERROR(
"Sample with DSID " << dsid <<
" and e-tag " << etag <<
" has no info stored!!!");
185 ATH_MSG_ERROR(
"Sample with DSID " << dsid <<
" and e-tag " << etag <<
" has no info stored!!!");
200 ATH_MSG_ERROR(
"Sample with DSID " << dsid <<
" and e-tag " << etag <<
" has no info stored!!!");
209 if (it !=
m_fStoreSampleInfo.end()) {
return it->second.amiXSec * it->second.kFactor * it->second.filterEff; }
213 ATH_MSG_ERROR(
"Sample with DSID " << dsid <<
" and e-tag " << etag <<
" has no info stored!!!");
220 std::vector<int> dsids;
223 dsids.push_back(key_info.second.dsid);
228 dsids.erase(
std::unique( dsids.begin(), dsids.end() ), dsids.end() );
#define ATH_MSG_WARNING(x)
DataModel_detail::iterator< DVL > unique(typename DataModel_detail::iterator< DVL > beg, typename DataModel_detail::iterator< DVL > end)
Specialization of unique for DataVector/List.
void sort(typename DataModel_detail::iterator< DVL > beg, typename DataModel_detail::iterator< DVL > end)
Specialization of sort for DataVector/List.