CMS 3D CMS Logo

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

Public Member Functions

 FTSLuminosityFromPixelClusters (edm::ParameterSet const &)
 
 ~FTSLuminosityFromPixelClusters ()
 
- Public Member Functions inherited from edm::global::EDAnalyzer<>
 EDAnalyzer ()=default
 
- Public Member Functions inherited from edm::global::EDAnalyzerBase
 EDAnalyzerBase ()
 
ModuleDescription const & moduleDescription () const
 
virtual ~EDAnalyzerBase ()
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
 EDConsumerBase ()
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
 EDConsumerBase (EDConsumerBase &&)=default
 
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 & itemsToGetFromEvent () 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
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
virtual ~EDConsumerBase () noexcept(false)
 

Static Public Member Functions

static void fillDescriptions (edm::ConfigurationDescriptions &descriptions)
 
- Static Public Member Functions inherited from edm::global::EDAnalyzerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 

Private Member Functions

void analyze (edm::StreamID sid, edm::Event const &event, const edm::EventSetup &setup) const override
 

Private Attributes

unsigned int m_lumi_id
 
edm::EDGetTokenT< SiPixelClusterCollectionNewm_token
 

Additional Inherited Members

- Public Types inherited from edm::global::EDAnalyzerBase
typedef EDAnalyzerBase ModuleType
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- 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 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 19 of file FTSLuminosityFromPixelClusters.cc.

Constructor & Destructor Documentation

FTSLuminosityFromPixelClusters::FTSLuminosityFromPixelClusters ( edm::ParameterSet const &  config)
explicit

Definition at line 33 of file FTSLuminosityFromPixelClusters.cc.

References edm::ParameterSet::getParameter(), diffTwoXMLs::label, m_lumi_id, dataset::name, fftjetproducer_cfi::resolution, AlCaHLTBitMon_QueryRunRegistry::string, and fftjetcommon_cfi::title.

33  :
34  m_token(consumes<SiPixelClusterCollectionNew>(config.getParameter<edm::InputTag>("source"))),
35  m_lumi_id((unsigned int) -1)
36 {
37  if (not edm::Service<FastTimerService>().isAvailable())
38  return;
39 
40  std::string const & name = config.getParameter<std::string>("name");
41  std::string const & title = config.getParameter<std::string>("title");
42  std::string const & label = config.getParameter<std::string>("label");
43  double range = config.getParameter<double>("range");
44  double resolution = config.getParameter<double>("resolution");
45 
46  m_lumi_id = edm::Service<FastTimerService>()->reserveLuminosityPlots(name, title, label, range, resolution);
47 }
Definition: config.py:1
edm::EDGetTokenT< SiPixelClusterCollectionNew > m_token
FTSLuminosityFromPixelClusters::~FTSLuminosityFromPixelClusters ( )

Definition at line 49 of file FTSLuminosityFromPixelClusters.cc.

50 {
51 }

Member Function Documentation

void FTSLuminosityFromPixelClusters::analyze ( edm::StreamID  sid,
edm::Event const &  event,
const edm::EventSetup setup 
) const
overrideprivate

Definition at line 54 of file FTSLuminosityFromPixelClusters.cc.

References edmNew::DetSetVector< T >::dataSize(), edm::Event::getByToken(), m_lumi_id, and m_token.

55 {
56  if (not edm::Service<FastTimerService>().isAvailable())
57  return;
58 
59  double value = 0.;
61  if (event.getByToken(m_token, h_clusters))
62  value = h_clusters->dataSize();
63 
64  edm::Service<FastTimerService>()->setLuminosity(sid, m_lumi_id, value);
65 }
size_type dataSize() const
Definition: value.py:1
edm::EDGetTokenT< SiPixelClusterCollectionNew > m_token
Definition: event.py:1
void FTSLuminosityFromPixelClusters::fillDescriptions ( edm::ConfigurationDescriptions descriptions)
static

Definition at line 68 of file FTSLuminosityFromPixelClusters.cc.

References edm::ConfigurationDescriptions::add(), edm::ParameterSetDescription::add(), DEFINE_FWK_MODULE, and AlCaHLTBitMon_QueryRunRegistry::string.

68  {
70  desc.add<edm::InputTag>("source", edm::InputTag("siPixelClusters"));
71  desc.add<std::string>("name", "clusters");
72  desc.add<std::string>("title", "pixel clusters");
73  desc.add<std::string>("label", "pixel clusters");
74  desc.add<double>("range", 20000);
75  desc.add<double>("resolution", 500);
76  descriptions.add("ftsLuminosityFromPixelClusters", desc);
77 }
ParameterDescriptionBase * add(U const &iLabel, T const &value)
void add(std::string const &label, ParameterSetDescription const &psetDescription)

Member Data Documentation

unsigned int FTSLuminosityFromPixelClusters::m_lumi_id
private

Definition at line 28 of file FTSLuminosityFromPixelClusters.cc.

Referenced by analyze(), and FTSLuminosityFromPixelClusters().

edm::EDGetTokenT<SiPixelClusterCollectionNew> FTSLuminosityFromPixelClusters::m_token
private

Definition at line 27 of file FTSLuminosityFromPixelClusters.cc.

Referenced by analyze().