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

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
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 L1TMuonBarrelParamsViewer.cc.

Constructor & Destructor Documentation

◆ L1TMuonBarrelParamsViewer()

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

Definition at line 30 of file L1TMuonBarrelParamsViewer.cc.

30 : edm::EDAnalyzer() { printPtaThreshold = false; }

◆ ~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 61 of file L1TMuonBarrelParamsViewer.cc.

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

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

◆ hash()

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

Definition at line 39 of file L1TMuonBarrelParamsViewer.cc.

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 }

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

Member Data Documentation

◆ printPtaThreshold

bool L1TMuonBarrelParamsViewer::printPtaThreshold
private

Definition at line 25 of file L1TMuonBarrelParamsViewer.cc.

edm::ESHandle::product
T const * product() const
Definition: ESHandle.h:86
mps_fire.i
i
Definition: mps_fire.py:428
L1TMuonBarrelParamsHelper
Definition: L1TMuonBarrelParamsHelper.h:30
gather_cfg.cout
cout
Definition: gather_cfg.py:144
createJobs.tmp
tmp
align.sh
Definition: createJobs.py:716
L1TMuonBarrelParamsViewer::hash
std::string hash(void *buf, size_t len) const
Definition: L1TMuonBarrelParamsViewer.cc:39
edm::EDAnalyzer
Definition: EDAnalyzer.h:28
edm::EventSetup::get
T get() const
Definition: EventSetup.h:87
edm::ESHandle< L1TMuonBarrelParams >
dqmdumpme.k
k
Definition: dqmdumpme.py:60
AlCaHLTBitMon_ParallelJobs.p
def p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
B2GTnPMonitor_cfi.item
item
Definition: B2GTnPMonitor_cfi.py:147
get
#define get
visDQMUpload.buf
buf
Definition: visDQMUpload.py:160
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
L1TMuonBarrelParamsViewer::printPtaThreshold
bool printPtaThreshold
Definition: L1TMuonBarrelParamsViewer.cc:25
Exception
Definition: hltDiff.cc:245
L1TMuonBarrelParams
Definition: L1TMuonBarrelParams.h:23
L1TMuonBarrelParamsRcd
Definition: L1TMuonBarrelParamsRcd.h:14