CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions | Private Attributes
L1TMuonGlobalParamsViewer Class Reference
Inheritance diagram for L1TMuonGlobalParamsViewer:
edm::one::EDAnalyzer<> edm::one::EDAnalyzerBase edm::EDConsumerBase

Public Member Functions

void analyze (const edm::Event &, const edm::EventSetup &) override
 
 L1TMuonGlobalParamsViewer (const edm::ParameterSet &pset)
 
- Public Member Functions inherited from edm::one::EDAnalyzer<>
 EDAnalyzer ()=default
 
 EDAnalyzer (const EDAnalyzer &)=delete
 
SerialTaskQueueglobalLuminosityBlocksQueue () final
 
SerialTaskQueueglobalRunsQueue () final
 
const EDAnalyzeroperator= (const EDAnalyzer &)=delete
 
bool wantsGlobalLuminosityBlocks () const noexcept final
 
bool wantsGlobalRuns () const noexcept final
 
bool wantsInputProcessBlocks () const noexcept final
 
bool wantsProcessBlocks () const noexcept 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 noexcept
 
bool wantsStreamRuns () const noexcept
 
 ~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

std::string hash (void *buf, size_t len) const
 
void printLUT (l1t::LUT *lut, const char *name) const
 

Private Attributes

edm::ESGetToken< L1TMuonGlobalParams, L1TMuonGlobalParamsRcdtoken_
 

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

Definition at line 22 of file L1TMuonGlobalParamsViewer.cc.

Constructor & Destructor Documentation

◆ L1TMuonGlobalParamsViewer()

L1TMuonGlobalParamsViewer::L1TMuonGlobalParamsViewer ( const edm::ParameterSet pset)
inlineexplicit

Definition at line 34 of file L1TMuonGlobalParamsViewer.cc.

References deDxTools::esConsumes().

34  : token_{esConsumes()} {
35  // printLayerMap = pset.getUntrackedParameter<bool>("printLayerMap", false);
36  }
edm::ESGetToken< L1TMuonGlobalParams, L1TMuonGlobalParamsRcd > token_

Member Function Documentation

◆ analyze()

void L1TMuonGlobalParamsViewer::analyze ( const edm::Event iEvent,
const edm::EventSetup evSetup 
)
overridevirtual

Implements edm::one::EDAnalyzerBase.

Definition at line 84 of file L1TMuonGlobalParamsViewer.cc.

References L1TMuonGlobalParams::absIsoCheckMemLUT(), L1TMuonGlobalParams::absIsoCheckMemLUTPath(), L1TMuonGlobalParams::bEtaExtrapolationLUT(), L1TMuonGlobalParams::bEtaExtrapolationLUTPath(), L1TMuonGlobalParams::bONegMatchQualLUT(), L1TMuonGlobalParams::bONegMatchQualLUTMaxDR(), L1TMuonGlobalParams::bONegMatchQualLUTMaxDREtaFine(), L1TMuonGlobalParams::bONegMatchQualLUTPath(), L1TMuonGlobalParams::bOPosMatchQualLUT(), L1TMuonGlobalParams::bOPosMatchQualLUTMaxDR(), L1TMuonGlobalParams::bOPosMatchQualLUTMaxDREtaFine(), L1TMuonGlobalParams::bOPosMatchQualLUTPath(), L1TMuonGlobalParams::bPhiExtrapolationLUT(), L1TMuonGlobalParams::bPhiExtrapolationLUTPath(), gather_cfg::cout, L1TMuonGlobalParams::fEtaExtrapolationLUT(), L1TMuonGlobalParams::fEtaExtrapolationLUTPath(), L1TMuonGlobalParams::fONegMatchQualLUT(), L1TMuonGlobalParams::fONegMatchQualLUTMaxDR(), L1TMuonGlobalParams::fONegMatchQualLUTPath(), L1TMuonGlobalParams::fOPosMatchQualLUT(), L1TMuonGlobalParams::fOPosMatchQualLUTMaxDR(), L1TMuonGlobalParams::fOPosMatchQualLUTPath(), L1TMuonGlobalParams::fPhiExtrapolationLUT(), L1TMuonGlobalParams::fPhiExtrapolationLUTPath(), L1TMuonGlobalParams::fwdNegSingleMatchQualLUT(), L1TMuonGlobalParams::fwdNegSingleMatchQualLUTMaxDR(), L1TMuonGlobalParams::fwdNegSingleMatchQualLUTPath(), L1TMuonGlobalParams::fwdPosSingleMatchQualLUT(), L1TMuonGlobalParams::fwdPosSingleMatchQualLUTMaxDR(), L1TMuonGlobalParams::fwdPosSingleMatchQualLUTPath(), edm::EventSetup::getData(), L1TMuonGlobalParams::idxSelMemEtaLUT(), L1TMuonGlobalParams::idxSelMemEtaLUTPath(), L1TMuonGlobalParams::idxSelMemPhiLUT(), L1TMuonGlobalParams::idxSelMemPhiLUTPath(), L1TMuonGlobalParams::oEtaExtrapolationLUT(), L1TMuonGlobalParams::oEtaExtrapolationLUTPath(), L1TMuonGlobalParams::oPhiExtrapolationLUT(), L1TMuonGlobalParams::oPhiExtrapolationLUTPath(), L1TMuonGlobalParams::ovlNegSingleMatchQualLUT(), L1TMuonGlobalParams::ovlNegSingleMatchQualLUTMaxDR(), L1TMuonGlobalParams::ovlNegSingleMatchQualLUTPath(), L1TMuonGlobalParams::ovlPosSingleMatchQualLUT(), L1TMuonGlobalParams::ovlPosSingleMatchQualLUTMaxDR(), L1TMuonGlobalParams::ovlPosSingleMatchQualLUTPath(), l1tmetemu::printLUT(), L1TMuonGlobalParams::relIsoCheckMemLUT(), L1TMuonGlobalParams::relIsoCheckMemLUTPath(), L1TMuonGlobalParams::sortRankLUT(), L1TMuonGlobalParams::sortRankLUTPath(), L1TMuonGlobalParams::sortRankLUTPtFactor(), and L1TMuonGlobalParams::sortRankLUTQualFactor().

84  {
85  // Pull the config from the ES
86  // has to be a copy as call non-const methods
87  L1TMuonGlobalParams ptr1 = evSetup.getData(token_);
88 
89  // cout<<"Some fields in L1TMuonGlobalParams: "<<endl;
90 
91  // ((L1TMuonGlobalParamsHelper*)ptr1.get())->print(cout);
92 
93  printLUT(ptr1.absIsoCheckMemLUT(), "absIsoCheckMemLUT");
94  printLUT(ptr1.absIsoCheckMemLUT(), "absIsoCheckMemLUT");
95  printLUT(ptr1.relIsoCheckMemLUT(), "relIsoCheckMemLUT");
96  printLUT(ptr1.idxSelMemPhiLUT(), "idxSelMemPhiLUT");
97  printLUT(ptr1.idxSelMemEtaLUT(), "idxSelMemEtaLUT");
98  //l1t::LUT* brlSingleMatchQualLUT();
99  printLUT(ptr1.fwdPosSingleMatchQualLUT(), "fwdPosSingleMatchQualLUT");
100  printLUT(ptr1.fwdNegSingleMatchQualLUT(), "fwdNegSingleMatchQualLUT");
101  printLUT(ptr1.ovlPosSingleMatchQualLUT(), "ovlPosSingleMatchQualLUT");
102  printLUT(ptr1.ovlNegSingleMatchQualLUT(), "ovlNegSingleMatchQualLUT");
103  printLUT(ptr1.bOPosMatchQualLUT(), "bOPosMatchQualLUT");
104  printLUT(ptr1.bONegMatchQualLUT(), "bONegMatchQualLUT");
105  printLUT(ptr1.fOPosMatchQualLUT(), "fOPosMatchQualLUT");
106  printLUT(ptr1.fONegMatchQualLUT(), "fONegMatchQualLUT");
107  printLUT(ptr1.bPhiExtrapolationLUT(), "bPhiExtrapolationLUT");
108  printLUT(ptr1.oPhiExtrapolationLUT(), "oPhiExtrapolationLUT");
109  printLUT(ptr1.fPhiExtrapolationLUT(), "fPhiExtrapolationLUT");
110  printLUT(ptr1.bEtaExtrapolationLUT(), "bEtaExtrapolationLUT");
111  printLUT(ptr1.oEtaExtrapolationLUT(), "oEtaExtrapolationLUT");
112  printLUT(ptr1.fEtaExtrapolationLUT(), "fEtaExtrapolationLUT");
113  printLUT(ptr1.sortRankLUT(), "sortRankLUT");
114 
115  std::cout << "absIsoCheckMemLUTPath: " << ptr1.absIsoCheckMemLUTPath() << std::endl;
116  std::cout << "relIsoCheckMemLUTPath: " << ptr1.relIsoCheckMemLUTPath() << std::endl;
117  std::cout << "idxSelMemPhiLUTPath: " << ptr1.idxSelMemPhiLUTPath() << std::endl;
118  std::cout << "idxSelMemEtaLUTPath: " << ptr1.idxSelMemEtaLUTPath() << std::endl;
119  //std::string brlSingleMatchQualLUTPath() const { return pnodes_[brlSingleMatchQual].sparams_.size() > spIdx::fname ? pnodes_[brlSingleMatchQual].sparams_[spIdx::fname] : ""; }
120  std::cout << "fwdPosSingleMatchQualLUTPath: " << ptr1.fwdPosSingleMatchQualLUTPath() << std::endl;
121  std::cout << "fwdNegSingleMatchQualLUTPath: " << ptr1.fwdNegSingleMatchQualLUTPath() << std::endl;
122  std::cout << "ovlPosSingleMatchQualLUTPath: " << ptr1.ovlPosSingleMatchQualLUTPath() << std::endl;
123  std::cout << "ovlNegSingleMatchQualLUTPath: " << ptr1.ovlNegSingleMatchQualLUTPath() << std::endl;
124  std::cout << "bOPosMatchQualLUTPath: " << ptr1.bOPosMatchQualLUTPath() << std::endl;
125  std::cout << "bONegMatchQualLUTPath: " << ptr1.bONegMatchQualLUTPath() << std::endl;
126  std::cout << "fOPosMatchQualLUTPath: " << ptr1.fOPosMatchQualLUTPath() << std::endl;
127  std::cout << "fONegMatchQualLUTPath: " << ptr1.fONegMatchQualLUTPath() << std::endl;
128  std::cout << "bPhiExtrapolationLUTPath: " << ptr1.bPhiExtrapolationLUTPath() << std::endl;
129  std::cout << "oPhiExtrapolationLUTPath: " << ptr1.oPhiExtrapolationLUTPath() << std::endl;
130  std::cout << "fPhiExtrapolationLUTPath: " << ptr1.fPhiExtrapolationLUTPath() << std::endl;
131  std::cout << "bEtaExtrapolationLUTPath: " << ptr1.bEtaExtrapolationLUTPath() << std::endl;
132  std::cout << "oEtaExtrapolationLUTPath: " << ptr1.oEtaExtrapolationLUTPath() << std::endl;
133  std::cout << "fEtaExtrapolationLUTPath: " << ptr1.fEtaExtrapolationLUTPath() << std::endl;
134  std::cout << "sortRankLUTPath: " << ptr1.sortRankLUTPath() << std::endl;
135 
136  std::cout << "fwdPosSingleMatchQualLUTMaxDR: " << ptr1.fwdPosSingleMatchQualLUTMaxDR() << std::endl;
137  std::cout << "fwdNegSingleMatchQualLUTMaxDR: " << ptr1.fwdNegSingleMatchQualLUTMaxDR() << std::endl;
138  std::cout << "ovlPosSingleMatchQualLUTMaxDR: " << ptr1.ovlPosSingleMatchQualLUTMaxDR() << std::endl;
139  std::cout << "ovlNegSingleMatchQualLUTMaxDR: " << ptr1.ovlNegSingleMatchQualLUTMaxDR() << std::endl;
140  std::cout << "bOPosMatchQualLUTMaxDR: " << ptr1.bOPosMatchQualLUTMaxDR() << std::endl;
141  std::cout << "bONegMatchQualLUTMaxDR: " << ptr1.bONegMatchQualLUTMaxDR() << std::endl;
142  std::cout << "bOPosMatchQualLUTMaxDREtaFine: " << ptr1.bOPosMatchQualLUTMaxDREtaFine() << std::endl;
143  std::cout << "bONegMatchQualLUTMaxDREtaFine: " << ptr1.bONegMatchQualLUTMaxDREtaFine() << std::endl;
144  std::cout << "fOPosMatchQualLUTMaxDR: " << ptr1.fOPosMatchQualLUTMaxDR() << std::endl;
145  std::cout << "fONegMatchQualLUTMaxDR: " << ptr1.fONegMatchQualLUTMaxDR() << std::endl;
146 
147  // Sort rank LUT factors for pT and quality
148  std::cout << "sortRankLUTPtFactor: " << ptr1.sortRankLUTPtFactor() << std::endl;
149  std::cout << "sortRankLUTQualFactor: " << ptr1.sortRankLUTQualFactor() << std::endl;
150 }
double ovlPosSingleMatchQualLUTMaxDR() const
double fONegMatchQualLUTMaxDR() const
std::string idxSelMemEtaLUTPath() const
l1t::LUT * oPhiExtrapolationLUT()
l1t::LUT * ovlNegSingleMatchQualLUT()
T const & getData(const ESGetToken< T, R > &iToken) const noexcept(false)
Definition: EventSetup.h:119
l1t::LUT * bONegMatchQualLUT()
unsigned sortRankLUTPtFactor() const
double fwdPosSingleMatchQualLUTMaxDR() const
std::string idxSelMemPhiLUTPath() const
double fOPosMatchQualLUTMaxDR() const
std::string fEtaExtrapolationLUTPath() const
double ovlNegSingleMatchQualLUTMaxDR() const
l1t::LUT * bOPosMatchQualLUT()
double bONegMatchQualLUTMaxDR() const
std::string fwdPosSingleMatchQualLUTPath() const
std::string bONegMatchQualLUTPath() const
double bOPosMatchQualLUTMaxDR() const
std::string bEtaExtrapolationLUTPath() const
double fwdNegSingleMatchQualLUTMaxDR() const
std::string absIsoCheckMemLUTPath() const
std::string oPhiExtrapolationLUTPath() const
l1t::LUT * fwdPosSingleMatchQualLUT()
l1t::LUT * fOPosMatchQualLUT()
std::string fONegMatchQualLUTPath() const
unsigned sortRankLUTQualFactor() const
l1t::LUT * fONegMatchQualLUT()
std::string fwdNegSingleMatchQualLUTPath() const
std::string sortRankLUTPath() const
std::string ovlPosSingleMatchQualLUTPath() const
l1t::LUT * bEtaExtrapolationLUT()
double bOPosMatchQualLUTMaxDREtaFine() const
l1t::LUT * ovlPosSingleMatchQualLUT()
l1t::LUT * relIsoCheckMemLUT()
std::string bPhiExtrapolationLUTPath() const
void printLUT(l1t::LUT *lut, const char *name) const
l1t::LUT * fEtaExtrapolationLUT()
std::string bOPosMatchQualLUTPath() const
l1t::LUT * fPhiExtrapolationLUT()
edm::ESGetToken< L1TMuonGlobalParams, L1TMuonGlobalParamsRcd > token_
l1t::LUT * bPhiExtrapolationLUT()
l1t::LUT * fwdNegSingleMatchQualLUT()
l1t::LUT * absIsoCheckMemLUT()
std::string fPhiExtrapolationLUTPath() const
std::string ovlNegSingleMatchQualLUTPath() const
l1t::LUT * oEtaExtrapolationLUT()
double bONegMatchQualLUTMaxDREtaFine() const
std::string relIsoCheckMemLUTPath() const
std::string fOPosMatchQualLUTPath() const
std::string oEtaExtrapolationLUTPath() const

◆ hash()

string L1TMuonGlobalParamsViewer::hash ( void *  buf,
size_t  len 
) const
private

Definition at line 44 of file L1TMuonGlobalParamsViewer.cc.

References visDQMUpload::buf, EVP_MD_CTX_free, EVP_MD_CTX_new, Exception, cond::hash, mps_fire::i, cms::openssl_init(), AlCaHLTBitMon_QueryRunRegistry::string, and createJobs::tmp.

44  {
46  EVP_MD_CTX* mdctx = EVP_MD_CTX_new();
47  const EVP_MD* md = EVP_get_digestbyname("SHA1");
48  if (!EVP_DigestInit_ex(mdctx, md, nullptr))
49  throw cms::Exception("L1TMuonGlobalParamsViewer::hash") << "SHA1 initialization error";
50 
51  if (!EVP_DigestUpdate(mdctx, buf, len))
52  throw cms::Exception("L1TMuonGlobalParamsViewer::hash") << "SHA1 processing error";
53 
54  unsigned char hash[EVP_MAX_MD_SIZE];
55  unsigned int md_len = 0;
56  if (!EVP_DigestFinal_ex(mdctx, hash, &md_len))
57  throw cms::Exception("L1TMuonGlobalParamsViewer::hash") << "SHA1 finalization error";
58 
59  EVP_MD_CTX_free(mdctx);
60 
61  // re-write bytes in hex
62  char tmp[EVP_MAX_MD_SIZE * 2 + 1];
63  if (md_len > 20)
64  md_len = 20;
65  for (unsigned int i = 0; i < md_len; i++)
66  ::sprintf(&tmp[i * 2], "%02x", hash[i]);
67 
68  tmp[md_len * 2] = 0;
69  return string(tmp);
70 }
void openssl_init()
Definition: openssl_init.cc:5
std::string hash(void *buf, size_t len) const
#define EVP_MD_CTX_free
Definition: openssl_init.h:7
#define EVP_MD_CTX_new
Definition: openssl_init.h:6
tmp
align.sh
Definition: createJobs.py:716

◆ printLUT()

void L1TMuonGlobalParamsViewer::printLUT ( l1t::LUT lut,
const char *  name 
) const
private

Definition at line 72 of file L1TMuonGlobalParamsViewer.cc.

References gather_cfg::cout, l1t::LUT::data(), l1t::LUT::empty(), cond::hash, mps_fire::i, l1t::LUT::maxSize(), and mergeVDriftHistosByStation::name.

72  {
73  if (!lut->empty()) {
74  cout << " " << std::setw(24) << name << "[" << lut->maxSize() << "] " << flush;
75  int pod[lut->maxSize()];
76  for (unsigned int i = 0; i < lut->maxSize(); i++)
77  pod[i] = lut->data(i);
78  cout << hash(pod, sizeof(int) * lut->maxSize()) << endl;
79  } else {
80  cout << " " << std::setw(24) << name << "[0]" << endl;
81  }
82 }
unsigned int maxSize() const
Definition: LUT.h:55
std::string hash(void *buf, size_t len) const
bool empty() const
Definition: LUT.h:58
int data(unsigned int address) const
Definition: LUT.h:46

Member Data Documentation

◆ token_

edm::ESGetToken<L1TMuonGlobalParams, L1TMuonGlobalParamsRcd> L1TMuonGlobalParamsViewer::token_
private

Definition at line 28 of file L1TMuonGlobalParamsViewer.cc.