ATLAS Offline Software
Functions
Run2toRun3ConvertersHLT.h File Reference
#include "TrigConfData/HLTMenu.h"
#include "TrigConfHLTData/HLTFrame.h"
Include dependency graph for Run2toRun3ConvertersHLT.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void convertRun2HLTMenuToRun3 (const TrigConf::HLTFrame *frame, const std::string &filename)
 
void convertRun2HLTPrescalesToRun3 (const TrigConf::HLTFrame *frame, const std::string &filename)
 

Function Documentation

◆ convertRun2HLTMenuToRun3()

void convertRun2HLTMenuToRun3 ( const TrigConf::HLTFrame frame,
const std::string &  filename 
)

Definition at line 163 of file Run2toRun3ConvertersHLT.cxx.

163  {
165  convertHLTMenu(frame, menu);
166 
168  writer.writeJsonFile(filename, menu);
169 
170 }

◆ convertRun2HLTPrescalesToRun3()

void convertRun2HLTPrescalesToRun3 ( const TrigConf::HLTFrame frame,
const std::string &  filename 
)

Definition at line 172 of file Run2toRun3ConvertersHLT.cxx.

172  {
174  ptree top;
175  top.put("filetype", "hltprescale");
176  top.put("name", frame->name());
177  ptree pChains;
178  for ( auto cptr : frame->getHLTChainList() ) {
179  ptree pChain;
180  pChain.put("name", cptr->chain_name());
181  pChain.put("counter", cptr->chain_counter());
182  pChain.put("hash", cptr->chain_hash_id());
183  pChain.put("prescale", cptr->prescale());
184  pChain.put("enabled", (cptr->prescale()>0 ? true: false));
185 
186  pChains.push_back(std::make_pair(cptr->chain_name(), pChain));
187  }
188  top.add_child("prescales", pChains);
189  TrigConf::HLTPrescalesSet psk(std::move(top));
190 
192  convertHLTMenu(frame, menu);
193 
195  writer.writeJsonFile(filename, menu, psk);
196 }
TrigConf::JsonFileWriterHLT
Loader of trigger configurations from Json files.
Definition: JsonFileWriterHLT.h:22
TrigConf::TrigConfData::name
const std::string & name() const
Definition: TrigConfData.h:22
top
TopConfig A simple configuration that is NOT a singleton.
Definition: AnalysisTrackingHelper.cxx:58
TrigConf::HLTMenu
HLT menu configuration.
Definition: HLTMenu.h:21
convertHLTMenu
bool convertHLTMenu(const TrigConf::HLTFrame *frame, TrigConf::HLTMenu &menu)
Definition: Run2toRun3ConvertersHLT.cxx:57
python.TriggerConfig.menu
menu
Definition: TriggerConfig.py:836
menu
make the sidebar many part of the config
Definition: hcg.cxx:551
ptree
boost::property_tree::ptree ptree
Definition: JsonFileLoader.cxx:16
TrigConf::HLTFrame::getHLTChainList
const HLTChainList & getHLTChainList() const
const accessor to the list of HLT chains
Definition: HLTFrame.h:49
CaloCellTimeCorrFiller.filename
filename
Definition: CaloCellTimeCorrFiller.py:24
top
@ top
Definition: TruthClasses.h:64
TrigConf::HLTPrescalesSet
HLT menu configuration.
Definition: HLTPrescalesSet.h:19
example.writer
writer
show summary of content
Definition: example.py:36