CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions | Private Attributes
L1TMuonBarrelKalmanParamsViewer Class Reference
Inheritance diagram for L1TMuonBarrelKalmanParamsViewer:
edm::one::EDAnalyzer<> edm::one::EDAnalyzerBase edm::EDConsumerBase

Public Member Functions

void analyze (const edm::Event &, const edm::EventSetup &) override
 
 L1TMuonBarrelKalmanParamsViewer (const edm::ParameterSet &)
 
- Public Member Functions inherited from edm::one::EDAnalyzer<>
 EDAnalyzer ()=default
 
 EDAnalyzer (const EDAnalyzer &)=delete
 
SerialTaskQueueglobalLuminosityBlocksQueue () final
 
SerialTaskQueueglobalRunsQueue () final
 
const EDAnalyzeroperator= (const EDAnalyzer &)=delete
 
bool wantsGlobalLuminosityBlocks () const final
 
bool wantsGlobalRuns () const final
 
bool wantsInputProcessBlocks () const final
 
bool wantsProcessBlocks () const final
 
- Public Member Functions inherited from edm::one::EDAnalyzerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzerBase ()
 
ModuleDescription const & moduleDescription () const
 
bool wantsStreamLuminosityBlocks () const
 
bool wantsStreamRuns () const
 
 ~EDAnalyzerBase () 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
 
ESResolverIndex const * esGetTokenIndices (edm::Transition iTrans) const
 
std::vector< ESResolverIndex > 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
 
void selectInputProcessBlocks (ProductRegistry const &productRegistry, ProcessBlockHelperBase const &processBlockHelperBase)
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
void updateLookup (eventsetup::ESRecordsToProductResolverIndices const &)
 
virtual ~EDConsumerBase () noexcept(false)
 

Private Member Functions

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

Private Attributes

edm::ESGetToken< L1TMuonBarrelKalmanParams, L1TMuonBarrelKalmanParamsRcdtoken_
 

Additional Inherited Members

- Public Types inherited from edm::one::EDAnalyzerBase
typedef EDAnalyzerBase ModuleType
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Static Public Member Functions inherited from edm::one::EDAnalyzerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
- 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 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 21 of file L1TMuonBarrelKalmanParamsViewer.cc.

Constructor & Destructor Documentation

◆ L1TMuonBarrelKalmanParamsViewer()

L1TMuonBarrelKalmanParamsViewer::L1TMuonBarrelKalmanParamsViewer ( const edm::ParameterSet )
inline

Definition at line 29 of file L1TMuonBarrelKalmanParamsViewer.cc.

References deDxTools::esConsumes().

29 : token_{esConsumes()} {};
edm::ESGetToken< L1TMuonBarrelKalmanParams, L1TMuonBarrelKalmanParamsRcd > token_

Member Function Documentation

◆ analyze()

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

Implements edm::one::EDAnalyzerBase.

Definition at line 65 of file L1TMuonBarrelKalmanParamsViewer.cc.

References L1TMuonBarrelKalmanParams::CONFIG, gather_cfg::cout, TauDecayModes::dec, edm::EventSetup::getData(), L1TMuonBarrelKalmanParams::pnodes_, and L1TMuonBarrelKalmanParams::version_.

65  {
66  L1TMuonBarrelKalmanParams const &ptr = evSetup.getData(token_);
67 
68  // Get the nodes and print out
69  auto pnodes = ptr.pnodes_[ptr.CONFIG];
70  cout << "version : " << ptr.version_ << endl;
71  cout << "fwVersion : " << hex << pnodes.fwVersion_ << dec << endl;
72  cout << "LUTsPath : " << pnodes.kalmanLUTsPath_ << endl;
73 
74  // typedef std::map<short, short, std::less<short> > LUT;
75 }
T const & getData(const ESGetToken< T, R > &iToken) const noexcept(false)
Definition: EventSetup.h:119
edm::ESGetToken< L1TMuonBarrelKalmanParams, L1TMuonBarrelKalmanParamsRcd > token_

◆ hash()

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

Definition at line 37 of file L1TMuonBarrelKalmanParamsViewer.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.

37  {
39  EVP_MD_CTX *mdctx = EVP_MD_CTX_new();
40  const EVP_MD *md = EVP_get_digestbyname("SHA1");
41  if (!EVP_DigestInit_ex(mdctx, md, nullptr))
42  throw cms::Exception("L1TMuonBarrelKalmanParamsViewer::hash") << "SHA1 initialization error";
43 
44  if (!EVP_DigestUpdate(mdctx, buf, len))
45  throw cms::Exception("L1TMuonBarrelKalmanParamsViewer::hash") << "SHA1 processing error";
46 
47  unsigned char hash[EVP_MAX_MD_SIZE];
48  unsigned int md_len = 0;
49  if (!EVP_DigestFinal_ex(mdctx, hash, &md_len))
50  throw cms::Exception("L1TMuonBarrelKalmanParamsViewer::hash") << "SHA1 finalization error";
51 
52  EVP_MD_CTX_free(mdctx);
53 
54  // re-write bytes in hex
55  char tmp[EVP_MAX_MD_SIZE * 2 + 1];
56  if (md_len > 20)
57  md_len = 20;
58  for (unsigned int i = 0; i < md_len; i++)
59  ::sprintf(&tmp[i * 2], "%02x", hash[i]);
60 
61  tmp[md_len * 2] = 0;
62  return std::string(tmp);
63 }
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

◆ token_

edm::ESGetToken<L1TMuonBarrelKalmanParams, L1TMuonBarrelKalmanParamsRcd> L1TMuonBarrelKalmanParamsViewer::token_
private

Definition at line 23 of file L1TMuonBarrelKalmanParamsViewer.cc.