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 const &)=delete
 
 EDConsumerBase (EDConsumerBase &&)=default
 
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
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
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
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
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<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)
 

Detailed Description

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

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

Definition at line 57 of file L1GtRunSettingsViewer.cc.

Constructor & Destructor Documentation

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

Definition at line 87 of file L1GtRunSettingsViewer.cc.

88  : m_prescalesKey( iConfig.getParameter< std::string >( "prescalesKey" ) ),
89  m_maskAlgoKey( iConfig.getParameter< std::string >( "maskAlgoKey" ) ),
90  m_maskTechKey( iConfig.getParameter< std::string >( "maskTechKey" ) ),
91  m_maskVetoAlgoKey( iConfig.getParameter< std::string >( "maskVetoAlgoKey" ) ),
92  m_maskVetoTechKey( iConfig.getParameter< std::string >( "maskVetoTechKey" ) )
93 {
94  //now do what ever initialization is needed
95 }
T getParameter(std::string const &) const
L1GtRunSettingsViewer::~L1GtRunSettingsViewer ( )
override

Definition at line 98 of file L1GtRunSettingsViewer.cc.

99 {
100 
101  // do anything here that needs to be done at desctruction time
102  // (e.g. close files, deallocate resources etc.)
103 
104 }

Member Function Documentation

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

Definition at line 113 of file L1GtRunSettingsViewer.cc.

References gather_cfg::cout, l1t::DataWriter::fillLastTriggerKeyList(), m_maskAlgoKey, m_maskTechKey, m_maskVetoAlgoKey, m_maskVetoTechKey, m_prescalesKey, RecoTauDiscriminantConfiguration::mask, L1GtPrescaleFactors::print(), L1GtTriggerMask::print(), l1t::DataWriter::readObject(), AlCaHLTBitMon_QueryRunRegistry::string, and L1TriggerKeyList::token().

114 {
115  using namespace edm;
116 
117  // Utility class
118  l1t::DataWriter dataWriter ;
119 
120  // Get most recent L1TriggerKeyList
121  L1TriggerKeyList keyList ;
122  dataWriter.fillLastTriggerKeyList( keyList ) ;
123 
124  // For the given GTRS key, find the corresponding payload tokens.
125  // Use the payload tokens to retrieve the corresponding objects.
126  // Call the print functions for these objects.
127 
128  if( !m_prescalesKey.empty() )
129  {
130  std::string pfAlgoToken = keyList.token( "L1GtPrescaleFactorsAlgoTrigRcd",
131  "L1GtPrescaleFactors",
132  m_prescalesKey ) ;
133  if( pfAlgoToken.empty() )
134  {
135  edm::LogError( "L1-O2O" ) << "No payload for L1GtPrescaleFactorsAlgoTrigRcd with key "
136  << m_prescalesKey ;
137  }
138  else
139  {
140  L1GtPrescaleFactors pfAlgo ;
141  dataWriter.readObject( pfAlgoToken, pfAlgo ) ;
142  pfAlgo.print( std::cout ) ;
143  }
144 
145  std::string pfTechToken = keyList.token( "L1GtPrescaleFactorsTechTrigRcd",
146  "L1GtPrescaleFactors",
147  m_prescalesKey ) ;
148  if( pfTechToken.empty() )
149  {
150  edm::LogError( "L1-O2O" ) << "No payload for L1GtPrescaleFactorsTechTrigRcd with key "
151  << m_prescalesKey ;
152  }
153  else
154  {
155  L1GtPrescaleFactors pfTech ;
156  dataWriter.readObject( pfTechToken, pfTech ) ;
157  pfTech.print( std::cout ) ;
158  }
159  }
160 
161  if( !m_maskAlgoKey.empty() )
162  {
163  std::string token = keyList.token( "L1GtTriggerMaskAlgoTrigRcd",
164  "L1GtTriggerMask",
165  m_maskAlgoKey ) ;
166  if( token.empty() )
167  {
168  edm::LogError( "L1-O2O" ) << "No payload for L1GtTriggerMaskAlgoTrigRcd with key "
169  << m_maskAlgoKey ;
170  }
171  else
172  {
174  dataWriter.readObject( token, mask ) ;
175  mask.print( std::cout ) ;
176  }
177  }
178 
179  if( !m_maskTechKey.empty() )
180  {
181  std::string token = keyList.token( "L1GtTriggerMaskTechTrigRcd",
182  "L1GtTriggerMask",
183  m_maskTechKey ) ;
184  if( token.empty() )
185  {
186  edm::LogError( "L1-O2O" ) << "No payload for L1GtTriggerMaskTechTrigRcd with key "
187  << m_maskTechKey ;
188  }
189  else
190  {
192  dataWriter.readObject( token, mask ) ;
193  mask.print( std::cout ) ;
194  }
195  }
196 
197  if( !m_maskVetoAlgoKey.empty() )
198  {
199  std::string token = keyList.token( "L1GtTriggerMaskVetoAlgoTrigRcd",
200  "L1GtTriggerMask",
202  if( token.empty() )
203  {
204  edm::LogError( "L1-O2O" ) << "No payload for L1GtTriggerMaskVetoAlgoTrigRcd with key "
205  << m_maskVetoAlgoKey ;
206  }
207  else
208  {
210  dataWriter.readObject( token, mask ) ;
211  mask.print( std::cout ) ;
212  }
213  }
214 
215  if( !m_maskVetoTechKey.empty() )
216  {
217  std::string token = keyList.token( "L1GtTriggerMaskVetoTechTrigRcd",
218  "L1GtTriggerMask",
220  if( token.empty() )
221  {
222  edm::LogError( "L1-O2O" ) << "No payload for L1GtTriggerMaskVetoTechTrigRcd with key "
223  << m_maskVetoTechKey ;
224  }
225  else
226  {
228  dataWriter.readObject( token, mask ) ;
229  mask.print( std::cout ) ;
230  }
231  }
232 }
void print(std::ostream &) const
print the mask
void print(std::ostream &) const
print the prescale factors
bool fillLastTriggerKeyList(L1TriggerKeyList &output)
Definition: DataWriter.cc:198
void readObject(const std::string &payloadToken, T &outputObject)
Definition: DataWriter.h:79
std::string token(const std::string &tscKey) const
HLT enums.
void L1GtRunSettingsViewer::beginJob ( void  )
overrideprivatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 237 of file L1GtRunSettingsViewer.cc.

238 {
239 }
void L1GtRunSettingsViewer::endJob ( void  )
overrideprivatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 243 of file L1GtRunSettingsViewer.cc.

References DEFINE_FWK_MODULE.

243  {
244 }

Member Data Documentation

std::string L1GtRunSettingsViewer::m_maskAlgoKey
private

Definition at line 70 of file L1GtRunSettingsViewer.cc.

Referenced by analyze().

std::string L1GtRunSettingsViewer::m_maskTechKey
private

Definition at line 71 of file L1GtRunSettingsViewer.cc.

Referenced by analyze().

std::string L1GtRunSettingsViewer::m_maskVetoAlgoKey
private

Definition at line 72 of file L1GtRunSettingsViewer.cc.

Referenced by analyze().

std::string L1GtRunSettingsViewer::m_maskVetoTechKey
private

Definition at line 73 of file L1GtRunSettingsViewer.cc.

Referenced by analyze().

std::string L1GtRunSettingsViewer::m_prescalesKey
private

Definition at line 69 of file L1GtRunSettingsViewer.cc.

Referenced by analyze().