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
 
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 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 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 39 of file L1GtPrescaleFactorsAndMasksTester.h.

Constructor & Destructor Documentation

◆ L1GtPrescaleFactorsAndMasksTester()

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

Definition at line 74 of file L1GtPrescaleFactorsAndMasksTester.cc.

75  : m_testerPrescaleFactors(parSet.getParameter<bool>("TesterPrescaleFactors")),
76  m_testerTriggerMask(parSet.getParameter<bool>("TesterTriggerMask")),
77  m_testerTriggerVetoMask(parSet.getParameter<bool>("TesterTriggerVetoMask")),
78  m_retrieveInBeginRun(parSet.getParameter<bool>("RetrieveInBeginRun")),
79  m_retrieveInBeginLuminosityBlock(parSet.getParameter<bool>("RetrieveInBeginLuminosityBlock")),
80  m_retrieveInAnalyze(parSet.getParameter<bool>("RetrieveInAnalyze")),
81  m_printInBeginRun(parSet.getParameter<bool>("PrintInBeginRun")),
82  m_printInBeginLuminosityBlock(parSet.getParameter<bool>("PrintInBeginLuminosityBlock")),
83  m_printInAnalyze(parSet.getParameter<bool>("PrintInAnalyze")),
84  m_printOutput(parSet.getUntrackedParameter<int>("PrintOutput", 3)),
85  m_run(tokens<edm::Transition::BeginRun>(
87  m_lumi(tokens<edm::Transition::BeginLuminosityBlock>(
89  m_event(tokens<edm::Transition::Event>(
91  // empty
92 }
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 118 of file L1GtPrescaleFactorsAndMasksTester.cc.

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

118  {
119  if (m_retrieveInAnalyze) {
120  retrieveL1EventSetup(evSetup, m_event);
121  }
122 
123  if (m_printInAnalyze) {
125  }
126 }
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 106 of file L1GtPrescaleFactorsAndMasksTester.cc.

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

107  {
109  retrieveL1EventSetup(evSetup, m_lumi);
110  }
111 
114  }
115 }
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 95 of file L1GtPrescaleFactorsAndMasksTester.cc.

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

95  {
97  retrieveL1EventSetup(evSetup, m_run);
98  }
99 
100  if (m_printInBeginRun) {
102  }
103 }
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 129 of file L1GtPrescaleFactorsAndMasksTester.cc.

130  {}

◆ endRun()

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

end run

Definition at line 133 of file L1GtPrescaleFactorsAndMasksTester.cc.

133 {}

◆ printL1EventSetup()

void L1GtPrescaleFactorsAndMasksTester::printL1EventSetup ( )
private

print the requred records

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

156  {
157  // define an output stream to print into
158  // it can then be directed to whatever log level is desired
159  std::ostringstream myCout;
160 
162  myCout << "\nL1 GT prescale factors for algorithm triggers" << std::endl;
163  m_l1GtPfAlgo->print(myCout);
164 
165  myCout << "\nL1 GT prescale factors for technical triggers" << std::endl;
166  m_l1GtPfTech->print(myCout);
167  }
168 
169  //
170  if (m_testerTriggerMask) {
171  myCout << "\nL1 GT trigger masks for algorithm triggers" << std::endl;
172  m_l1GtTmAlgo->print(myCout);
173 
174  myCout << "\nL1 GT trigger masks for technical triggers" << std::endl;
175  m_l1GtTmTech->print(myCout);
176  }
177 
178  //
180  myCout << "\nL1 GT trigger veto masks for algorithm triggers" << std::endl;
181  m_l1GtTmVetoAlgo->print(myCout);
182 
183  myCout << "\nL1 GT trigger veto masks for technical triggers" << std::endl;
184  m_l1GtTmVetoTech->print(myCout);
185  }
186 
187  switch (m_printOutput) {
188  case 0: {
189  std::cout << myCout.str() << std::endl;
190 
191  }
192 
193  break;
194  case 1: {
195  LogTrace("L1GtPrescaleFactorsAndMasksTester") << myCout.str() << std::endl;
196 
197  } break;
198 
199  case 2: {
200  edm::LogVerbatim("L1GtPrescaleFactorsAndMasksTester") << myCout.str() << std::endl;
201 
202  }
203 
204  break;
205  case 3: {
206  edm::LogInfo("L1GtPrescaleFactorsAndMasksTester") << myCout.str();
207 
208  }
209 
210  break;
211  default: {
212  myCout << "\n\n L1GtPrescaleFactorsAndMasksTester: Error - no print output = " << m_printOutput
213  << " defined! \n Check available values in the cfi file."
214  << "\n"
215  << std::endl;
216 
217  } break;
218  }
219 }
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 135 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().

135  {
137  // get / update the prescale factors from the EventSetup
138 
139  m_l1GtPfAlgo = &evSetup.getData(tokens.m_l1GtPfAlgo);
140  m_l1GtPfTech = &evSetup.getData(tokens.m_l1GtPfTech);
141  }
142 
143  if (m_testerTriggerMask) {
144  // get / update the trigger mask from the EventSetup
145 
146  m_l1GtTmAlgo = &evSetup.getData(tokens.m_l1GtTmAlgo);
147  m_l1GtTmTech = &evSetup.getData(tokens.m_l1GtTmTech);
148  }
149 
151  m_l1GtTmVetoAlgo = &evSetup.getData(tokens.m_l1GtTmVetoAlgo);
152  m_l1GtTmVetoTech = &evSetup.getData(tokens.m_l1GtTmVetoTech);
153  }
154 }
const L1GtTriggerMask * m_l1GtTmAlgo
trigger masks & veto masks
const L1GtPrescaleFactors * m_l1GtPfAlgo
prescale factors
bool getData(T &iHolder) const
Definition: EventSetup.h:122

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