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

#include <L1GtPrescaleFactorsAndMasksTester.h>

Inheritance diagram for L1GtPrescaleFactorsAndMasksTester:
edm::EDAnalyzer edm::EDConsumerBase

Public Member Functions

 L1GtPrescaleFactorsAndMasksTester (const edm::ParameterSet &)
 
 ~L1GtPrescaleFactorsAndMasksTester () 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
 
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
 analyze More...
 
void beginJob () override
 begin job More...
 
void beginLuminosityBlock (const edm::LuminosityBlock &, const edm::EventSetup &) override
 begin luminosity block More...
 
void beginRun (const edm::Run &, const edm::EventSetup &) override
 begin run More...
 
void endJob () override
 end job More...
 
void endLuminosityBlock (const edm::LuminosityBlock &, const edm::EventSetup &) override
 end luminosity block More...
 
void endRun (const edm::Run &, const edm::EventSetup &) override
 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 &)
 
static bool wantsGlobalLuminosityBlocks ()
 
static bool wantsGlobalRuns ()
 
static bool wantsInputProcessBlocks ()
 
static bool wantsProcessBlocks ()
 
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)
 
template<BranchType B = InEvent>
EDConsumerBaseAdaptor< Bconsumes (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 ()
 
template<Transition Tr = Transition::Event>
auto esConsumes (ESInputTag tag)
 
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: test analyzer for L1 GT prescale factors and masks.

Implementation: <TODO: enter implementation details>

Author
: Vasile Mihai Ghete - HEPHY Vienna

Definition at line 32 of file L1GtPrescaleFactorsAndMasksTester.h.

Constructor & Destructor Documentation

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

Definition at line 51 of file L1GtPrescaleFactorsAndMasksTester.cc.

52  : m_testerPrescaleFactors(parSet.getParameter<bool>("TesterPrescaleFactors")),
53  m_testerTriggerMask(parSet.getParameter<bool>("TesterTriggerMask")),
54  m_testerTriggerVetoMask(parSet.getParameter<bool>("TesterTriggerVetoMask")),
55  m_retrieveInBeginRun(parSet.getParameter<bool>("RetrieveInBeginRun")),
56  m_retrieveInBeginLuminosityBlock(parSet.getParameter<bool>("RetrieveInBeginLuminosityBlock")),
57  m_retrieveInAnalyze(parSet.getParameter<bool>("RetrieveInAnalyze")),
58  m_printInBeginRun(parSet.getParameter<bool>("PrintInBeginRun")),
59  m_printInBeginLuminosityBlock(parSet.getParameter<bool>("PrintInBeginLuminosityBlock")),
60  m_printInAnalyze(parSet.getParameter<bool>("PrintInAnalyze")),
61  m_printOutput(parSet.getUntrackedParameter<int>("PrintOutput", 3)) {
62  // empty
63 }
T getUntrackedParameter(std::string const &, T const &) const
bool m_retrieveInBeginRun
retrieve the records in beginRun, beginLuminosityBlock, analyze, respectively
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
bool m_printInBeginRun
print the records in beginRun, beginLuminosityBlock, analyze, respectively
L1GtPrescaleFactorsAndMasksTester::~L1GtPrescaleFactorsAndMasksTester ( )
override

Definition at line 66 of file L1GtPrescaleFactorsAndMasksTester.cc.

66  {
67  // empty
68 }

Member Function Documentation

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

analyze

Implements edm::EDAnalyzer.

Definition at line 97 of file L1GtPrescaleFactorsAndMasksTester.cc.

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

97  {
98  if (m_retrieveInAnalyze) {
99  retrieveL1EventSetup(evSetup);
100  }
101 
102  if (m_printInAnalyze) {
103  printL1EventSetup(evSetup);
104  }
105 }
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  )
overrideprivatevirtual

begin job

Reimplemented from edm::EDAnalyzer.

Definition at line 71 of file L1GtPrescaleFactorsAndMasksTester.cc.

71 {}
void L1GtPrescaleFactorsAndMasksTester::beginLuminosityBlock ( const edm::LuminosityBlock iLumiBlock,
const edm::EventSetup evSetup 
)
overrideprivatevirtual

begin luminosity block

Reimplemented from edm::EDAnalyzer.

Definition at line 85 of file L1GtPrescaleFactorsAndMasksTester.cc.

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

86  {
88  retrieveL1EventSetup(evSetup);
89  }
90 
92  printL1EventSetup(evSetup);
93  }
94 }
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 
)
overrideprivatevirtual

begin run

Reimplemented from edm::EDAnalyzer.

Definition at line 74 of file L1GtPrescaleFactorsAndMasksTester.cc.

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

74  {
76  retrieveL1EventSetup(evSetup);
77  }
78 
79  if (m_printInBeginRun) {
80  printL1EventSetup(evSetup);
81  }
82 }
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  )
overrideprivatevirtual

end job

Reimplemented from edm::EDAnalyzer.

Definition at line 115 of file L1GtPrescaleFactorsAndMasksTester.cc.

115 {}
void L1GtPrescaleFactorsAndMasksTester::endLuminosityBlock ( const edm::LuminosityBlock iLumiBlock,
const edm::EventSetup evSetup 
)
overrideprivatevirtual

end luminosity block

Reimplemented from edm::EDAnalyzer.

Definition at line 108 of file L1GtPrescaleFactorsAndMasksTester.cc.

109  {}
void L1GtPrescaleFactorsAndMasksTester::endRun ( const edm::Run iRun,
const edm::EventSetup evSetup 
)
overrideprivatevirtual

end run

Reimplemented from edm::EDAnalyzer.

Definition at line 112 of file L1GtPrescaleFactorsAndMasksTester.cc.

112 {}
void L1GtPrescaleFactorsAndMasksTester::printL1EventSetup ( const edm::EventSetup evSetup)
private

print the requred records

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

153  {
154  // define an output stream to print into
155  // it can then be directed to whatever log level is desired
156  std::ostringstream myCout;
157 
159  myCout << "\nL1 GT prescale factors for algorithm triggers" << std::endl;
160  m_l1GtPfAlgo->print(myCout);
161 
162  myCout << "\nL1 GT prescale factors for technical triggers" << std::endl;
163  m_l1GtPfTech->print(myCout);
164  }
165 
166  //
167  if (m_testerTriggerMask) {
168  myCout << "\nL1 GT trigger masks for algorithm triggers" << std::endl;
169  m_l1GtTmAlgo->print(myCout);
170 
171  myCout << "\nL1 GT trigger masks for technical triggers" << std::endl;
172  m_l1GtTmTech->print(myCout);
173  }
174 
175  //
177  myCout << "\nL1 GT trigger veto masks for algorithm triggers" << std::endl;
178  m_l1GtTmVetoAlgo->print(myCout);
179 
180  myCout << "\nL1 GT trigger veto masks for technical triggers" << std::endl;
181  m_l1GtTmVetoTech->print(myCout);
182  }
183 
184  switch (m_printOutput) {
185  case 0: {
186  std::cout << myCout.str() << std::endl;
187 
188  }
189 
190  break;
191  case 1: {
192  LogTrace("L1GtPrescaleFactorsAndMasksTester") << myCout.str() << std::endl;
193 
194  } break;
195 
196  case 2: {
197  edm::LogVerbatim("L1GtPrescaleFactorsAndMasksTester") << myCout.str() << std::endl;
198 
199  }
200 
201  break;
202  case 3: {
203  edm::LogInfo("L1GtPrescaleFactorsAndMasksTester") << myCout.str();
204 
205  }
206 
207  break;
208  default: {
209  myCout << "\n\n L1GtPrescaleFactorsAndMasksTester: Error - no print output = " << m_printOutput
210  << " defined! \n Check available values in the cfi file."
211  << "\n"
212  << std::endl;
213 
214  } break;
215  }
216 }
Log< level::Info, true > LogVerbatim
const L1GtTriggerMask * m_l1GtTmAlgo
trigger masks &amp; veto masks
void print(std::ostream &) const
print the mask
#define LogTrace(id)
void print(std::ostream &) const
print the prescale factors
const L1GtPrescaleFactors * m_l1GtPfAlgo
prescale factors
Log< level::Info, false > LogInfo
tuple cout
Definition: gather_cfg.py:144
void L1GtPrescaleFactorsAndMasksTester::retrieveL1EventSetup ( const edm::EventSetup evSetup)
private

retrieve all the relevant L1 trigger event setup records

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

117  {
119  // get / update the prescale factors from the EventSetup
120 
122  evSetup.get<L1GtPrescaleFactorsAlgoTrigRcd>().get(l1GtPfAlgo);
123  m_l1GtPfAlgo = l1GtPfAlgo.product();
124 
126  evSetup.get<L1GtPrescaleFactorsTechTrigRcd>().get(l1GtPfTech);
127  m_l1GtPfTech = l1GtPfTech.product();
128  }
129 
130  if (m_testerTriggerMask) {
131  // get / update the trigger mask from the EventSetup
132 
134  evSetup.get<L1GtTriggerMaskAlgoTrigRcd>().get(l1GtTmAlgo);
135  m_l1GtTmAlgo = l1GtTmAlgo.product();
136 
138  evSetup.get<L1GtTriggerMaskTechTrigRcd>().get(l1GtTmTech);
139  m_l1GtTmTech = l1GtTmTech.product();
140  }
141 
143  edm::ESHandle<L1GtTriggerMask> l1GtTmVetoAlgo;
144  evSetup.get<L1GtTriggerMaskVetoAlgoTrigRcd>().get(l1GtTmVetoAlgo);
145  m_l1GtTmVetoAlgo = l1GtTmVetoAlgo.product();
146 
147  edm::ESHandle<L1GtTriggerMask> l1GtTmVetoTech;
148  evSetup.get<L1GtTriggerMaskVetoTechTrigRcd>().get(l1GtTmVetoTech);
149  m_l1GtTmVetoTech = l1GtTmVetoTech.product();
150  }
151 }
const L1GtTriggerMask * m_l1GtTmAlgo
trigger masks &amp; veto masks
const L1GtPrescaleFactors * m_l1GtPfAlgo
prescale factors
T const * product() const
Definition: ESHandle.h:86
T get() const
Definition: EventSetup.h:82

Member Data Documentation

const L1GtPrescaleFactors* L1GtPrescaleFactorsAndMasksTester::m_l1GtPfAlgo
private

prescale factors

Definition at line 92 of file L1GtPrescaleFactorsAndMasksTester.h.

Referenced by printL1EventSetup(), and retrieveL1EventSetup().

const L1GtPrescaleFactors* L1GtPrescaleFactorsAndMasksTester::m_l1GtPfTech
private

Definition at line 93 of file L1GtPrescaleFactorsAndMasksTester.h.

Referenced by printL1EventSetup(), and retrieveL1EventSetup().

const L1GtTriggerMask* L1GtPrescaleFactorsAndMasksTester::m_l1GtTmAlgo
private

trigger masks & veto masks

Definition at line 96 of file L1GtPrescaleFactorsAndMasksTester.h.

Referenced by printL1EventSetup(), and retrieveL1EventSetup().

const L1GtTriggerMask* L1GtPrescaleFactorsAndMasksTester::m_l1GtTmTech
private

Definition at line 97 of file L1GtPrescaleFactorsAndMasksTester.h.

Referenced by printL1EventSetup(), and retrieveL1EventSetup().

const L1GtTriggerMask* L1GtPrescaleFactorsAndMasksTester::m_l1GtTmVetoAlgo
private

Definition at line 99 of file L1GtPrescaleFactorsAndMasksTester.h.

Referenced by printL1EventSetup(), and retrieveL1EventSetup().

const L1GtTriggerMask* L1GtPrescaleFactorsAndMasksTester::m_l1GtTmVetoTech
private

Definition at line 100 of file L1GtPrescaleFactorsAndMasksTester.h.

Referenced by printL1EventSetup(), and retrieveL1EventSetup().

bool L1GtPrescaleFactorsAndMasksTester::m_printInAnalyze
private

Definition at line 85 of file L1GtPrescaleFactorsAndMasksTester.h.

Referenced by analyze().

bool L1GtPrescaleFactorsAndMasksTester::m_printInBeginLuminosityBlock
private

Definition at line 84 of file L1GtPrescaleFactorsAndMasksTester.h.

Referenced by beginLuminosityBlock().

bool L1GtPrescaleFactorsAndMasksTester::m_printInBeginRun
private

print the records in beginRun, beginLuminosityBlock, analyze, respectively

Definition at line 83 of file L1GtPrescaleFactorsAndMasksTester.h.

Referenced by beginRun().

int L1GtPrescaleFactorsAndMasksTester::m_printOutput
private

print output

Definition at line 88 of file L1GtPrescaleFactorsAndMasksTester.h.

Referenced by printL1EventSetup().

bool L1GtPrescaleFactorsAndMasksTester::m_retrieveInAnalyze
private

Definition at line 80 of file L1GtPrescaleFactorsAndMasksTester.h.

Referenced by analyze().

bool L1GtPrescaleFactorsAndMasksTester::m_retrieveInBeginLuminosityBlock
private

Definition at line 79 of file L1GtPrescaleFactorsAndMasksTester.h.

Referenced by beginLuminosityBlock().

bool L1GtPrescaleFactorsAndMasksTester::m_retrieveInBeginRun
private

retrieve the records in beginRun, beginLuminosityBlock, analyze, respectively

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

Referenced by printL1EventSetup(), and retrieveL1EventSetup().

bool L1GtPrescaleFactorsAndMasksTester::m_testerTriggerMask
private

Definition at line 74 of file L1GtPrescaleFactorsAndMasksTester.h.

Referenced by printL1EventSetup(), and retrieveL1EventSetup().

bool L1GtPrescaleFactorsAndMasksTester::m_testerTriggerVetoMask
private

Definition at line 75 of file L1GtPrescaleFactorsAndMasksTester.h.

Referenced by printL1EventSetup(), and retrieveL1EventSetup().