ATLAS Offline Software
Loading...
Searching...
No Matches
TrigConf Namespace Reference

Forward iterator to traverse the main components of the trigger configuration. More...

Namespaces

namespace  JetWindowSize
namespace  MSGTC
 Messsage levels matching the Gaudi definition.
namespace  TrigConfCoolHLTPayloadConverters
namespace  TrigConfCoolL1PayloadConverters

Classes

class  AutoDBOpen
class  BunchGroup
class  BunchGroupCondAlg
class  BunchGroupLoader
class  BunchGroupSet
class  BunchGroupSetLoader
class  CaloInfo
class  CaloInfoLoader
 TriggerDB loader of the LVL1 calorimeter trigger configuration. More...
class  CaloJetInput
class  CaloJetInputLoader
 TriggerDB loader of the LVL1 calorimeter jet trigger configuration. More...
class  CaloSinCos
class  CaloSinCosLoader
 TriggerDB loader of the LVL1 calorimeter sin and cos configuration. More...
class  Chain
 HLT chain configuration. More...
class  ClusterThresholdValue
class  ConstIter
 Forward iterator over an iterable of type V returning an object of type T. More...
struct  counter
class  CrestLoadingException
class  CTPConfig
class  CTPConfigLoader
class  CTPFiles
class  CTPFilesLoader
 TriggerDB loader of the LVL1 LUT and CAM tables. More...
class  DataStructure
 Base class for Trigger configuration data and wrapper around underlying representation. More...
class  DBLoader
 Base class for loaders of configurations from the TriggerDB. More...
class  DeadTime
class  DeadTimeLoader
 TriggerDB loader of the LVL1 deadtime configuration. More...
class  DiffStruct
class  EtThresholdValue
class  FileWritingException
class  FolderDefinition
struct  HashMap
 Two concurrent maps to store name->hash and hash->name mappings. More...
struct  HashStore
 Store for hash maps per category. More...
class  HLTChain
 HLT chain configuration information. More...
class  HLTChainList
 list of all HLT chains in a trigger menu More...
class  HLTChainLoader
 TriggerDB loader of the HLT signatures. More...
class  HLTConfigSvc
 Service storing the HLT menu in the DetectorStore. More...
class  HLTFrame
 The HLT trigger menu,. More...
class  HLTFrameLoader
 TriggerDB loader of the HLT menu. More...
class  HLTMenu
 HLT menu configuration. More...
class  HLTMonitoring
 HLT monitoring configuration. More...
class  HLTPrescale
class  HLTPrescaleCondAlg
 Condition algorithm to provide the L1 trigger menu. More...
class  HLTPrescaleSet
 HLT chain configuration information. More...
class  HLTPrescaleSetCollection
 HLT chain configuration information. More...
class  HLTPrescaleSetCollectionLoader
class  HLTPrescaleSetLoader
class  HLTPrescalesSet
 HLT menu configuration. More...
class  HLTSequence
 HLT sequence configuration information. More...
class  HLTSequenceList
 list of HLT sequences More...
class  HLTSequenceLoader
 TriggerDB loader of the HLT signatures. More...
class  HLTSignature
 HLT signature configuration information. More...
class  HLTStreamTag
 HLT stream configuration information. More...
class  HLTTEUtils
 HLTUtils is renamed in r22 to HLTTEUtils. More...
class  HLTTriggerElement
 HLT trigger element configuration information. More...
class  HLTTriggerType
 HLT trigger type configuration information. More...
class  HLTUtils
class  IBunchGroupLoader
class  IBunchGroupSetLoader
class  ICaloInfoLoader
class  ICaloJetInputLoader
class  ICaloSinCosLoader
class  ICTPConfigLoader
class  ICTPFilesLoader
class  IDeadTimeLoader
class  IHLTConfigSvc
 Athena interface for all services that provide HLT menu configuration information. More...
class  IHLTFrameLoader
class  IHLTPrescaleSetCollectionLoader
class  IHLTPrescaleSetLoader
class  IIHLTConfigSvc
 Interface for all services/tools that provide HLT menu configuration information. More...
class  IILVL1ConfigSvc
 Interface for all services/tools that provide LVL1 menu configuration information. More...
class  IJobOptionsSvc
 Trigger-specific JobOptionsSvc interface. More...
class  IJobOptionTableLoader
class  IKeyWriterTool
class  IL1TopoMenuLoader
class  ILoader
 Interface class for loaders. More...
class  ILutCamLoader
class  ILVL1ConfigSvc
 Athena interface for all services that provide LVL1 menu configuration information. More...
class  IMasterTableLoader
 Interface for loaders of the LVL1 trigger configuration. More...
class  IMenuLoader
class  IMuctpiLoader
class  IMuonThresholdSetLoader
class  IOException
class  IPrescaledClockLoader
class  IPrescaleSetLoader
class  IPrioritySetLoader
class  IRandomLoader
class  ISequenceContentTableLoader
 Interface for loaders of the HLT sequences. More...
class  ISignatureContentTableLoader
 Interface for loaders of the HLT signatures. More...
class  IsolationLegacy
class  IsolationParam
class  IStorageMgr
 Interface for the StorageMgr (TriggerDB) and XMLStorageMgr (XML) classes. More...
class  IThresholdConfigLoader
class  IThresholdMonitorLoader
class  ITrigConfigSvc
 Athena interface for all service that provide L1Topo, LVL1, and HLT menu configuration information. More...
class  ITrigConfigTool
 Interface for dual-use tools that provide trigger configuration information. More...
class  ITriggerThresholdLoader
class  ITriggerThresholdValueLoader
class  ITriggerTypeLoader
class  JetThresholdValue
class  JobOption
 hold a single job option (parameter and value) More...
class  JobOptionsSvc
 JobOptionsSvc for the HLT. More...
class  JobOptionTable
 table to hold the complete list of JobOption entries for a single configuration, from which the JobOptionsCatalogue is built. More...
class  JobOptionTableLoader
 TriggerDB loader of the HLT job options. More...
class  JsonFileLoader
 Loader of trigger configurations from Json files. More...
class  JsonFileWriterHLT
 Loader of trigger configurations from Json files. More...
class  JsonFileWriterL1
 Loader of trigger configurations from Json files. More...
class  JsonParsingException
class  KeyWriterTool
class  L1Board
 a TriggerLine entry describes the location of a threshold multiplicity on a cable (connector) More...
class  L1BunchGroup
 Bunchgroup and BunchgroupSet representation. More...
class  L1BunchGroupSet
 L1 board configuration. More...
class  L1Connector
 L1 connectors configuration. More...
class  L1CTP
 a TriggerLine entry describes the location of a threshold multiplicity on a cable (connector) More...
class  L1CTPFiles
 L1 menu configuration. More...
class  L1DataBaseclass
class  L1DataDef
class  L1Item
 L1 threshold configuration. More...
class  L1Menu
 L1 menu configuration. More...
class  L1PrescaleCondAlg
 Condition algorithm to provide the L1 trigger menu. More...
class  L1PrescalesSet
 L1 menu configuration. More...
class  L1PSNumber
class  L1Threshold
 Standard L1 threshold configuration. More...
class  L1Threshold_Calo
class  L1Threshold_cTAU
class  L1Threshold_eEM
class  L1Threshold_EM
class  L1Threshold_eTAU
class  L1Threshold_gJ
class  L1Threshold_gLJ
class  L1Threshold_gTE
class  L1Threshold_gXE
class  L1Threshold_internal
class  L1Threshold_jEM
class  L1Threshold_JET
class  L1Threshold_jJ
class  L1Threshold_jLJ
class  L1Threshold_jTAU
class  L1Threshold_jTE
class  L1Threshold_jXE
class  L1Threshold_MU
class  L1Threshold_NIM
class  L1Threshold_TAU
class  L1Threshold_TE
class  L1Threshold_XE
class  L1Threshold_XS
class  L1Threshold_ZB
class  L1Threshold_ZBTopo
class  L1ThrExtraInfo
class  L1ThrExtraInfo_cTAU
class  L1ThrExtraInfo_eEM
class  L1ThrExtraInfo_EMTAULegacy
class  L1ThrExtraInfo_eTAU
class  L1ThrExtraInfo_gJ
class  L1ThrExtraInfo_gLJ
class  L1ThrExtraInfo_gTE
class  L1ThrExtraInfo_gXE
class  L1ThrExtraInfo_jEM
class  L1ThrExtraInfo_JETLegacy
class  L1ThrExtraInfo_jJ
class  L1ThrExtraInfo_jLJ
class  L1ThrExtraInfo_jTAU
class  L1ThrExtraInfo_jTE
class  L1ThrExtraInfo_jXE
class  L1ThrExtraInfo_MU
class  L1ThrExtraInfo_XSLegacy
class  L1ThrExtraInfoBase
 L1 extra information for certain threshold types. More...
class  L1TopoAlgorithm
 L1Topo algorithm configuration. More...
class  L1TopoMenuLoader
 TriggerDB loader of the HLT menu. More...
class  L1TopoOutput
 L1Topo output line configuration. More...
class  Logic
 Class to hold the logic structure representing a logical expression and evaluate it for a given state. More...
class  LogicAND
class  LogicExpression
class  LogicLeaf
class  LogicOPS
class  LogicOR
class  LogicParsingException
class  LutCam
class  LutCamLoader
class  LVL1Config
class  LVL1ConfigSvc
 Service storing the LVL1 menu in the DetectorStore. More...
class  MasterTableLoader
 TriggerDB loader of the LVL1 trigger configuration. More...
class  MCKLoader
class  Menu
class  MenuLoader
 TriggerDB loader of the LVL1 trigger menu configuration. More...
struct  MenuPtrWrapper
 Small utility class to wrap a pointer to a const xAOD::TriggerMenu. More...
class  METSigParam
struct  MinTOBPt
class  MsgStreamTC
 MsgStreamTC class to be used in TrigConf equivalent to Gaudi's MsgStream. More...
class  Muctpi
class  MuctpiLoader
class  MuonThresholdSet
class  MuonThresholdSetLoader
 TriggerDB loader of the LVL1 muon h/w configuration for online use. More...
class  MuonThresholdValue
struct  name
struct  name_hash
class  NimThresholdValue
class  NoBGSKException
class  NoHLTPSKException
class  NoKeyException
class  NoL1PSKException
class  NoQueryException
class  NoSMKException
class  ParsingException
class  PIT
class  PrescaledClock
class  PrescaledClockLoader
class  PrescaleSet
class  PrescaleSetLoader
class  PrioritySet
class  PrioritySetLoader
class  QueryDefinition
class  QueryException
class  Random
class  RandomLoader
class  ReplicaSorter
class  Selection
struct  seq_hash_id
struct  seq_name_hash
class  SessionMgr
 Manager of the database session. More...
class  StorageMgr
 Database Storage Manager, controls the database session and the different loader classes for DB access. More...
class  StorageMgrBase
struct  tag_ctpid
struct  tag_name_hash
class  ThresholdConfig
class  ThresholdConfigLoader
 TriggerDB loader of the LVL1 trigger threshold configuration. More...
class  ThresholdMonitor
class  ThresholdMonitorLoader
class  TIP
class  TrigConfCoolFolderSpec
 Definition of the COOL folder structure for the trigger configuration data. More...
class  TrigConfCoolWriter
 Reading/Writing of trigger configuration data from/to COOL. More...
class  TrigConfData
class  TrigConfMessaging
 Class to provide easy access to TrigConf::MsgStream for TrigConf classes. More...
class  TrigDBConnectionConfig
class  TrigDBCTPFilesLoader
 Loader of trigger configurations from Json files. More...
class  TrigDBHLTPrescalesSetLoader
 Loader of trigger configurations from Json files. More...
class  TrigDBJobOptionsLoader
 Loader of trigger configurations from Json files. More...
class  TrigDBL1BunchGroupSetLoader
 Loader of trigger configurations from Json files. More...
class  TrigDBL1PrescalesSetLoader
 Loader of trigger configurations from Json files. More...
class  TrigDBLoader
 Loader of trigger configurations from the Trigger database. More...
class  TrigDBMenuLoader
 Loader of trigger menu configurations from the database. More...
class  TrigDBMonitoringLoader
 Loader of trigger menu configurations from the database. More...
class  TriggerItem
class  TriggerItemNode
class  TriggerLine
 a TriggerLine entry describes the location of a threshold multiplicity on a cable (connector) More...
struct  TriggerMenuJsonPtrWrapper
 Small utility class to wrap a pointer to a const xAOD::TriggerMenuJson. More...
class  TriggerThreshold
class  TriggerThresholdLoader
 TriggerDB loader of the LVL1 trigger thresholds. More...
class  TriggerThresholdValue
class  TriggerThresholdValueLoader
class  ValidityRange
class  ValueWithEtaDependence
 class to implement a L1 threshold cut that varies with eta More...
class  xAODConfigSvc
 Trigger configuration service used when reading an xAOD file. More...
class  xAODConfigTool
 Trigger configuration metadata tool for xAOD analysis. More...
class  xAODMenuReader
 Algorithm for testing the xAOD menu reading in Athena. More...
class  xAODMenuWriter
 Algorithm used to write the light-weight xAOD configuration in the Run3 JSON format. More...
class  XEFlavour
class  XsThresholdValue

Typedefs

typedef boost::multi_index::multi_index_container< HLTChain *, boost::multi_index::indexed_by< boost::multi_index::ordered_unique< boost::multi_index::identity< HLTChain > >, boost::multi_index::ordered_unique< boost::multi_index::tag< counter >, boost::multi_index::composite_key< HLTChain *, boost::multi_index::const_mem_fun< HLTChain, int,&HLTChain::chain_counter >, boost::multi_index::const_mem_fun< HLTChain, HLTLevel,&HLTChain::level_enum > > >, boost::multi_index::ordered_unique< boost::multi_index::tag< name >, boost::multi_index::const_mem_fun< HLTChain, const std::string &, &HLTChain::chain_name > >, boost::multi_index::hashed_unique< boost::multi_index::tag< name_hash >, boost::multi_index::const_mem_fun< HLTChain, const std::string &, &HLTChain::chain_name > >, boost::multi_index::random_access<> > > HLTChainContainer
typedef boost::multi_index::multi_index_container< HLTSequence *, boost::multi_index::indexed_by< boost::multi_index::ordered_unique< boost::multi_index::identity< HLTSequence > >, boost::multi_index::ordered_unique< boost::multi_index::tag< seq_hash_id >, boost::multi_index::const_mem_fun< HLTSequence, unsigned int, &HLTSequence::hashId > >, boost::multi_index::hashed_unique< boost::multi_index::tag< seq_name_hash >, boost::multi_index::const_mem_fun< TrigConfData, const std::string &, &TrigConfData::name > > > > HLTSequenceContainer
typedef uint32_t HLTHash
typedef boost::multi_index::multi_index_container< TriggerItem *, boost::multi_index::indexed_by< boost::multi_index::random_access<>, boost::multi_index::ordered_unique< boost::multi_index::identity< TriggerItem > >, boost::multi_index::ordered_unique< boost::multi_index::tag< tag_ctpid >, boost::multi_index::const_mem_fun< TriggerItem, int, &TriggerItem::ctpId > >, boost::multi_index::hashed_unique< boost::multi_index::tag< tag_name_hash >, boost::multi_index::const_mem_fun< TrigConfData, const std::string &, &TrigConfData::name > > > > ItemContainer
typedef ItemContainer::index< tag_ctpid >::type item_by_ctpid_t
typedef item_by_ctpid_t::iterator item_by_ctpid_iterator
typedef ItemContainer::index< tag_name_hash >::type item_by_name_t
typedef ItemContainer::index< tag_name_hash >::type::iterator item_by_name_iterator
typedef std::pair< unsigned int, unsigned int > RunRange
typedef std::vector< RunRangeRunRangeVec
typedef CTPConfigLoader CTPConfigOnlineLoader
typedef std::vector< std::shared_ptr< LogicExpression > > LogicV_t

Enumerations

enum  HLTLevel { L2 =0 , EF , HLT }

Functions

MsgStreamTCendmsgtc (MsgStreamTC &s)
 End of message.
unsigned int energyInCounts (unsigned int energyMeV, unsigned int energyResolutionMeV)
 helper funtion to translate energies into counts
std::ostream & operator<< (std::ostream &os, const TrigConf::IsolationLegacy &iso)
std::ostream & operator<< (std::ostream &os, const TrigConf::L1ThrExtraInfo_eEM::WorkingPoints_eEM &iso)
std::ostream & operator<< (std::ostream &os, const TrigConf::L1ThrExtraInfo_jEM::WorkingPoints_jEM &iso)
std::ostream & operator<< (std::ostream &os, const TrigConf::L1ThrExtraInfo_eTAU::WorkingPoints_eTAU &iso)
std::ostream & operator<< (std::ostream &os, const TrigConf::L1ThrExtraInfo_jTAU::WorkingPoints_jTAU &iso)
std::ostream & operator<< (std::ostream &os, const TrigConf::L1ThrExtraInfo_cTAU::WorkingPoints_cTAU &iso)
std::vector< std::string > parse (std::string names)
void recursivelyFindOutputTEs (const std::string &tename, const TrigConf::HLTSequenceList &sequenceList, std::set< std::string > &tes, int level, const std::set< std::string > *veto=0)
void recursivelyFindOutputTEsWithLevelFromSequence (const std::string &tename, const TrigConf::HLTSequenceList &sequenceList, std::set< std::string > &tes, int level)
std::ostream & operator<< (std::ostream &, const HLTChain &)
std::ostream & operator<< (std::ostream &o, const TrigConf::HLTChainList &c)
std::ostream & operator<< (std::ostream &, const HLTFrame &)
HLTLevel str2lvl (const std::string &level)
std::string lvl2str (HLTLevel level)
std::ostream & operator<< (std::ostream &, const TrigConf::HLTPrescale &)
std::ostream & operator<< (std::ostream &, const TrigConf::HLTPrescaleSet &)
std::ostream & operator<< (std::ostream &, const TrigConf::HLTPrescaleSetCollection &)
std::ostream & operator<< (std::ostream &, const HLTSequence &)
std::ostream & operator<< (std::ostream &, const HLTSequenceList &)
std::ostream & operator<< (std::ostream &, const HLTSignature &)
std::ostream & operator<< (std::ostream &, const TrigConf::HLTStreamTag &)
std::ostream & operator<< (std::ostream &, const HLTTriggerElement &)
std::ostream & operator<< (std::ostream &, const HLTTriggerType &)
uint32_t doTruncatedHash (const std::stringstream &ss)
uint32_t truncatedHash (const DataStructure &dataStructure)
 Function to compute a truncated MD5 hash for a JSON file.
uint32_t truncatedHash (const TrigConf::L1Menu &L1DataStructure, const TrigConf::HLTMenu &HLTDataStructure)
 Function to compute a truncated MD5 hash for a JSON file.
bool isCrestConnection (const std::string &db_connection_string, std::string &crest_server, std::string &crest_api, std::string &dbname)
 Function to interpret the trigger connection string for CREST connections Format of the connections string:
void blobToPtree (const coral::Blob &blob, boost::property_tree::ptree &pt)
void stringToPtree (const std::string &json_string, boost::property_tree::ptree &pt)
void writeRawFile (const coral::Blob &data, const std::string &outFileName)
 write coral data blob to file
void writeRawFile (const std::string &data, const std::string &outFileName)
 write string into file
std::vector< std::string > split (const std::string &line, const std::string &del=" ")
void strip (std::string &str)
void replaceTabs (std::string &str)
void toLower (std::string &)
uint32_t bin2uint (const std::string &binary)
std::string uint2bin (uint32_t uinteger, uint16_t width)
TrigConf::TriggerItemNodeparse (const std::string &logic, const std::vector< std::string > &conditions, const std::vector< TrigConf::TriggerThreshold * > &thrs)
std::string::size_type findClosingBracket (std::string::size_type pos, const std::string &logic)
TrigConf::TriggerItemNodebuildObjNode (uint32_t condIdx, const std::vector< std::string > &conditions, const std::vector< TrigConf::TriggerThreshold * > &thrs)
std::string insertParenthesis (const std::string &givenlogic)
std::ostream & operator<< (std::ostream &, const TrigConfData &)
std::ostream & operator<< (std::ostream &, const TrigConf::TriggerItem &)
std::ostream & operator<< (std::ostream &o, const TrigConf::TriggerItemNode &node)
void fillQuery (coral::IQuery *q, coral::AttributeList &attList)
std::string rmtilde (const std::string &input)
void printTable (const coral::ITable &teTable)
StatusCode prepareTriggerMenu (const xAOD::TriggerMenu *menu, CTPConfig &ctpConfig, HLTChainList &chainList, HLTSequenceList &sequenceList, BunchGroupSet &bgSet, MsgStream &msg)
 In order to avoid duplicating code between how the dual-use and the Athena-only code translates the xAOD metadata into the transient trigger configuration information, this function is used by both to achieve this.
template<typename T>
std::vector< T > ToVector (const TrigConf::DataStructure &ds, const std::string &child)
 Helper function ptree key->[] to std::vector<T>
template<typename T>
std::vector< std::vector< T > > ToVectorVector (const TrigConf::DataStructure &ds, const std::string &child)
 Helper function ptree key->[[]] to std::vector<std::vector<T>>
StatusCode prepareTriggerMenu (const HLTMenu &loadedHlt, const L1Menu &loadedL1, const HLTPrescalesSet &loadedHltps, const L1PrescalesSet &loadedL1ps, const L1BunchGroupSet &loadedBgSet, CTPConfig &ctpConfig, HLTChainList &chainList, HLTSequenceList &sequenceList, BunchGroupSet &bgSet, MsgStream &msg)
 Load JSON derived data into legacy structures to maintain compatiblity with existing code.
bool xAODKeysMatch (const xAOD::TrigConfKeys *keys, const xAOD::TriggerMenu *menu)
 Since this is used in a couple of places, it seemed to make sense to put this simple code into a central place.
bool xAODKeysMatch (const xAOD::TriggerMenu *menuA, const xAOD::TriggerMenu *menuB)
 Helper function checking if the DB keys match on two objects.

Detailed Description

Forward iterator to traverse the main components of the trigger configuration.

class PrescaleSet contains prescales of a Level 1 partition

Loader class for HLT monitoring configuration from the Trigger DB.

Write Json file from L1Menu object To validate correct loading of the L1 menu.

Write Json file from HLTMenu object To validate correct loading of the HLT menu.

helper class to store a query

Namespace holding all the trigger configuration code.

Base class for Trigger configuration data and wrapper around underlying representation.

In run 2 the CTP uses a new prescaling mechanism: for each item a 24-bit pseudo-random number generator is used. If the resulting (thrown) number is

Typedef Documentation

◆ CTPConfigOnlineLoader

◆ HLTChainContainer

typedef boost::multi_index::multi_index_container<HLTChain*, boost::multi_index::indexed_by< boost::multi_index::ordered_unique< boost::multi_index::identity<HLTChain> >, boost::multi_index::ordered_unique< boost::multi_index::tag<counter>, boost::multi_index::composite_key< HLTChain*, boost::multi_index::const_mem_fun<HLTChain,int,&HLTChain::chain_counter>, boost::multi_index::const_mem_fun<HLTChain,HLTLevel,&HLTChain::level_enum> > >, boost::multi_index::ordered_unique< boost::multi_index::tag<name>, boost::multi_index::const_mem_fun<HLTChain, const std::string&, &HLTChain::chain_name> >, boost::multi_index::hashed_unique< boost::multi_index::tag<name_hash>, boost::multi_index::const_mem_fun<HLTChain,const std::string&, &HLTChain::chain_name> >, boost::multi_index::random_access<> > > TrigConf::HLTChainContainer

Definition at line 52 of file HLTChainList.h.

◆ HLTHash

typedef uint32_t TrigConf::HLTHash

Definition at line 19 of file TrigConfHLTUtils/TrigConfHLTUtils/HLTUtils.h.

◆ HLTSequenceContainer

typedef boost::multi_index::multi_index_container<HLTSequence*, boost::multi_index::indexed_by< boost::multi_index::ordered_unique< boost::multi_index::identity<HLTSequence> >, boost::multi_index::ordered_unique< boost::multi_index::tag<seq_hash_id>, boost::multi_index::const_mem_fun<HLTSequence, unsigned int, &HLTSequence::hashId> >, boost::multi_index::hashed_unique< boost::multi_index::tag<seq_name_hash>, boost::multi_index::const_mem_fun<TrigConfData, const std::string&, &TrigConfData::name> > > > TrigConf::HLTSequenceContainer

Definition at line 36 of file HLTSequenceList.h.

◆ item_by_ctpid_iterator

typedef item_by_ctpid_t::iterator TrigConf::item_by_ctpid_iterator

Definition at line 42 of file Menu.h.

◆ item_by_ctpid_t

typedef ItemContainer::index<tag_ctpid>::type TrigConf::item_by_ctpid_t

Definition at line 41 of file Menu.h.

◆ item_by_name_iterator

typedef ItemContainer::index<tag_name_hash>::type::iterator TrigConf::item_by_name_iterator

Definition at line 45 of file Menu.h.

◆ item_by_name_t

typedef ItemContainer::index<tag_name_hash>::type TrigConf::item_by_name_t

Definition at line 44 of file Menu.h.

◆ ItemContainer

typedef boost::multi_index::multi_index_container<TriggerItem*, boost::multi_index::indexed_by< boost::multi_index::random_access<>, boost::multi_index::ordered_unique< boost::multi_index::identity<TriggerItem> >, boost::multi_index::ordered_unique< boost::multi_index::tag<tag_ctpid>, boost::multi_index::const_mem_fun<TriggerItem, int, &TriggerItem::ctpId> >, boost::multi_index::hashed_unique < boost::multi_index::tag<tag_name_hash>, boost::multi_index::const_mem_fun<TrigConfData, const std::string&, &TrigConfData::name> > > > TrigConf::ItemContainer

Definition at line 39 of file Menu.h.

◆ LogicV_t

typedef std::vector<std::shared_ptr<LogicExpression> > TrigConf::LogicV_t

Definition at line 25 of file LogicExpression.h.

◆ RunRange

typedef std::pair<unsigned int,unsigned int> TrigConf::RunRange

Definition at line 36 of file TrigConfCoolWriter.h.

◆ RunRangeVec

typedef std::vector<RunRange> TrigConf::RunRangeVec

Definition at line 37 of file TrigConfCoolWriter.h.

Enumeration Type Documentation

◆ HLTLevel

Enumerator
L2 
EF 
HLT 

Definition at line 12 of file HLTLevel.h.

12{ L2=0, EF, HLT };
It used to be useful piece of code for replacing actual SG with other store of similar functionality ...

Function Documentation

◆ bin2uint()

uint32_t TrigConf::bin2uint ( const std::string & binary)

Definition at line 313 of file Trigger/TrigConfiguration/TrigConfL1Data/Root/HelperFunctions.cxx.

313 {
314 uint32_t value(0);
315 for(char c: binary) {
316 value <<= 1;
317 if(c=='1') value += 1;
318 }
319 return value;
320}

◆ blobToPtree()

void TrigConf::blobToPtree ( const coral::Blob & blob,
boost::property_tree::ptree & pt )

Definition at line 58 of file TrigDBHelper.cxx.

58 {
59 boost::iostreams::stream<boost::iostreams::array_source> stream( static_cast<const char*> ( blob.startingAddress()),
60 blob.size());
61 boost::property_tree::read_json(stream, pt);
62}

◆ buildObjNode()

TrigConf::TriggerItemNode * TrigConf::buildObjNode ( uint32_t condIdx,
const std::vector< std::string > & conditions,
const std::vector< TrigConf::TriggerThreshold * > & thrs )

Definition at line 203 of file Trigger/TrigConfiguration/TrigConfL1Data/Root/HelperFunctions.cxx.

205 {
206
208
209 try {
210 vector<string> condDef = split(conditions[condIdx-1], ",");
211
212 if(condDef.size()==1) { // internal trigger (condDef contains internal trigger name)
213
214 newNode->setInternalTrigger( condDef[0] );
215
216 } else { // threshold (condDef contains multiplicity, condName, and threshold name)
217 // set multiplicity
218 newNode->setMultiplicity(std::stoi(condDef[0]));
219 // find trigger threshold in list of all thresholds and set it in the TriggerItemNode
220 std::string& name = condDef[2];
221 if(thrs.size()>0) {
222 std::vector<TrigConf::TriggerThreshold*>::const_iterator thrIt = thrs.begin();
223 for(;thrIt!=thrs.end(); ++thrIt ) {
224 if((*thrIt)->name()==name) {
225 newNode->setTriggerThreshold(*thrIt);
226 break;
227 }
228 }
229 } else {
230 newNode->setThresholdName(name);
231 }
232 }
233 }
234 catch(const std::exception& e) {
235 std::cout << "Exeption caught in buildObjNode for " << conditions[condIdx-1] << ": " << e.what() << std::endl;
236 throw;
237 }
238 return newNode;
239}
void setInternalTrigger(L1DataDef::TriggerType x, unsigned int thresholdNumber)
void setTriggerThreshold(TriggerThreshold *thr)
void setThresholdName(const std::string &thrname)
std::vector< std::string > split(const std::string &line, const std::string &del=" ")

◆ doTruncatedHash()

uint32_t TrigConf::doTruncatedHash ( const std::stringstream & ss)

Definition at line 13 of file TrigConfMD5.cxx.

13 {
14 MD5 md5(ss.str());
15 const std::string truncated_hash_hex = md5.hex_digest().substr(0, 8); // Of 32
16 std::stringstream hex_to_int;
17 uint32_t truncated_hash_int = 0;
18 hex_to_int << std::hex << truncated_hash_hex;
19 hex_to_int >> truncated_hash_int;
20 return truncated_hash_int;
21 }
static Double_t ss
Definition MD5.h:20

◆ endmsgtc()

MsgStreamTC & TrigConf::endmsgtc ( MsgStreamTC & s)
inline

End of message.

Definition at line 113 of file Trigger/TrigConfiguration/TrigConfBase/TrigConfBase/MsgStream.h.

113 {
114 if (s.isActive()) s.doOutput();
115 return s;
116 }

◆ energyInCounts()

unsigned int TrigConf::energyInCounts ( unsigned int energyMeV,
unsigned int energyResolutionMeV )

helper funtion to translate energies into counts

L1Threshold base class.

Parameters
energyMeV[in] energy value in MeV
energyResolutionMeV[in] energy resolution in MeV (energy that corresponds to one count
Returns
energy counts

The funtion throws a runtime error if the energy value is not a multiple of the resolution

Definition at line 18 of file L1ThresholdBase.cxx.

19{
20 if ( energyMeV % energyResolutionMeV != 0 ) {
21 throw std::runtime_error("Energy " + std::to_string(energyMeV) + " MeV is not a multiple of the energy resolution " + std::to_string(energyResolutionMeV));
22 }
23 return energyMeV / energyResolutionMeV;
24}

◆ fillQuery()

void TrigConf::fillQuery ( coral::IQuery * q,
coral::AttributeList & attList )

Definition at line 13 of file DBHelper.cxx.

13 {
14 q->defineOutput(attList);
15 for(coral::AttributeList::iterator attr=attList.begin(); attr!=attList.end(); ++attr)
16 q->addToOutputList(attr->specification().name());
17}

◆ findClosingBracket()

std::string::size_type TrigConf::findClosingBracket ( std::string::size_type pos,
const std::string & logic )

Definition at line 270 of file Trigger/TrigConfiguration/TrigConfL1Data/Root/HelperFunctions.cxx.

271 {
272
273 pos++;
274 uint32_t openBrackets = 1;
275 std::string::size_type last = logic.size();
276 while(openBrackets>0 && pos!=last) {
277 if(logic[pos]==')') openBrackets--;
278 if(logic[pos]=='(') openBrackets++;
279 pos++;
280 }
281 if (openBrackets>0) {
282 std::string errMsg = "No matching closing bracket in '";
283 errMsg += logic;
284 errMsg += "'";
285 throw std::logic_error(errMsg);
286 }
287 return pos-1;
288}

◆ insertParenthesis()

std::string TrigConf::insertParenthesis ( const std::string & givenlogic)

Definition at line 291 of file Trigger/TrigConfiguration/TrigConfL1Data/Root/HelperFunctions.cxx.

291 {
292 std::string logicWithPars(givenlogic);
293 size_t last = givenlogic.size()-1;
294 bool leadingAnd(false);
295 for(size_t pos = 0;pos<last;pos++) {
296 char c = logicWithPars[pos];
297 if(c=='(') { pos=findClosingBracket(pos,givenlogic); continue; }
298 if(c=='&') leadingAnd=true;
299 if(c=='|') {
300 if(leadingAnd) {
301 logicWithPars.insert(pos,")");
302 logicWithPars.insert(0,"(");
303 }
304 break;
305 }
306 }
307 return logicWithPars;
308}
std::string::size_type findClosingBracket(std::string::size_type pos, const std::string &logic)

◆ isCrestConnection()

bool TrigConf::isCrestConnection ( const std::string & db_connection_string,
std::string & crest_server,
std::string & crest_api,
std::string & dbname )

Function to interpret the trigger connection string for CREST connections Format of the connections string:

Parameters
db_connection_stringThe database connection string
crest_serverThe server address (including protocol such as https://)
crest_apiThe API version
dbnameThe database name
Returns
true if the connection is a CREST connection

Definition at line 9 of file TrigConfSvcHelper.cxx.

10 {
11 // Implementation of the function
12 if(!db_connection_string.starts_with("http")) {
13 return false;
14 }
15
16 std::string url = db_connection_string;
17 std::size_t protocol_end = url.find("://");
18 std::string protocol;
19
20 // --- 1. Extract protocol ---
21 if (protocol_end != std::string::npos) {
22 protocol = url.substr(0, protocol_end);
23 } else {
24 protocol = ""; // no protocol given
25 protocol_end = -3; // so that host_start = 0 below
26 }
27
28 // --- 2. Extract host ---
29 std::size_t host_start = protocol_end + 3;
30 std::size_t host_end = url.find('/', host_start);
31 std::string host = (host_end == std::string::npos) ? \
32 url.substr(host_start) : url.substr(host_start, host_end - host_start);
33 // server is protocol + host
34 crest_server = std::format("{}://{}", protocol, host);
35
36 // --- 3. Extract path ---
37 std::string path = (host_end != std::string::npos) ? url.substr(host_end) : "";
38
39 // --- 4. Remove trailing slashes ---
40 while (!path.empty() && path.back() == '/')
41 path.pop_back();
42
43 // --- 5. Split path into non-empty parts ---
44 std::vector<std::string> path_parts;
45 std::stringstream ss(path);
46 std::string segment;
47
48 while (std::getline(ss, segment, '/')) {
49 if (!segment.empty()) {
50 path_parts.push_back(segment);
51 }
52 }
53 if(path_parts.empty()) {
54 throw std::runtime_error("TrigConfJobOptionsSvc: crest connection '" + db_connection_string + "' is missing the database name.");
55 }
56 crest_api = "";
57 dbname = "";
58 if(path_parts.size()==1) {
59 dbname = path_parts[0];
60 } else if(path_parts.size()==2) {
61 crest_api = path_parts[0];
62 dbname = path_parts[1];
63 }
64 return true;
65}
path
python interpreter configuration --------------------------------------—
Definition athena.py:128

◆ lvl2str()

std::string TrigConf::lvl2str ( HLTLevel level)
inline

Definition at line 19 of file HLTLevel.h.

19 {
20 return level==L2 ? "L2" :
21 (level==EF ? "EF" : "HLT");
22 }

◆ operator<<() [1/21]

std::ostream & TrigConf::operator<< ( std::ostream & o,
const HLTChain & c )

Definition at line 418 of file TrigConfHLTData/Root/HLTChain.cxx.

419 {
420 int dp = o.precision();
421 o << "- -- HLTChain printout ------------------------------------- " << endl;
422 o << "- -- name='" << c.name()
423 << "' [v " << c.m_chain_version << "]"
424 << " | counter: " << c.m_chain_counter
425 << " | level: " << c.m_level
426 << " | lower_chain_name: " << c.m_lower_chain_name
427 << " | lower_chain_counter: " << c.m_lower_chain_counter;
428 if (c.m_level == "HLT") o << " | EB_after_step: " << c.m_EB_after_step;
429
430 o.precision(3);
431 o.setf(std::ios::fixed, std::ios::floatfield);
432 o << " | prescale: " << c.prescale()
433 << " | pass_through: " << c.pass_through();
434 o << " | rerun: " << c.prescales().getRerunPrescales().size() << " [ ";
435 for(TrigConf::HLTPrescale::value_type rrps : c.prescales().getRerunPrescales()) o << rrps.first << ":" << rrps.second << " ";
436 o << "]" << endl;
437 o << endl;
438
439 set<std::string>::const_iterator group = c.m_groups.begin();
440 o << "- -- Chain groups : " << c.m_groups.size() << " [ ";
441 for (; group != c.m_groups.end(); ++group) o << "'" << *group << "' ";
442 o << "]" << std::endl;
443
444 vector<TrigConf::HLTTriggerType*>::const_iterator triggerType = c.m_HLTTriggerTypeList.begin();
445 o << "- -- Trigger type bits : " << c.m_HLTTriggerTypeList.size() << " [ ";
446 for (; triggerType != c.m_HLTTriggerTypeList.end(); ++triggerType) o << (*triggerType)->bit() << " ";
447 o << "]" << std::endl;
448
449
450 vector<TrigConf::HLTStreamTag*>::const_iterator streamTag = c.m_streams.begin();
451 o << "- -- Trigger streams : " << c.m_streams.size() << std::endl;
452 for (; streamTag != c.m_streams.end(); ++streamTag) o << *(*streamTag);
453
454 vector<TrigConf::HLTSignature*>::const_iterator signature = c.m_HLTSignatureList.begin();
455 for (; signature != c.m_HLTSignatureList.end(); ++signature) o << *(*signature);
456 o << "- ---------------------------------------------------------- " << endl;
457
458 o.precision(dp);
459 return o;
460}
PrescaleMap_t::value_type value_type
Definition HLTPrescale.h:43
STL iterator class.

◆ operator<<() [2/21]

std::ostream & TrigConf::operator<< ( std::ostream & o,
const HLTFrame & f )

Definition at line 140 of file HLTFrame.cxx.

141 {
142 o << "HLTFrame print: " << std::endl
143 << "Running " << (f.mergedHLT() ? "":" not ") << "merged HLT" << std::endl
144 << f.getHLTChainList()
145 << f.getHLTSequenceList();
146 return o;
147}

◆ operator<<() [3/21]

std::ostream & TrigConf::operator<< ( std::ostream & o,
const HLTSequence & s )

Definition at line 142 of file HLTSequence.cxx.

143 {
144 o << "- -- HLTSequence printout ---------------------------------- " << std::endl;
145 o << "- -- inputTEs : ";
146 bool first = true;
147 for (TrigConf::HLTTriggerElement* inputTE : s.m_inputTEs) {
148 if (first)
149 first = false;
150 else
151 o << ", ";
152 o << *inputTE;
153 }
154
155 if (s.m_topoStartTE) {
156 o << "\n";
157 o << "- -- topoStartTE ";
158 o << *s.m_topoStartTE;
159 }
160 o << "\n- -- algorithms";
161 first = true;
162 for (const std::string& algorithm : s.m_algorithms) {
163 if (first)
164 first = false;
165 else
166 o << ", ";
167 o << algorithm;
168 }
169 o << "\n- -- outputTE : "; o << *s.outputTE();
170 o << "\n- ---------------------------------------------------------- " << std::endl;
171 return o;
172}
HLT trigger element configuration information.
std::string algorithm
Definition hcg.cxx:85
bool first
Definition DeMoScan.py:534

◆ operator<<() [4/21]

std::ostream & TrigConf::operator<< ( std::ostream & o,
const HLTSequenceList & sl )

Definition at line 124 of file HLTSequenceList.cxx.

125 {
126 o << "- -- HLTSequenceList printout ------------------------------ " << std::endl;
127 for(TrigConf::HLTSequence* seq : sl) o << *seq;
128 o << "- ---------------------------------------------------------- " << std::endl;
129 return o;
130}
HLT sequence configuration information.
Definition HLTSequence.h:28

◆ operator<<() [5/21]

std::ostream & TrigConf::operator<< ( std::ostream & o,
const HLTSignature & s )

Definition at line 72 of file HLTSignature.cxx.

73 {
74 o << "signature: " << s.signature_counter() << " (logic=" << s.logic() << ")" << endl;
75 o << "outputTE(s)";
76
77 for( HLTTriggerElement* te : s.m_outputTEs ) {
78 o << ", ";
79 if( te!=0 ) o << *te; else o << "(0)";
80 }
81 o << endl;
82 return o;
83}

◆ operator<<() [6/21]

std::ostream & TrigConf::operator<< ( std::ostream & o,
const HLTTriggerElement & te )

Definition at line 55 of file HLTTriggerElement.cxx.

56 {
57 o << "(\"" << te.name() << "\", " << te.m_hashId << ")";
58 return o;
59}
unsigned int m_hashId
trigger element id
const std::string & name() const

◆ operator<<() [7/21]

std::ostream & TrigConf::operator<< ( std::ostream & o,
const HLTTriggerType & tt )

Definition at line 18 of file HLTTriggerType.cxx.

19 {
20 o << "- -- HLTTriggerType bit : " << tt.m_bit << std::endl;
21 return o;
22}

◆ operator<<() [8/21]

std::ostream & TrigConf::operator<< ( std::ostream & o,
const TrigConf::HLTPrescale & c )

Definition at line 52 of file HLTPrescale.cxx.

53 {
54
55 o << "Prescale: " << setw(4) << c.prescale()
56 << ", pass-through: " << setw(4) << c.pass_through()
57 << endl;
58 return o;
59}

◆ operator<<() [9/21]

std::ostream & TrigConf::operator<< ( std::ostream & o,
const TrigConf::HLTPrescaleSet & c )

Definition at line 147 of file HLTPrescaleSet.cxx.

148 {
149 o << "HLTPrescaleSet " << c.name();
150 if(c.id()>0 || c.version()>0) o << " (id=" << c.id() << "/v=" << c.version() << ")";
151 o << endl;
152 if(c.comment()!="") o << "Comment : " << c.comment() << endl;
153
154 for(unsigned int i = TrigConf::L2; i <= TrigConf::HLT; i++) {
156 if(c.size(level)==0) continue;
157 o << (level==TrigConf::L2?"L2":"EF") << " prescales:" << endl;
158 for(const TrigConf::HLTPrescaleSet::ScalingMap_t::value_type& sc: c.getPrescales(level)) {
159 o << "Chain counter: " << setw(4) << sc.first
160 << ", prescale: " << setw(4) << sc.second.prescale()
161 << ", pass-through: " << setw(4) << sc.second.pass_through()
162 << endl;
163 }
164 }
165 o << "---------------------------------------------------------- " << endl;
166 return o;
167}
static Double_t sc

◆ operator<<() [10/21]

std::ostream & TrigConf::operator<< ( std::ostream & o,
const TrigConf::HLTPrescaleSetCollection & c )

Definition at line 184 of file HLTPrescaleSetCollection.cxx.

185 {
186 lock_guard<recursive_mutex> lock(c.m_prescaleSetCollection_mutex);
187 o << "HLTPrescaleSetCollection has " << c.size() << " prescale sets" << endl;
188 if(c.size()>0) {
189 o << " LB Prescale set key Loaded Prescale set" << endl;
190 for(const TrigConf::HLTPrescaleSetCollection::cont& psinfo : c.m_prescaleSets)
191 o << setw(9) << psinfo.lb << setw(19) << psinfo.psk << " " << (psinfo.pss!=0?"yes":" no")
192 << " " << (psinfo.pss!=0?psinfo.pss->name():"") << endl;
193 }
194 return o;
195}

◆ operator<<() [11/21]

std::ostream & TrigConf::operator<< ( std::ostream & o,
const TrigConf::HLTStreamTag & st )

Definition at line 58 of file HLTStreamTag.cxx.

59 {
60 int dp = o.precision();
61 o << "HLTStreamTag "
62 << "stream: '" << st.m_stream
63 << "' type: '" << st.m_type
64 << "' obeyLB: '" << (st.m_obeyLB?"yes":"no");
65 o.precision(3);
66 o.setf(std::ios::fixed, std::ios::floatfield);
67 o << "' prescale: " << st.m_prescale
68 << std::endl;
69 o.precision(dp);
70 return o;
71}

◆ operator<<() [12/21]

std::ostream & TrigConf::operator<< ( std::ostream & o,
const TrigConf::TriggerItem & item )

Definition at line 158 of file TriggerItem.cxx.

159 {
160 o << "TriggerItem: " << (const TrigConfData&)item;
161 o << " Complex Deadtime: " << item.m_ComplexDeadtime << endl;
162 o << " Definition: " << item.m_Definition << endl;
163 o << " CTP_id: " << item.m_CtpId << endl;
164 o << " TriggerType(hex): " << hex << item.m_TriggerType << dec << endl;
165 if (item.topNode()) o << *item.topNode();
166 else o << " No TopNode" << endl;
167 return o;
168}

◆ operator<<() [13/21]

std::ostream & TrigConf::operator<< ( std::ostream & o,
const TrigConfData & data )

Definition at line 41 of file TrigConfData.cxx.

42 {
43 o << data.name();
44 if(data.id()>0 || data.version()>0)
45 o << " (id=" << data.id() << "/v=" << data.version() << ")";
46 return o;
47}
char data[hepevt_bytes_allocation_ATLAS]
Definition HepEvt.cxx:11

◆ operator<<() [14/21]

std::ostream & TrigConf::operator<< ( std::ostream & o,
const TrigConf::HLTChainList & c )

Definition at line 189 of file HLTChainList.cxx.

190 {
191 o << "- -- HLTChainList [" << cl.size() << " chains] -------------------------------- " << std::endl;
192 for(TrigConf::HLTChain* ch : cl)
193 o << *ch;
194 o << "- ---------------------------------------------------------- " << std::endl;
195 return o;
196}
HLT chain configuration information.

◆ operator<<() [15/21]

std::ostream & TrigConf::operator<< ( std::ostream & o,
const TrigConf::TriggerItemNode & node )

Definition at line 308 of file TriggerItemNode.cxx.

309 {
310 o << " TriggerItemNode: " << endl;
311 o << " type : " << (node.type()==TriggerItemNode::OBJ? "OBJ" : (node.type()==TriggerItemNode::AND?"AND":(node.type()==TriggerItemNode::OR?"OR":"NOT"))) << endl;
312 o << " position : " << node.position() << endl;
313
314 if (node.type() == TriggerItemNode::OBJ) {
315 o << " multiplicity: " << node.multiplicity() << endl;
316 if ( node.triggerThreshold() ) {
317 o << " threshold : " << node.thresholdName() << endl
318 << node.triggerThreshold();
319 } else if( node.isInternalTrigger() ) {
320 o << " InternalTrigger: " << node.thresholdName() << endl;
321 } else {
322 o << node.thresholdName() << endl;
323 }
324 }
325 else {
326 for(TriggerItemNode* subnode: node.children()) {
327 o << " subnodes : " << *subnode << endl;
328 }
329 }
330 return o;
331}
node * subnode(node *np, const std::string &name)
check whether a subnode with this name already exists
Definition addnode.cxx:20
Definition node.h:24
void type(TYPE t)
Definition node.h:51

◆ operator<<() [16/21]

std::ostream & TrigConf::operator<< ( std::ostream & os,
const TrigConf::IsolationLegacy & iso )

Definition at line 338 of file L1ThresholdBase.cxx.

339 {
340 os << "isolation bit " << iso.isobit() << ": offset=" << iso.offset() << ", slope=" << iso.slope()
341 << ", mincut=" << iso.mincut() << ", upperlimit=" << iso.upperlimit()
342 << ", etamin=" << iso.etamin() << ", etamax=" << iso.etamax() << ", priority=" << iso.priority();
343 return os;
344}

◆ operator<<() [17/21]

std::ostream & TrigConf::operator<< ( std::ostream & os,
const TrigConf::L1ThrExtraInfo_cTAU::WorkingPoints_cTAU & iso )

Definition at line 484 of file L1ThrExtraInfo.cxx.

485 {
486 os << "isolation_fw=" << iso.isolation_fw() << ", isolation_jTAUCoreScale_fw=" << iso.isolation_jTAUCoreScale_fw();
487 os << ", eTAU_rCoreMin_WP_fw=" << iso.eTAU_rCoreMin_WP_fw() << ", eTAU_rHadMin_WP_fw=" << iso.eTAU_rHadMin_WP_fw();
488 return os;
489}

◆ operator<<() [18/21]

std::ostream & TrigConf::operator<< ( std::ostream & os,
const TrigConf::L1ThrExtraInfo_eEM::WorkingPoints_eEM & iso )

Definition at line 294 of file L1ThrExtraInfo.cxx.

295 {
296 os << "reta_fw=" << iso.reta_fw() << ", wstot_fw=" << iso.wstot_fw() << ", rhad_fw=" << iso.rhad_fw();
297 return os;
298}

◆ operator<<() [19/21]

std::ostream & TrigConf::operator<< ( std::ostream & os,
const TrigConf::L1ThrExtraInfo_eTAU::WorkingPoints_eTAU & iso )

Definition at line 388 of file L1ThrExtraInfo.cxx.

389 {
390 os << "rCore_fw=" << iso.rCore_fw() << ", rHad_fw=" << iso.rHad_fw() ;
391 return os;
392}

◆ operator<<() [20/21]

std::ostream & TrigConf::operator<< ( std::ostream & os,
const TrigConf::L1ThrExtraInfo_jEM::WorkingPoints_jEM & iso )

Definition at line 338 of file L1ThrExtraInfo.cxx.

339 {
340 os << "iso_fw=" << iso.iso_fw() << ", frac_fw=" << iso.frac_fw() << ", frac2_fw=" << iso.frac2_fw();
341 return os;
342}

◆ operator<<() [21/21]

std::ostream & TrigConf::operator<< ( std::ostream & os,
const TrigConf::L1ThrExtraInfo_jTAU::WorkingPoints_jTAU & iso )

Definition at line 430 of file L1ThrExtraInfo.cxx.

431 {
432 os << "isolation_fw=" << iso.isolation_fw() ;
433 return os;
434}

◆ parse() [1/2]

TrigConf::TriggerItemNode * TrigConf::parse ( const std::string & logic,
const std::vector< std::string > & conditions,
const std::vector< TrigConf::TriggerThreshold * > & thrs )

Definition at line 243 of file Trigger/TrigConfiguration/TrigConfL1Data/Root/HelperFunctions.cxx.

245 {
246
247 // balance expression
248 std::string expr = insertParenthesis(givenlogic);
249
250 // parse
251 TriggerItemNode* topNode = parseExpr(expr, conditions, thrs);
252
253 // wrap in an AND
254 if( topNode->type() != TriggerItemNode::AND) {
256 newNode->addChild(topNode);
257 topNode = newNode;
258 }
259
260 return topNode;
261}
void addChild(TriggerItemNode *node)
std::string insertParenthesis(const std::string &givenlogic)

◆ parse() [2/2]

std::vector< std::string > TrigConf::parse ( std::string names)

Definition at line 117 of file TrigConfHLTData/Root/HLTChain.cxx.

117 {
118 std::erase(names,' ');
119 return TrigConf::split(names,",");
120 }

◆ prepareTriggerMenu() [1/2]

StatusCode TrigConf::prepareTriggerMenu ( const HLTMenu & loadedHlt,
const L1Menu & loadedL1,
const HLTPrescalesSet & loadedHltps,
const L1PrescalesSet & loadedL1ps,
const L1BunchGroupSet & loadedBgSet,
CTPConfig & ctpConfig,
HLTChainList & chainList,
HLTSequenceList & sequenceList,
BunchGroupSet & bgSet,
MsgStream & msg )

Load JSON derived data into legacy structures to maintain compatiblity with existing code.

Parameters
loadedHltThe incoming HLT trigger menu object to translate
loadedL1The incoming L1 trigger menu object to translate
loadedHltpsThe incoming HLT prescales menu object to translate
loadedL1psThe incoming L1 prescales menu object to translate
loadedBgThe incoming bunchgroup object to translate
ctpConfigThe LVL1 configuration object to fill
chainListThe HLT configuration object to fill
bgSetThe bunch structure configuration object to fill
msgMsgStream to print messages to
Returns
StatusCode::SUCCESS if successful, StatusCode::FAILURE if not

Definition at line 303 of file prepareTriggerMenu.cxx.

312 {
313
314 // Clear the current LVL1 configuration:
315 ctpConfig.menu().clear();
316 ctpConfig.clearPrescaleSets();
317 ctpConfig.prescaleSet().resize( 512 );
318
319 if (loadedL1.isInitialized()) {
320 // Fill the LVL1 configuration:
321 for (const L1Item& loadedItem : loadedL1) {
322 TriggerItem* item = new TriggerItem();
323 item->setName( loadedItem.name() );
324 item->setCtpId( loadedItem.ctpId() );
325 ctpConfig.menu().addTriggerItem( item );
326
327 float ps = -1.0;
328 if (loadedL1ps.isInitialized()) {
329 const L1PrescalesSet::L1Prescale& loadedPrescale = loadedL1ps.prescale( loadedItem.name() );
330 ps = loadedPrescale.enabled ? static_cast< float >( loadedPrescale.prescale ) : -1.0;
331 }
332 ctpConfig.prescaleSet().setPrescale( loadedItem.ctpId(), ps );
333
334 if( msg.level() <= MSG::VERBOSE ) {
335 msg << MSG::VERBOSE << "L1 item " << loadedItem.name()
336 << " has ctpid " << loadedItem.ctpId()
337 << " and prescale " << ps
338 << endmsg;
339 }
340 }
341 }
342
343 // Clear the current HLT configuration:
344 chainList.clear();
345 sequenceList.clear();
346
347 // Fill the HLT configuration:
348 if (loadedHlt.isInitialized()) {
349 for (const Chain& loadedChain : loadedHlt) {
350 // Figure out which level this chain is from:
351 std::string level = "";
352 if( loadedChain.name().find( "L2_" ) == 0 ) {
353 level = "L2";
354 } else if( loadedChain.name().find( "EF_" ) == 0 ) {
355 level = "EF";
356 } else if( loadedChain.name().find( "HLT_" ) == 0 ) {
357 level = "HLT";
358 } else {
359 msg << MSG::WARNING << "prepareTriggerMenu(...): "
360 << "Couldn't figure out 'level' for chain: "
361 << loadedChain.name() << endmsg;
362 }
363
364 // An empty signature list for the chain:
365 std::vector< HLTSignature* > signatures;
366
367 // Optional Run2 payload
368 std::vector<uint32_t> counters;
369 std::vector<int> logics;
370 std::vector<std::vector<std::string>> outputTEs;
371 if (loadedChain.hasChild("signature")) {
372 counters = ToVector<uint32_t>(loadedChain, "signature.counters");
373 logics = ToVector<int>(loadedChain, "signature.logics");
374 outputTEs = ToVectorVector<std::string>(loadedChain, "signature.outputTEs");
375 }
376
377 for( size_t sig = 0; sig < counters.size(); ++sig ) {
378 std::vector< HLTTriggerElement* > outTEs;
379 outTEs.reserve(outputTEs[ sig ].size());
380 for( size_t outTEcounter = 0; outTEcounter< outputTEs[ sig ].size(); ++outTEcounter ) {
381 HLTTriggerElement* element = new HLTTriggerElement( outputTEs[ sig ][ outTEcounter ] );
382 outTEs.push_back( element );
383 }
384 HLTSignature* signature = new HLTSignature( counters[ sig ], logics[ sig ], std::move(outTEs) );
385 signatures.push_back( signature );
386 if( msg.level() <= MSG::VERBOSE ) {
387 msg << MSG::VERBOSE << "prepared signature: " << *( signatures.back() ) << endmsg;
388 }
389 }
390
391 // Create the chain object:
392 HLTChain* chain = new HLTChain( loadedChain.name(),
393 loadedChain.counter(),
394 1, // Chain version not important
395 level,
396 loadedChain.l1item(), // L1 seeds (string)
397 -1, // Lower chain ID not important
398 std::move(signatures) ); // Empty for R3 JSONs
399
400 chain->set_rerun_prescale( -1.0 ); // Not used in R3
401 chain->set_pass_through( -1.0 ); // Not used in R3
402 chain->set_leg_multiplicities( loadedChain.legMultiplicities() );
403
404 for (const std::string& group : loadedChain.groups()){
405 chain->addGroup(group);
406 }
407
408 float ps = -1.0;
409 if (loadedHltps.isInitialized()) {
410 const HLTPrescalesSet::HLTPrescale& loadedPrescale = loadedHltps.prescale( loadedChain.name() );
411 ps = loadedPrescale.enabled ? static_cast< float >( loadedPrescale.prescale ) : -1.0;
412 }
413 chain->set_prescale( ps );
414
415 if( msg.level() <= MSG::VERBOSE ) {
416 msg << MSG::VERBOSE << "chain " << loadedChain.name()
417 << " has counter " << loadedChain.counter()
418 << ", HLT prescale " << ps
419 << ", groups " << loadedChain.groups().size() << ", legs " << loadedChain.legMultiplicities().size()
420 << ", and " << counters.size() << " signatures (runs 1,2 only) " << endmsg;
421 }
422
423 // Add it to the list of chains:
424 if( ! chainList.addHLTChain( chain ) ) {
425 msg << MSG::FATAL << "prepareTriggerMenu(...): "
426 << "Couldn't add chain \"" << chain->name()
427 << "\"" << endmsg;
428 delete chain;
429 return StatusCode::FAILURE;
430 }
431 }
432 }
433
434 // Add sequence information if it's available (R1 or R2 menu):
435 if( loadedHlt.hasChild("sequence_run2") ) {
436 std::vector<std::string> menu_outputTEs = ToVector<std::string>(loadedHlt, "sequence_run2.outputTEs");
437 std::vector<std::vector<std::string>> menu_inputTEs = ToVectorVector<std::string>(loadedHlt, "sequence_run2.inputTEs");
438 std::vector<std::vector<std::string>> menu_algorithms = ToVectorVector<std::string>(loadedHlt, "sequence_run2.algorithms");
439
440 for( size_t i = 0; i< menu_outputTEs.size(); ++i ) {
441 HLTTriggerElement* outputTE = new HLTTriggerElement( menu_outputTEs[ i ] );
442 std::vector< HLTTriggerElement* > inputTEs;
443 for( size_t j = 0; j < menu_inputTEs[ i ].size(); ++j ) {
444 HLTTriggerElement* te = new HLTTriggerElement( menu_inputTEs[ i ][ j ] );
445 inputTEs.push_back( te );
446 }
447 HLTSequence* sequence = new HLTSequence( inputTEs, outputTE, menu_algorithms[ i ] );
448 sequenceList.addHLTSequence( sequence );
449 // This throws a runtime_error if it fails, which we don't need to
450 // handle, since this is a FATAL error anyways.
451 }
452 }
453
454 // Bunchgroup data is TODO
455 // Create a new BunchGroupSet object, since an existing one can't be
456 // modified... :-/
457 BunchGroupSet bgSetNew;
458
459 // Empty structure if data are missing
460 if (!loadedBgSet) {
461
462 for( size_t i = 0; i < 16; ++i ) {
464 bg.setInternalNumber(i);
465 bgSetNew.addBunchGroup(bg);
466 }
467
468 } else {
469
470 // Fill it with info:
471 for( size_t i = 0; i < loadedBgSet.size(); ++i ) {
472
473 const std::shared_ptr<L1BunchGroup> loadedBg = loadedBgSet.getBunchGroup(i);
474
475 // Create a BunchGroup object:
477 bg.setInternalNumber(i);
478
479 // Not the most efficient of copies, but one format has 16 bit ints whereas the other has 32 bit ints.
480 for (const uint16_t b : loadedBg->bunches()) {
481 bg.addBunch( static_cast<int>(b) );
482 }
483
484 // Add it to the set:
485 bgSetNew.addBunchGroup(bg);
486 }
487
488 }
489
490 static_assert(std::is_move_assignable<BunchGroupSet>::value);
491 // Replace the current bunch-group set with the new one:
492 bgSet = std::move(bgSetNew);
493
494 // Return gracefully:
495 return StatusCode::SUCCESS;
496 }
#define endmsg
const Menu & menu() const
Definition CTPConfig.h:38
const PrescaleSet & prescaleSet(unsigned int partition=0) const
Definition CTPConfig.h:39
bool addHLTChain(HLTChain *ch)
adds an HLTChain to the menu
const HLTPrescale & prescale(const std::string &chainName) const
HLT prescales by chain names.
void addHLTSequence(HLTSequence *sequence)
adds an HLTSequence to the menu
HLT signature configuration information.
std::size_t size() const
Accessor to the number of defined bunchgroups.
const std::shared_ptr< L1BunchGroup > & getBunchGroup(const std::string &name) const
Accessor to the bunchgroup by name.
L1 threshold configuration.
Definition L1Item.h:18
const L1Prescale & prescale(const std::string &itemName) const
void addTriggerItem(TriggerItem *ti)
Definition Menu.cxx:48
void clear()
Definition Menu.cxx:160
void setPrescale(unsigned int num, int64_t prescaleValue) __attribute__((deprecated))
Set the prescale NUM from the int64 value prescaleValue.
void resize(size_t size)
std::vector< std::string > signatures(const std::string &chain)
std::vector< std::vector< T > > ToVectorVector(const TrigConf::DataStructure &ds, const std::string &child)
Helper function ptree key->[[]] to std::vector<std::vector<T>>
std::vector< T > ToVector(const TrigConf::DataStructure &ds, const std::string &child)
Helper function ptree key->[] to std::vector<T>
MsgStream & msg
Definition testRead.cxx:32

◆ prepareTriggerMenu() [2/2]

StatusCode TrigConf::prepareTriggerMenu ( const xAOD::TriggerMenu * menu,
CTPConfig & ctpConfig,
HLTChainList & chainList,
HLTSequenceList & sequenceList,
BunchGroupSet & bgSet,
MsgStream & msg )

In order to avoid duplicating code between how the dual-use and the Athena-only code translates the xAOD metadata into the transient trigger configuration information, this function is used by both to achieve this.

Function providing translation for the transient configuration from the R2 AOD format.

Parameters
menuThe persistent trigger menu object to translate
ctpConfigThe LVL1 configuration object to fill
chainListThe HLT configuration object to fill
bgSetThe bunch structure configuration object to fill
msgMsgStream to print messages to
Returns
StatusCode::SUCCESS if successful, StatusCode::FAILURE if not

Definition at line 47 of file prepareTriggerMenu.cxx.

52 {
53
54 // A little sanity check:
55 if( ( ! menu->hasStore() ) && ( ( ! menu->container() ) ||
56 ( ! menu->container()->hasStore() ) ) ) {
57 msg << MSG::FATAL << "prepareTriggerMenu(...) Received "
58 << "xAOD::TriggerMenu object is not connected to an auxiliary "
59 << "store" << endmsg;
60 return StatusCode::FAILURE;
61 }
62
63 // Clear the current LVL1 configuration:
64 ctpConfig.menu().clear();
65 ctpConfig.clearPrescaleSets();
66 ctpConfig.prescaleSet().resize( 512 );
67
68 // Fill the LVL1 configuration:
69 for( size_t i = 0; i < menu->itemCtpIds().size(); ++i ) {
70 TriggerItem* item = new TriggerItem();
71 item->setName( menu->itemNames()[ i ] );
72 item->setCtpId( menu->itemCtpIds()[ i ] );
73 ctpConfig.menu().addTriggerItem( item );
74 if( menu->itemPrescalesAvailable() ) {
75 ctpConfig.prescaleSet().setPrescale( menu->itemCtpIds()[ i ],
76 static_cast< float >( menu->itemPrescales()[ i ] ) );
77 }
78 if( msg.level() <= MSG::VERBOSE ) {
79 msg << MSG::VERBOSE << "L1 item " << menu->itemNames()[ i ]
80 << " has ctpid " << menu->itemCtpIds()[ i ] << endmsg;
81 }
82 }
83
84 // Clear the current HLT configuration:
85 chainList.clear();
86 sequenceList.clear();
87
88 // A helper variable:
89 bool signatureWarningPrinted = false;
90
91 // Fill the HLT configuration:
92 for( size_t i = 0; i < menu->chainIds().size(); ++i ) {
93
94 // Figure out which level this chain is from:
95 std::string level = "";
96 if( menu->chainNames()[ i ].find( "L2_" ) == 0 ) {
97 level = "L2";
98 } else if( menu->chainNames()[ i ].find( "EF_" ) == 0 ) {
99 level = "EF";
100 } else if( menu->chainNames()[ i ].find( "HLT_" ) == 0 ) {
101 level = "HLT";
102 } else {
103 msg << MSG::WARNING << "prepareTriggerMenu(...): "
104 << "Couldn't figure out 'level' for chain: "
105 << menu->chainNames()[ i ] << endmsg;
106 }
107 // An empty signature list for the chain:
108 std::vector< HLTSignature* > signatures;
109
110 // If signature information is available, read it in:
111 if( menu->chainSignatureCountersAvailable() &&
112 menu->chainSignatureCounters().size() &&
113 menu->chainSignatureLogicsAvailable() &&
114 menu->chainSignatureLogics().size() &&
115 menu->chainSignatureOutputTEsAvailable() &&
116 menu->chainSignatureOutputTEs().size() /*&&
117 menu->chainSignatureLabelsAvailable() &&
118 menu->chainSignatureLabels().size() */) {
119
120 const std::vector< uint32_t >& counters =
121 menu->chainSignatureCounters()[ i ];
122 const std::vector< int >& logics =
123 menu->chainSignatureLogics()[ i ];
124 const std::vector< std::vector< std::string > >& outputTEs =
125 menu->chainSignatureOutputTEs()[ i ];
126 /*
127 const std::vector< std::string >& labels =
128 menu->chainSignatureLabels()[ i ];
129 */
130
131 if( msg.level() <= MSG::VERBOSE ) {
132 msg << MSG::VERBOSE << "chain " << menu->chainNames()[ i ]
133 << " has counter " << menu->chainIds()[ i ]
134 << " and " << counters.size() << " signatures" << endmsg;
135 }
136 for( size_t sig = 0; sig < counters.size(); ++sig ) {
137 std::vector< HLTTriggerElement* > outTEs;
138 outTEs.reserve(outputTEs[ sig ].size());
139 for( size_t outTEcounter = 0;
140 outTEcounter< outputTEs[ sig ].size(); ++outTEcounter ) {
141 HLTTriggerElement* element =
142 new HLTTriggerElement( outputTEs[ sig ][ outTEcounter ] );
143 outTEs.push_back( element );
144 }
145 HLTSignature* signature =
146 new HLTSignature( counters[ sig ], logics[ sig ], std::move(outTEs) );
147 signatures.push_back( signature );
148 if( msg.level() <= MSG::VERBOSE ) {
149 msg << MSG::VERBOSE << "prepared signature: "
150 << *( signatures.back() ) << endmsg;
151 }
152 }
153 } else if( ! signatureWarningPrinted ) {
154 msg << MSG::WARNING << "prepareTriggerMenu(...): "
155 << "HLT Signature information not available on the input"
156 << endmsg;
157 signatureWarningPrinted = true;
158 }
159
160 // Create the chain object:
161 HLTChain* chain = new HLTChain( menu->chainNames()[ i ],
162 menu->chainIds()[ i ],
163 1, // Chain version not important
164 level,
165 menu->chainParentNames()[ i ],
166 -1, // Lower chain ID not important
167 std::move(signatures) );
168 if( menu->chainRerunPrescalesAvailable() ) {
169 chain->set_rerun_prescale( menu->chainRerunPrescales()[ i ] );
170 }
171 if( menu->chainPassthroughPrescalesAvailable() ) {
172 chain->set_pass_through( menu->chainPassthroughPrescales()[ i ] );
173 }
174 if ( menu->chainPrescalesAvailable() ) {
175 chain->set_prescale( menu->chainPrescales()[ i ]);
176 }
177 {
178 auto parsed_multiplicities = ChainNameParser::multiplicities(menu->chainNames()[ i ]);
179 std::vector<long unsigned int> leg_multiplicities(parsed_multiplicities.begin(), parsed_multiplicities.end());
180 chain->set_leg_multiplicities( leg_multiplicities );
181 }
182 // Add it to the list of chains:
183 if( ! chainList.addHLTChain( chain ) ) {
184 msg << MSG::FATAL << "prepareTriggerMenu(...): "
185 << "Couldn't add chain \"" << chain->name()
186 << "\"" << endmsg;
187 delete chain;
188 return StatusCode::FAILURE;
189 }
190 }
191
192 // Add sequence information if it's available:
193 if( menu->sequenceInputTEsAvailable() &&
194 menu->sequenceOutputTEsAvailable() &&
195 menu->sequenceAlgorithmsAvailable() ) {
196
197 for( size_t i = 0; i< menu->sequenceOutputTEs().size(); ++i ) {
198 HLTTriggerElement* outputTE =
199 new HLTTriggerElement( menu->sequenceOutputTEs()[ i ] );
200 std::vector< HLTTriggerElement* > inputTEs;
201 for( size_t j = 0; j < menu->sequenceInputTEs()[ i ].size(); ++j ) {
203 new HLTTriggerElement( menu->sequenceInputTEs()[ i ][ j ] );
204 inputTEs.push_back( te );
205 }
206 HLTSequence* sequence =
207 new HLTSequence( inputTEs, outputTE,
208 menu->sequenceAlgorithms()[ i ] );
209 sequenceList.addHLTSequence( sequence );
210 // This throws a runtime_error if it fails, which we don't need to
211 // handle, since this is a FATAL error anyways.
212 }
213 } else {
214 msg << MSG::WARNING << "prepareTriggerMenu(...): "
215 << "HLT Sequence information not available on the input" << endmsg;
216 }
217
218 // Check if bunch-groups are available:
219 if( menu->bunchGroupBunchesAvailable() ) {
220
221 // Create a new BunchGroupSet object, since an existing one can't be
222 // modified... :-/
223 BunchGroupSet bgSetNew;
224
225 // Fill it with info:
226 for( size_t i = 0; i < menu->bunchGroupBunches().size(); ++i ) {
227
228 // Create a BunchGroup object:
230 bg.setInternalNumber( i );
231 std::vector< uint16_t >::const_iterator b_itr =
232 menu->bunchGroupBunches()[ i ].begin();
233 std::vector< uint16_t >::const_iterator b_end =
234 menu->bunchGroupBunches()[ i ].end();
235 for( ; b_itr != b_end; ++b_itr ) {
236 bg.addBunch( *b_itr );
237 }
238
239 // Add it to the set:
240 bgSetNew.addBunchGroup( bg );
241 }
242
243 // Replace the current bunch-group set with the new one:
244 bgSet = bgSetNew;
245
246 } else {
247 msg << MSG::WARNING << "prepareTriggerMenu(...): "
248 << "Bunch-group information not available on the "
249 << "input" << endmsg;
250 }
251
252 // Let the user know what happened:
253 msg << MSG::INFO << "Loaded xAOD::TriggerMenu configuration:" << endmsg;
254 msg << MSG::INFO << " SMK = " << menu->smk()
255 << ", L1PSK = " << menu->l1psk()
256 << ", HLTPSK = " << menu->hltpsk() << endmsg;
257
258 // Return gracefully:
259 return StatusCode::SUCCESS;
260 }
make the sidebar many part of the config
Definition hcg.cxx:552
std::vector< int > multiplicities(const std::string &chain)

◆ printTable()

void TrigConf::printTable ( const coral::ITable & teTable)

Definition at line 21 of file DBHelper.cxx.

21 {
22 const coral::ITableDescription & desc = table.description();
23 for(int i=0; i<desc.numberOfColumns(); ++i) {
24 const coral::IColumn & col = desc.columnDescription(i);
25 std::cout << " " << col.name() << std::endl;
26 }
27}

◆ recursivelyFindOutputTEs()

void TrigConf::recursivelyFindOutputTEs ( const std::string & tename,
const TrigConf::HLTSequenceList & sequenceList,
std::set< std::string > & tes,
int level,
const std::set< std::string > * veto = 0 )

Definition at line 66 of file TrigConfHLTData/Root/HLTUtils.cxx.

71 {
72 if ( veto && veto->find(tename) != veto->end() ) return;
73 TrigConf::HLTSequence* seq = sequenceList.getSequence(tename);
74 if ( seq==0 ) return;
75
76 if(level==2) seq->setL2();
77 else if(level==3) seq->setEF();
78 else if(level==4) seq->setHLT();
79
80 tes.insert(tename);
81 for( TrigConf::HLTTriggerElement* te : seq->inputTEs() )
82 recursivelyFindOutputTEs( te->name(), sequenceList, tes, level, veto);
83 }
HLTSequence * getSequence(unsigned int id) const
counts the number of sequences in the menu
std::vector< std::string > veto
these patterns are anded
Definition listroot.cxx:191
void recursivelyFindOutputTEs(const std::string &tename, const TrigConf::HLTSequenceList &sequenceList, std::set< std::string > &tes, int level, const std::set< std::string > *veto=0)

◆ recursivelyFindOutputTEsWithLevelFromSequence()

void TrigConf::recursivelyFindOutputTEsWithLevelFromSequence ( const std::string & tename,
const TrigConf::HLTSequenceList & sequenceList,
std::set< std::string > & tes,
int level )

Definition at line 86 of file TrigConfHLTData/Root/HLTUtils.cxx.

88 {
89
90 // check if sequence exists that outputs this TE
91 const TrigConf::HLTSequence* seq = sequenceList.getSequence(tename);
92 if ( seq==0 ) return;
93
94 // it must know in which level it is running
95 if(! seq->isSet()) {
96 std::stringstream str;
97 str << "Sequence " << seq->outputTE()->name() << " has no level set " << std::endl;
98 throw std::runtime_error(str.str());
99 }
100
101 // it must be the level that is requested
102 if( (level==2 && !seq->inL2()) || (level==3 && !seq->inEF()) || (level==4 && !seq->inHLT()) ) return;
103
104 // now insert the te and continue to check
105 tes.insert(tename);
106 for( TrigConf::HLTTriggerElement* te : seq->inputTEs() )
107 recursivelyFindOutputTEsWithLevelFromSequence( te->name(), sequenceList, tes, level);
108 }
void recursivelyFindOutputTEsWithLevelFromSequence(const std::string &tename, const TrigConf::HLTSequenceList &sequenceList, std::set< std::string > &tes, int level)

◆ replaceTabs()

void TrigConf::replaceTabs ( std::string & str)

Definition at line 38 of file Trigger/TrigConfiguration/TrigConfL1Data/Root/HelperFunctions.cxx.

38 {
39 std::replace(str.begin(), str.end(), '\t', ' ');
40}

◆ rmtilde()

std::string TrigConf::rmtilde ( const std::string & input)
inline

Definition at line 24 of file DBHelper.h.

24{ return input=="~" ? "" : input; }

◆ split()

std::vector< std::string > TrigConf::split ( const std::string & line,
const std::string & del = " " )

Definition at line 25 of file Trigger/TrigConfiguration/TrigConfL1Data/Root/HelperFunctions.cxx.

25 {
26 std::vector<std::string> res;
27 boost::split(res, line, boost::is_any_of(del));
28 return res;
29}
std::pair< std::vector< unsigned int >, bool > res

◆ str2lvl()

HLTLevel TrigConf::str2lvl ( const std::string & level)
inline

Definition at line 14 of file HLTLevel.h.

14 {
15 return (level=="L2" || level=="l2") ? L2 :
16 ((level=="EF" || level=="ef") ? EF : HLT);
17 }

◆ stringToPtree()

void TrigConf::stringToPtree ( const std::string & json_string,
boost::property_tree::ptree & pt )

Definition at line 65 of file TrigDBHelper.cxx.

65 {
66 boost::iostreams::array_source source(json_string.data(), json_string.size());
67 boost::iostreams::stream<boost::iostreams::array_source> stream(source);
68 boost::property_tree::read_json(stream, pt);
69}

◆ strip()

void TrigConf::strip ( std::string & str)

Definition at line 33 of file Trigger/TrigConfiguration/TrigConfL1Data/Root/HelperFunctions.cxx.

33 {
34 boost::algorithm::trim(str);
35}

◆ toLower()

void TrigConf::toLower ( std::string & s)

Definition at line 45 of file Trigger/TrigConfiguration/TrigConfL1Data/Root/HelperFunctions.cxx.

45 {
46 for(size_t i=0; i<s.size(); i++) s[i] += (s[i]>='A'&&s[i]<='Z')?'a'-'A':0;
47}

◆ ToVector()

template<typename T>
std::vector< T > TrigConf::ToVector ( const TrigConf::DataStructure & ds,
const std::string & child )

Helper function ptree key->[] to std::vector<T>

Definition at line 265 of file prepareTriggerMenu.cxx.

265 {
266 using ptree = boost::property_tree::ptree;
267 std::vector<T> return_vector;
268 for( const ptree::value_type& entry : ds.data().get_child(child) ) {
269 return_vector.push_back( entry.second.get_value<T>() );
270 }
271 return return_vector;
272 }
boost::property_tree::ptree ptree

◆ ToVectorVector()

template<typename T>
std::vector< std::vector< T > > TrigConf::ToVectorVector ( const TrigConf::DataStructure & ds,
const std::string & child )

Helper function ptree key->[[]] to std::vector<std::vector<T>>

Definition at line 276 of file prepareTriggerMenu.cxx.

276 {
277 using ptree = boost::property_tree::ptree;
278 std::vector<std::vector<T>> return_vector;
279 for( const ptree::value_type& outer : ds.data().get_child(child) ) {
280 return_vector.push_back(std::vector<T>());
281 for (const ptree::value_type& inner : outer.second) {
282 return_vector.back().push_back( inner.second.get_value<T>() );
283 }
284 }
285 return return_vector;
286 }

◆ truncatedHash() [1/2]

uint32_t TrigConf::truncatedHash ( const DataStructure & dataStructure)

Function to compute a truncated MD5 hash for a JSON file.

Trigger keys must be uint32_t whereas a MD5 is 128 bit. Used to generate a unique key for each MC JSON file to preserve JSON distinguishability upon merging of AOD files between MC campaigns.

Definition at line 23 of file TrigConfMD5.cxx.

23 {
24 std::stringstream ss;
25 dataStructure.printRaw(ss);
26 return doTruncatedHash(ss);
27 }
void printRaw(std::ostream &os=std::cout) const
uint32_t doTruncatedHash(const std::stringstream &ss)

◆ truncatedHash() [2/2]

uint32_t TrigConf::truncatedHash ( const TrigConf::L1Menu & L1DataStructure,
const TrigConf::HLTMenu & HLTDataStructure )

Function to compute a truncated MD5 hash for a JSON file.

Trigger keys must be uint32_t whereas a MD5 is 128 bit. Used to generate a unique key for both a L1 and HLT menu, mimicking a SMK

Definition at line 30 of file TrigConfMD5.cxx.

30 {
31 std::stringstream ss1;
32 L1DataStructure.printRaw(ss1);
33 std::stringstream ss2;
34 HLTDataStructure.printRaw(ss2);
35 std::stringstream ss_concatonate;
36 ss_concatonate << ss2.str() << ss1.str();
37 return doTruncatedHash(ss_concatonate);
38 }

◆ uint2bin()

std::string TrigConf::uint2bin ( uint32_t uinteger,
uint16_t width )

Definition at line 324 of file Trigger/TrigConfiguration/TrigConfL1Data/Root/HelperFunctions.cxx.

324 {
325 stringstream ss;
326 for(uint32_t mask = 1 << (width-1); mask>0; mask>>=1)
327 ss << ( (value & mask) == 0 ? '0' : '1' );
328
329 return ss.str();
330}
const double width

◆ writeRawFile() [1/2]

void TrigConf::writeRawFile ( const coral::Blob & data,
const std::string & outFileName )

write coral data blob to file

This is used by loader classes to write the DB content to file without going through a ptree

Parameters
data[in] coral blob to be written
outFileName[in] name of file to write out the loaded data (if an empty string, no file will be written)
Exceptions
TrigConf::JsonFileWritingExceptionif writing was successfull

Definition at line 72 of file TrigDBHelper.cxx.

73{
74 try {
75 std::ofstream outFile(outFileName, std::ofstream::binary);
76 if (!outFile) {
77 throw FileWritingException(std::format("Failed to open file {} for writing", outFileName));
78 }
79 outFile.write( static_cast<const char*> ( data.startingAddress()), data.size() );
80 if (!outFile) {
81 throw FileWritingException("Failed to write data to file " + outFileName);
82 }
83 outFile.close();
84 } catch (const std::exception& e) {
85 throw FileWritingException(std::format("Exception while writing file {} : {}", outFileName, e.what()));
86 }
87}
outFile
Comment Out Those You do not wish to run.

◆ writeRawFile() [2/2]

void TrigConf::writeRawFile ( const std::string & data,
const std::string & outFileName )

write string into file

This is used by loader classes to write the DB content from CREST to file without going through a ptree

Parameters
data[in] crest data string to be written
outFileName[in] name of file to write out the loaded data (if an empty string, no file will be written)
Exceptions
TrigConf::JsonFileWritingExceptionif writing was successfull

Definition at line 90 of file TrigDBHelper.cxx.

91{
92 try {
93 std::ofstream outFile(outFileName, std::ofstream::binary);
94 if (!outFile) {
95 throw FileWritingException(std::format("Failed to open file {} for writing", outFileName));
96 }
97 outFile.write(data.data(), data.size());
98 if (!outFile) {
99 throw FileWritingException("Failed to write data to file " + outFileName);
100 }
101 outFile.close();
102 } catch (const std::exception& e) {
103 throw FileWritingException(std::format("Exception while writing file {} : {}", outFileName, e.what()));
104 }
105}

◆ xAODKeysMatch() [1/2]

bool TrigConf::xAODKeysMatch ( const xAOD::TrigConfKeys * keys,
const xAOD::TriggerMenu * menu )

Since this is used in a couple of places, it seemed to make sense to put this simple code into a central place.

Helper function checking if the DB keys match on two objects.

Parameters
keysThe event identifier
menuThe trigger menu
Returns
true if the two objects match each other, false otherwise

Definition at line 20 of file xAODKeysMatch.cxx.

21 {
22
23 return ( ( keys->smk() == menu->smk() ) &&
24 ( keys->l1psk() == menu->l1psk() ) &&
25 ( keys->hltpsk() == menu->hltpsk() ) );
26 }

◆ xAODKeysMatch() [2/2]

bool TrigConf::xAODKeysMatch ( const xAOD::TriggerMenu * menuA,
const xAOD::TriggerMenu * menuB )

Helper function checking if the DB keys match on two objects.

Parameters
menuAOne trigger menu
menuBAnother trigger menu
Returns
true if the two objects match each other, false otherwise

Definition at line 33 of file xAODKeysMatch.cxx.

34 {
35
36 return ( ( menuA->smk() == menuB->smk() ) &&
37 ( menuA->l1psk() == menuB->l1psk() ) &&
38 ( menuA->hltpsk() == menuB->hltpsk() ) );
39 }
uint32_t smk() const
Get the Super Master Key of this configuration.
uint32_t hltpsk() const
Get the HLT prescale key of this configuration.
uint32_t l1psk() const
Get the LVL1 prescale key of this configuration.