40 {
41
42 TList*
keys = parentDir->GetListOfKeys();
44
45
46
47 TList* labelkeys = parentDir->GetListOfKeys();
50 std::set<std::string> DSID_set;
51 std::set<std::string> systematics_set;
52
54 std::string taggername =
path.at(0);
55 std::string jetcollname =
path.at(1);
56 std::string workingpointname =
path.at(2);
57
58
59
60
61 for(
const auto label : *labelkeys){
62 std::string labelname =
label->GetName();
63 if(labelname == "cutvalue" || labelname.find("fraction") != std::string::npos) continue;
65 theseLabels.push_back(labelname);
66
67
68 TDirectoryFile*
flavourDir = (TDirectoryFile*)parentDir->Get(labelname.c_str());
69 if(flavourDir){
72 for(const auto CDHistCont : *DSIDkeys){
73 std::string DSIDname = CDHistCont->GetName();
74 DSID_set.insert(DSIDname);
76 if(DSIDname == "default_SF"){
77
78 std::string
dir = taggername +
"/" + jetcollname +
"/" + workingpointname +
"/" + labelname +
"/default_SF";
79 Analysis::CalibrationDataHistogramContainer* cont;
81 if(!cont){
82 std::cout << "No default_SF CalibrationDataHistogramContainer?" << std::endl;
83 } else {
85 for(const std::string &s : uncertainties){
86 systematics_set.insert(s);
87 }
88 }
89
90 std::string flav_spec_unc_name = labelname + "_syst";
91 theseData[flav_spec_unc_name] = uncertainties;
92 }
93 }
94 } else {
95 std::cout << "No flavour directory?" << std::endl;
96 }
97 }
98
99 std::sort(theseLabels.begin(), theseLabels.end());
100 theseData["labels"] = std::move(theseLabels);
101
102 Labels theseDSIDs(DSID_set.size());
103 std::copy(DSID_set.begin(), DSID_set.end(), theseDSIDs.begin());
104 theseData["DSIDs"] = std::move(theseDSIDs);
105
106 Labels theseSystematics(systematics_set.size());
107 std::copy(systematics_set.begin(), systematics_set.end(), theseSystematics.begin());
108 theseData["systematics"] = std::move(theseSystematics);
109
110
112 } else {
113 for(const auto coll: *keys){
114 std::string collname = coll->GetName();
115 if ( collname.find("cutvalue") != std::string::npos || collname.find("fraction") != std::string::npos) continue;
116
118 TDirectoryFile* collDir = (TDirectoryFile*)parentDir->Get(collname.c_str());
119 if(collDir && collname != "VersionInfo"){
120 std::string nextmap = metamap + ";" + collname;
122 } else {
123 std::cout << "No collection directory?" << std::endl;
124 }
125 }
126 }
127}
std::set< std::string > m_DSIDs
void record_metadata_map(const Data &data, const std::string &path)
bool isWPdirectory(TList *list)
std::set< std::string > m_labels
std::map< std::string, Labels > Data
std::vector< std::string > split(const std::string &str, char token=';')
std::vector< std::string > Labels
std::vector< std::string > listUncertainties() const
retrieve the list of "uncertainties" accessible to this object.
std::string depth
tag string for intendation
std::string label(const std::string &format, int i)
path
python interpreter configuration --------------------------------------—