CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
SiStripMonitorRawData Class Reference

#include <SiStripMonitorRawData.h>

Inheritance diagram for SiStripMonitorRawData:
DQMEDAnalyzer edm::one::EDProducer< edm::Accumulator, edm::EndLuminosityBlockProducer, edm::EndRunProducer, edm::one::WatchLuminosityBlocks, edm::one::WatchRuns > edm::one::EDProducerBase edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

Public Member Functions

void analyze (const edm::Event &, const edm::EventSetup &) override
 
void bookHistograms (DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
 
void endJob () override
 
void endRun (edm::Run const &run, edm::EventSetup const &eSetup) override
 
 SiStripMonitorRawData (const edm::ParameterSet &)
 
 ~SiStripMonitorRawData () override
 
- Public Member Functions inherited from DQMEDAnalyzer
void accumulate (edm::Event const &ev, edm::EventSetup const &es) final
 
virtual void analyze (edm::Event const &, edm::EventSetup const &)
 
void beginLuminosityBlock (edm::LuminosityBlock const &lumi, edm::EventSetup const &setup) override
 
void beginRun (edm::Run const &run, edm::EventSetup const &setup) final
 
virtual void dqmBeginRun (edm::Run const &, edm::EventSetup const &)
 
 DQMEDAnalyzer ()
 
 DQMEDAnalyzer (DQMEDAnalyzer const &)=delete
 
 DQMEDAnalyzer (DQMEDAnalyzer &&)=delete
 
void endLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &) override
 
void endLuminosityBlockProduce (edm::LuminosityBlock &lumi, edm::EventSetup const &setup) final
 
void endRun (edm::Run const &run, edm::EventSetup const &setup) override
 
void endRunProduce (edm::Run &run, edm::EventSetup const &setup) override
 
 ~DQMEDAnalyzer () override=default
 
- Public Member Functions inherited from edm::one::EDProducer< edm::Accumulator, edm::EndLuminosityBlockProducer, edm::EndRunProducer, edm::one::WatchLuminosityBlocks, edm::one::WatchRuns >
 EDProducer ()=default
 
SerialTaskQueueglobalLuminosityBlocksQueue () final
 
SerialTaskQueueglobalRunsQueue () final
 
bool hasAbilityToProduceInLumis () const final
 
bool hasAbilityToProduceInRuns () const final
 
bool wantsGlobalLuminosityBlocks () const final
 
bool wantsGlobalRuns () const final
 
- Public Member Functions inherited from edm::one::EDProducerBase
 EDProducerBase ()
 
ModuleDescription const & moduleDescription () const
 
bool wantsStreamLuminosityBlocks () const
 
bool wantsStreamRuns () const
 
 ~EDProducerBase () override
 
- Public Member Functions inherited from edm::ProducerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
std::vector< edm::ProductResolverIndex > const & indiciesForPutProducts (BranchType iBranchType) const
 
 ProducerBase ()
 
std::vector< edm::ProductResolverIndex > const & putTokenIndexToProductResolverIndex () const
 
void registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &)
 
std::function< void(BranchDescription const &)> registrationCallback () const
 used by the fwk to register list of products More...
 
void resolvePutIndicies (BranchType iBranchType, ModuleToResolverIndicies const &iIndicies, std::string const &moduleLabel)
 
 ~ProducerBase () noexcept(false) 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
 
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)
 
virtual ~EDConsumerBase () noexcept(false)
 

Private Attributes

MonitorElementBadFedNumber
 
edm::ParameterSet conf_
 
edm::ESHandle< SiStripDetCablingdetcabling
 
edm::EDGetTokenT< edm::DetSetVector< SiStripRawDigi > > digiToken_
 
DQMStoredqmStore_
 
unsigned long long m_cacheID_
 
std::vector< uint32_t > SelectedDetIds
 

Additional Inherited Members

- Public Types inherited from edm::one::EDProducerBase
typedef EDProducerBase ModuleType
 
- Public Types inherited from edm::ProducerBase
using ModuleToResolverIndicies = std::unordered_multimap< std::string, std::tuple< edm::TypeID const *, const char *, edm::ProductResolverIndex >>
 
typedef ProductRegistryHelper::TypeLabelList TypeLabelList
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Static Public Member Functions inherited from edm::one::EDProducerBase
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 DQMEDAnalyzer
edm::EDPutTokenT< DQMTokenlumiToken_
 
edm::EDPutTokenT< DQMTokenrunToken_
 

Detailed Description

Description: <one line="" class="" summary>="">

Usage: <usage>

Definition at line 49 of file SiStripMonitorRawData.h.

Constructor & Destructor Documentation

SiStripMonitorRawData::SiStripMonitorRawData ( const edm::ParameterSet )
explicit

Definition at line 42 of file SiStripMonitorRawData.cc.

References conf_, EcnaPython_AdcPeg12_S1_10_R170298_1_0_150_Dee0::digiProducer, digiToken_, edm::ParameterSet::getParameter(), and AlCaHLTBitMon_QueryRunRegistry::string.

42  :
43  BadFedNumber(nullptr),
45  conf_(iConfig),
46  m_cacheID_(0)
47 
48 
49 {
50  // retrieve producer name of input StripDigiCollection
52  std::string digiType = "VirginRaw";
53  digiToken_ = consumes<edm::DetSetVector<SiStripRawDigi> >(edm::InputTag(digiProducer,digiType) );
54 
55  edm::LogInfo("SiStripMonitorRawData") <<"SiStripMonitorRawData "
56  << " Constructing....... ";
57 }
T getParameter(std::string const &) const
unsigned long long m_cacheID_
edm::EDGetTokenT< edm::DetSetVector< SiStripRawDigi > > digiToken_
MonitorElement * BadFedNumber
SiStripMonitorRawData::~SiStripMonitorRawData ( )
override

Definition at line 60 of file SiStripMonitorRawData.cc.

61 {
62  edm::LogInfo("SiStripMonitorRawData") <<"SiStripMonitorRawData "
63  << " Destructing....... ";
64 }

Member Function Documentation

void SiStripMonitorRawData::analyze ( const edm::Event ,
const edm::EventSetup  
)
override

Definition at line 91 of file SiStripMonitorRawData.cc.

References BadFedNumber, detcabling, digiToken_, edm::EventID::event(), MonitorElement::Fill(), edm::EventSetup::get(), edm::Event::getByToken(), SiStripDetCabling::getConnections(), edm::EventBase::id(), gen::k, edm::EventID::run(), and SelectedDetIds.

92 {
93 
94  edm::LogInfo("SiStripMonitorRawData") <<"SiStripMonitorRawData::analyze: Run "<<
95  iEvent.id().run() << " Event " << iEvent.id().event();
96 
97 
98  iSetup.get<SiStripDetCablingRcd>().get( detcabling );
99 
100  // get DigiCollection object from Event
102  iEvent.getByToken(digiToken_, digi_collection);
103 
104  for (std::vector<uint32_t>::const_iterator idetid=SelectedDetIds.begin(),
105  iEnd=SelectedDetIds.end();idetid!=iEnd;++idetid){
106  std::vector< edm::DetSet<SiStripRawDigi> >::const_iterator digis = digi_collection->find( (*idetid) );
107  if (digis == digi_collection->end() ||
108  digis->data.empty() ||
109  digis->data.size() > 768 ) {
110  std::vector<const FedChannelConnection *> fed_conns = detcabling->getConnections((*idetid));
111  for (unsigned int k = 0; k < fed_conns.size() ; k++) {
112  if(fed_conns[k] && fed_conns[k]->isConnected()) {
113  float fed_id = fed_conns[k]->fedId() + 0.01*fed_conns[k]->fedCh();
114  BadFedNumber->Fill(fed_id);
115  }
116  }
117  continue;
118  }
119  }
120 }
edm::ESHandle< SiStripDetCabling > detcabling
void Fill(long long x)
const std::vector< const FedChannelConnection * > & getConnections(uint32_t det_id) const
int iEvent
Definition: GenABIO.cc:230
int k[5][pyjets_maxn]
std::vector< uint32_t > SelectedDetIds
edm::EDGetTokenT< edm::DetSetVector< SiStripRawDigi > > digiToken_
MonitorElement * BadFedNumber
void SiStripMonitorRawData::bookHistograms ( DQMStore::IBooker ,
edm::Run const &  ,
edm::EventSetup const &   
)
overridevirtual

Implements DQMEDAnalyzer.

Definition at line 69 of file SiStripMonitorRawData.cc.

References SiStripDetCabling::addActiveDetectorsRawIds(), BadFedNumber, DQMStore::IBooker::book1D(), detcabling, edm::EventSetup::get(), m_cacheID_, MonitorElement::Reset(), SelectedDetIds, MonitorElement::setAxisTitle(), and DQMStore::IBooker::setCurrentFolder().

70 {
71  unsigned long long cacheID = eSetup.get<SiStripDetCablingRcd>().cacheIdentifier();
72 
74  if (m_cacheID_ != cacheID) {
75  m_cacheID_ = cacheID;
76  eSetup.get<SiStripDetCablingRcd>().get( detcabling );
77  SelectedDetIds.clear();
79 
80  edm::LogInfo("SiStripMonitorRawData") <<"SiStripMonitorRawData::bookHistograms: "
81  << " Creating MEs for new Cabling ";
82  ibooker.setCurrentFolder("Track/GlobalParameter");
83  if (!BadFedNumber) {
84  BadFedNumber = ibooker.book1D("FaultyFedNumberAndChannel","Faulty Fed Id and Channel and Numbers", 60000, 0.5, 600.5);
85  BadFedNumber->setAxisTitle("Fed Id and Channel numbers",1);
86  }
87  }
88 }
void addActiveDetectorsRawIds(std::vector< uint32_t > &) const
edm::ESHandle< SiStripDetCabling > detcabling
void Reset()
reset ME (ie. contents, errors, etc)
std::vector< uint32_t > SelectedDetIds
unsigned long long m_cacheID_
MonitorElement * BadFedNumber
void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
void SiStripMonitorRawData::endJob ( void  )
overridevirtual

Reimplemented from edm::one::EDProducerBase.

Definition at line 135 of file SiStripMonitorRawData.cc.

References DEFINE_FWK_MODULE.

135  {
136  edm::LogInfo("SiStripMonitorRawData") <<"SiStripMonitorRawData::EndJob: "
137  << " Finishing!! ";
138 }
void SiStripMonitorRawData::endRun ( edm::Run const &  run,
edm::EventSetup const &  eSetup 
)
override

Definition at line 124 of file SiStripMonitorRawData.cc.

References conf_, dqmStore_, edm::ParameterSet::getParameter(), postProcessorL1Gen_cff::outputFileName, DQMStore::save(), and AlCaHLTBitMon_QueryRunRegistry::string.

124  {
125  bool outputMEsInRootFile = conf_.getParameter<bool>("OutputMEsInRootFile");
127  if (outputMEsInRootFile) {
128  //dqmStore_->showDirStructure();
129  dqmStore_->save(outputFileName);
130  }
131 }
T getParameter(std::string const &) const
void save(const std::string &filename, const std::string &path="", const std::string &pattern="", const std::string &rewrite="", const uint32_t run=0, const uint32_t lumi=0, SaveReferenceTag ref=SaveWithReference, int minStatus=dqm::qstatus::STATUS_OK, const std::string &fileupdate="RECREATE")
Definition: DQMStore.cc:2502

Member Data Documentation

MonitorElement* SiStripMonitorRawData::BadFedNumber
private

Definition at line 63 of file SiStripMonitorRawData.h.

Referenced by analyze(), and bookHistograms().

edm::ParameterSet SiStripMonitorRawData::conf_
private

Definition at line 66 of file SiStripMonitorRawData.h.

Referenced by endRun(), and SiStripMonitorRawData().

edm::ESHandle< SiStripDetCabling > SiStripMonitorRawData::detcabling
private

Definition at line 67 of file SiStripMonitorRawData.h.

Referenced by analyze(), and bookHistograms().

edm::EDGetTokenT<edm::DetSetVector<SiStripRawDigi> > SiStripMonitorRawData::digiToken_
private

Definition at line 61 of file SiStripMonitorRawData.h.

Referenced by analyze(), and SiStripMonitorRawData().

DQMStore* SiStripMonitorRawData::dqmStore_
private

Definition at line 65 of file SiStripMonitorRawData.h.

Referenced by endRun().

unsigned long long SiStripMonitorRawData::m_cacheID_
private

Definition at line 70 of file SiStripMonitorRawData.h.

Referenced by bookHistograms().

std::vector<uint32_t> SiStripMonitorRawData::SelectedDetIds
private

Definition at line 68 of file SiStripMonitorRawData.h.

Referenced by analyze(), and bookHistograms().