GeneratorInterface
Pythia8Interface
plugins
SLHAReaderpMSSM.cc
Go to the documentation of this file.
1
#include "
GeneratorInterface/Pythia8Interface/interface/SLHAReaderBase.h
"
2
3
#include "TTree.h"
4
#include "TString.h"
5
6
#include <memory>
7
8
class
SLHAReaderpMSSM
:
public
SLHAReaderBase
{
9
public
:
10
SLHAReaderpMSSM
(
const
edm::ParameterSet
& conf) :
SLHAReaderBase
(conf) {}
11
~SLHAReaderpMSSM
()
override
{}
12
13
std::string
getSLHA
(
const
std::string
& configDesc)
override
;
14
};
15
16
DEFINE_EDM_PLUGIN
(
SLHAReaderFactory
,
SLHAReaderpMSSM
,
"SLHAReaderpMSSM"
);
17
18
std::string
SLHAReaderpMSSM::getSLHA
(
const
std::string
& configDesc) {
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
}
SLHAReaderBase.h
SLHAReaderpMSSM::~SLHAReaderpMSSM
~SLHAReaderpMSSM() override
Definition:
SLHAReaderpMSSM.cc:11
SLHAReaderBase::splitline
static std::vector< std::string > splitline(const std::string &line, char delim)
Definition:
SLHAReaderBase.cc:23
SLHAReaderpMSSM::SLHAReaderpMSSM
SLHAReaderpMSSM(const edm::ParameterSet &conf)
Definition:
SLHAReaderpMSSM.cc:10
SLHAReaderBase::tree_
TTree * tree_
Definition:
SLHAReaderBase.h:26
DEFINE_EDM_PLUGIN
#define DEFINE_EDM_PLUGIN(factory, type, name)
Definition:
PluginFactory.h:124
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition:
AlCaHLTBitMon_QueryRunRegistry.py:256
edm::ParameterSet
Definition:
ParameterSet.h:47
edmplugin::PluginFactory
Definition:
PluginFactory.h:34
SLHAReaderBase
Definition:
SLHAReaderBase.h:12
SLHAReaderpMSSM::getSLHA
std::string getSLHA(const std::string &configDesc) override
Definition:
SLHAReaderpMSSM.cc:18
SLHAReaderpMSSM
Definition:
SLHAReaderpMSSM.cc:8
align_cfg.iteration
iteration
Definition:
align_cfg.py:5
chain
Definition:
chain.py:1
Generated for CMSSW Reference Manual by
1.8.16