CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Attributes
SiStripMonitorRawData Class Reference

#include <SiStripMonitorRawData.h>

Inheritance diagram for SiStripMonitorRawData:
DQMEDAnalyzer edm::stream::EDAnalyzer< edm::RunSummaryCache< dqmDetails::NoCache >, edm::LuminosityBlockSummaryCache< dqmDetails::NoCache > > edm::stream::EDAnalyzerBase edm::EDConsumerBase

Public Member Functions

virtual void analyze (const edm::Event &, const edm::EventSetup &)
 
virtual void beginJob ()
 
void bookHistograms (DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
 
virtual void endJob ()
 
virtual void endRun (edm::Run const &run, edm::EventSetup const &eSetup)
 
 SiStripMonitorRawData (const edm::ParameterSet &)
 
 ~SiStripMonitorRawData ()
 
- Public Member Functions inherited from DQMEDAnalyzer
virtual void beginRun (edm::Run const &, edm::EventSetup const &) final
 
virtual void beginStream (edm::StreamID id) final
 
virtual void dqmBeginRun (edm::Run const &, edm::EventSetup const &)
 
 DQMEDAnalyzer (void)
 
virtual void endLuminosityBlockSummary (edm::LuminosityBlock const &, edm::EventSetup const &, dqmDetails::NoCache *) const final
 
virtual void endRunSummary (edm::Run const &, edm::EventSetup const &, dqmDetails::NoCache *) const final
 
uint32_t streamId () const
 
- Public Member Functions inherited from edm::stream::EDAnalyzer< edm::RunSummaryCache< dqmDetails::NoCache >, edm::LuminosityBlockSummaryCache< dqmDetails::NoCache > >
 EDAnalyzer ()=default
 
- Public Member Functions inherited from edm::stream::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 ()
 
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
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
bool registeredToConsume (ProductHolderIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &)
 
virtual ~EDConsumerBase ()
 

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::stream::EDAnalyzer< edm::RunSummaryCache< dqmDetails::NoCache >, edm::LuminosityBlockSummaryCache< dqmDetails::NoCache > >
typedef CacheContexts< T...> CacheTypes
 
typedef CacheTypes::GlobalCache GlobalCache
 
typedef AbilityChecker< T...> HasAbility
 
typedef
CacheTypes::LuminosityBlockCache 
LuminosityBlockCache
 
typedef
LuminosityBlockContextT
< LuminosityBlockCache,
RunCache, GlobalCache
LuminosityBlockContext
 
typedef
CacheTypes::LuminosityBlockSummaryCache 
LuminosityBlockSummaryCache
 
typedef CacheTypes::RunCache RunCache
 
typedef RunContextT< RunCache,
GlobalCache
RunContext
 
typedef CacheTypes::RunSummaryCache RunSummaryCache
 
- Public Types inherited from edm::stream::EDAnalyzerBase
typedef EDAnalyzerAdaptorBase ModuleType
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Static Public Member Functions inherited from DQMEDAnalyzer
static std::shared_ptr
< dqmDetails::NoCache
globalBeginLuminosityBlockSummary (edm::LuminosityBlock const &, edm::EventSetup const &, LuminosityBlockContext const *)
 
static std::shared_ptr
< dqmDetails::NoCache
globalBeginRunSummary (edm::Run const &, edm::EventSetup const &, RunContext const *)
 
static void globalEndLuminosityBlockSummary (edm::LuminosityBlock const &, edm::EventSetup const &, LuminosityBlockContext const *, dqmDetails::NoCache *)
 
static void globalEndRunSummary (edm::Run const &, edm::EventSetup const &, RunContext const *, dqmDetails::NoCache *)
 
- Static Public Member Functions inherited from edm::stream::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)
 

Detailed Description

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

Usage: <usage>

Definition at line 46 of file SiStripMonitorRawData.h.

Constructor & Destructor Documentation

SiStripMonitorRawData::SiStripMonitorRawData ( const edm::ParameterSet iConfig)
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(), HLT_25ns14e33_v1_cff::InputTag, and AlCaHLTBitMon_QueryRunRegistry::string.

42  :
43  BadFedNumber(0),
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 ( )

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 iEvent,
const edm::EventSetup iSetup 
)
virtual

Implements edm::stream::EDAnalyzerBase.

Definition at line 96 of file SiStripMonitorRawData.cc.

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

97 {
98 
99  edm::LogInfo("SiStripMonitorRawData") <<"SiStripMonitorRawData::analyze: Run "<<
100  iEvent.id().run() << " Event " << iEvent.id().event();
101 
102 
103  iSetup.get<SiStripDetCablingRcd>().get( detcabling );
104 
105  // get DigiCollection object from Event
107  iEvent.getByToken(digiToken_, digi_collection);
108 
109  for (std::vector<uint32_t>::const_iterator idetid=SelectedDetIds.begin(),
110  iEnd=SelectedDetIds.end();idetid!=iEnd;++idetid){
111  std::vector< edm::DetSet<SiStripRawDigi> >::const_iterator digis = digi_collection->find( (*idetid) );
112  if (digis == digi_collection->end() ||
113  digis->data.size() == 0 ||
114  digis->data.size() > 768 ) {
115  std::vector<const FedChannelConnection *> fed_conns = detcabling->getConnections((*idetid));
116  for (unsigned int k = 0; k < fed_conns.size() ; k++) {
117  if(fed_conns[k] && fed_conns[k]->isConnected()) {
118  float fed_id = fed_conns[k]->fedId() + 0.01*fed_conns[k]->fedCh();
119  BadFedNumber->Fill(fed_id);
120  }
121  }
122  continue;
123  }
124  }
125 }
RunNumber_t run() const
Definition: EventID.h:39
EventNumber_t event() const
Definition: EventID.h:41
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:457
edm::ESHandle< SiStripDetCabling > detcabling
void Fill(long long x)
std::vector< uint32_t > SelectedDetIds
const T & get() const
Definition: EventSetup.h:55
edm::EventID id() const
Definition: EventBase.h:60
edm::EDGetTokenT< edm::DetSetVector< SiStripRawDigi > > digiToken_
MonitorElement * BadFedNumber
void SiStripMonitorRawData::beginJob ( void  )
virtual

Definition at line 68 of file SiStripMonitorRawData.cc.

68  {
69 }
void SiStripMonitorRawData::bookHistograms ( DQMStore::IBooker ibooker,
edm::Run const &  run,
edm::EventSetup const &  eSetup 
)
overridevirtual

Implements DQMEDAnalyzer.

Definition at line 74 of file SiStripMonitorRawData.cc.

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

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

Definition at line 140 of file SiStripMonitorRawData.cc.

140  {
141  edm::LogInfo("SiStripMonitorRawData") <<"SiStripMonitorRawData::EndJob: "
142  << " Finishing!! ";
143 }
void SiStripMonitorRawData::endRun ( edm::Run const &  run,
edm::EventSetup const &  eSetup 
)
virtual

Reimplemented from edm::stream::EDAnalyzerBase.

Definition at line 129 of file SiStripMonitorRawData.cc.

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

129  {
130  bool outputMEsInRootFile = conf_.getParameter<bool>("OutputMEsInRootFile");
132  if (outputMEsInRootFile) {
133  //dqmStore_->showDirStructure();
134  dqmStore_->save(outputFileName);
135  }
136 }
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", const bool resetMEsAfterWriting=false)
Definition: DQMStore.cc:2602

Member Data Documentation

MonitorElement* SiStripMonitorRawData::BadFedNumber
private

Definition at line 61 of file SiStripMonitorRawData.h.

Referenced by analyze(), and bookHistograms().

edm::ParameterSet SiStripMonitorRawData::conf_
private

Definition at line 64 of file SiStripMonitorRawData.h.

Referenced by endRun(), and SiStripMonitorRawData().

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

Definition at line 65 of file SiStripMonitorRawData.h.

Referenced by analyze(), and bookHistograms().

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

Definition at line 59 of file SiStripMonitorRawData.h.

Referenced by analyze(), and SiStripMonitorRawData().

DQMStore* SiStripMonitorRawData::dqmStore_
private

Definition at line 63 of file SiStripMonitorRawData.h.

Referenced by endRun().

unsigned long long SiStripMonitorRawData::m_cacheID_
private

Definition at line 68 of file SiStripMonitorRawData.h.

Referenced by bookHistograms().

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

Definition at line 66 of file SiStripMonitorRawData.h.

Referenced by analyze(), and bookHistograms().