CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Protected Attributes | Private Member Functions | Private Attributes
SiPixelErrorsDigisToCalibDigis Class Reference

#include <SiPixelErrors/SiPixelErrorsDigisToCalibDigis/src/SiPixelErrorsDigisToCalibDigis.cc>

Inheritance diagram for SiPixelErrorsDigisToCalibDigis:
edm::EDAnalyzer edm::EDConsumerBase

Public Types

typedef dqm::legacy::DQMStore DQMStore
 
typedef dqm::legacy::MonitorElement MonitorElement
 
- Public Types inherited from edm::EDAnalyzer
typedef EDAnalyzer ModuleType
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 

Public Member Functions

MonitorElementbookDQMHistogram2D (uint32_t detid, std::string name, std::string title, int nchX, double lowX, double highX, int nchY, double lowY, double highY)
 
MonitorElementbookDQMHistoPlaquetteSummary2D (uint32_t detid, std::string name, std::string title)
 
bool setDQMDirectory (std::string dirName)
 
bool setDQMDirectory (uint32_t detID)
 
 SiPixelErrorsDigisToCalibDigis (const edm::ParameterSet &)
 
 ~SiPixelErrorsDigisToCalibDigis () override
 
- Public Member Functions inherited from edm::EDAnalyzer
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzer ()
 
SerialTaskQueueglobalLuminosityBlocksQueue ()
 
SerialTaskQueueglobalRunsQueue ()
 
ModuleDescription const & moduleDescription () const
 
std::string workerType () const
 
 ~EDAnalyzer () 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 &&)=default
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
ESProxyIndex const * esGetTokenIndices (edm::Transition iTrans) const
 
std::vector< ESProxyIndex > const & esGetTokenIndicesVector (edm::Transition iTrans) const
 
std::vector< ESRecordIndex > const & esGetTokenRecordIndicesVector (edm::Transition iTrans) const
 
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::array< std::vector< ModuleDescription const * > *, NumBranchTypes > &modulesAll, std::vector< ModuleProcessName > &modulesInPreviousProcesses, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void selectInputProcessBlocks (ProductRegistry const &productRegistry, ProcessBlockHelperBase const &processBlockHelperBase)
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
void updateLookup (eventsetup::ESRecordsToProxyIndices const &)
 
virtual ~EDConsumerBase () noexcept(false)
 

Protected Attributes

edm::ESHandle< TrackerGeometrygeom_
 
edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecordtrackerGeomToken_
 

Private Member Functions

void analyze (const edm::Event &, const edm::EventSetup &) override
 
void beginJob () override
 
void endJob () override
 

Private Attributes

bool createOutputFile_
 
DQMStoredaqBE_
 
SiPixelFolderOrganizerfolderMaker_
 
std::string outputFilename_
 
std::map< uint32_t, MonitorElement * > SiPixelErrorsDigisToCalibDigis_2DErrorInformation_
 
edm::InputTag siPixelProducerLabel_
 
MonitorElementtemp
 
SiPixelHistogramIdtheHistogramIdWorker_
 
edm::EDGetTokenT< edm::DetSetVector< SiPixelCalibDigiError > > tPixelCalibDigiError
 

Additional Inherited Members

- Static Public Member Functions inherited from edm::EDAnalyzer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &)
 
static bool wantsGlobalLuminosityBlocks ()
 
static bool wantsGlobalRuns ()
 
static bool wantsInputProcessBlocks ()
 
static bool wantsProcessBlocks ()
 
static bool wantsStreamLuminosityBlocks ()
 
static bool wantsStreamRuns ()
 
- Protected Member Functions inherited from edm::EDConsumerBase
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
template<BranchType B = InEvent>
EDConsumerBaseAdaptor< B > consumes (edm::InputTag tag) noexcept
 
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 ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes ()
 
template<Transition Tr = Transition::Event>
constexpr auto esConsumes () noexcept
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
template<Transition Tr = Transition::Event>
auto esConsumes (ESInputTag tag) noexcept
 
template<Transition Tr = Transition::Event>
ESGetTokenGeneric esConsumes (eventsetup::EventSetupRecordKey const &iRecord, eventsetup::DataKey const &iKey)
 Used with EventSetupRecord::doGet. More...
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 

Detailed Description

class SiPixelErrorsDigisToCalibDigis

Description: Create monitorElements for the Errors in created in the reduction of digis to calibDigis

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

Implementation: <Notes on="" implementation>="">

Definition at line 44 of file SiPixelErrorsDigisToCalibDigis.h.

Member Typedef Documentation

◆ DQMStore

Definition at line 47 of file SiPixelErrorsDigisToCalibDigis.h.

◆ MonitorElement

Definition at line 46 of file SiPixelErrorsDigisToCalibDigis.h.

Constructor & Destructor Documentation

◆ SiPixelErrorsDigisToCalibDigis()

SiPixelErrorsDigisToCalibDigis::SiPixelErrorsDigisToCalibDigis ( const edm::ParameterSet iConfig)
explicit

Definition at line 38 of file SiPixelErrorsDigisToCalibDigis.cc.

40 {
41  siPixelProducerLabel_ = iConfig.getParameter<edm::InputTag>("SiPixelProducerLabelTag");
42  createOutputFile_ = iConfig.getUntrackedParameter<bool>("saveFile", false);
43  outputFilename_ = iConfig.getParameter<std::string>("outputFilename");
46 
47  tPixelCalibDigiError = consumes<edm::DetSetVector<SiPixelCalibDigiError> >(siPixelProducerLabel_);
48 
49  trackerGeomToken_ = esConsumes<TrackerGeometry, TrackerDigiGeometryRecord>();
50 
51  // std::cout<<"siPixelProducerLabel_ = "<<siPixelProducerLabel_<<std::endl;
52  // std::cout<<"createOutputFile_= "<< createOutputFile_<<std::endl;
53  // std::cout<<"outpuFilename_= "<< outputFilename_<< std::endl;
54 }

References createOutputFile_, daqBE_, folderMaker_, edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), outputFilename_, siPixelProducerLabel_, AlCaHLTBitMon_QueryRunRegistry::string, tPixelCalibDigiError, and trackerGeomToken_.

◆ ~SiPixelErrorsDigisToCalibDigis()

SiPixelErrorsDigisToCalibDigis::~SiPixelErrorsDigisToCalibDigis ( )
override

Definition at line 56 of file SiPixelErrorsDigisToCalibDigis.cc.

56  {
57  // do anything here that needs to be done at desctruction time
58  // (e.g. close files, deallocate resources etc.)
59 }

Member Function Documentation

◆ analyze()

void SiPixelErrorsDigisToCalibDigis::analyze ( const edm::Event iEvent,
const edm::EventSetup iSetup 
)
overrideprivatevirtual

Implements edm::EDAnalyzer.

Definition at line 66 of file SiPixelErrorsDigisToCalibDigis.cc.

66  {
67  using namespace edm;
68 
69  static int first(1);
70  if (1 == first) {
71  first = 0;
74  }
75 
77  iEvent.getByToken(tPixelCalibDigiError, thePlaquettes);
78  // iEvent.getByLabel("siPixelCalibDigis", thePlaquettes);
79 
81 
82  for (digiIter = thePlaquettes->begin(); digiIter != thePlaquettes->end(); digiIter++) {
83  uint32_t detId = digiIter->id;
84 
86  //loop over pixel errors pulsed in the current plaquette
87 
88  MonitorElement* temp_;
89 
90  std::map<uint32_t, MonitorElement*>::iterator mapIterator =
92 
93  if (digiIter->begin() != digiIter->end()) {
94  if (mapIterator == SiPixelErrorsDigisToCalibDigis_2DErrorInformation_.end()) {
95  // std::cout << "This is the beginning of an error 2d histo booking: "<<std::endl;
96  setDQMDirectory(detId);
97  temp_ = bookDQMHistoPlaquetteSummary2D(detId, "SiPixelErrorsCalibDigis", "SiPixelErrorsDigisToCalibDigis");
98  SiPixelErrorsDigisToCalibDigis_2DErrorInformation_.insert(std::make_pair(detId, temp_));
99  } else {
100  // std::cout << "This one was already booked."<<std::endl;
101  temp_ = (*mapIterator).second;
102  }
103 
104  for (ipix = digiIter->begin(); ipix != digiIter->end(); ++ipix) {
105  temp_->Fill(ipix->getCol(), ipix->getRow());
106  // std::cout << "detId: " << detId << " " << ipix->getRow() << " " << ipix->getCol() << std::endl;
107  }
108 
109  } // end of the if statement asking if the plaquette in question has any errors in it
110 
111  } // end of the for loop that goes through all plaquettes
112 }

References edm::DetSetVector< T >::begin(), bookDQMHistoPlaquetteSummary2D(), edm::DetSetVector< T >::end(), dqm::impl::MonitorElement::Fill(), first, geom_, edm::EventSetup::getHandle(), iEvent, edm::InputTag::label(), setDQMDirectory(), SiPixelErrorsDigisToCalibDigis_2DErrorInformation_, siPixelProducerLabel_, theHistogramIdWorker_, tPixelCalibDigiError, and trackerGeomToken_.

◆ beginJob()

void SiPixelErrorsDigisToCalibDigis::beginJob ( void  )
overrideprivatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 115 of file SiPixelErrorsDigisToCalibDigis.cc.

115 {}

◆ bookDQMHistogram2D()

SiPixelErrorsDigisToCalibDigis::MonitorElement * SiPixelErrorsDigisToCalibDigis::bookDQMHistogram2D ( uint32_t  detid,
std::string  name,
std::string  title,
int  nchX,
double  lowX,
double  highX,
int  nchY,
double  lowY,
double  highY 
)

◆ bookDQMHistoPlaquetteSummary2D()

SiPixelErrorsDigisToCalibDigis::MonitorElement * SiPixelErrorsDigisToCalibDigis::bookDQMHistoPlaquetteSummary2D ( uint32_t  detid,
std::string  name,
std::string  title 
)

Definition at line 141 of file SiPixelErrorsDigisToCalibDigis.cc.

142  {
143  DetId detId(detid);
144  const TrackerGeometry& theTracker(*geom_);
145  const PixelGeomDetUnit* theGeomDet = dynamic_cast<const PixelGeomDetUnit*>(theTracker.idToDet(detId));
146  int maxcol = theGeomDet->specificTopology().ncolumns();
147  int maxrow = theGeomDet->specificTopology().nrows();
148 
150  return daqBE_->book2D(hid, title, maxcol, 0, maxcol, maxrow, 0, maxrow);
151 }

References dqm::implementation::IBooker::book2D(), daqBE_, geom_, TrackerGeometry::idToDet(), Skims_PA_cff::name, PixelTopology::ncolumns(), PixelTopology::nrows(), SiPixelHistogramId::setHistoId(), PixelGeomDetUnit::specificTopology(), AlCaHLTBitMon_QueryRunRegistry::string, theHistogramIdWorker_, and runGCPTkAlMap::title.

Referenced by analyze().

◆ endJob()

void SiPixelErrorsDigisToCalibDigis::endJob ( void  )
overrideprivatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 118 of file SiPixelErrorsDigisToCalibDigis.cc.

118  {
119  if (!outputFilename_.empty() && createOutputFile_) {
120  edm::LogInfo("SiPixelErrorCalibDigis") << "Writing ROOT file to: " << outputFilename_ << std::endl;
121  if (edm::Service<DQMStore>().isAvailable())
123  }
124 }

References createOutputFile_, and outputFilename_.

Referenced by o2olib.O2ORunMgr::executeJob().

◆ setDQMDirectory() [1/2]

bool SiPixelErrorsDigisToCalibDigis::setDQMDirectory ( std::string  dirName)

◆ setDQMDirectory() [2/2]

bool SiPixelErrorsDigisToCalibDigis::setDQMDirectory ( uint32_t  detID)

Definition at line 158 of file SiPixelErrorsDigisToCalibDigis.cc.

158 { return folderMaker_->setModuleFolder(detID, 0); }

References folderMaker_, and SiPixelFolderOrganizer::setModuleFolder().

Member Data Documentation

◆ createOutputFile_

bool SiPixelErrorsDigisToCalibDigis::createOutputFile_
private

Definition at line 89 of file SiPixelErrorsDigisToCalibDigis.h.

Referenced by endJob(), and SiPixelErrorsDigisToCalibDigis().

◆ daqBE_

DQMStore* SiPixelErrorsDigisToCalibDigis::daqBE_
private

◆ folderMaker_

SiPixelFolderOrganizer* SiPixelErrorsDigisToCalibDigis::folderMaker_
private

◆ geom_

edm::ESHandle<TrackerGeometry> SiPixelErrorsDigisToCalibDigis::geom_
protected

Definition at line 69 of file SiPixelErrorsDigisToCalibDigis.h.

Referenced by analyze(), and bookDQMHistoPlaquetteSummary2D().

◆ outputFilename_

std::string SiPixelErrorsDigisToCalibDigis::outputFilename_
private

Definition at line 88 of file SiPixelErrorsDigisToCalibDigis.h.

Referenced by endJob(), and SiPixelErrorsDigisToCalibDigis().

◆ SiPixelErrorsDigisToCalibDigis_2DErrorInformation_

std::map<uint32_t, MonitorElement*> SiPixelErrorsDigisToCalibDigis::SiPixelErrorsDigisToCalibDigis_2DErrorInformation_
private

Definition at line 92 of file SiPixelErrorsDigisToCalibDigis.h.

Referenced by analyze().

◆ siPixelProducerLabel_

edm::InputTag SiPixelErrorsDigisToCalibDigis::siPixelProducerLabel_
private

Definition at line 83 of file SiPixelErrorsDigisToCalibDigis.h.

Referenced by analyze(), and SiPixelErrorsDigisToCalibDigis().

◆ temp

MonitorElement* SiPixelErrorsDigisToCalibDigis::temp
private

Definition at line 94 of file SiPixelErrorsDigisToCalibDigis.h.

◆ theHistogramIdWorker_

SiPixelHistogramId* SiPixelErrorsDigisToCalibDigis::theHistogramIdWorker_
private

◆ tPixelCalibDigiError

edm::EDGetTokenT<edm::DetSetVector<SiPixelCalibDigiError> > SiPixelErrorsDigisToCalibDigis::tPixelCalibDigiError
private

Definition at line 84 of file SiPixelErrorsDigisToCalibDigis.h.

Referenced by analyze(), and SiPixelErrorsDigisToCalibDigis().

◆ trackerGeomToken_

edm::ESGetToken<TrackerGeometry, TrackerDigiGeometryRecord> SiPixelErrorsDigisToCalibDigis::trackerGeomToken_
protected

Definition at line 71 of file SiPixelErrorsDigisToCalibDigis.h.

Referenced by analyze(), and SiPixelErrorsDigisToCalibDigis().

runGCPTkAlMap.title
string title
Definition: runGCPTkAlMap.py:94
SiPixelErrorsDigisToCalibDigis::theHistogramIdWorker_
SiPixelHistogramId * theHistogramIdWorker_
Definition: SiPixelErrorsDigisToCalibDigis.h:87
SiPixelErrorsDigisToCalibDigis::daqBE_
DQMStore * daqBE_
Definition: SiPixelErrorsDigisToCalibDigis.h:86
edm::DetSetVector::end
iterator end()
Return the off-the-end iterator.
Definition: DetSetVector.h:325
SiPixelFolderOrganizer::setModuleFolder
bool setModuleFolder(const uint32_t &rawdetid=0, int type=0, bool isUpgrade=false)
Set folder name for a module or plaquette.
Definition: SiPixelFolderOrganizer.cc:27
edm
HLT enums.
Definition: AlignableModifier.h:19
SiPixelErrorsDigisToCalibDigis::outputFilename_
std::string outputFilename_
Definition: SiPixelErrorsDigisToCalibDigis.h:88
edm::DetSetVector::begin
iterator begin()
Return an iterator to the first DetSet.
Definition: DetSetVector.h:314
dqm::legacy::MonitorElement
Definition: MonitorElement.h:462
edm::ParameterSet::getUntrackedParameter
T getUntrackedParameter(std::string const &, T const &) const
edm::LogInfo
Log< level::Info, false > LogInfo
Definition: MessageLogger.h:125
edm::Handle
Definition: AssociativeIterator.h:50
SiPixelErrorsDigisToCalibDigis::setDQMDirectory
bool setDQMDirectory(std::string dirName)
Definition: SiPixelErrorsDigisToCalibDigis.cc:153
edm::InputTag::label
std::string const & label() const
Definition: InputTag.h:36
DetId
Definition: DetId.h:17
SiPixelErrorsDigisToCalibDigis::createOutputFile_
bool createOutputFile_
Definition: SiPixelErrorsDigisToCalibDigis.h:89
PixelGeomDetUnit
Definition: PixelGeomDetUnit.h:15
dqm::impl::MonitorElement::Fill
void Fill(long long x)
Definition: MonitorElement.h:290
SiPixelErrorsDigisToCalibDigis::siPixelProducerLabel_
edm::InputTag siPixelProducerLabel_
Definition: SiPixelErrorsDigisToCalibDigis.h:83
SiPixelHistogramId::setHistoId
std::string setHistoId(std::string variable, uint32_t &rawId)
Set Histogram Id.
Definition: SiPixelHistogramId.cc:29
PixelTopology::ncolumns
virtual int ncolumns() const =0
dqm::implementation::DQMStore::setCurrentFolder
void setCurrentFolder(std::string const &fullpath) override
Definition: DQMStore.h:569
SiPixelErrorsDigisToCalibDigis::bookDQMHistoPlaquetteSummary2D
MonitorElement * bookDQMHistoPlaquetteSummary2D(uint32_t detid, std::string name, std::string title)
Definition: SiPixelErrorsDigisToCalibDigis.cc:141
first
auto first
Definition: CAHitNtupletGeneratorKernelsImpl.h:125
SiPixelErrorsDigisToCalibDigis::trackerGeomToken_
edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > trackerGeomToken_
Definition: SiPixelErrorsDigisToCalibDigis.h:71
SiPixelHistogramId
Definition: SiPixelHistogramId.h:25
SiPixelErrorsDigisToCalibDigis::SiPixelErrorsDigisToCalibDigis_2DErrorInformation_
std::map< uint32_t, MonitorElement * > SiPixelErrorsDigisToCalibDigis_2DErrorInformation_
Definition: SiPixelErrorsDigisToCalibDigis.h:92
edm::DetSetVector::const_iterator
collection_type::const_iterator const_iterator
Definition: DetSetVector.h:102
PixelGeomDetUnit::specificTopology
virtual const PixelTopology & specificTopology() const
Returns a reference to the pixel proxy topology.
Definition: PixelGeomDetUnit.cc:17
edm::Service
Definition: Service.h:30
iEvent
int iEvent
Definition: GenABIO.cc:224
edm::EventSetup::getHandle
ESHandle< T > getHandle(const ESGetToken< T, R > &iToken) const
Definition: EventSetup.h:155
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
dqm::implementation::IBooker::book2D
MonitorElement * book2D(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, FUNC onbooking=NOOP())
Definition: DQMStore.h:177
SiPixelFolderOrganizer
Definition: SiPixelFolderOrganizer.h:26
TrackerOfflineValidation_Dqm_cff.dirName
dirName
Definition: TrackerOfflineValidation_Dqm_cff.py:55
Skims_PA_cff.name
name
Definition: Skims_PA_cff.py:17
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
SiPixelErrorsDigisToCalibDigis::folderMaker_
SiPixelFolderOrganizer * folderMaker_
Definition: SiPixelErrorsDigisToCalibDigis.h:91
SiPixelErrorsDigisToCalibDigis::geom_
edm::ESHandle< TrackerGeometry > geom_
Definition: SiPixelErrorsDigisToCalibDigis.h:69
PixelTopology::nrows
virtual int nrows() const =0
SiPixelErrorsDigisToCalibDigis::tPixelCalibDigiError
edm::EDGetTokenT< edm::DetSetVector< SiPixelCalibDigiError > > tPixelCalibDigiError
Definition: SiPixelErrorsDigisToCalibDigis.h:84
edm::InputTag
Definition: InputTag.h:15
dqm::implementation::IGetter::dirExists
virtual bool dirExists(std::string const &path) const
Definition: DQMStore.cc:730
TrackerGeometry
Definition: TrackerGeometry.h:14
edm::DetSet::const_iterator
collection_type::const_iterator const_iterator
Definition: DetSet.h:31