7 return baseName.empty() ? leafName : (leafName.empty() ? baseName : baseName +
"_" + leafName);
46 "Trying to save an extension table for " +
m_baseName +
47 " before having saved the corresponding main table\n");
50 if (tree.FindBranch((
"n" +
m_baseName).c_str()) !=
nullptr) {
58 for (std::vector<NamedBranchPtr> *branches :
60 for (
auto &pair : *branches) {
63 tree.Branch(branchName.c_str(), (
void *)
nullptr, (branchName + varsize +
"/" + pair.rootTypeCode).c_str());
64 pair.branch->SetTitle(pair.title.c_str());
92 "Mismatch in number of entries between extension and main table for " + tab.
name());
96 fillColumn<float>(pair, tab);
98 fillColumn<int>(pair, tab);
100 fillColumn<uint8_t>(pair, tab);
102 fillColumn<uint32_t>(pair, tab);
104 fillColumn<double>(pair, tab);
std::vector< NamedBranchPtr > m_uint32Branches
ColumnType columnType(unsigned int col) const
void defineBranchesFromFirstEvent(const nanoaod::FlatTable &tab)
const std::string & doc() const
std::vector< NamedBranchPtr > m_intBranches
TBranch * m_counterBranch
list var
if using global norm cols_to_minmax = ['t_delta', 't_hmaxNearP','t_emaxNearP', 't_hAnnular', 't_eAnnular','t_pt','t_nVtx','t_ieta','t_eHcal10', 't_eHcal30','t_rhoh','t_eHcal'] df[cols_to_minmax] = df[cols_to_minmax].apply(lambda x: (x - x.min()) / (x.max() - x.min()) if (x.max() - x.min() > 0) else 1.0/200.0)
std::vector< NamedBranchPtr > m_uint8Branches
void fill(const edm::OccurrenceForOutput &iWhatever, TTree &tree, bool extensions)
const std::string & name() const
const std::string & columnName(unsigned int col) const
BasicHandle getByToken(EDGetToken token, TypeID const &typeID) const
unsigned int nColumns() const
unsigned int size() const
enum TableOutputBranches::@894 m_extension
std::vector< NamedBranchPtr > m_floatBranches
const std::string & columnDoc(unsigned int col) const
std::vector< NamedBranchPtr > m_doubleBranches