CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions
RootTreeHandler Class Reference

#include <RootTreeHandler.h>

Public Member Functions

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=0)
 
void readTree (const int maxEvents, const TString &fileName, MuonPairExtendedVector *savedPair, const int muonType, std::vector< std::pair< unsigned int, unsigned long long > > *evtRun, MuonPairExtendedVector *genPair=0)
 
void readTree (const int maxEvents, const TString &fileName, std::vector< MuonPair > *savedPair, const int muonType, std::vector< GenMuonPair > *genPair=0)
 Used to read the external trees. More...
 
void writeTree (const TString &fileName, const std::vector< MuonPair > *savedPair, const int muonType=0, const std::vector< GenMuonPair > *genPair=0, const bool saveAll=false)
 

Detailed Description

This class can be used to save all the muon pairs (and gen muon pairs if any) to a root tree.
The writeTree method gets the name of the file to store the tree and the savedPair (and possibly genPair) vector of muon pairs.
Likewise, the readTree method takes the same arguments. It reads back from the file with the given name the pairs and stores them in the given savedPair (and genPair) vector.

Definition at line 24 of file RootTreeHandler.h.

Member Function Documentation

void RootTreeHandler::readTree ( const int  maxEvents,
const TString &  fileName,
MuonPairVector savedPair,
const int  muonType,
std::vector< std::pair< unsigned int, unsigned long long > > *  evtRun,
MuonPairVector genPair = 0 
)
inline

Definition at line 88 of file RootTreeHandler.h.

Referenced by TreeSplitter::endJob(), and main().

void RootTreeHandler::readTree ( const int  maxEvents,
const TString &  fileName,
MuonPairExtendedVector savedPair,
const int  muonType,
std::vector< std::pair< unsigned int, unsigned long long > > *  evtRun,
MuonPairExtendedVector genPair = 0 
)
inline

Definition at line 124 of file RootTreeHandler.h.

void RootTreeHandler::readTree ( const int  maxEvents,
const TString &  fileName,
std::vector< MuonPair > *  savedPair,
const int  muonType,
std::vector< GenMuonPair > *  genPair = 0 
)
inline

Used to read the external trees.

Definition at line 160 of file RootTreeHandler.h.

void RootTreeHandler::writeTree ( const TString &  fileName,
const std::vector< MuonPair > *  savedPair,
const int  muonType = 0,
const std::vector< GenMuonPair > *  genPair = 0,
const bool  saveAll = false 
)
inline

Definition at line 29 of file RootTreeHandler.h.

Referenced by TreeSplitter::endJob(), and main().