#include <EDepSimKinemPassThrough.hh>
Public Types | |
typedef std::map< const TTree *, int > | TreeToInt |
for relating input tree pointers to the input file. More... | |
Public Member Functions | |
~KinemPassThrough () | |
bool | AddInputTree (const TTree *inputTreePtr, const char *inputFileName, const char *generatorName) |
bool | AddEntry (const TTree *inputTreePtr, const int origEntry) |
int | LastEntryNumber () |
Static Public Member Functions | |
static EDepSim::KinemPassThrough * | GetInstance () |
Private Member Functions | |
KinemPassThrough () | |
Private constructor. More... | |
void | CreateInternalTrees () |
void | CleanUp () |
Clean up all of the allocated pointers. More... | |
void | Init () |
Set default values for all fields. More... | |
std::string | SetInputFileName (std::string name) |
Set the name of the input file being read. More... | |
Private Attributes | |
TTree * | fPersistentTree |
Persistent tree that stores entries from multiple temp trees. More... | |
TChain * | fInputTreeChain |
TChain to store input trees. More... | |
std::string | fFirstTreeName |
Store the first tree name. More... | |
TreeToInt | fInputTreeMap |
for relating input tree pointers to the input file. More... | |
TreeToInt | fFirstEntryMap |
for relating input tree to first entry in TChain. More... | |
std::vector< std::string > | fFileList |
Used to store list of files before they are written to tree. More... | |
TTree * | fInputKinemTree |
Tree relating all events in the persistent tree to an input file. More... | |
int | fInputFileNumber |
int | fOrigEntryNumber |
TTree * | fInputFilesTree |
Tree containing list of input files. More... | |
char | fInputFileName [1024] |
Used to fill input file list tree with input file name. More... | |
char | fInputFileGenerator [128] |
Used to fill the name of the generator for this file. More... | |
char | fInputFileTreeName [128] |
Used to fill the name of the tree for this file. More... | |
double | fInputFilePOT |
Used to fill input file list tree "filePOT" field. More... | |
int | fInputFileEntries |
Static Private Attributes | |
static EDepSim::KinemPassThrough * | fKinemPassThrough = NULL |
Static pointer to singleton instance. More... | |
Definition at line 54 of file EDepSimKinemPassThrough.hh.
typedef std::map<const TTree *, int> EDepSim::KinemPassThrough::TreeToInt |
for relating input tree pointers to the input file.
Definition at line 57 of file EDepSimKinemPassThrough.hh.
EDepSim::KinemPassThrough::~KinemPassThrough | ( | ) |
Definition at line 42 of file EDepSimKinemPassThrough.cc.
|
private |
Private constructor.
Definition at line 46 of file EDepSimKinemPassThrough.cc.
bool EDepSim::KinemPassThrough::AddEntry | ( | const TTree * | inputTreePtr, |
const int | origEntry | ||
) |
Copy the i'th entry from segment of the TChain corresponding to the input tree pointed at (in detsim) by inputTreePtr.
Definition at line 199 of file EDepSimKinemPassThrough.cc.
bool EDepSim::KinemPassThrough::AddInputTree | ( | const TTree * | inputTreePtr, |
const char * | inputFileName, | ||
const char * | generatorName | ||
) |
Add an input tree to the TChain of input trees that rootracker entries will be copied from. A map between the tree pointer that detsim is using and the correct segment of the TChain is also made.
Definition at line 61 of file EDepSimKinemPassThrough.cc.
|
private |
Clean up all of the allocated pointers.
Definition at line 262 of file EDepSimKinemPassThrough.cc.
|
private |
Create the bookkeeping and file list trees. This also creates the directory.
Definition at line 143 of file EDepSimKinemPassThrough.cc.
|
static |
Returns (or initialises if first time) the instance of the singleton.
Definition at line 52 of file EDepSimKinemPassThrough.cc.
|
private |
Set default values for all fields.
Definition at line 277 of file EDepSimKinemPassThrough.cc.
int EDepSim::KinemPassThrough::LastEntryNumber | ( | ) |
Return the position (entry number) that the most recent entry to be copied to the pass-through tree will have.
Definition at line 242 of file EDepSimKinemPassThrough.cc.
|
private |
Set the name of the input file being read.
Definition at line 253 of file EDepSimKinemPassThrough.cc.
|
private |
Used to store list of files before they are written to tree.
Definition at line 116 of file EDepSimKinemPassThrough.hh.
|
private |
for relating input tree to first entry in TChain.
Definition at line 113 of file EDepSimKinemPassThrough.hh.
|
private |
Store the first tree name.
Definition at line 107 of file EDepSimKinemPassThrough.hh.
|
private |
Used to fill input file list tree "nEntriesTot" field. This is the total number of entries in the input tree.
Definition at line 148 of file EDepSimKinemPassThrough.hh.
|
private |
Used to fill the name of the generator for this file.
Definition at line 138 of file EDepSimKinemPassThrough.hh.
|
private |
Used to fill input file list tree with input file name.
Definition at line 135 of file EDepSimKinemPassThrough.hh.
|
private |
Used to fill the bookkeeping tree "inputFileNum" field. This is the entry number of the input file in the input file tree.
Definition at line 124 of file EDepSimKinemPassThrough.hh.
|
private |
Used to fill input file list tree "filePOT" field.
Definition at line 144 of file EDepSimKinemPassThrough.hh.
|
private |
Tree containing list of input files.
Definition at line 132 of file EDepSimKinemPassThrough.hh.
|
private |
Used to fill the name of the tree for this file.
Definition at line 141 of file EDepSimKinemPassThrough.hh.
|
private |
Tree relating all events in the persistent tree to an input file.
Definition at line 120 of file EDepSimKinemPassThrough.hh.
|
private |
TChain to store input trees.
Definition at line 104 of file EDepSimKinemPassThrough.hh.
|
private |
for relating input tree pointers to the input file.
Definition at line 110 of file EDepSimKinemPassThrough.hh.
|
staticprivate |
Static pointer to singleton instance.
Definition at line 85 of file EDepSimKinemPassThrough.hh.
|
private |
Used to fill the bookkeeping tree "origEntryNum" field. This is the entry number of the event in the original tree.
Definition at line 128 of file EDepSimKinemPassThrough.hh.
|
private |
Persistent tree that stores entries from multiple temp trees.
Definition at line 101 of file EDepSimKinemPassThrough.hh.