CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 ()
 
- 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 ()
 

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 &)
 

Private Member Functions

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

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
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

Definition at line 37 of file L1TUtmTriggerMenuDumper.cc.

Constructor & Destructor Documentation

L1TUtmTriggerMenuDumper::L1TUtmTriggerMenuDumper ( const ParameterSet iConfig)
explicit

Definition at line 57 of file L1TUtmTriggerMenuDumper.cc.

57 {}
L1TUtmTriggerMenuDumper::~L1TUtmTriggerMenuDumper ( )

Definition at line 59 of file L1TUtmTriggerMenuDumper.cc.

59 {}

Member Function Documentation

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

Implements edm::EDAnalyzer.

Definition at line 63 of file L1TUtmTriggerMenuDumper.cc.

63 {}
void L1TUtmTriggerMenuDumper::beginJob ( void  )
privatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 66 of file L1TUtmTriggerMenuDumper.cc.

References gather_cfg::cout.

67 {
68  cout << "INFO: L1TUtmTriggerMenuDumper module beginJob called.\n";
69 }
tuple cout
Definition: gather_cfg.py:145
void L1TUtmTriggerMenuDumper::beginLuminosityBlock ( LuminosityBlock const &  ,
EventSetup const &   
)
privatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 220 of file L1TUtmTriggerMenuDumper.cc.

221 {
222 }
void L1TUtmTriggerMenuDumper::beginRun ( Run const &  run,
EventSetup const &  iSetup 
)
privatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 77 of file L1TUtmTriggerMenuDumper.cc.

References ecalcalib_dqm_sourceclient-live_cfg::algo, gather_cfg::cout, GOODCOLL_filter_cfg::cut, hpstanc_transforms::cuts, edm::EventSetup::get(), cuy::ii, findQualityFiles::jj, GetRecoTauVFromDQM_MC_cff::kk, relval_steps::menu, gen::n, edm::ESHandle< class >::product(), AlCaHLTBitMon_QueryRunRegistry::string, and unpackBuffers-CaloStage2::token.

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

Reimplemented from edm::EDAnalyzer.

Definition at line 72 of file L1TUtmTriggerMenuDumper.cc.

References gather_cfg::cout.

72  {
73  cout << "INFO: L1TUtmTriggerMenuDumper module endJob called.\n";
74 }
tuple cout
Definition: gather_cfg.py:145
void L1TUtmTriggerMenuDumper::endLuminosityBlock ( LuminosityBlock const &  ,
EventSetup const &   
)
privatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 225 of file L1TUtmTriggerMenuDumper.cc.

226 {
227 }
void L1TUtmTriggerMenuDumper::endRun ( Run const &  ,
EventSetup const &   
)
privatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 215 of file L1TUtmTriggerMenuDumper.cc.

216 {
217 }
void L1TUtmTriggerMenuDumper::fillDescriptions ( ConfigurationDescriptions descriptions)
static

Definition at line 230 of file L1TUtmTriggerMenuDumper.cc.

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

230  {
231  //The following says we do not know what parameters are allowed so do no validation
232  // Please change this to state exactly what you do use, even if it is no parameters
234  desc.setUnknown();
235  descriptions.addDefault(desc);
236 }
void addDefault(ParameterSetDescription const &psetDescription)