1 #ifndef TREESPLITTER_CC
2 #define TREESPLITTER_CC
7 : treeFileName_(iConfig.getParameter<std::
string>(
"InputFileName")),
8 outputFileName_(iConfig.getParameter<std::
string>(
"OutputFileName")),
9 maxEvents_(iConfig.getParameter<int32_t>(
"MaxEvents")),
10 subSampleFirstEvent_(iConfig.getParameter<uint32_t>(
"SubSampleFirstEvent")),
11 subSampleMaxEvents_(iConfig.getParameter<uint32_t>(
"SubSampleMaxEvents")) {}
19 typedef std::vector<std::pair<lorentzVector, lorentzVector> >
MuonPairVector;
21 std::vector<MuonPair> savedPair;
26 std::vector<MuonPair> newSavedPair;
30 std::vector<MuonPair>::iterator it = savedPair.begin();
31 std::cout <<
"Starting loop on " << savedPair.size() <<
" muons" << std::endl;
33 for (; it != savedPair.end(); ++it, ++
i) {
36 newSavedPair.push_back(*it);
uint32_t subSampleFirstEvent_
TreeSplitter(const edm::ParameterSet &)
#define DEFINE_FWK_MODULE(type)
void readTree(const int maxEvents, const TString &fileName, MuonPairVector *savedPair, const int muonType, std::vector< std::pair< unsigned int, unsigned long long > > *evtRun, MuonPairVector *genPair=nullptr)
void writeTree(const TString &fileName, const std::vector< MuonPair > *savedPair, const int muonType=0, const std::vector< GenMuonPair > *genPair=nullptr, const bool saveAll=false)
uint32_t subSampleMaxEvents_
std::vector< std::pair< lorentzVector, lorentzVector > > MuonPairVector