2#include "GaudiKernel/Bootstrap.h"
3#include "GaudiKernel/ISvcLocator.h"
4#include "HltSteerData/HltCriteria.h"
5#include "HltDataTypes/CriteriaItemValue.h"
14 ISvcLocator* svcLocator = Gaudi::svcLocator();
15 StatusCode sc = svcLocator->service(
"HltStoreSvc", m_HltStoreSvc);
17 std::cout<<
"Event Filter: In HltCriteria ==> Could not access HltStoreSvc!"<<std::endl;
26 std::vector<CriteriaItem>::const_iterator it = m_items.begin();
29 while (it != m_items.end()) {
32 bool status = m_HltStoreSvc->
get(it->name, p_itemValue);
33 if (!status)
return false;
35 status = p_itemValue->
getValue(itemValue);
36 if (!status)
return false;
41 if (it->type ==
"MIN") {
42 if (itemValue <= it->value) judge=
false;
43 }
else if (it->type ==
"MAX") {
44 if (itemValue >= it->value) judge=
false;
45 }
else if (it->type ==
"TRUE") {
46 if (fabs(itemValue - it->value) > 0.000001) judge=
false;
47 }
else if (it->type ==
"FALSE") {
48 if (fabs(itemValue - it->value) < 0.000001) judge=
false;
50 std::cout <<
"In HltCriteria::satisfyCriteria() ==> Unvalid CriteriaItemType!" << std::endl;
54 if(it->name ==
"nmuc"){
57 else if(it->name ==
"nmdc"){
60 else if(it->name==
"etot"&&it->type==
"MIN"){
63 else if(it->name==
"etot"&&it->type==
"MAX"){
66 else if(it->name==
"acop"&&it->type==
"MAX"){
80 CriteriaItem it = {name, value, type,
id};
81 m_items.push_back(it);
bool getValue(float &value) const
void addItem(const std::string &name, float value, const std::string &type, int id)
bool satisfyCriteria() const
bool get(const std::string &name, T &value)