CMS 3D CMS Logo

SLHAReaderpMSSM.cc
Go to the documentation of this file.
2 
3 #include "TTree.h"
4 #include "TString.h"
5 
6 #include <memory>
7 
9 public:
11  ~SLHAReaderpMSSM() override {}
12 
13  std::string getSLHA(const std::string& configDesc) override;
14 };
15 
17 
19  const auto& config_fields = splitline(configDesc, '_');
20  int chain = std::stoi(config_fields.at(2));
21  int iteration = std::stoi(config_fields.at(3));
22 
23  auto slhabranch = std::make_unique<TString>();
24  auto slhabranch_ptr = slhabranch.get();
25  tree_->SetBranchAddress("slhacontent", &slhabranch_ptr);
26  tree_->GetEntryWithIndex(chain, iteration);
27 
28  return std::string(*slhabranch);
29 }
~SLHAReaderpMSSM() override
static std::vector< std::string > splitline(const std::string &line, char delim)
SLHAReaderpMSSM(const edm::ParameterSet &conf)
std::string getSLHA(const std::string &configDesc) override
#define DEFINE_EDM_PLUGIN(factory, type, name)