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::one::EDAnalyzer<> edm::one::EDAnalyzerBase edm::EDConsumerBase

Public Member Functions

 L1GtRunSettingsViewer (const edm::ParameterSet &)
 
 ~L1GtRunSettingsViewer () override
 
- Public Member Functions inherited from edm::one::EDAnalyzer<>
 EDAnalyzer ()=default
 
 EDAnalyzer (const EDAnalyzer &)=delete
 
SerialTaskQueueglobalLuminosityBlocksQueue () final
 
SerialTaskQueueglobalRunsQueue () final
 
const EDAnalyzeroperator= (const EDAnalyzer &)=delete
 
bool wantsGlobalLuminosityBlocks () const final
 
bool wantsGlobalRuns () const final
 
bool wantsInputProcessBlocks () const final
 
bool wantsProcessBlocks () const final
 
- Public Member Functions inherited from edm::one::EDAnalyzerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzerBase ()
 
ModuleDescription const & moduleDescription () const
 
bool wantsStreamLuminosityBlocks () const
 
bool wantsStreamRuns () const
 
 ~EDAnalyzerBase () 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 const &)=delete
 
 EDConsumerBase (EDConsumerBase &&)=default
 
ESProxyIndex const * esGetTokenIndices (edm::Transition iTrans) const
 
std::vector< ESProxyIndex > const & esGetTokenIndicesVector (edm::Transition iTrans) const
 
std::vector< ESRecordIndex > const & esGetTokenRecordIndicesVector (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::array< std::vector< ModuleDescription const *> *, NumBranchTypes > &modulesAll, std::vector< ModuleProcessName > &modulesInPreviousProcesses, ProductRegistry const &preg, std::map< std::string, ModuleDescription const *> const &labelsToDesc, std::string const &processName) const
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void selectInputProcessBlocks (ProductRegistry const &productRegistry, ProcessBlockHelperBase const &processBlockHelperBase)
 
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::one::EDAnalyzerBase
typedef EDAnalyzerBase ModuleType
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Static Public Member Functions inherited from edm::one::EDAnalyzerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
template<BranchType B = InEvent>
EDConsumerBaseAdaptor< Bconsumes (edm::InputTag tag) noexcept
 
EDGetToken consumes (const TypeToGet &id, 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)
 
template<Transition Tr = Transition::Event>
constexpr auto esConsumes ()
 
template<Transition Tr = Transition::Event>
auto esConsumes (ESInputTag tag)
 
template<Transition Tr = Transition::Event>
ESGetTokenGeneric esConsumes (eventsetup::EventSetupRecordKey const &iRecord, eventsetup::DataKey const &iKey)
 Used with EventSetupRecord::doGet. More...
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
void resetItemsToGetFrom (BranchType iType)
 

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 }
T getParameter(std::string const &) const
Definition: ParameterSet.h:303

◆ ~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::one::EDAnalyzerBase.

Definition at line 104 of file L1GtRunSettingsViewer.cc.

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

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 {
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 {
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 {
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 {
177  dataWriter.readObject(token, mask);
178  mask.print(std::cout);
179  }
180  }
181 }
std::string token(const std::string &tscKey) const
Log< level::Error, false > LogError
constexpr uint32_t mask
Definition: gpuClustering.h:24
bool fillLastTriggerKeyList(L1TriggerKeyList &output)
Definition: DataWriter.cc:147
void readObject(const std::string &payloadToken, T &outputObject)
Definition: DataWriter.h:72
void print(std::ostream &) const
print the prescale factors
HLT enums.

◆ beginJob()

void L1GtRunSettingsViewer::beginJob ( )
overrideprivatevirtual

Reimplemented from edm::one::EDAnalyzerBase.

Definition at line 184 of file L1GtRunSettingsViewer.cc.

184 {}

◆ endJob()

void L1GtRunSettingsViewer::endJob ( void  )
overrideprivatevirtual

Reimplemented from edm::one::EDAnalyzerBase.

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().