26 copy(chainList.begin(), chainList.end(), std::inserter(*
this, begin()));
38 HLTChainContainer::clear();
43 pair<iterator, bool> ins = insert(
chain);
45 throw runtime_error(
"Can't insert chain '" +
chain->name() +
"', because a uniqueness constraint is violated");
55 if(ch == byname.end())
return 0;
64 if(ch == bycounter.end())
return 0;
77 ch->set_prescales(
sc );
80 if(ch->mergeCounter.l2==0 && ch->mergeCounter.ef==0) {
81 throw runtime_error(
"Merged HLT chain has no info about L2 or EF counter");
82 }
else if(ch->mergeCounter.l2==0) {
84 ch->set_prescales( efps );
85 }
else if(ch->mergeCounter.ef==0) {
87 ch->set_prescales( l2ps );
97 ch->set_prescales(
sc );
107 pss->
setPrescale(ch->prescales(), ch->chain_counter(), ch->level_enum());
117 throw runtime_error(
"setL2LowerChainCounter: no CTPConfig object available");
121 std::map<std::string,int> ctpFromName;
123 ctpFromName[item->name()] = item->ctpId();
126 if(ch->level() ==
"EF")
continue;
127 std::string low_chain_names = ch->lower_chain_name();
128 std::erase(low_chain_names,
' ');
129 vector<string> low_chain_names_V =
split(low_chain_names,
",");
130 std::vector<int> lccs;
131 for(
const std::string& lowerChainName : low_chain_names_V)
132 lccs.push_back(ctpFromName[lowerChainName]);
133 ch->set_lower_chain_counter(low_chain_names_V.size()==1 ? lccs[0] : -1);
134 ch->set_lower_chain_counters(lccs);
143 if(ch->level()!=
"EF" || ch->lower_chain_name()==
"")
continue;
146 cerr <<
"ERROR: Did not find lower chain name '" << ch->lower_chain_name() <<
"' for chain '" << ch->chain_name() <<
"'" << endl;
159 ds->addSub( ch->compareTo(o_ch) );
161 ds->addLeftOnlySub(
"CHAIN", ch->name() );
167 ds->addRightOnlySub(
"CHAIN", o_ch->name() );
179 cout << indent <<
"HLTChainList has " << size() <<
" chains" << endl;
182 ch->print(indent +
" ",
detail);
183 cout << indent <<
"- ---------------------------------------------------------- " << endl;
191 o <<
"- -- HLTChainList [" << cl.size() <<
" chains] -------------------------------- " << std::endl;
194 o <<
"- ---------------------------------------------------------- " << std::endl;
const Menu & menu() const
list of all HLT chains in a trigger menu
bool addHLTChain(HLTChain *ch)
adds an HLTChain to the menu
void setL2LowerChainCounter(const CTPConfig *ctpcfg)
HLTChain * chain(const std::string &chainname) const
access the chain by name returns null-pointer if chain not found
HLTChainList()
default constructor
void applyPrescaleSet(const HLTPrescaleSet *pss)
set prescales of all chains
void print(const std::string &indent="", unsigned int detail=1) const
accessors to list of chains, for backward compatibility, use HLTChainList directly
~HLTChainList()
default destructor
DiffStruct * compareTo(const HLTChainList *o) const
HLTPrescaleSet * extractPrescaleSet() const
extract prescales from all chains
void setEFLowerChainCounter()
HLT chain configuration information.
int chain_counter() const
HLT chain configuration information.
bool hasPrescale(unsigned int counter, TrigConf::HLTLevel level=HLT) const
HLTPrescale & setPrescale(const HLTPrescale &sc, unsigned int chain_counter, HLTLevel level=HLT)
const HLTPrescale & getPrescale(unsigned int chain_counter, HLTLevel level=HLT) const
static void mergeL2EFPrescales(TrigConf::HLTChain *hltchain, const TrigConf::HLTPrescale &l2ps, const TrigConf::HLTPrescale &efps)
T * get(TKey *tobj)
get a TObject* from a TKey* (why can't a TObject be a TKey?)
HLTLevel str2lvl(const std::string &level)
std::ostream & operator<<(std::ostream &os, const TrigConf::IsolationLegacy &iso)
std::vector< std::string > split(const std::string &line, const std::string &del=" ")