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 33 of file L1TMuonBarrelParamsViewer.cc.

33 {}

Member Function Documentation

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

Definition at line 65 of file L1TMuonBarrelParamsViewer.cc.

References gather_cfg::cout, DEFINE_FWK_MODULE, edm::EventSetup::get(), cond::hash, mps_fire::i, checklumidiff::l, lumiPlot::lut, AlCaHLTBitMon_ParallelJobs::p, and edm::ESHandle< T >::product().

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

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

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

Member Data Documentation

bool L1TMuonBarrelParamsViewer::printPtaThreshold
private

Definition at line 25 of file L1TMuonBarrelParamsViewer.cc.