CMS 3D CMS Logo

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

Public Member Functions

void analyze (const edm::Event &, const edm::EventSetup &) override
 
 L1TMuonGlobalParamsViewer (const edm::ParameterSet &pset)
 
 ~L1TMuonGlobalParamsViewer (void) 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
 
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
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
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

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

Additional Inherited Members

- Public Types inherited from edm::EDAnalyzer
typedef EDAnalyzer ModuleType
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- 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 wantsInputProcessBlocks ()
 
static bool wantsProcessBlocks ()
 
static bool wantsStreamLuminosityBlocks ()
 
static bool wantsStreamRuns ()
 
- 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 = InEvent>
EDConsumerBaseAdaptor< B > consumes (edm::InputTag tag) noexcept
 
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<Transition Tr = Transition::Event>
constexpr auto esConsumes () noexcept
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
template<Transition Tr = Transition::Event>
auto esConsumes (ESInputTag tag) noexcept
 
template<Transition Tr = Transition::Event>
ESGetTokenGeneric esConsumes (eventsetup::EventSetupRecordKey const &iRecord, eventsetup::DataKey const &iKey)
 Used with EventSetupRecord::doGet. More...
 
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 22 of file L1TMuonGlobalParamsViewer.cc.

Constructor & Destructor Documentation

◆ L1TMuonGlobalParamsViewer()

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

Definition at line 32 of file L1TMuonGlobalParamsViewer.cc.

32  : edm::EDAnalyzer() {
33  // printLayerMap = pset.getUntrackedParameter<bool>("printLayerMap", false);
34  }

◆ ~L1TMuonGlobalParamsViewer()

L1TMuonGlobalParamsViewer::~L1TMuonGlobalParamsViewer ( void  )
inlineoverride

Definition at line 35 of file L1TMuonGlobalParamsViewer.cc.

35 {}

Member Function Documentation

◆ analyze()

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

Implements edm::EDAnalyzer.

Definition at line 77 of file L1TMuonGlobalParamsViewer.cc.

77  {
78  // Pull the config from the ES
80  evSetup.get<L1TMuonGlobalParamsRcd>().get(handle1);
81  std::shared_ptr<L1TMuonGlobalParams> ptr1(new L1TMuonGlobalParams(*(handle1.product())));
82 
83  // cout<<"Some fields in L1TMuonGlobalParams: "<<endl;
84 
85  // ((L1TMuonGlobalParamsHelper*)ptr1.get())->print(cout);
86 
87  printLUT(ptr1.get()->absIsoCheckMemLUT(), "absIsoCheckMemLUT");
88  printLUT(ptr1.get()->absIsoCheckMemLUT(), "absIsoCheckMemLUT");
89  printLUT(ptr1.get()->relIsoCheckMemLUT(), "relIsoCheckMemLUT");
90  printLUT(ptr1.get()->idxSelMemPhiLUT(), "idxSelMemPhiLUT");
91  printLUT(ptr1.get()->idxSelMemEtaLUT(), "idxSelMemEtaLUT");
92  //l1t::LUT* brlSingleMatchQualLUT();
93  printLUT(ptr1.get()->fwdPosSingleMatchQualLUT(), "fwdPosSingleMatchQualLUT");
94  printLUT(ptr1.get()->fwdNegSingleMatchQualLUT(), "fwdNegSingleMatchQualLUT");
95  printLUT(ptr1.get()->ovlPosSingleMatchQualLUT(), "ovlPosSingleMatchQualLUT");
96  printLUT(ptr1.get()->ovlNegSingleMatchQualLUT(), "ovlNegSingleMatchQualLUT");
97  printLUT(ptr1.get()->bOPosMatchQualLUT(), "bOPosMatchQualLUT");
98  printLUT(ptr1.get()->bONegMatchQualLUT(), "bONegMatchQualLUT");
99  printLUT(ptr1.get()->fOPosMatchQualLUT(), "fOPosMatchQualLUT");
100  printLUT(ptr1.get()->fONegMatchQualLUT(), "fONegMatchQualLUT");
101  printLUT(ptr1.get()->bPhiExtrapolationLUT(), "bPhiExtrapolationLUT");
102  printLUT(ptr1.get()->oPhiExtrapolationLUT(), "oPhiExtrapolationLUT");
103  printLUT(ptr1.get()->fPhiExtrapolationLUT(), "fPhiExtrapolationLUT");
104  printLUT(ptr1.get()->bEtaExtrapolationLUT(), "bEtaExtrapolationLUT");
105  printLUT(ptr1.get()->oEtaExtrapolationLUT(), "oEtaExtrapolationLUT");
106  printLUT(ptr1.get()->fEtaExtrapolationLUT(), "fEtaExtrapolationLUT");
107  printLUT(ptr1.get()->sortRankLUT(), "sortRankLUT");
108 
109  std::cout << "absIsoCheckMemLUTPath: " << ptr1.get()->absIsoCheckMemLUTPath() << std::endl;
110  std::cout << "relIsoCheckMemLUTPath: " << ptr1.get()->relIsoCheckMemLUTPath() << std::endl;
111  std::cout << "idxSelMemPhiLUTPath: " << ptr1.get()->idxSelMemPhiLUTPath() << std::endl;
112  std::cout << "idxSelMemEtaLUTPath: " << ptr1.get()->idxSelMemEtaLUTPath() << std::endl;
113  //std::string brlSingleMatchQualLUTPath() const { return pnodes_[brlSingleMatchQual].sparams_.size() > spIdx::fname ? pnodes_[brlSingleMatchQual].sparams_[spIdx::fname] : ""; }
114  std::cout << "fwdPosSingleMatchQualLUTPath: " << ptr1.get()->fwdPosSingleMatchQualLUTPath() << std::endl;
115  std::cout << "fwdNegSingleMatchQualLUTPath: " << ptr1.get()->fwdNegSingleMatchQualLUTPath() << std::endl;
116  std::cout << "ovlPosSingleMatchQualLUTPath: " << ptr1.get()->ovlPosSingleMatchQualLUTPath() << std::endl;
117  std::cout << "ovlNegSingleMatchQualLUTPath: " << ptr1.get()->ovlNegSingleMatchQualLUTPath() << std::endl;
118  std::cout << "bOPosMatchQualLUTPath: " << ptr1.get()->bOPosMatchQualLUTPath() << std::endl;
119  std::cout << "bONegMatchQualLUTPath: " << ptr1.get()->bONegMatchQualLUTPath() << std::endl;
120  std::cout << "fOPosMatchQualLUTPath: " << ptr1.get()->fOPosMatchQualLUTPath() << std::endl;
121  std::cout << "fONegMatchQualLUTPath: " << ptr1.get()->fONegMatchQualLUTPath() << std::endl;
122  std::cout << "bPhiExtrapolationLUTPath: " << ptr1.get()->bPhiExtrapolationLUTPath() << std::endl;
123  std::cout << "oPhiExtrapolationLUTPath: " << ptr1.get()->oPhiExtrapolationLUTPath() << std::endl;
124  std::cout << "fPhiExtrapolationLUTPath: " << ptr1.get()->fPhiExtrapolationLUTPath() << std::endl;
125  std::cout << "bEtaExtrapolationLUTPath: " << ptr1.get()->bEtaExtrapolationLUTPath() << std::endl;
126  std::cout << "oEtaExtrapolationLUTPath: " << ptr1.get()->oEtaExtrapolationLUTPath() << std::endl;
127  std::cout << "fEtaExtrapolationLUTPath: " << ptr1.get()->fEtaExtrapolationLUTPath() << std::endl;
128  std::cout << "sortRankLUTPath: " << ptr1.get()->sortRankLUTPath() << std::endl;
129 
130  std::cout << "fwdPosSingleMatchQualLUTMaxDR: " << ptr1.get()->fwdPosSingleMatchQualLUTMaxDR() << std::endl;
131  std::cout << "fwdNegSingleMatchQualLUTMaxDR: " << ptr1.get()->fwdNegSingleMatchQualLUTMaxDR() << std::endl;
132  std::cout << "ovlPosSingleMatchQualLUTMaxDR: " << ptr1.get()->ovlPosSingleMatchQualLUTMaxDR() << std::endl;
133  std::cout << "ovlNegSingleMatchQualLUTMaxDR: " << ptr1.get()->ovlNegSingleMatchQualLUTMaxDR() << std::endl;
134  std::cout << "bOPosMatchQualLUTMaxDR: " << ptr1.get()->bOPosMatchQualLUTMaxDR() << std::endl;
135  std::cout << "bONegMatchQualLUTMaxDR: " << ptr1.get()->bONegMatchQualLUTMaxDR() << std::endl;
136  std::cout << "bOPosMatchQualLUTMaxDREtaFine: " << ptr1.get()->bOPosMatchQualLUTMaxDREtaFine() << std::endl;
137  std::cout << "bONegMatchQualLUTMaxDREtaFine: " << ptr1.get()->bONegMatchQualLUTMaxDREtaFine() << std::endl;
138  std::cout << "fOPosMatchQualLUTMaxDR: " << ptr1.get()->fOPosMatchQualLUTMaxDR() << std::endl;
139  std::cout << "fONegMatchQualLUTMaxDR: " << ptr1.get()->fONegMatchQualLUTMaxDR() << std::endl;
140 
141  // Sort rank LUT factors for pT and quality
142  std::cout << "sortRankLUTPtFactor: " << ptr1.get()->sortRankLUTPtFactor() << std::endl;
143  std::cout << "sortRankLUTQualFactor: " << ptr1.get()->sortRankLUTQualFactor() << std::endl;
144 }

References gather_cfg::cout, edm::EventSetup::get(), get, and edm::ESHandle< T >::product().

◆ hash()

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

Definition at line 43 of file L1TMuonGlobalParamsViewer.cc.

43  {
44  char tmp[SHA_DIGEST_LENGTH * 2 + 1];
45  bzero(tmp, sizeof(tmp));
46  SHA_CTX ctx;
47  if (!SHA1_Init(&ctx))
48  throw cms::Exception("L1TMuonGlobalParamsViewer::hash") << "SHA1 initialization error";
49 
50  if (!SHA1_Update(&ctx, buf, len))
51  throw cms::Exception("L1TMuonGlobalParamsViewer::hash") << "SHA1 processing error";
52 
53  unsigned char hash[SHA_DIGEST_LENGTH];
54  if (!SHA1_Final(hash, &ctx))
55  throw cms::Exception("L1TMuonGlobalParamsViewer::hash") << "SHA1 finalization error";
56 
57  // re-write bytes in hex
58  for (unsigned int i = 0; i < 20; i++)
59  ::sprintf(&tmp[i * 2], "%02x", hash[i]);
60 
61  tmp[20 * 2] = 0;
62  return string(tmp);
63 }

References visDQMUpload::buf, Exception, cond::hash, mps_fire::i, AlCaHLTBitMon_QueryRunRegistry::string, and createJobs::tmp.

◆ printLUT()

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

Definition at line 65 of file L1TMuonGlobalParamsViewer.cc.

65  {
66  if (!lut->empty()) {
67  cout << " " << std::setw(24) << name << "[" << lut->maxSize() << "] " << flush;
68  int pod[lut->maxSize()];
69  for (unsigned int i = 0; i < lut->maxSize(); i++)
70  pod[i] = lut->data(i);
71  cout << hash(pod, sizeof(int) * lut->maxSize()) << endl;
72  } else {
73  cout << " " << std::setw(24) << name << "[0]" << endl;
74  }
75 }

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

edm::ESHandle::product
T const * product() const
Definition: ESHandle.h:86
mps_fire.i
i
Definition: mps_fire.py:428
l1t::LUT::maxSize
unsigned int maxSize() const
Definition: LUT.h:55
gather_cfg.cout
cout
Definition: gather_cfg.py:144
L1TMuonGlobalParams
Definition: L1TMuonGlobalParams.h:21
createJobs.tmp
tmp
align.sh
Definition: createJobs.py:716
edm::EDAnalyzer
Definition: EDAnalyzer.h:28
L1TMuonGlobalParamsViewer::hash
std::string hash(void *buf, size_t len) const
Definition: L1TMuonGlobalParamsViewer.cc:43
edm::EventSetup::get
T get() const
Definition: EventSetup.h:87
edm::ESHandle
Definition: DTSurvey.h:22
l1t::LUT::empty
bool empty() const
Definition: LUT.h:58
l1t::LUT::data
int data(unsigned int address) const
Definition: LUT.h:46
get
#define get
L1TMuonGlobalParamsRcd
Definition: L1TMuonGlobalParamsRcd.h:23
visDQMUpload.buf
buf
Definition: visDQMUpload.py:160
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
Exception
Definition: hltDiff.cc:245
Skims_PA_cff.name
name
Definition: Skims_PA_cff.py:17
L1TMuonGlobalParamsViewer::printLUT
void printLUT(l1t::LUT *lut, const char *name) const
Definition: L1TMuonGlobalParamsViewer.cc:65