71 throw runtime_error(
"Threshold input must be either 'ctpin' or 'ctpcore' but value was '"+
input+
"'" );
86 float eta = float(eta_i)+0.5;
87 float phi = float(phi_i)+0.5;
91 if( thrV->contains(
eta,
phi) ) {
93 if( ttv != 0 && ttv->
priority()==thrV->priority() ) {
94 cerr <<
"TriggerThreshold '" <<
name() <<
"' has overlapping values of same priority at eta = "
95 <<
eta <<
", phi = " <<
phi << endl;
96 throw runtime_error(
"Overlapping thresholdValues of the same priority" );
98 if( ttv==0 || ttv->
priority()<thrV->priority() ) {
104 cerr <<
"TriggerThreshold::triggerThresholdValue: did not find threshold value at eta = "
105 <<
eta <<
", phi = " <<
phi <<
" for threshold " <<
name() << endl;
106 throw runtime_error(
"Did not find threshold value" );
113std::vector<TrigConf::TriggerThresholdValue*>&
162 cout <<
"TriggerThreshold::createThresholdValue: ERROR Unknown trigger value type: " <<
type << endl;
163 throw std::runtime_error(
"TriggerThreshold::createThresholdValue: Unknown trigger value type.");
177 cout <<
indent <<
"TriggerThreshold " <<
name() << endl;
181 cout <<
indent <<
"==================================" << endl;
184 cout <<
indent <<
" Type: " <<
type() << endl;
209 if(
x->priority() !=
y->priority())
210 return x->priority() <
y->priority();
211 if(
x->etamin() !=
y->etamin())
212 return x->etamin() <
y->etamin();
213 return x->name() <
y->name();
222 <<
"<TriggerThreshold active=\"" <<
m_Active
223 <<
"\" bitnum=\"" <<
bitnum()
224 <<
"\" id=\"" <<
id()
226 <<
"\" name=\"" <<
name()
227 <<
"\" type=\"" <<
type()
228 <<
"\" input=\"" <<
input();
238 sort(sortedThresholdValues.begin(),sortedThresholdValues.end(),compThrValues);
241 thrV->writeXML(
xmlfile, indentLevel+1, indentWidth);
244 if(
input()==
"ctpin") {
255 indent(
xmlfile, indentLevel+1, indentWidth) <<
"</Cable>" << endl;
259 <<
"</TriggerThreshold>" << endl;
Scalar eta() const
pseudorapidity method
Scalar phi() const
phi method
void print(char *figname, TCanvas *c1)
static TriggerType stringAsType(const std::string &type)
static TriggerTypeConfig & typeConfig(TriggerType tt)
static std::string & typeAsString(TriggerType tt)
std::ostream & indent(std::ostream &o, int lvl, int size) const
void printNameIdV(const std::string &indent="") const
unsigned int version() const
void setType(L1DataDef::TriggerType type)
void addThresholdValue(TriggerThresholdValue *value)
void clearThresholdValues()
static TriggerThresholdValue * createThresholdValue(const std::string &type)
virtual ~TriggerThreshold() override
const std::string & type() const
int m_ZBSeedingThresholdMulti
std::string m_ZBSeedingThresholdName
int numberofValues() const
void setInput(const std::string &input)
virtual void print(const std::string &indent="", unsigned int detail=1) const override
TriggerThresholdValue * triggerThresholdValue(int eta, int phi) const
unsigned int bitnum() const
std::vector< TriggerThresholdValue * > m_TriggerThresholdValueVector
const std::vector< TriggerThresholdValue * > & thresholdValueVector() const
virtual void writeXML(std::ostream &xmlfile, int indentLevel=0, int indentWidth=2) const
std::string m_CableConnector
L1DataDef::TriggerType m_type
L1DataDef::TriggerType ttype() const
const std::string & input() const
static std::vector< std::string > xmlfile
void sort(typename DataModel_detail::iterator< DVL > beg, typename DataModel_detail::iterator< DVL > end)
Specialization of sort for DataVector/List.