CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros 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::EDAnalyzer

Public Member Functions

 L1GtRunSettingsViewer (const edm::ParameterSet &)
 
 ~L1GtRunSettingsViewer ()
 
- Public Member Functions inherited from edm::EDAnalyzer
 EDAnalyzer ()
 
std::string workerType () const
 
virtual ~EDAnalyzer ()
 

Private Member Functions

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

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
 
typedef WorkerT< EDAnalyzerWorkerType
 
- Static Public Member Functions inherited from edm::EDAnalyzer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &)
 
- Protected Member Functions inherited from edm::EDAnalyzer
CurrentProcessingContext const * currentContext () const
 

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 86 of file L1GtRunSettingsViewer.cc.

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

Definition at line 97 of file L1GtRunSettingsViewer.cc.

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

Member Function Documentation

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

Implements edm::EDAnalyzer.

Definition at line 112 of file L1GtRunSettingsViewer.cc.

References gather_cfg::cout, m_maskAlgoKey, m_maskTechKey, m_maskVetoAlgoKey, m_maskVetoTechKey, m_prescalesKey, L1GtPrescaleFactors::print(), L1GtTriggerMask::print(), and L1TriggerKeyList::token().

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

Reimplemented from edm::EDAnalyzer.

Definition at line 236 of file L1GtRunSettingsViewer.cc.

237 {
238 }
void L1GtRunSettingsViewer::endJob ( void  )
privatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 242 of file L1GtRunSettingsViewer.cc.

242  {
243 }

Member Data Documentation

std::string L1GtRunSettingsViewer::m_maskAlgoKey
private

Definition at line 69 of file L1GtRunSettingsViewer.cc.

Referenced by analyze().

std::string L1GtRunSettingsViewer::m_maskTechKey
private

Definition at line 70 of file L1GtRunSettingsViewer.cc.

Referenced by analyze().

std::string L1GtRunSettingsViewer::m_maskVetoAlgoKey
private

Definition at line 71 of file L1GtRunSettingsViewer.cc.

Referenced by analyze().

std::string L1GtRunSettingsViewer::m_maskVetoTechKey
private

Definition at line 72 of file L1GtRunSettingsViewer.cc.

Referenced by analyze().

std::string L1GtRunSettingsViewer::m_prescalesKey
private

Definition at line 68 of file L1GtRunSettingsViewer.cc.

Referenced by analyze().