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
 
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
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
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)
 

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 wantsStreamLuminosityBlocks ()
 
static bool wantsStreamRuns ()
 
- 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 ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes ()
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
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 22 of file L1TMuonBarrelParamsViewer.cc.

Constructor & Destructor Documentation

L1TMuonBarrelParamsViewer::L1TMuonBarrelParamsViewer ( const edm::ParameterSet )
inlineexplicit
L1TMuonBarrelParamsViewer::~L1TMuonBarrelParamsViewer ( void  )
inlineoverride

Definition at line 31 of file L1TMuonBarrelParamsViewer.cc.

31 {}

Member Function Documentation

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

Definition at line 61 of file L1TMuonBarrelParamsViewer.cc.

References gather_cfg::cout, DEFINE_FWK_MODULE, edm::EventSetup::get(), cond::hash, LaserClient_cfi::high, mps_fire::i, B2GTnPMonitor_cfi::item, cmsLHEtoEOSManager::l, LaserClient_cfi::low, AlCaHLTBitMon_ParallelJobs::p, and edm::ESHandle< T >::product().

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

Definition at line 39 of file L1TMuonBarrelParamsViewer.cc.

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

39  {
40  char tmp[SHA_DIGEST_LENGTH * 2 + 1];
41  bzero(tmp, sizeof(tmp));
42  SHA_CTX ctx;
43  if (!SHA1_Init(&ctx))
44  throw cms::Exception("L1TMuonBarrelParamsViewer::hash") << "SHA1 initialization error";
45 
46  if (!SHA1_Update(&ctx, buf, len))
47  throw cms::Exception("L1TMuonBarrelParamsViewer::hash") << "SHA1 processing error";
48 
49  unsigned char hash[SHA_DIGEST_LENGTH];
50  if (!SHA1_Final(hash, &ctx))
51  throw cms::Exception("L1TMuonBarrelParamsViewer::hash") << "SHA1 finalization error";
52 
53  // re-write bytes in hex
54  for (unsigned int i = 0; i < 20; i++)
55  ::sprintf(&tmp[i * 2], "%02x", hash[i]);
56 
57  tmp[20 * 2] = 0;
58  return std::string(tmp);
59 }
std::string hash(void *buf, size_t len) const
tmp
align.sh
Definition: createJobs.py:716

Member Data Documentation

bool L1TMuonBarrelParamsViewer::printPtaThreshold
private

Definition at line 25 of file L1TMuonBarrelParamsViewer.cc.