CMS 3D CMS Logo

List of all members | Classes | Public Member Functions | Private Member Functions | Private Attributes
L1GtPrescaleFactorsAndMasksTester Class Reference

#include <L1GtPrescaleFactorsAndMasksTester.h>

Inheritance diagram for L1GtPrescaleFactorsAndMasksTester:
edm::one::EDAnalyzer< edm::one::WatchRuns, edm::one::WatchLuminosityBlocks > edm::one::EDAnalyzerBase edm::EDConsumerBase

Classes

struct  Tokens
 

Public Member Functions

 L1GtPrescaleFactorsAndMasksTester (const edm::ParameterSet &)
 
- Public Member Functions inherited from edm::one::EDAnalyzer< edm::one::WatchRuns, edm::one::WatchLuminosityBlocks >
 EDAnalyzer ()=default
 
 EDAnalyzer (const EDAnalyzer &)=delete
 
SerialTaskQueueglobalLuminosityBlocksQueue () final
 
SerialTaskQueueglobalRunsQueue () final
 
const EDAnalyzeroperator= (const EDAnalyzer &)=delete
 
bool wantsGlobalLuminosityBlocks () const final
 
bool wantsGlobalRuns () const final
 
bool wantsInputProcessBlocks () const final
 
bool wantsProcessBlocks () const final
 
- Public Member Functions inherited from edm::one::EDAnalyzerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzerBase ()
 
ModuleDescription const & moduleDescription () const
 
bool wantsStreamLuminosityBlocks () const
 
bool wantsStreamRuns () const
 
 ~EDAnalyzerBase () 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
 
ESResolverIndex const * esGetTokenIndices (edm::Transition iTrans) const
 
std::vector< ESResolverIndex > 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
 
void selectInputProcessBlocks (ProductRegistry const &productRegistry, ProcessBlockHelperBase const &processBlockHelperBase)
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
void updateLookup (eventsetup::ESRecordsToProductResolverIndices const &)
 
virtual ~EDConsumerBase () noexcept(false)
 

Private Member Functions

void analyze (const edm::Event &, const edm::EventSetup &) override
 analyze 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 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 ()
 print the requred records More...
 
void retrieveL1EventSetup (const edm::EventSetup &, const Tokens &)
 retrieve all the relevant L1 trigger event setup records More...
 

Private Attributes

Tokens m_event
 
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
 
Tokens m_lumi
 
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...
 
Tokens m_run
 
bool m_testerPrescaleFactors
 input parameters More...
 
bool m_testerTriggerMask
 
bool m_testerTriggerVetoMask
 

Additional Inherited Members

- Public Types inherited from edm::one::EDAnalyzerBase
typedef EDAnalyzerBase ModuleType
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Static Public Member Functions inherited from edm::one::EDAnalyzerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
- 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 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 39 of file L1GtPrescaleFactorsAndMasksTester.h.

Constructor & Destructor Documentation

◆ L1GtPrescaleFactorsAndMasksTester()

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

Definition at line 71 of file L1GtPrescaleFactorsAndMasksTester.cc.

72  : m_testerPrescaleFactors(parSet.getParameter<bool>("TesterPrescaleFactors")),
73  m_testerTriggerMask(parSet.getParameter<bool>("TesterTriggerMask")),
74  m_testerTriggerVetoMask(parSet.getParameter<bool>("TesterTriggerVetoMask")),
75  m_retrieveInBeginRun(parSet.getParameter<bool>("RetrieveInBeginRun")),
76  m_retrieveInBeginLuminosityBlock(parSet.getParameter<bool>("RetrieveInBeginLuminosityBlock")),
77  m_retrieveInAnalyze(parSet.getParameter<bool>("RetrieveInAnalyze")),
78  m_printInBeginRun(parSet.getParameter<bool>("PrintInBeginRun")),
79  m_printInBeginLuminosityBlock(parSet.getParameter<bool>("PrintInBeginLuminosityBlock")),
80  m_printInAnalyze(parSet.getParameter<bool>("PrintInAnalyze")),
81  m_printOutput(parSet.getUntrackedParameter<int>("PrintOutput", 3)),
82  m_run(tokens<edm::Transition::BeginRun>(
84  m_lumi(tokens<edm::Transition::BeginLuminosityBlock>(
86  m_event(tokens<edm::Transition::Event>(
88  // empty
89 }
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
bool m_retrieveInBeginRun
retrieve the records in beginRun, beginLuminosityBlock, analyze, respectively
T getUntrackedParameter(std::string const &, T const &) const
ConsumesCollector consumesCollector()
Use a ConsumesCollector to gather consumes information from helper functions.
bool m_printInBeginRun
print the records in beginRun, beginLuminosityBlock, analyze, respectively

Member Function Documentation

◆ analyze()

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

analyze

Implements edm::one::EDAnalyzerBase.

Definition at line 115 of file L1GtPrescaleFactorsAndMasksTester.cc.

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

115  {
116  if (m_retrieveInAnalyze) {
117  retrieveL1EventSetup(evSetup, m_event);
118  }
119 
120  if (m_printInAnalyze) {
122  }
123 }
void printL1EventSetup()
print the requred records
void retrieveL1EventSetup(const edm::EventSetup &, const Tokens &)
retrieve all the relevant L1 trigger event setup records

◆ beginLuminosityBlock()

void L1GtPrescaleFactorsAndMasksTester::beginLuminosityBlock ( const edm::LuminosityBlock iLumiBlock,
const edm::EventSetup evSetup 
)
overrideprivate

begin luminosity block

Definition at line 103 of file L1GtPrescaleFactorsAndMasksTester.cc.

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

104  {
106  retrieveL1EventSetup(evSetup, m_lumi);
107  }
108 
111  }
112 }
void printL1EventSetup()
print the requred records
void retrieveL1EventSetup(const edm::EventSetup &, const Tokens &)
retrieve all the relevant L1 trigger event setup records

◆ beginRun()

void L1GtPrescaleFactorsAndMasksTester::beginRun ( const edm::Run iRun,
const edm::EventSetup evSetup 
)
overrideprivate

begin run

Definition at line 92 of file L1GtPrescaleFactorsAndMasksTester.cc.

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

92  {
94  retrieveL1EventSetup(evSetup, m_run);
95  }
96 
97  if (m_printInBeginRun) {
99  }
100 }
bool m_retrieveInBeginRun
retrieve the records in beginRun, beginLuminosityBlock, analyze, respectively
bool m_printInBeginRun
print the records in beginRun, beginLuminosityBlock, analyze, respectively
void printL1EventSetup()
print the requred records
void retrieveL1EventSetup(const edm::EventSetup &, const Tokens &)
retrieve all the relevant L1 trigger event setup records

◆ endLuminosityBlock()

void L1GtPrescaleFactorsAndMasksTester::endLuminosityBlock ( const edm::LuminosityBlock iLumiBlock,
const edm::EventSetup evSetup 
)
overrideprivate

end luminosity block

Definition at line 126 of file L1GtPrescaleFactorsAndMasksTester.cc.

127  {}

◆ endRun()

void L1GtPrescaleFactorsAndMasksTester::endRun ( const edm::Run iRun,
const edm::EventSetup evSetup 
)
overrideprivate

end run

Definition at line 130 of file L1GtPrescaleFactorsAndMasksTester.cc.

130 {}

◆ printL1EventSetup()

void L1GtPrescaleFactorsAndMasksTester::printL1EventSetup ( )
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 & veto masks
#define LogTrace(id)
void print(std::ostream &) const
print the mask
const L1GtPrescaleFactors * m_l1GtPfAlgo
prescale factors
Log< level::Info, false > LogInfo
void print(std::ostream &) const
print the prescale factors

◆ retrieveL1EventSetup()

void L1GtPrescaleFactorsAndMasksTester::retrieveL1EventSetup ( const edm::EventSetup evSetup,
const Tokens tokens 
)
private

retrieve all the relevant L1 trigger event setup records

Definition at line 132 of file L1GtPrescaleFactorsAndMasksTester.cc.

References edm::EventSetup::getData(), L1GtPrescaleFactorsAndMasksTester::Tokens::m_l1GtPfAlgo, m_l1GtPfAlgo, L1GtPrescaleFactorsAndMasksTester::Tokens::m_l1GtPfTech, m_l1GtPfTech, L1GtPrescaleFactorsAndMasksTester::Tokens::m_l1GtTmAlgo, m_l1GtTmAlgo, L1GtPrescaleFactorsAndMasksTester::Tokens::m_l1GtTmTech, m_l1GtTmTech, L1GtPrescaleFactorsAndMasksTester::Tokens::m_l1GtTmVetoAlgo, m_l1GtTmVetoAlgo, L1GtPrescaleFactorsAndMasksTester::Tokens::m_l1GtTmVetoTech, m_l1GtTmVetoTech, m_testerPrescaleFactors, m_testerTriggerMask, and m_testerTriggerVetoMask.

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

132  {
134  // get / update the prescale factors from the EventSetup
135 
136  m_l1GtPfAlgo = &evSetup.getData(tokens.m_l1GtPfAlgo);
137  m_l1GtPfTech = &evSetup.getData(tokens.m_l1GtPfTech);
138  }
139 
140  if (m_testerTriggerMask) {
141  // get / update the trigger mask from the EventSetup
142 
143  m_l1GtTmAlgo = &evSetup.getData(tokens.m_l1GtTmAlgo);
144  m_l1GtTmTech = &evSetup.getData(tokens.m_l1GtTmTech);
145  }
146 
148  m_l1GtTmVetoAlgo = &evSetup.getData(tokens.m_l1GtTmVetoAlgo);
149  m_l1GtTmVetoTech = &evSetup.getData(tokens.m_l1GtTmVetoTech);
150  }
151 }
T const & getData(const ESGetToken< T, R > &iToken) const noexcept(false)
Definition: EventSetup.h:119
const L1GtTriggerMask * m_l1GtTmAlgo
trigger masks & veto masks
const L1GtPrescaleFactors * m_l1GtPfAlgo
prescale factors

Member Data Documentation

◆ m_event

Tokens L1GtPrescaleFactorsAndMasksTester::m_event
private

Definition at line 112 of file L1GtPrescaleFactorsAndMasksTester.h.

Referenced by analyze().

◆ m_l1GtPfAlgo

const L1GtPrescaleFactors* L1GtPrescaleFactorsAndMasksTester::m_l1GtPfAlgo
private

prescale factors

Definition at line 100 of file L1GtPrescaleFactorsAndMasksTester.h.

Referenced by printL1EventSetup(), and retrieveL1EventSetup().

◆ m_l1GtPfTech

const L1GtPrescaleFactors* L1GtPrescaleFactorsAndMasksTester::m_l1GtPfTech
private

Definition at line 101 of file L1GtPrescaleFactorsAndMasksTester.h.

Referenced by printL1EventSetup(), and retrieveL1EventSetup().

◆ m_l1GtTmAlgo

const L1GtTriggerMask* L1GtPrescaleFactorsAndMasksTester::m_l1GtTmAlgo
private

trigger masks & veto masks

Definition at line 104 of file L1GtPrescaleFactorsAndMasksTester.h.

Referenced by printL1EventSetup(), and retrieveL1EventSetup().

◆ m_l1GtTmTech

const L1GtTriggerMask* L1GtPrescaleFactorsAndMasksTester::m_l1GtTmTech
private

Definition at line 105 of file L1GtPrescaleFactorsAndMasksTester.h.

Referenced by printL1EventSetup(), and retrieveL1EventSetup().

◆ m_l1GtTmVetoAlgo

const L1GtTriggerMask* L1GtPrescaleFactorsAndMasksTester::m_l1GtTmVetoAlgo
private

Definition at line 107 of file L1GtPrescaleFactorsAndMasksTester.h.

Referenced by printL1EventSetup(), and retrieveL1EventSetup().

◆ m_l1GtTmVetoTech

const L1GtTriggerMask* L1GtPrescaleFactorsAndMasksTester::m_l1GtTmVetoTech
private

Definition at line 108 of file L1GtPrescaleFactorsAndMasksTester.h.

Referenced by printL1EventSetup(), and retrieveL1EventSetup().

◆ m_lumi

Tokens L1GtPrescaleFactorsAndMasksTester::m_lumi
private

Definition at line 111 of file L1GtPrescaleFactorsAndMasksTester.h.

Referenced by beginLuminosityBlock().

◆ m_printInAnalyze

bool L1GtPrescaleFactorsAndMasksTester::m_printInAnalyze
private

Definition at line 93 of file L1GtPrescaleFactorsAndMasksTester.h.

Referenced by analyze().

◆ m_printInBeginLuminosityBlock

bool L1GtPrescaleFactorsAndMasksTester::m_printInBeginLuminosityBlock
private

Definition at line 92 of file L1GtPrescaleFactorsAndMasksTester.h.

Referenced by beginLuminosityBlock().

◆ m_printInBeginRun

bool L1GtPrescaleFactorsAndMasksTester::m_printInBeginRun
private

print the records in beginRun, beginLuminosityBlock, analyze, respectively

Definition at line 91 of file L1GtPrescaleFactorsAndMasksTester.h.

Referenced by beginRun().

◆ m_printOutput

int L1GtPrescaleFactorsAndMasksTester::m_printOutput
private

print output

Definition at line 96 of file L1GtPrescaleFactorsAndMasksTester.h.

Referenced by printL1EventSetup().

◆ m_retrieveInAnalyze

bool L1GtPrescaleFactorsAndMasksTester::m_retrieveInAnalyze
private

Definition at line 88 of file L1GtPrescaleFactorsAndMasksTester.h.

Referenced by analyze().

◆ m_retrieveInBeginLuminosityBlock

bool L1GtPrescaleFactorsAndMasksTester::m_retrieveInBeginLuminosityBlock
private

Definition at line 87 of file L1GtPrescaleFactorsAndMasksTester.h.

Referenced by beginLuminosityBlock().

◆ m_retrieveInBeginRun

bool L1GtPrescaleFactorsAndMasksTester::m_retrieveInBeginRun
private

retrieve the records in beginRun, beginLuminosityBlock, analyze, respectively

Definition at line 86 of file L1GtPrescaleFactorsAndMasksTester.h.

Referenced by beginRun().

◆ m_run

Tokens L1GtPrescaleFactorsAndMasksTester::m_run
private

Definition at line 110 of file L1GtPrescaleFactorsAndMasksTester.h.

Referenced by beginRun().

◆ m_testerPrescaleFactors

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().

◆ m_testerTriggerMask

bool L1GtPrescaleFactorsAndMasksTester::m_testerTriggerMask
private

Definition at line 82 of file L1GtPrescaleFactorsAndMasksTester.h.

Referenced by printL1EventSetup(), and retrieveL1EventSetup().

◆ m_testerTriggerVetoMask

bool L1GtPrescaleFactorsAndMasksTester::m_testerTriggerVetoMask
private

Definition at line 83 of file L1GtPrescaleFactorsAndMasksTester.h.

Referenced by printL1EventSetup(), and retrieveL1EventSetup().