![]() |
SynAPSE
0.6.0
Synergistic Analysis of Phase Space Evolution
|
Extracts the data from an array of imported ROOT file. More...
#include <Extractor.hh>
Public Member Functions | |
| Extractor () | |
| Default constructor, initilizes everything to 0. More... | |
| Extractor (const std::vector< std::string > &data_files) | |
| Data extractor constructor, sets the list of data files. More... | |
| Extractor (const Extractor &ext) | |
| Copy constructor. More... | |
| Extractor & | operator= (const Extractor &ext) |
| Equality operator. More... | |
| ~Extractor () | |
| Destructor. More... | |
| const std::string & | Get (const std::string &key) const |
| Gets the value of the requested dictionary entry. More... | |
| const std::vector< std::string > | GetListOfKeys () const |
| Gets the list of keys in the dictionary. More... | |
| Bunch | GetBunch (const std::string &data_type, const size_t plane_id, const bool measerr=false) const |
| Extracts the beam at a specific z position. More... | |
| Stream | GetStream (const std::string &data_type, const std::vector< size_t > plane_ids=std::vector< size_t >(), const bool measerr=false) const |
| Extracts beam at every requested z position. More... | |
| std::map< std::string, Stream > | GetStreams (const std::vector< std::string > &data_types, const std::map< std::string, std::vector< size_t >> plane_ids=std::map< std::string, std::vector< size_t >>(), const bool measerr=false) const |
| Extracts beam at every requested z position and for the requested data types. More... | |
| void | SetRunName (const std::string &run_name) |
| Sets the run name. More... | |
| std::string | GetRunName () const |
| Returns the run name. More... | |
Private Member Functions | |
| void | Initialize () |
| Initializes the extractor. More... | |
| bool | Exists (const std::string &file) const |
| Checks if file exists at the specified path. More... | |
Private Attributes | |
| std::vector< std::string > | _data_files |
| List of data files. More... | |
| std::string | _run_name |
| Name of the run. More... | |
| std::map< std::string, std::string > | _dictionary |
| Dictionary of run characteristics. More... | |
Extracts the data from an array of imported ROOT file.
Stores the list of data files to be analyzed by phase space evolution algorithms. Upon request, loops over the list the list of files provided and looks for the requested data type.
May be requested to limit the extraction to a set of virtual planes in the simulation or a set of stations in the data.
| Beam::Extractor::Extractor | ( | ) |
Default constructor, initilizes everything to 0.
| Beam::Extractor::Extractor | ( | const std::vector< std::string > & | data_files | ) |
Data extractor constructor, sets the list of data files.
| data_files | Path to the ROOT imported data files |
| Beam::Extractor::Extractor | ( | const Extractor & | ext | ) |
Copy constructor.
| Beam::Extractor::~Extractor | ( | ) |
Destructor.
|
private |
Checks if file exists at the specified path.
|
inline |
Gets the value of the requested dictionary entry.
| Bunch Beam::Extractor::GetBunch | ( | const std::string & | data_type, |
| const size_t | plane_id, | ||
| const bool | measerr = false |
||
| ) | const |
Extracts the beam at a specific z position.
| data_type | Type of data |
| plane_id | Requested plane ID |
| measerr | Extract the measurement errors |
| const std::vector< std::string > Beam::Extractor::GetListOfKeys | ( | ) | const |
Gets the list of keys in the dictionary.
|
inline |
Returns the run name.
| Stream Beam::Extractor::GetStream | ( | const std::string & | data_type, |
| const std::vector< size_t > | plane_ids = std::vector<size_t>(), |
||
| const bool | measerr = false |
||
| ) | const |
Extracts beam at every requested z position.
| data_type | Type of data plane_ids Requested plane IDs. if empty, extracts everything |
| measerr | Extract the measurement errors |
| std::map< std::string, Stream > Beam::Extractor::GetStreams | ( | const std::vector< std::string > & | data_types, |
| const std::map< std::string, std::vector< size_t >> | plane_ids = std::map<std::string, std::vector<size_t>>(), |
||
| const bool | measerr = false |
||
| ) | const |
Extracts beam at every requested z position and for the requested data types.
| data_types | Types of data plane_ids Map of requested plane IDs. If empty, extracts everything |
| measerr | Extract the measurement errors |
|
private |
Initializes the extractor.
Check that they exist and are of the right type.
|
inline |
Sets the run name.
|
private |
List of data files.
|
private |
Dictionary of run characteristics.
|
private |
Name of the run.
1.8.6