SynAPSE  0.6.0
Synergistic Analysis of Phase Space Evolution
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends
Public Member Functions | Private Member Functions | Private Attributes
Beam::Extractor Class Reference

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...
 

Detailed Description

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.

Constructor & Destructor Documentation

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.

Parameters
data_filesPath to the ROOT imported data files
Beam::Extractor::Extractor ( const Extractor &  ext)

Copy constructor.

Beam::Extractor::~Extractor ( )

Destructor.

Member Function Documentation

bool Beam::Extractor::Exists ( const std::string &  file) const
private

Checks if file exists at the specified path.

const std::string& Beam::Extractor::Get ( const std::string &  key) const
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.

Parameters
data_typeType of data
plane_idRequested plane ID
measerrExtract the measurement errors
Returns
Bunch object at the specified plane ID
const std::vector< std::string > Beam::Extractor::GetListOfKeys ( ) const

Gets the list of keys in the dictionary.

std::string Beam::Extractor::GetRunName ( ) const
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.

Parameters
data_typeType of data plane_ids Requested plane IDs. if empty, extracts everything
measerrExtract the measurement errors
Returns
Stream object for the selected plane IDs
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.

Parameters
data_typesTypes of data plane_ids Map of requested plane IDs. If empty, extracts everything
measerrExtract the measurement errors
Returns
Stream object for the selected plane IDs
void Beam::Extractor::Initialize ( )
private

Initializes the extractor.

Check that they exist and are of the right type.

Extractor & Beam::Extractor::operator= ( const Extractor &  ext)

Equality operator.

void Beam::Extractor::SetRunName ( const std::string &  run_name)
inline

Sets the run name.

Field Documentation

std::vector<std::string> Beam::Extractor::_data_files
private

List of data files.

std::map<std::string, std::string> Beam::Extractor::_dictionary
private

Dictionary of run characteristics.

std::string Beam::Extractor::_run_name
private

Name of the run.


The documentation for this class was generated from the following files: