CMS 3D CMS Logo

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

Public Member Functions

void analyze (const edm::Event &, const edm::EventSetup &) override
 
 L1TMuonBarrelParamsViewer (const edm::ParameterSet &)
 
 ~L1TMuonBarrelParamsViewer (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 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

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

Private Attributes

bool printPtaThreshold
 

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

Definition at line 22 of file L1TMuonBarrelParamsViewer.cc.

Constructor & Destructor Documentation

◆ L1TMuonBarrelParamsViewer()

L1TMuonBarrelParamsViewer::L1TMuonBarrelParamsViewer ( const edm::ParameterSet )
inlineexplicit

◆ ~L1TMuonBarrelParamsViewer()

L1TMuonBarrelParamsViewer::~L1TMuonBarrelParamsViewer ( void  )
inlineoverride

Definition at line 31 of file L1TMuonBarrelParamsViewer.cc.

31 {}

Member Function Documentation

◆ analyze()

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

Implements edm::EDAnalyzer.

Definition at line 67 of file L1TMuonBarrelParamsViewer.cc.

References gather_cfg::cout, edm::EventSetup::get(), cond::hash, mps_fire::i, B2GTnPMonitor_cfi::item, dqmdumpme::k, AlCaHLTBitMon_ParallelJobs::p, and edm::ESHandle< T >::product().

67  {
69  evSetup.get<L1TMuonBarrelParamsRcd>().get(handle1);
70  std::shared_ptr<L1TMuonBarrelParams> ptr(new L1TMuonBarrelParams(*(handle1.product())));
71 
73 
74  cout << "AssLUTPath: " << ptr1->AssLUTPath() << endl;
75 
76  // typedef std::map<short, short, std::less<short> > LUT;
77 
78  size_t k = 0; // avoid using l
79  for (const auto &lut : ptr1->pta_lut()) {
80  if (!lut.empty()) {
81  cout << " pta_lut[" << setw(2) << k << "]= [" << lut.size() << "] " << flush;
82  int lut_[lut.size()], i = 0;
83  for (const pair<const short, short> &p : lut)
84  lut_[i++] = p.first * 0xFFFF + p.second;
85  cout << hash(lut_, sizeof(int) * lut.size()) << endl;
86  } else {
87  cout << " pta_lut[" << setw(2) << k << "]= [0] " << endl;
88  }
89  k++;
90  }
91 
92  cout << " pta_threshold= [" << ptr1->pta_threshold().size() << "] " << flush;
93  int pta_threshold[ptr1->pta_threshold().size()];
94  for (unsigned int i = 0; i < ptr1->pta_threshold().size(); i++) {
95  pta_threshold[i] = ptr1->pta_threshold()[i];
97  cout << " " << pta_threshold[i] << endl;
98  }
99  if (!ptr1->pta_threshold().empty())
100  cout << hash(pta_threshold, sizeof(int) * ptr1->pta_threshold().size()) << endl;
101  else
102  cout << endl;
103 
104  k = 0;
105  for (const auto &lut : ptr1->pta_lut()) {
106  if (!lut.empty()) {
107  cout << " phi_lut[" << k << "]= [" << lut.size() << "] " << flush;
108  int lut_[lut.size()], i = 0;
109  for (const pair<const short, short> &p : lut)
110  lut_[i++] = p.first * 0xFFFF + p.second;
111  cout << hash(lut_, sizeof(int) * lut.size()) << endl;
112  } else {
113  cout << " phi_lut[" << k << "]= [0] " << endl;
114  }
115  k++;
116  }
117 
118  k = 0;
119  for (const auto &lu : ptr1->ext_lut()) {
120  const auto &lut = lu.low;
121  if (!lut.empty()) {
122  cout << " ext_lut_low[" << setw(2) << k << "]= [" << lut.size() << "] " << flush;
123  int lut_[lut.size()], i = 0;
124  for (const pair<const short, short> &p : lut)
125  lut_[i++] = p.first * 0xFFFF + p.second;
126  cout << hash(lut_, sizeof(int) * lut.size()) << endl;
127  } else {
128  cout << " ext_lut_low[" << setw(2) << k << "]= [0] " << endl;
129  }
130  k++;
131  }
132 
133  k = 0;
134  for (const auto &lu : ptr1->ext_lut()) {
135  const auto &lut = lu.high;
136  if (!lut.empty()) {
137  cout << " ext_lut_high[" << setw(2) << k << "]= [" << lut.size() << "] " << flush;
138  int lut_[lut.size()], i = 0;
139  for (const pair<const short, short> &p : lut)
140  lut_[i++] = p.first * 0xFFFF + p.second;
141  cout << hash(lut_, sizeof(int) * lut.size()) << endl;
142  } else {
143  cout << " ext_lut_high[" << setw(2) << k << "]= [0] " << endl;
144  }
145  k++;
146  }
147 
148  // typedef std::map< LUTID, LUTCONT > qpLUT;
149  for (const auto &item : ptr1->qp_lut()) {
150  cout << " qp_lut[" << item.first.first << "," << item.first.second << "]= " << item.second.first << ", ["
151  << item.second.second.size() << "] " << flush;
152  if (!item.second.second.empty()) {
153  int lut_[item.second.second.size()];
154  for (size_t i = 0; i < item.second.second.size(); i++)
155  lut_[i] = item.second.second[i];
156  cout << hash(lut_, sizeof(int) * item.second.second.size()) << endl;
157  } else {
158  cout << endl;
159  }
160  }
161 
162  // typedef std::map<short, L1MuDTEtaPattern, std::less<short> > etaLUT;
163  for (const pair<const short, L1MuDTEtaPattern> &item : ptr1->eta_lut())
164  cout << " eta_lut[" << item.first << "]= " << endl << item.second << endl;
165 
166  cout << "PT_Assignment_nbits_Phi= " << ptr1->get_PT_Assignment_nbits_Phi() << endl;
167  cout << "PT_Assignment_nbits_PhiB= " << ptr1->get_PT_Assignment_nbits_PhiB() << endl;
168  cout << "PHI_Assignment_nbits_Phi= " << ptr1->get_PHI_Assignment_nbits_Phi() << endl;
169  cout << "PHI_Assignment_nbits_PhiB= " << ptr1->get_PHI_Assignment_nbits_PhiB() << endl;
170  cout << "Extrapolation_nbits_Phi= " << ptr1->get_Extrapolation_nbits_Phi() << endl;
171  cout << "Extrapolation_nbits_PhiB= " << ptr1->get_Extrapolation_nbits_PhiB() << endl;
172  cout << "BX_min= " << ptr1->get_BX_min() << endl;
173  cout << "BX_max= " << ptr1->get_BX_max() << endl;
174  cout << "Extrapolation_Filter= " << ptr1->get_Extrapolation_Filter() << endl;
175  cout << "OutOfTime_Filter_Window= " << ptr1->get_OutOfTime_Filter_Window() << endl;
176 
177  cout << boolalpha;
178  cout << "OutOfTime_Filter= " << ptr1->get_OutOfTime_Filter() << endl;
179  cout << "Open_LUTs= " << ptr1->get_Open_LUTs() << endl;
180  cout << "EtaTrackFinder= " << ptr1->get_EtaTrackFinder() << endl;
181  cout << "Extrapolation_21= " << ptr1->get_Extrapolation_21() << endl;
182  cout << "DisableNewAlgo= " << ptr1->get_DisableNewAlgo() << endl;
183  cout << noboolalpha;
184 
185  // FW version
186  cout << "fwVersion= " << ptr1->fwVersion() << endl;
187  cout << "version= " << ptr1->version_ << endl;
188 }
std::string hash(void *buf, size_t len) const
T const * product() const
Definition: ESHandle.h:86
T get() const
Definition: EventSetup.h:82

◆ hash()

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

Definition at line 39 of file L1TMuonBarrelParamsViewer.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.

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

Member Data Documentation

◆ printPtaThreshold

bool L1TMuonBarrelParamsViewer::printPtaThreshold
private

Definition at line 25 of file L1TMuonBarrelParamsViewer.cc.