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 edm::EDConsumerBase

Public Member Functions

 L1GtPrescaleFactorsAndMasksTester (const edm::ParameterSet &)
 
virtual ~L1GtPrescaleFactorsAndMasksTester ()
 
- Public Member Functions inherited from edm::EDAnalyzer
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzer ()
 
ModuleDescription const & moduleDescription () const
 
std::string workerType () const
 
virtual ~EDAnalyzer ()
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
 EDConsumerBase ()
 
ProductHolderIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
std::vector
< ProductHolderIndexAndSkipBit >
const & 
itemsToGetFromEvent () const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesDependentUpon (std::string const &iProcessName, std::string const &iModuleLabel, bool iPrint, std::vector< char const * > &oModuleLabels) const
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
bool registeredToConsume (ProductHolderIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &)
 
virtual ~EDConsumerBase ()
 

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

Implementation: <TODO: enter implementation details>

Author
: Vasile Mihai Ghete - HEPHY Vienna

Definition at line 33 of file L1GtPrescaleFactorsAndMasksTester.h.

Constructor & Destructor Documentation

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

Definition at line 51 of file L1GtPrescaleFactorsAndMasksTester.cc.

52  :
54  parSet.getParameter<bool> ("TesterPrescaleFactors")),
55  m_testerTriggerMask(parSet.getParameter<bool> ("TesterTriggerMask")),
57  parSet.getParameter<bool> ("TesterTriggerVetoMask")),
59  parSet.getParameter<bool> ("RetrieveInBeginRun")),
61  parSet.getParameter<bool> ("RetrieveInBeginLuminosityBlock")),
62  m_retrieveInAnalyze(parSet.getParameter<bool> ("RetrieveInAnalyze")),
63  m_printInBeginRun(parSet.getParameter<bool> ("PrintInBeginRun")),
65  parSet.getParameter<bool> ("PrintInBeginLuminosityBlock")),
66  m_printInAnalyze(parSet.getParameter<bool> ("PrintInAnalyze")),
67  m_printOutput(parSet.getUntrackedParameter<int> ("PrintOutput", 3)) {
68  // empty
69 }
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 72 of file L1GtPrescaleFactorsAndMasksTester.cc.

72  {
73  // empty
74 }

Member Function Documentation

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

analyze

Implements edm::EDAnalyzer.

Definition at line 110 of file L1GtPrescaleFactorsAndMasksTester.cc.

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

111  {
112 
113  if (m_retrieveInAnalyze) {
114  retrieveL1EventSetup(evSetup);
115  }
116 
117  if (m_printInAnalyze) {
118  printL1EventSetup(evSetup);
119  }
120 
121 }
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 77 of file L1GtPrescaleFactorsAndMasksTester.cc.

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

begin luminosity block

Reimplemented from edm::EDAnalyzer.

Definition at line 96 of file L1GtPrescaleFactorsAndMasksTester.cc.

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

97  {
98 
100  retrieveL1EventSetup(evSetup);
101  }
102 
104  printL1EventSetup(evSetup);
105  }
106 
107 }
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 82 of file L1GtPrescaleFactorsAndMasksTester.cc.

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

83  {
84 
86  retrieveL1EventSetup(evSetup);
87  }
88 
89  if (m_printInBeginRun) {
90  printL1EventSetup(evSetup);
91  }
92 
93 }
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 136 of file L1GtPrescaleFactorsAndMasksTester.cc.

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

end luminosity block

Reimplemented from edm::EDAnalyzer.

Definition at line 124 of file L1GtPrescaleFactorsAndMasksTester.cc.

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

end run

Reimplemented from edm::EDAnalyzer.

Definition at line 130 of file L1GtPrescaleFactorsAndMasksTester.cc.

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

print the requred records

Definition at line 180 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().

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

retrieve all the relevant L1 trigger event setup records

Definition at line 140 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().

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

Member Data Documentation

const L1GtPrescaleFactors* L1GtPrescaleFactorsAndMasksTester::m_l1GtPfAlgo
private

prescale factors

Definition at line 103 of file L1GtPrescaleFactorsAndMasksTester.h.

Referenced by printL1EventSetup(), and retrieveL1EventSetup().

const L1GtPrescaleFactors* L1GtPrescaleFactorsAndMasksTester::m_l1GtPfTech
private

Definition at line 104 of file L1GtPrescaleFactorsAndMasksTester.h.

Referenced by printL1EventSetup(), and retrieveL1EventSetup().

const L1GtTriggerMask* L1GtPrescaleFactorsAndMasksTester::m_l1GtTmAlgo
private

trigger masks & veto masks

Definition at line 107 of file L1GtPrescaleFactorsAndMasksTester.h.

Referenced by printL1EventSetup(), and retrieveL1EventSetup().

const L1GtTriggerMask* L1GtPrescaleFactorsAndMasksTester::m_l1GtTmTech
private

Definition at line 108 of file L1GtPrescaleFactorsAndMasksTester.h.

Referenced by printL1EventSetup(), and retrieveL1EventSetup().

const L1GtTriggerMask* L1GtPrescaleFactorsAndMasksTester::m_l1GtTmVetoAlgo
private

Definition at line 110 of file L1GtPrescaleFactorsAndMasksTester.h.

Referenced by printL1EventSetup(), and retrieveL1EventSetup().

const L1GtTriggerMask* L1GtPrescaleFactorsAndMasksTester::m_l1GtTmVetoTech
private

Definition at line 111 of file L1GtPrescaleFactorsAndMasksTester.h.

Referenced by printL1EventSetup(), and retrieveL1EventSetup().

bool L1GtPrescaleFactorsAndMasksTester::m_printInAnalyze
private

Definition at line 93 of file L1GtPrescaleFactorsAndMasksTester.h.

Referenced by analyze().

bool L1GtPrescaleFactorsAndMasksTester::m_printInBeginLuminosityBlock
private

Definition at line 92 of file L1GtPrescaleFactorsAndMasksTester.h.

Referenced by beginLuminosityBlock().

bool L1GtPrescaleFactorsAndMasksTester::m_printInBeginRun
private

print the records in beginRun, beginLuminosityBlock, analyze, respectively

Definition at line 91 of file L1GtPrescaleFactorsAndMasksTester.h.

Referenced by beginRun().

int L1GtPrescaleFactorsAndMasksTester::m_printOutput
private

print output

Definition at line 96 of file L1GtPrescaleFactorsAndMasksTester.h.

Referenced by printL1EventSetup().

bool L1GtPrescaleFactorsAndMasksTester::m_retrieveInAnalyze
private

Definition at line 88 of file L1GtPrescaleFactorsAndMasksTester.h.

Referenced by analyze().

bool L1GtPrescaleFactorsAndMasksTester::m_retrieveInBeginLuminosityBlock
private

Definition at line 87 of file L1GtPrescaleFactorsAndMasksTester.h.

Referenced by beginLuminosityBlock().

bool L1GtPrescaleFactorsAndMasksTester::m_retrieveInBeginRun
private

retrieve the records in beginRun, beginLuminosityBlock, analyze, respectively

Definition at line 86 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 81 of file L1GtPrescaleFactorsAndMasksTester.h.

Referenced by printL1EventSetup(), and retrieveL1EventSetup().

bool L1GtPrescaleFactorsAndMasksTester::m_testerTriggerMask
private

Definition at line 82 of file L1GtPrescaleFactorsAndMasksTester.h.

Referenced by printL1EventSetup(), and retrieveL1EventSetup().

bool L1GtPrescaleFactorsAndMasksTester::m_testerTriggerVetoMask
private

Definition at line 83 of file L1GtPrescaleFactorsAndMasksTester.h.

Referenced by printL1EventSetup(), and retrieveL1EventSetup().