1 #ifndef VariableNtupler_NTupler_H 2 #define VariableNtupler_NTupler_H 33 leaves_[v->second->name()]=v->second;
37 std::vector<std::string> leaves=variablePSet.
getParameter<std::vector<std::string> >(
"leaves");
38 for (
uint i=0;
i!=leaves.size();++
i){
42 if (variablePSet.
exists(
"useTFileService"))
48 if (variablePSet.
exists(
"treeName"))
84 for(;i!=i_end;++
i,++iInDataHolder){
85 tree_->Branch(i->first.c_str(), &(
dataHolder_[iInDataHolder]), (i->first+
"/D").c_str());
106 uint iInDataHolder=0;
107 for(;i!=i_end;++
i,++iInDataHolder){
119 auto leafValue = std::make_unique<double>((*i->second)(iEvent));
129 typedef std::map<std::string, const CachingVariable *>::iterator
iterator;
130 std::map<std::string, const CachingVariable *>
leaves_;
BranchAliasSetterT< ProductType > produces()
declare what type of product will make and with which optional label
T getParameter(std::string const &) const
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
VariableNTupler(const edm::ParameterSet &iConfig)
bool exists(std::string const ¶meterName) const
checks if a parameter exists
def replace(string, replacements)
T * make(const Args &...args) const
make new ROOT object
uint registerleaves(edm::ProducerBase *producer) override
std::map< std::string, const CachingVariable * >::iterator iterator
TFile & file() const
return opened TFile
std::map< std::string, const CachingVariable * > leaves_
std::map< std::string, const CachingVariable * >::const_iterator iterator
void fill(edm::Event &iEvent) override