File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -79,6 +79,23 @@ void PlainTreeFiller::Init() {
7979
8080 if (vars_.size () != vars.size ()) throw std::runtime_error (" PlainTreeFiller::Init(): vars_.size() != vars.size()" );
8181
82+ std::vector<std::string> leafNames;
83+ for (int iVar = 0 , nVars = vars.size (); iVar < nVars; ++iVar) {
84+ leafNames.emplace_back (vars[iVar].GetName ());
85+ }
86+
87+ for (const auto & fti : fields_to_ignore_) {
88+ if (std::find (leafNames.begin (), leafNames.end (), fti) == leafNames.end ()) {
89+ std::cout << " WARNING PlainTreeFiller::Init(): field " << fti << " is set to be ignored, but it is absent among input fields\n " ;
90+ }
91+ }
92+
93+ for (const auto & ftp : fields_to_preserve_) {
94+ if (std::find (leafNames.begin (), leafNames.end (), ftp) == leafNames.end ()) {
95+ std::cout << " WARNING PlainTreeFiller::Init(): field " << ftp << " is set to be preserved, but it is absent among input fields\n " ;
96+ }
97+ }
98+
8299 file_ = TFile::Open (file_name_.c_str (), " recreate" );
83100 plain_tree_ = new TTree (tree_name_.c_str (), " Plain Tree" );
84101 plain_tree_->SetAutoSave (0 );
You can’t perform that action at this time.
0 commit comments