CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes
FTSLuminosityFromPileupSummaryInfo Class Reference
Inheritance diagram for FTSLuminosityFromPileupSummaryInfo:
edm::global::EDAnalyzer<> edm::global::EDAnalyzerBase edm::EDConsumerBase

Public Member Functions

 FTSLuminosityFromPileupSummaryInfo (edm::ParameterSet const &)
 
 ~FTSLuminosityFromPileupSummaryInfo ()
 
- 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
 EDConsumerBase ()
 
ProductHolderIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
std::vector
< ProductHolderIndexAndSkipBit >
const & 
itemsToGetFromEvent () const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesDependentUpon (const std::string &iProcessName, std::vector< const char * > &oModuleLabels) const
 
bool registeredToConsume (ProductHolderIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &)
 
virtual ~EDConsumerBase ()
 

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< std::vector
< PileupSummaryInfo > > 
m_token
 

Additional Inherited Members

- Public Types inherited from edm::global::EDAnalyzerBase
typedef EDAnalyzerBase ModuleType
 
- 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 FTSLuminosityFromPileupSummaryInfo.cc.

Constructor & Destructor Documentation

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

Definition at line 33 of file FTSLuminosityFromPileupSummaryInfo.cc.

References edm::ParameterSet::getParameter(), diffTwoXMLs::label, m_lumi_id, mergeVDriftHistosByStation::name, dtDQMClient_cfg::resolution, AlCaHLTBitMon_QueryRunRegistry::string, and indexGen::title.

33  :
34  m_token(consumes<std::vector<PileupSummaryInfo>>(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 }
edm::EDGetTokenT< std::vector< PileupSummaryInfo > > m_token
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
FTSLuminosityFromPileupSummaryInfo::~FTSLuminosityFromPileupSummaryInfo ( )

Definition at line 49 of file FTSLuminosityFromPileupSummaryInfo.cc.

50 {
51 }

Member Function Documentation

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

Implements edm::global::EDAnalyzerBase.

Definition at line 54 of file FTSLuminosityFromPileupSummaryInfo.cc.

References edm::Event::getByToken(), m_lumi_id, m_token, estimatePileup_makeJSON::pileup, and relativeConstraints::value.

55 {
56  if (not edm::Service<FastTimerService>().isAvailable())
57  return;
58 
59  double value = 0.;
61  if (event.getByToken(m_token, h_summary)) {
62  for (PileupSummaryInfo const & pileup: *h_summary) {
63  // only use the in-time pileup
64  if (pileup.getBunchCrossing() == 0) {
65  // use the per-event in-time pileup
66  value = pileup.getPU_NumInteractions();
67  // use the average pileup
68  // value = pileup.getTrueNumInteractions();
69  break;
70  }
71  }
72  }
73 
74  edm::Service<FastTimerService>()->setLuminosity(sid, m_lumi_id, value);
75 }
edm::EDGetTokenT< std::vector< PileupSummaryInfo > > m_token
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger but the state exists so we define the behavior If all triggers are the negative crieriion will lead to accepting the event(this again matches the behavior of"!*"before the partial wildcard feature was incorporated).The per-event"cost"of each negative criterion with multiple relevant triggers is about the same as!*was in the past
void FTSLuminosityFromPileupSummaryInfo::fillDescriptions ( edm::ConfigurationDescriptions descriptions)
static

Definition at line 78 of file FTSLuminosityFromPileupSummaryInfo.cc.

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

78  {
80  desc.add<edm::InputTag>("source", edm::InputTag("addPileupInfo"));
81  desc.add<std::string>("name", "pileup");
82  desc.add<std::string>("title", "in-time pileup");
83  desc.add<std::string>("label", "in-time pileup");
84  desc.add<double>("range", 40);
85  desc.add<double>("resolution", 1);
86  descriptions.add("ftsLuminosityFromPileupSummaryInfo", desc);
87 }
ParameterDescriptionBase * add(U const &iLabel, T const &value)
void add(std::string const &label, ParameterSetDescription const &psetDescription)

Member Data Documentation

unsigned int FTSLuminosityFromPileupSummaryInfo::m_lumi_id
private
edm::EDGetTokenT<std::vector<PileupSummaryInfo> > FTSLuminosityFromPileupSummaryInfo::m_token
private

Definition at line 27 of file FTSLuminosityFromPileupSummaryInfo.cc.

Referenced by analyze().