HighLAND
|
Public Member Functions | |
Experiment (const std::string &name) | |
Experiment (const std::string &name, const std::string &configfile) | |
Experiment (const std::string &name, const std::string &file1, const std::string &file2) | |
Create an experiment provided a data and a MC files. | |
bool | HasSampleGroup (const std::string &name) |
Checks if the Experiment has a SampleGroup with a given name. | |
void | AddSampleGroup (const std::string &name, SampleGroup &sampleGroup) |
void | AddSampleGroup (const std::string &name, const std::string &dataFile, std::map< std::string, std::string > &mcFiles) |
void | AddSampleGroup (const std::string &name, DataSample *dataFile, std::map< std::string, DataSample *> &mcSamples) |
Add group of samples (normally data and MC). | |
std::map< std::string, SampleGroup > & | GetSampleGroups () |
Returns all sample groups. | |
SampleGroup & | GetSampleGroup (const std::string &name) |
Get a single sample group by name. | |
DataSample * | GetDataSample (const std::string &name) |
Returns the data sample in group. | |
DataSample * | GetMCSample (const std::string &name, const std::string &name2) |
Returns the by name a MC sample in agroup. | |
std::map< std::string, DataSample * > & | GetMCSamples (const std::string &name) |
Returns all MC samples in a group. | |
void | DumpPOT (const std::string &name) |
Dump detailed POT information for a given sample pair. | |
void | DumpPOTRatios () |
Dump total good POT for all sample pairs, and the POT ratio for each pair. | |
Float_t | GetOverallPOTRatio () |
Get the overall POT ratio. | |
std::string | GetFilePath () |
void | SetCurrentTree (const std::string &name) |
Set the current configuration to all samples in all SampleGroups. | |
const std::string & | GetCurrentTree () const |
Get the current configuration. | |
void | Dump () |
Dump info about the experiment. | |
std::vector< std::string > | GetMCFileVector () |
Return pointer to vector of mc files. | |
std::vector< std::string > | GetDataFileVector () |
Return pointer to vector of data files. | |
void | AddSampleFilesToVector (SampleGroup &sampleGroup) |
Method to add file paths to the MC and Data vectors that store them. | |
Protected Attributes | |
std::string | _name |
What the user called this Experiment. | |
std::map< std::string, SampleGroup > | _sampleGroups |
std::string | _filePath |
std::string | _tree |
The current tree from the tree manager. | |
std::vector< std::string > | _mcFiles |
Vector holding all MC file paths associated with this experiment. | |
std::vector< std::string > | _dataFiles |
Vector holding all data file paths associated with this experiment. | |
Definition at line 73 of file Experiment.hxx.
Experiment::Experiment | ( | const std::string & | name | ) |
Default constructor - just set the name of the experiment. You can add sample groups using AddSampleGroup functions.
Definition at line 149 of file Experiment.cxx.
Experiment::Experiment | ( | const std::string & | name, |
const std::string & | configfile | ||
) |
Automatically add sampleGroups to the experiment, based on the contents of a configuration file.
Each line in this file should relate to one SampleGroup. The first entry on each line is the group name. The samples are then specified in "sampleName:fileName" pairs. The first pair on each line corresponds to the data, the others to MC.
NOTE THAT YOU CANNOT HAVE SPACES IN EITHER THE GROUP NAME OR SAMPLE NAMES.
Example: Run1 Data:run1_data.root MC:run1_mc.root Sand:run1_sand.root Run2 Data:run2_data.root MC:run2_mc.root
Definition at line 169 of file Experiment.cxx.
void Experiment::AddSampleGroup | ( | const std::string & | name, |
SampleGroup & | sampleGroup | ||
) |
Add a group of samples (normally data and MC). A DataSample object will be generated internally for each.
Definition at line 248 of file Experiment.cxx.
void Experiment::AddSampleGroup | ( | const std::string & | name, |
const std::string & | dataFile, | ||
std::map< std::string, std::string > & | mcFiles | ||
) |
Add a group of samples (normally data and MC). A DataSample object will be generated internally for each.
Definition at line 257 of file Experiment.cxx.
|
inline |
If the Experiment was created by passing file paths in (rather than DataSample objects) then return the path to one of those files. This is mainly used in automated scripts where the Experiment(name, configfile) constructor was used and you later need an explicit file path to construct some other object.
Definition at line 142 of file Experiment.hxx.
|
protected |
we keep a record of one of the input files the user specified, so that they can access it later (for example, if they want to instantiate a DrawingTools object using an Experiment rather than specifying a file path directly).
Definition at line 174 of file Experiment.hxx.
|
protected |
Configurations that have been added. Structure is name ==> [ sample1, sample2 ]
Definition at line 169 of file Experiment.hxx.