CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions | Private Attributes
L1GtRunSettingsViewer Class Reference

#include <CondTools/L1GtRunSettingsViewer/src/L1GtRunSettingsViewer.cc>

Inheritance diagram for L1GtRunSettingsViewer:
edm::EDAnalyzer edm::EDConsumerBase

Public Member Functions

 L1GtRunSettingsViewer (const edm::ParameterSet &)
 
 ~L1GtRunSettingsViewer () override
 
- Public Member Functions inherited from edm::EDAnalyzer
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzer ()
 
SerialTaskQueueglobalLuminosityBlocksQueue ()
 
SerialTaskQueueglobalRunsQueue ()
 
ModuleDescription const & moduleDescription () const
 
std::string workerType () const
 
 ~EDAnalyzer () override
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
void convertCurrentProcessAlias (std::string const &processName)
 Convert "@currentProcess" in InputTag process names to the actual current process name. More...
 
 EDConsumerBase ()
 
 EDConsumerBase (EDConsumerBase &&)=default
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
ESProxyIndex const * esGetTokenIndices (edm::Transition iTrans) const
 
ProductResolverIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
std::vector< ProductResolverIndexAndSkipBit > const & itemsToGetFrom (BranchType iType) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
void updateLookup (eventsetup::ESRecordsToProxyIndices const &)
 
virtual ~EDConsumerBase () noexcept(false)
 

Private Member Functions

void analyze (const edm::Event &, const edm::EventSetup &) override
 
void beginJob () override
 
void endJob () override
 

Private Attributes

std::string m_maskAlgoKey
 
std::string m_maskTechKey
 
std::string m_maskVetoAlgoKey
 
std::string m_maskVetoTechKey
 
std::string m_prescalesKey
 

Additional Inherited Members

- Public Types inherited from edm::EDAnalyzer
typedef EDAnalyzer ModuleType
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Static Public Member Functions inherited from edm::EDAnalyzer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &)
 
static bool wantsGlobalLuminosityBlocks ()
 
static bool wantsGlobalRuns ()
 
static bool wantsStreamLuminosityBlocks ()
 
static bool wantsStreamRuns ()
 
- Protected Member Functions inherited from edm::EDConsumerBase
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes ()
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 

Detailed Description

Description: <one line="" class="" summary>="">

Implementation: <Notes on="" implementation>="">

Definition at line 56 of file L1GtRunSettingsViewer.cc.

Constructor & Destructor Documentation

◆ L1GtRunSettingsViewer()

L1GtRunSettingsViewer::L1GtRunSettingsViewer ( const edm::ParameterSet iConfig)
explicit

Definition at line 85 of file L1GtRunSettingsViewer.cc.

86  : m_prescalesKey(iConfig.getParameter<std::string>("prescalesKey")),
87  m_maskAlgoKey(iConfig.getParameter<std::string>("maskAlgoKey")),
88  m_maskTechKey(iConfig.getParameter<std::string>("maskTechKey")),
89  m_maskVetoAlgoKey(iConfig.getParameter<std::string>("maskVetoAlgoKey")),
90  m_maskVetoTechKey(iConfig.getParameter<std::string>("maskVetoTechKey")) {
91  //now do what ever initialization is needed
92 }

◆ ~L1GtRunSettingsViewer()

L1GtRunSettingsViewer::~L1GtRunSettingsViewer ( )
override

Definition at line 94 of file L1GtRunSettingsViewer.cc.

94  {
95  // do anything here that needs to be done at desctruction time
96  // (e.g. close files, deallocate resources etc.)
97 }

Member Function Documentation

◆ analyze()

void L1GtRunSettingsViewer::analyze ( const edm::Event iEvent,
const edm::EventSetup iSetup 
)
overrideprivatevirtual

Implements edm::EDAnalyzer.

Definition at line 104 of file L1GtRunSettingsViewer.cc.

104  {
105  using namespace edm;
106 
107  // Utility class
108  l1t::DataWriter dataWriter;
109 
110  // Get most recent L1TriggerKeyList
111  L1TriggerKeyList keyList;
112  dataWriter.fillLastTriggerKeyList(keyList);
113 
114  // For the given GTRS key, find the corresponding payload tokens.
115  // Use the payload tokens to retrieve the corresponding objects.
116  // Call the print functions for these objects.
117 
118  if (!m_prescalesKey.empty()) {
119  std::string pfAlgoToken = keyList.token("L1GtPrescaleFactorsAlgoTrigRcd", "L1GtPrescaleFactors", m_prescalesKey);
120  if (pfAlgoToken.empty()) {
121  edm::LogError("L1-O2O") << "No payload for L1GtPrescaleFactorsAlgoTrigRcd with key " << m_prescalesKey;
122  } else {
124  dataWriter.readObject(pfAlgoToken, pfAlgo);
125  pfAlgo.print(std::cout);
126  }
127 
128  std::string pfTechToken = keyList.token("L1GtPrescaleFactorsTechTrigRcd", "L1GtPrescaleFactors", m_prescalesKey);
129  if (pfTechToken.empty()) {
130  edm::LogError("L1-O2O") << "No payload for L1GtPrescaleFactorsTechTrigRcd with key " << m_prescalesKey;
131  } else {
132  L1GtPrescaleFactors pfTech;
133  dataWriter.readObject(pfTechToken, pfTech);
134  pfTech.print(std::cout);
135  }
136  }
137 
138  if (!m_maskAlgoKey.empty()) {
139  std::string token = keyList.token("L1GtTriggerMaskAlgoTrigRcd", "L1GtTriggerMask", m_maskAlgoKey);
140  if (token.empty()) {
141  edm::LogError("L1-O2O") << "No payload for L1GtTriggerMaskAlgoTrigRcd with key " << m_maskAlgoKey;
142  } else {
143  L1GtTriggerMask mask;
144  dataWriter.readObject(token, mask);
145  mask.print(std::cout);
146  }
147  }
148 
149  if (!m_maskTechKey.empty()) {
150  std::string token = keyList.token("L1GtTriggerMaskTechTrigRcd", "L1GtTriggerMask", m_maskTechKey);
151  if (token.empty()) {
152  edm::LogError("L1-O2O") << "No payload for L1GtTriggerMaskTechTrigRcd with key " << m_maskTechKey;
153  } else {
154  L1GtTriggerMask mask;
155  dataWriter.readObject(token, mask);
156  mask.print(std::cout);
157  }
158  }
159 
160  if (!m_maskVetoAlgoKey.empty()) {
161  std::string token = keyList.token("L1GtTriggerMaskVetoAlgoTrigRcd", "L1GtTriggerMask", m_maskVetoAlgoKey);
162  if (token.empty()) {
163  edm::LogError("L1-O2O") << "No payload for L1GtTriggerMaskVetoAlgoTrigRcd with key " << m_maskVetoAlgoKey;
164  } else {
165  L1GtTriggerMask mask;
166  dataWriter.readObject(token, mask);
167  mask.print(std::cout);
168  }
169  }
170 
171  if (!m_maskVetoTechKey.empty()) {
172  std::string token = keyList.token("L1GtTriggerMaskVetoTechTrigRcd", "L1GtTriggerMask", m_maskVetoTechKey);
173  if (token.empty()) {
174  edm::LogError("L1-O2O") << "No payload for L1GtTriggerMaskVetoTechTrigRcd with key " << m_maskVetoTechKey;
175  } else {
176  L1GtTriggerMask mask;
177  dataWriter.readObject(token, mask);
178  mask.print(std::cout);
179  }
180  }
181 }

References gather_cfg::cout, l1t::DataWriter::fillLastTriggerKeyList(), m_maskAlgoKey, m_maskTechKey, m_maskVetoAlgoKey, m_maskVetoTechKey, m_prescalesKey, l1pfProducerBarrel_cfi::pfAlgo, L1GtPrescaleFactors::print(), L1GtTriggerMask::print(), l1t::DataWriter::readObject(), AlCaHLTBitMon_QueryRunRegistry::string, L1TriggerKeyList::token(), and unpackBuffers-CaloStage2::token.

◆ beginJob()

void L1GtRunSettingsViewer::beginJob ( void  )
overrideprivatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 184 of file L1GtRunSettingsViewer.cc.

184 {}

◆ endJob()

void L1GtRunSettingsViewer::endJob ( void  )
overrideprivatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 187 of file L1GtRunSettingsViewer.cc.

187 {}

Member Data Documentation

◆ m_maskAlgoKey

std::string L1GtRunSettingsViewer::m_maskAlgoKey
private

Definition at line 68 of file L1GtRunSettingsViewer.cc.

Referenced by analyze().

◆ m_maskTechKey

std::string L1GtRunSettingsViewer::m_maskTechKey
private

Definition at line 69 of file L1GtRunSettingsViewer.cc.

Referenced by analyze().

◆ m_maskVetoAlgoKey

std::string L1GtRunSettingsViewer::m_maskVetoAlgoKey
private

Definition at line 70 of file L1GtRunSettingsViewer.cc.

Referenced by analyze().

◆ m_maskVetoTechKey

std::string L1GtRunSettingsViewer::m_maskVetoTechKey
private

Definition at line 71 of file L1GtRunSettingsViewer.cc.

Referenced by analyze().

◆ m_prescalesKey

std::string L1GtRunSettingsViewer::m_prescalesKey
private

Definition at line 67 of file L1GtRunSettingsViewer.cc.

Referenced by analyze().

L1GtRunSettingsViewer::m_maskVetoTechKey
std::string m_maskVetoTechKey
Definition: L1GtRunSettingsViewer.cc:71
L1GtPrescaleFactors
Definition: L1GtPrescaleFactors.h:32
edm
HLT enums.
Definition: AlignableModifier.h:19
gather_cfg.cout
cout
Definition: gather_cfg.py:144
L1GtRunSettingsViewer::m_prescalesKey
std::string m_prescalesKey
Definition: L1GtRunSettingsViewer.cc:67
L1GtTriggerMask
Definition: L1GtTriggerMask.h:33
L1GtRunSettingsViewer::m_maskVetoAlgoKey
std::string m_maskVetoAlgoKey
Definition: L1GtRunSettingsViewer.cc:70
L1GtPrescaleFactors::print
void print(std::ostream &) const
print the prescale factors
Definition: L1GtPrescaleFactors.cc:47
L1GtRunSettingsViewer::m_maskAlgoKey
std::string m_maskAlgoKey
Definition: L1GtRunSettingsViewer.cc:68
L1GtRunSettingsViewer::m_maskTechKey
std::string m_maskTechKey
Definition: L1GtRunSettingsViewer.cc:69
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
L1TriggerKeyList
Definition: L1TriggerKeyList.h:32
edm::LogError
Definition: MessageLogger.h:183
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
l1t::DataWriter::readObject
void readObject(const std::string &payloadToken, T &outputObject)
Definition: DataWriter.h:72
l1t::DataWriter::fillLastTriggerKeyList
bool fillLastTriggerKeyList(L1TriggerKeyList &output)
Definition: DataWriter.cc:147
l1pfProducerBarrel_cfi.pfAlgo
pfAlgo
Definition: l1pfProducerBarrel_cfi.py:39
l1t::DataWriter
Definition: DataWriter.h:35
L1GtTriggerMask::print
void print(std::ostream &) const
print the mask
Definition: L1GtTriggerMask.cc:43
L1TriggerKeyList::token
std::string token(const std::string &tscKey) const
Definition: L1TriggerKeyList.cc:96
unpackBuffers-CaloStage2.token
token
Definition: unpackBuffers-CaloStage2.py:316