CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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< B > consumes (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 () noexcept
 
template<Transition Tr = Transition::Event>
auto esConsumes (ESInputTag tag) noexcept
 
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 ( 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 ( )
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

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, m_maskAlgoKey, m_maskTechKey, m_maskVetoAlgoKey, m_maskVetoTechKey, m_prescalesKey, L1GtPrescaleFactors::print(), L1GtTriggerMask::print(), AlCaHLTBitMon_QueryRunRegistry::string, 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 {
123  L1GtPrescaleFactors pfAlgo;
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 }
void print(std::ostream &) const
print the mask
Log< level::Error, false > LogError
void print(std::ostream &) const
print the prescale factors
tuple cout
Definition: gather_cfg.py:144
void L1GtRunSettingsViewer::beginJob ( void  )
overrideprivatevirtual

Reimplemented from edm::one::EDAnalyzerBase.

Definition at line 184 of file L1GtRunSettingsViewer.cc.

184 {}
void L1GtRunSettingsViewer::endJob ( void  )
overrideprivatevirtual

Reimplemented from edm::one::EDAnalyzerBase.

Definition at line 187 of file L1GtRunSettingsViewer.cc.

187 {}

Member Data Documentation

std::string L1GtRunSettingsViewer::m_maskAlgoKey
private

Definition at line 68 of file L1GtRunSettingsViewer.cc.

Referenced by analyze().

std::string L1GtRunSettingsViewer::m_maskTechKey
private

Definition at line 69 of file L1GtRunSettingsViewer.cc.

Referenced by analyze().

std::string L1GtRunSettingsViewer::m_maskVetoAlgoKey
private

Definition at line 70 of file L1GtRunSettingsViewer.cc.

Referenced by analyze().

std::string L1GtRunSettingsViewer::m_maskVetoTechKey
private

Definition at line 71 of file L1GtRunSettingsViewer.cc.

Referenced by analyze().

std::string L1GtRunSettingsViewer::m_prescalesKey
private

Definition at line 67 of file L1GtRunSettingsViewer.cc.

Referenced by analyze().