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
L1GtPrescaleFactorsAndMasksTester Class Reference

#include <L1GtPrescaleFactorsAndMasksTester.h>

Inheritance diagram for L1GtPrescaleFactorsAndMasksTester:
edm::EDAnalyzer

Public Member Functions

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

Private Member Functions

void analyze (const edm::Event &, const edm::EventSetup &)
 analyze More...
 
void beginJob ()
 begin job More...
 
void beginLuminosityBlock (const edm::LuminosityBlock &, const edm::EventSetup &)
 begin luminosity block More...
 
void beginRun (const edm::Run &, const edm::EventSetup &)
 begin run More...
 
void endJob ()
 end job More...
 
void endLuminosityBlock (const edm::LuminosityBlock &, const edm::EventSetup &)
 end luminosity block More...
 
void endRun (const edm::Run &, const edm::EventSetup &)
 end run More...
 
void printL1EventSetup (const edm::EventSetup &)
 print the requred records More...
 
void retrieveL1EventSetup (const edm::EventSetup &)
 retrieve all the relevant L1 trigger event setup records More...
 

Private Attributes

const L1GtPrescaleFactorsm_l1GtPfAlgo
 prescale factors More...
 
const L1GtPrescaleFactorsm_l1GtPfTech
 
const L1GtTriggerMaskm_l1GtTmAlgo
 trigger masks & veto masks More...
 
const L1GtTriggerMaskm_l1GtTmTech
 
const L1GtTriggerMaskm_l1GtTmVetoAlgo
 
const L1GtTriggerMaskm_l1GtTmVetoTech
 
bool m_printInAnalyze
 
bool m_printInBeginLuminosityBlock
 
bool m_printInBeginRun
 print the records in beginRun, beginLuminosityBlock, analyze, respectively More...
 
int m_printOutput
 print output More...
 
bool m_retrieveInAnalyze
 
bool m_retrieveInBeginLuminosityBlock
 
bool m_retrieveInBeginRun
 retrieve the records in beginRun, beginLuminosityBlock, analyze, respectively More...
 
bool m_testerPrescaleFactors
 input parameters More...
 
bool m_testerTriggerMask
 
bool m_testerTriggerVetoMask
 

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: test analyzer for L1 GT prescale factors and masks.

Implementation: <TODO: enter implementation details>

Author
: Vasile Mihai Ghete - HEPHY Vienna

$Date$ $Revision$

Definition at line 35 of file L1GtPrescaleFactorsAndMasksTester.h.

Constructor & Destructor Documentation

L1GtPrescaleFactorsAndMasksTester::L1GtPrescaleFactorsAndMasksTester ( const edm::ParameterSet parSet)
explicit

Definition at line 52 of file L1GtPrescaleFactorsAndMasksTester.cc.

53  :
55  parSet.getParameter<bool> ("TesterPrescaleFactors")),
56  m_testerTriggerMask(parSet.getParameter<bool> ("TesterTriggerMask")),
58  parSet.getParameter<bool> ("TesterTriggerVetoMask")),
60  parSet.getParameter<bool> ("RetrieveInBeginRun")),
62  parSet.getParameter<bool> ("RetrieveInBeginLuminosityBlock")),
63  m_retrieveInAnalyze(parSet.getParameter<bool> ("RetrieveInAnalyze")),
64  m_printInBeginRun(parSet.getParameter<bool> ("PrintInBeginRun")),
66  parSet.getParameter<bool> ("PrintInBeginLuminosityBlock")),
67  m_printInAnalyze(parSet.getParameter<bool> ("PrintInAnalyze")),
68  m_printOutput(parSet.getUntrackedParameter<int> ("PrintOutput", 3)) {
69  // empty
70 }
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
bool m_retrieveInBeginRun
retrieve the records in beginRun, beginLuminosityBlock, analyze, respectively
bool m_printInBeginRun
print the records in beginRun, beginLuminosityBlock, analyze, respectively
L1GtPrescaleFactorsAndMasksTester::~L1GtPrescaleFactorsAndMasksTester ( )
virtual

Definition at line 73 of file L1GtPrescaleFactorsAndMasksTester.cc.

73  {
74  // empty
75 }

Member Function Documentation

void L1GtPrescaleFactorsAndMasksTester::analyze ( const edm::Event iEvent,
const edm::EventSetup evSetup 
)
privatevirtual

analyze

Implements edm::EDAnalyzer.

Definition at line 111 of file L1GtPrescaleFactorsAndMasksTester.cc.

References m_printInAnalyze, m_retrieveInAnalyze, printL1EventSetup(), and retrieveL1EventSetup().

112  {
113 
114  if (m_retrieveInAnalyze) {
115  retrieveL1EventSetup(evSetup);
116  }
117 
118  if (m_printInAnalyze) {
119  printL1EventSetup(evSetup);
120  }
121 
122 }
void retrieveL1EventSetup(const edm::EventSetup &)
retrieve all the relevant L1 trigger event setup records
void printL1EventSetup(const edm::EventSetup &)
print the requred records
void L1GtPrescaleFactorsAndMasksTester::beginJob ( void  )
privatevirtual

begin job

Reimplemented from edm::EDAnalyzer.

Definition at line 78 of file L1GtPrescaleFactorsAndMasksTester.cc.

78  {
79 
80 }
void L1GtPrescaleFactorsAndMasksTester::beginLuminosityBlock ( const edm::LuminosityBlock iLumiBlock,
const edm::EventSetup evSetup 
)
privatevirtual

begin luminosity block

Reimplemented from edm::EDAnalyzer.

Definition at line 97 of file L1GtPrescaleFactorsAndMasksTester.cc.

References m_printInBeginLuminosityBlock, m_retrieveInBeginLuminosityBlock, printL1EventSetup(), and retrieveL1EventSetup().

98  {
99 
101  retrieveL1EventSetup(evSetup);
102  }
103 
105  printL1EventSetup(evSetup);
106  }
107 
108 }
void retrieveL1EventSetup(const edm::EventSetup &)
retrieve all the relevant L1 trigger event setup records
void printL1EventSetup(const edm::EventSetup &)
print the requred records
void L1GtPrescaleFactorsAndMasksTester::beginRun ( const edm::Run iRun,
const edm::EventSetup evSetup 
)
privatevirtual

begin run

Reimplemented from edm::EDAnalyzer.

Definition at line 83 of file L1GtPrescaleFactorsAndMasksTester.cc.

References m_printInBeginRun, m_retrieveInBeginRun, printL1EventSetup(), and retrieveL1EventSetup().

84  {
85 
87  retrieveL1EventSetup(evSetup);
88  }
89 
90  if (m_printInBeginRun) {
91  printL1EventSetup(evSetup);
92  }
93 
94 }
bool m_retrieveInBeginRun
retrieve the records in beginRun, beginLuminosityBlock, analyze, respectively
void retrieveL1EventSetup(const edm::EventSetup &)
retrieve all the relevant L1 trigger event setup records
bool m_printInBeginRun
print the records in beginRun, beginLuminosityBlock, analyze, respectively
void printL1EventSetup(const edm::EventSetup &)
print the requred records
void L1GtPrescaleFactorsAndMasksTester::endJob ( void  )
privatevirtual

end job

Reimplemented from edm::EDAnalyzer.

Definition at line 137 of file L1GtPrescaleFactorsAndMasksTester.cc.

137  {
138 
139 }
void L1GtPrescaleFactorsAndMasksTester::endLuminosityBlock ( const edm::LuminosityBlock iLumiBlock,
const edm::EventSetup evSetup 
)
privatevirtual

end luminosity block

Reimplemented from edm::EDAnalyzer.

Definition at line 125 of file L1GtPrescaleFactorsAndMasksTester.cc.

126  {
127 
128 }
void L1GtPrescaleFactorsAndMasksTester::endRun ( const edm::Run iRun,
const edm::EventSetup evSetup 
)
privatevirtual

end run

Reimplemented from edm::EDAnalyzer.

Definition at line 131 of file L1GtPrescaleFactorsAndMasksTester.cc.

132  {
133 
134 }
void L1GtPrescaleFactorsAndMasksTester::printL1EventSetup ( const edm::EventSetup evSetup)
private

print the requred records

Definition at line 181 of file L1GtPrescaleFactorsAndMasksTester.cc.

References gather_cfg::cout, LogTrace, m_l1GtPfAlgo, m_l1GtPfTech, m_l1GtTmAlgo, m_l1GtTmTech, m_l1GtTmVetoAlgo, m_l1GtTmVetoTech, m_printOutput, m_testerPrescaleFactors, m_testerTriggerMask, m_testerTriggerVetoMask, L1GtPrescaleFactors::print(), and L1GtTriggerMask::print().

Referenced by analyze(), beginLuminosityBlock(), and beginRun().

182  {
183 
184  // define an output stream to print into
185  // it can then be directed to whatever log level is desired
186  std::ostringstream myCout;
187 
189 
190  myCout << "\nL1 GT prescale factors for algorithm triggers"
191  << std::endl;
192  m_l1GtPfAlgo->print(myCout);
193 
194  myCout << "\nL1 GT prescale factors for technical triggers"
195  << std::endl;
196  m_l1GtPfTech->print(myCout);
197  }
198 
199  //
200  if (m_testerTriggerMask) {
201  myCout << "\nL1 GT trigger masks for algorithm triggers" << std::endl;
202  m_l1GtTmAlgo->print(myCout);
203 
204  myCout << "\nL1 GT trigger masks for technical triggers" << std::endl;
205  m_l1GtTmTech->print(myCout);
206 
207  }
208 
209  //
211  myCout << "\nL1 GT trigger veto masks for algorithm triggers"
212  << std::endl;
213  m_l1GtTmVetoAlgo->print(myCout);
214 
215  myCout << "\nL1 GT trigger veto masks for technical triggers"
216  << std::endl;
217  m_l1GtTmVetoTech->print(myCout);
218 
219  }
220 
221  switch (m_printOutput) {
222  case 0: {
223 
224  std::cout << myCout.str() << std::endl;
225 
226  }
227 
228  break;
229  case 1: {
230 
231  LogTrace("L1GtPrescaleFactorsAndMasksTester") << myCout.str()
232  << std::endl;
233 
234  }
235  break;
236 
237  case 2: {
238 
239  edm::LogVerbatim("L1GtPrescaleFactorsAndMasksTester")
240  << myCout.str() << std::endl;
241 
242  }
243 
244  break;
245  case 3: {
246 
247  edm::LogInfo("L1GtPrescaleFactorsAndMasksTester") << myCout.str();
248 
249  }
250 
251  break;
252  default: {
253  myCout
254  << "\n\n L1GtPrescaleFactorsAndMasksTester: Error - no print output = "
255  << m_printOutput
256  << " defined! \n Check available values in the cfi file."
257  << "\n" << std::endl;
258 
259  }
260  break;
261  }
262 
263 }
const L1GtTriggerMask * m_l1GtTmAlgo
trigger masks &amp; veto masks
void print(std::ostream &) const
print the mask
void print(std::ostream &) const
print the prescale factors
const L1GtPrescaleFactors * m_l1GtPfAlgo
prescale factors
#define LogTrace(id)
tuple cout
Definition: gather_cfg.py:121
void L1GtPrescaleFactorsAndMasksTester::retrieveL1EventSetup ( const edm::EventSetup evSetup)
private

retrieve all the relevant L1 trigger event setup records

Definition at line 141 of file L1GtPrescaleFactorsAndMasksTester.cc.

References edm::EventSetup::get(), m_l1GtPfAlgo, m_l1GtPfTech, m_l1GtTmAlgo, m_l1GtTmTech, m_l1GtTmVetoAlgo, m_l1GtTmVetoTech, m_testerPrescaleFactors, m_testerTriggerMask, m_testerTriggerVetoMask, and edm::ESHandle< class >::product().

Referenced by analyze(), beginLuminosityBlock(), and beginRun().

142  {
143 
145 
146  // get / update the prescale factors from the EventSetup
147 
149  evSetup.get<L1GtPrescaleFactorsAlgoTrigRcd> ().get(l1GtPfAlgo);
150  m_l1GtPfAlgo = l1GtPfAlgo.product();
151 
153  evSetup.get<L1GtPrescaleFactorsTechTrigRcd> ().get(l1GtPfTech);
154  m_l1GtPfTech = l1GtPfTech.product();
155  }
156 
157  if (m_testerTriggerMask) {
158  // get / update the trigger mask from the EventSetup
159 
161  evSetup.get<L1GtTriggerMaskAlgoTrigRcd> ().get(l1GtTmAlgo);
162  m_l1GtTmAlgo = l1GtTmAlgo.product();
163 
165  evSetup.get<L1GtTriggerMaskTechTrigRcd> ().get(l1GtTmTech);
166  m_l1GtTmTech = l1GtTmTech.product();
167  }
168 
170  edm::ESHandle<L1GtTriggerMask> l1GtTmVetoAlgo;
171  evSetup.get<L1GtTriggerMaskVetoAlgoTrigRcd> ().get(l1GtTmVetoAlgo);
172  m_l1GtTmVetoAlgo = l1GtTmVetoAlgo.product();
173 
174  edm::ESHandle<L1GtTriggerMask> l1GtTmVetoTech;
175  evSetup.get<L1GtTriggerMaskVetoTechTrigRcd> ().get(l1GtTmVetoTech);
176  m_l1GtTmVetoTech = l1GtTmVetoTech.product();
177  }
178 
179 }
const L1GtTriggerMask * m_l1GtTmAlgo
trigger masks &amp; veto masks
const L1GtPrescaleFactors * m_l1GtPfAlgo
prescale factors
const T & get() const
Definition: EventSetup.h:55
T const * product() const
Definition: ESHandle.h:62

Member Data Documentation

const L1GtPrescaleFactors* L1GtPrescaleFactorsAndMasksTester::m_l1GtPfAlgo
private

prescale factors

Definition at line 105 of file L1GtPrescaleFactorsAndMasksTester.h.

Referenced by printL1EventSetup(), and retrieveL1EventSetup().

const L1GtPrescaleFactors* L1GtPrescaleFactorsAndMasksTester::m_l1GtPfTech
private

Definition at line 106 of file L1GtPrescaleFactorsAndMasksTester.h.

Referenced by printL1EventSetup(), and retrieveL1EventSetup().

const L1GtTriggerMask* L1GtPrescaleFactorsAndMasksTester::m_l1GtTmAlgo
private

trigger masks & veto masks

Definition at line 109 of file L1GtPrescaleFactorsAndMasksTester.h.

Referenced by printL1EventSetup(), and retrieveL1EventSetup().

const L1GtTriggerMask* L1GtPrescaleFactorsAndMasksTester::m_l1GtTmTech
private

Definition at line 110 of file L1GtPrescaleFactorsAndMasksTester.h.

Referenced by printL1EventSetup(), and retrieveL1EventSetup().

const L1GtTriggerMask* L1GtPrescaleFactorsAndMasksTester::m_l1GtTmVetoAlgo
private

Definition at line 112 of file L1GtPrescaleFactorsAndMasksTester.h.

Referenced by printL1EventSetup(), and retrieveL1EventSetup().

const L1GtTriggerMask* L1GtPrescaleFactorsAndMasksTester::m_l1GtTmVetoTech
private

Definition at line 113 of file L1GtPrescaleFactorsAndMasksTester.h.

Referenced by printL1EventSetup(), and retrieveL1EventSetup().

bool L1GtPrescaleFactorsAndMasksTester::m_printInAnalyze
private

Definition at line 95 of file L1GtPrescaleFactorsAndMasksTester.h.

Referenced by analyze().

bool L1GtPrescaleFactorsAndMasksTester::m_printInBeginLuminosityBlock
private

Definition at line 94 of file L1GtPrescaleFactorsAndMasksTester.h.

Referenced by beginLuminosityBlock().

bool L1GtPrescaleFactorsAndMasksTester::m_printInBeginRun
private

print the records in beginRun, beginLuminosityBlock, analyze, respectively

Definition at line 93 of file L1GtPrescaleFactorsAndMasksTester.h.

Referenced by beginRun().

int L1GtPrescaleFactorsAndMasksTester::m_printOutput
private

print output

Definition at line 98 of file L1GtPrescaleFactorsAndMasksTester.h.

Referenced by printL1EventSetup().

bool L1GtPrescaleFactorsAndMasksTester::m_retrieveInAnalyze
private

Definition at line 90 of file L1GtPrescaleFactorsAndMasksTester.h.

Referenced by analyze().

bool L1GtPrescaleFactorsAndMasksTester::m_retrieveInBeginLuminosityBlock
private

Definition at line 89 of file L1GtPrescaleFactorsAndMasksTester.h.

Referenced by beginLuminosityBlock().

bool L1GtPrescaleFactorsAndMasksTester::m_retrieveInBeginRun
private

retrieve the records in beginRun, beginLuminosityBlock, analyze, respectively

Definition at line 88 of file L1GtPrescaleFactorsAndMasksTester.h.

Referenced by beginRun().

bool L1GtPrescaleFactorsAndMasksTester::m_testerPrescaleFactors
private

input parameters

analyze prescale factors, trigger masks and trigger veto masks, respectively

Definition at line 83 of file L1GtPrescaleFactorsAndMasksTester.h.

Referenced by printL1EventSetup(), and retrieveL1EventSetup().

bool L1GtPrescaleFactorsAndMasksTester::m_testerTriggerMask
private

Definition at line 84 of file L1GtPrescaleFactorsAndMasksTester.h.

Referenced by printL1EventSetup(), and retrieveL1EventSetup().

bool L1GtPrescaleFactorsAndMasksTester::m_testerTriggerVetoMask
private

Definition at line 85 of file L1GtPrescaleFactorsAndMasksTester.h.

Referenced by printL1EventSetup(), and retrieveL1EventSetup().