CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Member Functions | Private Member Functions
L1TUtmTriggerMenuDumper Class Reference
Inheritance diagram for L1TUtmTriggerMenuDumper:
edm::EDAnalyzer edm::EDConsumerBase

Public Member Functions

 L1TUtmTriggerMenuDumper (const ParameterSet &)
 
 ~L1TUtmTriggerMenuDumper () 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 &&)=default
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
ESProxyIndex const * esGetTokenIndices (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::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
void updateLookup (eventsetup::ESRecordsToProxyIndices const &)
 
virtual ~EDConsumerBase () noexcept(false)
 

Static Public Member Functions

static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
- 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 wantsStreamLuminosityBlocks ()
 
static bool wantsStreamRuns ()
 

Private Member Functions

void analyze (Event const &, EventSetup const &) override
 
void beginJob () override
 
void beginLuminosityBlock (LuminosityBlock const &, EventSetup const &) override
 
void beginRun (Run const &, EventSetup const &) override
 
void endJob () override
 
void endLuminosityBlock (LuminosityBlock const &, EventSetup const &) override
 
void endRun (Run const &, EventSetup const &) override
 

Additional Inherited Members

- Public Types inherited from edm::EDAnalyzer
typedef EDAnalyzer ModuleType
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Protected Member Functions inherited from edm::EDConsumerBase
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (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)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 

Detailed Description

Definition at line 35 of file L1TUtmTriggerMenuDumper.cc.

Constructor & Destructor Documentation

◆ L1TUtmTriggerMenuDumper()

L1TUtmTriggerMenuDumper::L1TUtmTriggerMenuDumper ( const ParameterSet iConfig)
explicit

Definition at line 53 of file L1TUtmTriggerMenuDumper.cc.

53 {}

◆ ~L1TUtmTriggerMenuDumper()

L1TUtmTriggerMenuDumper::~L1TUtmTriggerMenuDumper ( )
override

Definition at line 55 of file L1TUtmTriggerMenuDumper.cc.

55 {}

Member Function Documentation

◆ analyze()

void L1TUtmTriggerMenuDumper::analyze ( Event const &  iEvent,
EventSetup const &  iSetup 
)
overrideprivatevirtual

Implements edm::EDAnalyzer.

Definition at line 57 of file L1TUtmTriggerMenuDumper.cc.

57 {}

◆ beginJob()

void L1TUtmTriggerMenuDumper::beginJob ( void  )
overrideprivatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 59 of file L1TUtmTriggerMenuDumper.cc.

59 { cout << "INFO: L1TUtmTriggerMenuDumper module beginJob called.\n"; }

References gather_cfg::cout.

◆ beginLuminosityBlock()

void L1TUtmTriggerMenuDumper::beginLuminosityBlock ( LuminosityBlock const &  ,
EventSetup const &   
)
overrideprivatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 186 of file L1TUtmTriggerMenuDumper.cc.

186 {}

◆ beginRun()

void L1TUtmTriggerMenuDumper::beginRun ( Run const &  run,
EventSetup const &  iSetup 
)
overrideprivatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 63 of file L1TUtmTriggerMenuDumper.cc.

63  {
65  iSetup.get<L1TUtmTriggerMenuRcd>().get(hmenu);
66  const esTriggerMenu* menu = reinterpret_cast<const esTriggerMenu*>(hmenu.product());
67 
68  const std::map<std::string, esAlgorithm>& algoMap = menu->getAlgorithmMap();
69  const std::map<std::string, esCondition>& condMap = menu->getConditionMap();
70  const std::map<std::string, esScale>& scaleMap = menu->getScaleMap();
71 
72  bool hasPrecision = false;
73  std::map<std::string, unsigned int> precisions;
74  getPrecisions(precisions, scaleMap);
75  for (std::map<std::string, unsigned int>::const_iterator cit = precisions.begin(); cit != precisions.end(); cit++) {
76  std::cout << cit->first << " = " << cit->second << "\n";
77  hasPrecision = true;
78  }
79 
80  if (hasPrecision) {
81  std::map<std::string, esScale>::iterator it1, it2;
82  const esScale* scale1 = &scaleMap.find("EG-ETA")->second;
83  const esScale* scale2 = &scaleMap.find("MU-ETA")->second;
84 
85  std::vector<long long> lut_eg_2_mu_eta;
86  getCaloMuonEtaConversionLut(lut_eg_2_mu_eta, scale1, scale2);
87 
88  scale1 = &scaleMap.find("EG-PHI")->second;
89  scale2 = &scaleMap.find("MU-PHI")->second;
90 
91  std::vector<long long> lut_eg_2_mu_phi;
92  getCaloMuonPhiConversionLut(lut_eg_2_mu_phi, scale1, scale2);
93 
94  scale1 = &scaleMap.find("EG-ETA")->second;
95  scale2 = &scaleMap.find("MU-ETA")->second;
96 
97  std::vector<double> eg_mu_delta_eta;
98  std::vector<long long> lut_eg_mu_delta_eta;
99  size_t n = getDeltaVector(eg_mu_delta_eta, scale1, scale2);
100  setLut(lut_eg_mu_delta_eta, eg_mu_delta_eta, precisions["PRECISION-EG-MU-Delta"]);
101 
102  std::vector<long long> lut_eg_mu_cosh;
103  applyCosh(eg_mu_delta_eta, n);
104  setLut(lut_eg_mu_cosh, eg_mu_delta_eta, precisions["PRECISION-EG-MU-Math"]);
105 
106  scale1 = &scaleMap.find("EG-PHI")->second;
107  scale2 = &scaleMap.find("MU-PHI")->second;
108 
109  std::vector<double> eg_mu_delta_phi;
110  std::vector<long long> lut_eg_mu_delta_phi;
111  n = getDeltaVector(eg_mu_delta_phi, scale1, scale2);
112  setLut(lut_eg_mu_delta_phi, eg_mu_delta_phi, precisions["PRECISION-EG-MU-Delta"]);
113 
114  std::vector<long long> lut_eg_mu_cos;
115  applyCos(eg_mu_delta_phi, n);
116  setLut(lut_eg_mu_cos, eg_mu_delta_phi, precisions["PRECISION-EG-MU-Math"]);
117 
118  scale1 = &scaleMap.find("EG-ET")->second;
119  std::vector<long long> lut_eg_et;
120  getLut(lut_eg_et, scale1, precisions["PRECISION-EG-MU-MassPt"]);
121 
122  scale1 = &scaleMap.find("MU-ET")->second;
123  std::vector<long long> lut_mu_et;
124  getLut(lut_mu_et, scale1, precisions["PRECISION-EG-MU-MassPt"]);
125  for (size_t ii = 0; ii < lut_mu_et.size(); ii++) {
126  std::cout << lut_mu_et.at(ii) << "\n";
127  }
128  }
129 
130  for (std::map<std::string, esAlgorithm>::const_iterator cit = algoMap.begin(); cit != algoMap.end(); cit++) {
131  const esAlgorithm& algo = cit->second;
132  std::cout << "algo name = " << algo.getName() << "\n";
133  std::cout << "algo exp. = " << algo.getExpression() << "\n";
134  std::cout << "algo exp. in cond. = " << algo.getExpressionInCondition() << "\n";
135 
136  const std::vector<std::string>& rpn_vec = algo.getRpnVector();
137  for (size_t ii = 0; ii < rpn_vec.size(); ii++) {
138  const std::string& token = rpn_vec.at(ii);
139  if (Algorithm::isGate(token))
140  continue;
141  const esCondition& condition = condMap.find(token)->second;
142  std::cout << " cond type = " << condition.getType() << "\n";
143 
144  const std::vector<esCut>& cuts = condition.getCuts();
145  for (size_t jj = 0; jj < cuts.size(); jj++) {
146  const esCut& cut = cuts.at(jj);
147  std::cout << " cut name = " << cut.getName() << "\n";
148  std::cout << " cut target = " << cut.getObjectType() << "\n";
149  std::cout << " cut type = " << cut.getCutType() << "\n";
150  std::cout << " cut min. value index = " << cut.getMinimum().value << " " << cut.getMinimum().index << "\n";
151  std::cout << " cut max. value index = " << cut.getMaximum().value << " " << cut.getMaximum().index << "\n";
152  std::cout << " cut data = " << cut.getData() << "\n";
153  }
154 
155  const std::vector<esObject>& objects = condition.getObjects();
156  for (size_t jj = 0; jj < objects.size(); jj++) {
157  const esObject& object = objects.at(jj);
158  std::cout << " obj name = " << object.getName() << "\n";
159  std::cout << " obj type = " << object.getType() << "\n";
160  std::cout << " obj op = " << object.getComparisonOperator() << "\n";
161  std::cout << " obj bx = " << object.getBxOffset() << "\n";
162  if (object.getType() == esObjectType::EXT) {
163  std::cout << " ext name = " << object.getExternalSignalName() << "\n";
164  std::cout << " ext ch id = " << object.getExternalChannelId() << "\n";
165  }
166 
167  const std::vector<esCut>& cuts = object.getCuts();
168  for (size_t kk = 0; kk < cuts.size(); kk++) {
169  const esCut& cut = cuts.at(kk);
170  std::cout << " cut name = " << cut.getName() << "\n";
171  std::cout << " cut target = " << cut.getObjectType() << "\n";
172  std::cout << " cut type = " << cut.getCutType() << "\n";
173  std::cout << " cut min. value index = " << cut.getMinimum().value << " " << cut.getMinimum().index
174  << "\n";
175  std::cout << " cut max. value index = " << cut.getMaximum().value << " " << cut.getMaximum().index
176  << "\n";
177  std::cout << " cut data = " << cut.getData() << "\n";
178  }
179  }
180  }
181  }
182 }

References goodZToMuMu_cfi::condition, gather_cfg::cout, TkAlMuonSelectors_cfi::cut, L1TMuonDQMOffline_cfi::cuts, edm::EventSetup::get(), edm::get(), cuy::ii, findQualityFiles::jj, GetRecoTauVFromDQM_MC_cff::kk, optionsL1T::menu, dqmiodumpmetadata::n, edm::ESHandle< T >::product(), AlCaHLTBitMon_QueryRunRegistry::string, and unpackBuffers-CaloStage2::token.

◆ endJob()

void L1TUtmTriggerMenuDumper::endJob ( void  )
overrideprivatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 61 of file L1TUtmTriggerMenuDumper.cc.

61 { cout << "INFO: L1TUtmTriggerMenuDumper module endJob called.\n"; }

References gather_cfg::cout.

◆ endLuminosityBlock()

void L1TUtmTriggerMenuDumper::endLuminosityBlock ( LuminosityBlock const &  ,
EventSetup const &   
)
overrideprivatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 188 of file L1TUtmTriggerMenuDumper.cc.

188 {}

◆ endRun()

void L1TUtmTriggerMenuDumper::endRun ( Run const &  ,
EventSetup const &   
)
overrideprivatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 184 of file L1TUtmTriggerMenuDumper.cc.

184 {}

◆ fillDescriptions()

void L1TUtmTriggerMenuDumper::fillDescriptions ( ConfigurationDescriptions descriptions)
static

Definition at line 190 of file L1TUtmTriggerMenuDumper.cc.

190  {
191  //The following says we do not know what parameters are allowed so do no validation
192  // Please change this to state exactly what you do use, even if it is no parameters
194  desc.setUnknown();
195  descriptions.addDefault(desc);
196 }

References edm::ConfigurationDescriptions::addDefault(), and edm::ParameterSetDescription::setUnknown().

edm::ESHandle::product
T const * product() const
Definition: ESHandle.h:86
dqmiodumpmetadata.n
n
Definition: dqmiodumpmetadata.py:28
TkAlMuonSelectors_cfi.cut
cut
Definition: TkAlMuonSelectors_cfi.py:5
L1TUtmTriggerMenuRcd
Definition: L1TUtmTriggerMenuRcd.h:11
gather_cfg.cout
cout
Definition: gather_cfg.py:144
objects
Definition: __init__.py:1
edm::ParameterSetDescription
Definition: ParameterSetDescription.h:52
cmsdt::algo
algo
Definition: constants.h:164
edm::ESHandle
Definition: DTSurvey.h:22
GetRecoTauVFromDQM_MC_cff.kk
kk
Definition: GetRecoTauVFromDQM_MC_cff.py:84
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
optionsL1T.menu
menu
Definition: optionsL1T.py:29
edm::ParameterSetDescription::setUnknown
void setUnknown()
Definition: ParameterSetDescription.cc:39
get
#define get
goodZToMuMu_cfi.condition
condition
Definition: goodZToMuMu_cfi.py:37
findQualityFiles.jj
string jj
Definition: findQualityFiles.py:188
L1TMuonDQMOffline_cfi.cuts
cuts
Definition: L1TMuonDQMOffline_cfi.py:41
edm::ConfigurationDescriptions::addDefault
void addDefault(ParameterSetDescription const &psetDescription)
Definition: ConfigurationDescriptions.cc:99
cuy.ii
ii
Definition: cuy.py:590
unpackBuffers-CaloStage2.token
token
Definition: unpackBuffers-CaloStage2.py:316