subspectrum_contents.cpp
Go to the documentation of this file.
26 void SubSpectrumContents::addParameter(const Par::Tags tag, const std::string& name, const std::vector<int>& shape, 48 for( std::vector<SpectrumParameter>::const_iterator it=parameters.begin(); it!=parameters.end(); ++it ) 56 std::vector<SpectrumParameter> SubSpectrumContents::all_parameters_with_tag_and_shape(Par::Tags tag, std::vector<int>& shape) const 59 for( std::vector<SpectrumParameter>::const_iterator it=parameters.begin(); it!=parameters.end(); ++it ) 70 for ( std::vector<SpectrumParameter>::const_iterator it=parameters.begin(); it!=parameters.end(); ++it) 72 if(it->blockname() != "SMINPUTS" || it->blockname() != "YUKAWA" || it->blockname() != "CKMBLOCK" || it->blockname() != "") 98 errmsg << "Error while verifying contents of SubSpectrum object against SubSpectrumContents object with name \""<<my_name<<"\" !" << std::endl; 99 errmsg << "Encountered a required parameter ("<<Par::toString.at(tag)<<", "<<name<<") with shape.size()==0. This is not allowed; if you want this parameter to be considered a scalar, please set the shape to '1', i.e. std::vector<int> shape = initVector(1). Please fix this parameter in the SubSpectrumContents class." << std::endl; 109 errmsg << "Error while verifying contents of SubSpectrum object against SubSpectrumContents object with name \""<<my_name<<"\" !" << std::endl; 110 errmsg << "Required scalar-valued parameter ("<<Par::toString.at(tag)<<", "<<name<<") is not accessible via subspectrum->get(Par::"<<Par::toString.at(tag)<<", \""<<name<<"\"). Please fix the relevant SubSpectrum wrapper class so that this parameter can be accessed." << std::endl; 121 errmsg << "Error while verifying contents of SubSpectrum object against SubSpectrumContents object with name \""<<my_name<<"\" !" << std::endl; 122 errmsg << "Encountered a vector-valued required parameter ("<<Par::toString.at(tag)<<", "<<name<<") with negative required length ("<<shape[0]<<")! This is invalid; Please fix this parameter in the SubSpectrumContents class so that the required length is a positive number." << std::endl; 132 errmsg << "Error while verifying contents of SubSpectrum object against SubSpectrumContents object with name \""<<my_name<<"\" !" << std::endl; 133 errmsg << "An entry of the required vector-valued parameter ("<<Par::toString.at(tag)<<", "<<name<<") with required length "<<shape[0]<<" is not accessible via subspectrum->get(Par::"<<Par::toString.at(tag)<<", \""<<name<<"\", "<<i<<"). Please fix the relevant SubSpectrum wrapper class so that this parameter can be accessed. Keep in mind that you may need to override index_offset() to align the expected indices." << std::endl; 146 errmsg << "Error while verifying contents of SubSpectrum object against SubSpectrumContents object with name \""<<my_name<<"\" !" << std::endl; 147 errmsg << "Encountered a matrix-valued required parameter ("<<Par::toString.at(tag)<<", "<<name<<") with at least one negative required dimension (dims = ["<<shape[0]<<", "<<shape[1]<<"])! This is invalid; Please fix the shape settings for this parameter in the SubSpectrumContents so that they are positive numbers." << std::endl; 158 errmsg << "Error while verifying contents of SubSpectrum object against SubSpectrumContents object with name \""<<my_name<<"\" !" << std::endl; 159 errmsg << "An entry of the required matrix-valued parameter ("<<Par::toString.at(tag)<<", "<<name<<") with required dimensions ("<<shape[0]<<", "<<shape[1]<<") is not accessible via subspectrum->get(Par::"<<Par::toString.at(tag)<<", \""<<name<<"\", "<<i<<", "<<j<<"). Please fix the relevant SubSpectrum wrapper class so that this parameter can be accessed. Keep in mind that you may need to override index_offset() to align the expected indices." << std::endl; 171 errmsg << "Error while verifying contents of SubSpectrum object against SubSpectrumContents object with name \""<<my_name<<"\" !" << std::endl; 172 errmsg << "The specified shape for the required parameter ("<<Par::toString.at(tag)<<", "<<name<<") is invalid. The length of the shape vector is only permitted to be 1 or 2 (received shape vector was "<<shape<<"). Please fix this parameter entry in the SubSpectrumContents class."<<std::endl; Define overloadings of the stream operator for various containers. void addParameter(const Par::Tags tag, const std::string &name, const std::vector< int > &shape=initVector(1), const std::string &blockname="", const int index=0) Add a parameter to the Contents object. Definition: subspectrum_contents.cpp:26 void setName(const std::string &name) Set the name of this Contents object (i.e. the name of the model to which this spectrum data applies)... Definition: subspectrum_contents.cpp:33 std::string my_name Name of SubSpectrumContents class (for more helpful error messages) Definition: subspectrum_contents.hpp:65 void verify_contents(const SubSpectrum &spec) const Function to verify that a SubSpectrum wrapper contains everything that this class says it should... Definition: subspectrum_contents.cpp:82 std::vector< SpectrumParameter > all_BSM_parameters() const Function to retrieve all parameters whose blockName is not SMINPUTS, YUKAWA, CKMBLOCK, or empty. Definition: subspectrum_contents.cpp:67 std::vector< SpectrumParameter > parameters Vector defining what parameters a wrapper must contain. Definition: subspectrum_contents.hpp:62 std::vector< SpectrumParameter > all_parameters_with_tag(Par::Tags tag) const Function to retreive all parameters matching a certain tag. Definition: subspectrum_contents.cpp:45 Abstract class for accessing general spectrum information. Base class for definining the required contents of SubSpectrum wrapper objects. Virtual base class for interacting with spectrum generator output. Definition: subspectrum.hpp:87 std::vector< SpectrumParameter > all_parameters_with_tag_and_shape(Par::Tags tag, std::vector< int > &shape) const Function to retrieve all parameters matching a certain tag and shape. Definition: subspectrum_contents.cpp:56 virtual bool has(const Par::Tags, const str &, const SpecOverrideOptions=use_overrides, const SafeBool check_antiparticle=SafeBool(true)) const =0 Getters/Setters etc. std::vector< SpectrumParameter > all_parameters() const Function to retreive all parameters. Definition: subspectrum_contents.cpp:39 |