test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions
SiPixelPhase1OnlineHarvester Class Reference
Inheritance diagram for SiPixelPhase1OnlineHarvester:
SiPixelPhase1Harvester DQMEDHarvester HistogramManagerHolder edm::one::EDAnalyzer< edm::one::WatchRuns, edm::one::WatchLuminosityBlocks, edm::one::SharedResources > edm::one::EDAnalyzerBase edm::EDConsumerBase

Public Member Functions

 SiPixelPhase1OnlineHarvester (const edm::ParameterSet &iConfig)
 
- Public Member Functions inherited from SiPixelPhase1Harvester
void dqmEndJob (DQMStore::IBooker &iBooker, DQMStore::IGetter &iGetter)
 
void dqmEndLuminosityBlock (DQMStore::IBooker &iBooker, DQMStore::IGetter &iGetter, edm::LuminosityBlock const &lumiBlock, edm::EventSetup const &eSetup)
 
 SiPixelPhase1Harvester (const edm::ParameterSet &iConfig)
 
- Public Member Functions inherited from DQMEDHarvester
virtual void analyze (edm::Event const &, edm::EventSetup const &) final
 
virtual void beginLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &) final
 
virtual void beginRun (edm::Run const &, edm::EventSetup const &)
 
 DQMEDHarvester (void)
 
virtual void endJob () final
 
virtual void endLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &) final
 
virtual void endRun (edm::Run const &, edm::EventSetup const &)
 
- Public Member Functions inherited from edm::one::EDAnalyzer< edm::one::WatchRuns, edm::one::WatchLuminosityBlocks, edm::one::SharedResources >
 EDAnalyzer ()=default
 
- Public Member Functions inherited from edm::one::EDAnalyzerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 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)
 
- Public Member Functions inherited from HistogramManagerHolder
 HistogramManagerHolder (const edm::ParameterSet &iConfig)
 

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)
 
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)
 
- Protected Attributes inherited from HistogramManagerHolder
GeometryInterface geometryInterface
 
std::vector< HistogramManagerhisto
 

Detailed Description

Definition at line 6 of file SiPixelPhase1OnlineHarvester.cc.

Constructor & Destructor Documentation

SiPixelPhase1OnlineHarvester::SiPixelPhase1OnlineHarvester ( const edm::ParameterSet iConfig)
inline

Definition at line 11 of file SiPixelPhase1OnlineHarvester.cc.

References createPayload::block, alignCSCRings::e, spr::find(), edm::ParameterSet::getParameter(), h, HistogramManagerHolder::histo, i, eostools::ls(), alignCSCRings::s, AlCaHLTBitMon_QueryRunRegistry::string, and t.

12  : SiPixelPhase1Harvester(iConfig) {
13 
14  int onlineblock = iConfig.getParameter<edm::ParameterSet>("geometry").getParameter<int>("onlineblock");
15  int n_onlineblocks = iConfig.getParameter<edm::ParameterSet>("geometry").getParameter<int>("n_onlineblocks");
16 
17  for (auto& h : histo) {
18  h.setCustomHandler([&h, onlineblock, n_onlineblocks] (SummationStep& s, HistogramManager::Table & t,
20  if (!h.lumisection) return; // not online
21  uint32_t ls = h.lumisection->id().luminosityBlock();
22 
23  // TODO: this is hard to get right if we don't see all LS.
24  uint32_t block = (ls / onlineblock) % n_onlineblocks;
25  uint32_t next_block = ((ls / onlineblock)+1) % n_onlineblocks;
26  if (block == next_block) return;
27 
28  for (auto& e : t) {
29  TH1* th1 = e.second.th1;
30  if (std::string(th1->GetYaxis()->GetTitle()).find("OnlineBlock") != std::string::npos) {
31  for (int i = 1; i <= th1->GetNbinsX(); i++) {
32  th1->SetBinContent(i, next_block+1, 0);
33  }
34  } else {
35  // TODO: do sth.like exponential decay here.
36  }
37  }
38  });
39  }
40  }
T getParameter(std::string const &) const
int i
Definition: DBlmapReader.cc:9
FWCore Framework interface EventSetupRecordImplementation h
Helper function to determine trigger accepts.
def ls
Definition: eostools.py:348
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:7
SiPixelPhase1Harvester(const edm::ParameterSet &iConfig)
std::map< GeometryInterface::Values, AbstractHistogram > Table
std::vector< HistogramManager > histo