CMS 3D CMS Logo

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

#include <DQM/TrackingMonitorClient/interface/TrackingCertificationInfo.h>

Inheritance diagram for TrackingCertificationInfo:
DQMEDHarvester edm::one::EDProducer< edm::Accumulator, edm::EndLuminosityBlockProducer, edm::EndRunProducer, edm::one::WatchLuminosityBlocks, edm::one::WatchRuns, edm::one::SharedResources > edm::one::EDProducerBase edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

Classes

struct  TrackingLSMEs
 
struct  TrackingMEs
 

Public Member Functions

 TrackingCertificationInfo (const edm::ParameterSet &ps)
 Constructor. More...
 
 ~TrackingCertificationInfo () override
 Destructor. More...
 
- Public Member Functions inherited from DQMEDHarvester
void accumulate (edm::Event const &ev, edm::EventSetup const &es) final
 
void beginLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &) final
 
void beginRun (edm::Run const &, edm::EventSetup const &) override
 
 DQMEDHarvester ()
 
void endJob () final
 
void endLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &) final
 
void endLuminosityBlockProduce (edm::LuminosityBlock &, edm::EventSetup const &) final
 
void endRun (edm::Run const &, edm::EventSetup const &) override
 
void endRunProduce (edm::Run &run, edm::EventSetup const &setup) override
 
 ~DQMEDHarvester () override=default
 
- Public Member Functions inherited from edm::one::EDProducer< edm::Accumulator, edm::EndLuminosityBlockProducer, edm::EndRunProducer, edm::one::WatchLuminosityBlocks, edm::one::WatchRuns, edm::one::SharedResources >
 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 Member Functions

void beginJob () override
 BeginJob. More...
 
void beginRun (edm::Run const &run, edm::EventSetup const &eSetup) override
 Begin Run. More...
 
void bookTrackingCertificationMEs (DQMStore::IBooker &ibooker_, DQMStore::IGetter &igetter_)
 
void bookTrackingCertificationMEsAtLumi (DQMStore::IBooker &ibooker_, DQMStore::IGetter &igetter_)
 
void dqmEndJob (DQMStore::IBooker &ibooker_, DQMStore::IGetter &igetter_) override
 EndJob. More...
 
void dqmEndLuminosityBlock (DQMStore::IBooker &ibooker_, DQMStore::IGetter &igetter_, edm::LuminosityBlock const &lumiSeg, edm::EventSetup const &iSetup) override
 End Of Luminosity. More...
 
void fillDummyTrackingCertification (DQMStore::IBooker &ibooker_, DQMStore::IGetter &igetter_)
 
void fillDummyTrackingCertificationAtLumi (DQMStore::IBooker &ibooker_, DQMStore::IGetter &igetter_)
 
void fillTrackingCertificationMEs (DQMStore::IBooker &ibooker_, DQMStore::IGetter &igetter_)
 
void fillTrackingCertificationMEsAtLumi (DQMStore::IBooker &ibooker_, DQMStore::IGetter &igetter_)
 
void resetTrackingCertificationMEs (DQMStore::IBooker &ibooker_, DQMStore::IGetter &igetter_)
 
void resetTrackingCertificationMEsAtLumi (DQMStore::IBooker &ibooker_, DQMStore::IGetter &igetter_)
 

Private Attributes

bool allPixelFEDConnected_
 
bool checkPixelFEDs_
 
edm::ESHandle< SiStripDetCablingdetCabling_
 
unsigned long long m_cacheID_
 
int nFEDConnected_
 
edm::ParameterSet pSet_
 
std::vector< std::string > SubDetFolder
 
std::string TopFolderName_
 
MonitorElementTrackingCertification
 
bool trackingCertificationBooked_
 
MonitorElementTrackingCertificationSummaryMap
 
MonitorElementTrackingLSCertification
 
bool trackingLSCertificationBooked_
 
std::map< std::string, TrackingLSMEsTrackingLSMEsMap
 
std::map< std::string, TrackingMEsTrackingMEsMap
 
bool verbose_
 

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 ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes ()
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
template<typename ESProduct , Transition Tr = Transition::Event>
auto esConsumes (eventsetup::EventSetupRecordKey const &, ESInputTag const &tag)
 
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 DQMEDHarvester
edm::EDPutTokenT< DQMTokenlumiToken_
 
edm::EDPutTokenT< DQMTokenrunToken_
 

Detailed Description

Description:

Usage: <usage>

Definition at line 37 of file TrackingCertificationInfo.h.

Constructor & Destructor Documentation

TrackingCertificationInfo::TrackingCertificationInfo ( const edm::ParameterSet ps)

Constructor.

Definition at line 31 of file TrackingCertificationInfo.cc.

References checkPixelFEDs_, gather_cfg::cout, edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), pSet_, AlCaHLTBitMon_QueryRunRegistry::string, SubDetFolder, TopFolderName_, TrackingCertificationInfo::TrackingMEs::TrackingFlag, TrackingCertificationInfo::TrackingLSMEs::TrackingFlag, TrackingLSMEsMap, TrackingMEsMap, and verbose_.

32  : pSet_(pSet)
35  , nFEDConnected_(0)
36  , allPixelFEDConnected_(true)
37  , m_cacheID_(0)
38 {
39  // Create MessageSender
40  edm::LogInfo( "TrackingCertificationInfo") << "TrackingCertificationInfo::Deleting TrackingCertificationInfo ";
41 
42  verbose_ = pSet_.getUntrackedParameter<bool>("verbose",false);
43  TopFolderName_ = pSet_.getUntrackedParameter<std::string>("TopFolderName","Tracking");
44  if (verbose_) std::cout << "[TrackingCertificationInfo::TrackingCertificationInfo] TopFolderName_: " << TopFolderName_ << std::endl;
45 
46  TrackingMEs tracking_mes;
47  // load variables for Global certification
48 
49  checkPixelFEDs_ = pSet_.getParameter<bool>("checkPixelFEDs");
50  if ( checkPixelFEDs_ ) {
51  std::string QTname = "pixel";
52  tracking_mes.TrackingFlag = nullptr;
53  TrackingMEsMap.insert(std::pair<std::string, TrackingMEs>(QTname, tracking_mes));
54  }
55 
56  std::vector<edm::ParameterSet> TrackingGlobalQualityMEs = pSet_.getParameter< std::vector<edm::ParameterSet> >("TrackingGlobalQualityPSets" );
57  for ( auto meQTset : TrackingGlobalQualityMEs ) {
58 
59  std::string QTname = meQTset.getParameter<std::string>("QT");
60  tracking_mes.TrackingFlag = nullptr;
61 
62  if (verbose_) std::cout<< "[TrackingQualityChecker::TrackingCertificationInfo] inserting " << QTname << " in TrackingMEsMap" << std::endl;
63  TrackingMEsMap.insert(std::pair<std::string, TrackingMEs>(QTname, tracking_mes));
64  }
65 
66  TrackingLSMEs tracking_ls_mes;
67  // load variables for LS certification
68  std::vector<edm::ParameterSet> TrackingLSQualityMEs = pSet_.getParameter< std::vector<edm::ParameterSet> >("TrackingLSQualityMEs" );
69  for ( auto meQTset : TrackingLSQualityMEs ) {
70 
71  std::string QTname = meQTset.getParameter<std::string>("QT");
72  tracking_ls_mes.TrackingFlag = nullptr;
73 
74  if (verbose_) std::cout<< "[TrackingQualityChecker::TrackingCertificationInfo] inserting " << QTname << " in TrackingMEsMap" << std::endl;
75  TrackingLSMEsMap.insert(std::pair<std::string, TrackingLSMEs>(QTname, tracking_ls_mes));
76  }
77 
78 
79  // define sub-detectors which affect the quality
80  SubDetFolder.push_back("SiStrip");
81  SubDetFolder.push_back("Pixel");
82 
83 }
std::map< std::string, TrackingLSMEs > TrackingLSMEsMap
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
std::map< std::string, TrackingMEs > TrackingMEsMap
std::vector< std::string > SubDetFolder
TrackingCertificationInfo::~TrackingCertificationInfo ( )
override

Destructor.

Definition at line 85 of file TrackingCertificationInfo.cc.

85  {
86  edm::LogInfo("TrackingCertificationInfo") << "TrackingCertificationInfo::Deleting TrackingCertificationInfo ";
87 
88 }

Member Function Documentation

void TrackingCertificationInfo::beginJob ( void  )
overrideprivatevirtual

BeginJob.

Reimplemented from edm::one::EDProducerBase.

Definition at line 92 of file TrackingCertificationInfo.cc.

92  {
93 
94 }
void TrackingCertificationInfo::beginRun ( edm::Run const &  run,
edm::EventSetup const &  eSetup 
)
overrideprivate

Begin Run.

Definition at line 98 of file TrackingCertificationInfo.cc.

References allPixelFEDConnected_, gather_cfg::cout, detCabling_, edm::EventSetup::get(), edm::ESHandleBase::isValid(), LogDebug, m_cacheID_, RunInfo::m_fed_in, FEDNumbering::MAXSiPixelFEDID, FEDNumbering::MAXSiStripFEDID, FEDNumbering::MINSiPixelFEDID, FEDNumbering::MINSiStripFEDID, nFEDConnected_, edm::EventSetup::tryToGet(), and verbose_.

98  {
99 
100  if (verbose_) std::cout << "[TrackingCertificationInfo::beginRun] starting .." << std::endl;
101 
102  edm::LogInfo ("TrackingCertificationInfo") <<"TrackingCertificationInfo:: Begining of Run";
103  unsigned long long cacheID = eSetup.get<SiStripDetCablingRcd>().cacheIdentifier();
104  if (m_cacheID_ != cacheID) {
105  m_cacheID_ = cacheID;
106  }
107  eSetup.get<SiStripDetCablingRcd>().get(detCabling_);
108 
109  nFEDConnected_ = 0;
110  int nPixelFEDConnected_ = 0;
111  const int siStripFedIdMin = FEDNumbering::MINSiStripFEDID;
112  const int siStripFedIdMax = FEDNumbering::MAXSiStripFEDID;
113  const int siPixelFedIdMin = FEDNumbering::MINSiPixelFEDID;
114  const int siPixelFedIdMax = FEDNumbering::MAXSiPixelFEDID;
115  const int siPixelFeds = (siPixelFedIdMax-siPixelFedIdMin+1);
116 
117  if(auto runInfoRec = eSetup.tryToGet<RunInfoRcd>()) {
118 
119  edm::ESHandle<RunInfo> sumFED;
120  runInfoRec->get(sumFED);
121 
122  if ( sumFED.isValid() ) {
123 
124  std::vector<int> FedsInIds= sumFED->m_fed_in;
125  for ( auto fedID : FedsInIds ) {
126  if ( fedID >= siPixelFedIdMin && fedID <= siPixelFedIdMax ) {
127  ++nFEDConnected_;
128  ++nPixelFEDConnected_;
129  }
130  else if ( fedID >= siStripFedIdMin && fedID <= siStripFedIdMax )
131  ++nFEDConnected_;
132  }
133  LogDebug ("TrackingDcsInfo") << " TrackingDcsInfo :: Connected FEDs " << nFEDConnected_;
134  }
135  }
136 
137  allPixelFEDConnected_ = ( nPixelFEDConnected_ == siPixelFeds );
138 
139 }
#define LogDebug(id)
edm::ESHandle< SiStripDetCabling > detCabling_
std::vector< int > m_fed_in
Definition: RunInfo.h:26
bool isValid() const
Definition: ESHandle.h:45
void TrackingCertificationInfo::bookTrackingCertificationMEs ( DQMStore::IBooker ibooker_,
DQMStore::IGetter igetter_ 
)
private

Definition at line 144 of file TrackingCertificationInfo.cc.

References DQMStore::IBooker::book2D(), DQMStore::IBooker::bookFloat(), DQMStore::IBooker::cd(), gather_cfg::cout, TrackingUtility::getTopFolderPath(), MonitorElement::setAxisTitle(), MonitorElement::setBinLabel(), DQMStore::IBooker::setCurrentFolder(), AlCaHLTBitMon_QueryRunRegistry::string, TopFolderName_, TrackingCertification, trackingCertificationBooked_, TrackingCertificationSummaryMap, TrackingMEsMap, and verbose_.

Referenced by dqmEndJob(), and resetTrackingCertificationMEs().

144  {
145 
146  if (verbose_) std::cout << "[TrackingCertificationInfo::bookTrackingCertificationMEs] starting .. trackingCertificationBooked_: " << trackingCertificationBooked_ << std::endl;
147 
149 
150  ibooker_.cd();
151  std::string tracking_dir = "";
152  TrackingUtility::getTopFolderPath(ibooker_,igetter_, TopFolderName_, tracking_dir);
153 
154  if (!tracking_dir.empty() ) ibooker_.setCurrentFolder(tracking_dir+"/EventInfo");
155  else ibooker_.setCurrentFolder(TopFolderName_+"/EventInfo");
156 
157  TrackingCertification = ibooker_.bookFloat("CertificationSummary");
158 
159  std::string hname, htitle;
160  hname = "CertificationReportMap";
161  htitle = "Tracking Certification Summary Map";
162  size_t nQT = TrackingMEsMap.size();
163  TrackingCertificationSummaryMap = ibooker_.book2D(hname, htitle, nQT,0.5,float(nQT)+0.5,1,0.5,1.5);
164  TrackingCertificationSummaryMap->setAxisTitle("Track Quality Type", 1);
166  size_t ibin =0;
167  for ( auto meQTset : TrackingMEsMap ) {
168  TrackingCertificationSummaryMap->setBinLabel(ibin+1,meQTset.first);
169  ibin++;
170  }
171 
172 
173  if (!tracking_dir.empty() ) ibooker_.setCurrentFolder(TopFolderName_+"/EventInfo/CertificationContents");
174  else ibooker_.setCurrentFolder(TopFolderName_+"/EventInfo/CertificationContents");
175 
176  for (std::map<std::string, TrackingMEs>::iterator it = TrackingMEsMap.begin();
177  it != TrackingMEsMap.end(); it++) {
178  std::string meQTname = it->first;
179  if (verbose_) std::cout << "[TrackingCertificationInfo::bookStatus] meQTname: " << meQTname << std::endl;
180  it->second.TrackingFlag = ibooker_.bookFloat("Track"+meQTname);
181  if (verbose_) std::cout << "[TrackingCertificationInfo::bookStatus] " << it->first << " exists ? " << it->second.TrackingFlag << std::endl;
182  }
183 
185  ibooker_.cd();
186  }
187 
188  if (verbose_) std::cout << "[TrackingCertificationInfo::bookStatus] trackingCertificationBooked_: " << trackingCertificationBooked_ << std::endl;
189 }
std::map< std::string, TrackingMEs > TrackingMEsMap
void setBinLabel(int bin, const std::string &label, int axis=1)
set bin label for x, y or z axis (axis=1, 2, 3 respectively)
MonitorElement * TrackingCertificationSummaryMap
void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:268
MonitorElement * book2D(Args &&...args)
Definition: DQMStore.h:109
MonitorElement * bookFloat(Args &&...args)
Definition: DQMStore.h:105
static void getTopFolderPath(DQMStore::IBooker &ibooker, DQMStore::IGetter &igetter, std::string top_dir, std::string &path)
void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
void TrackingCertificationInfo::bookTrackingCertificationMEsAtLumi ( DQMStore::IBooker ibooker_,
DQMStore::IGetter igetter_ 
)
private

Definition at line 194 of file TrackingCertificationInfo.cc.

References DQMStore::IBooker::bookFloat(), DQMStore::IBooker::cd(), gather_cfg::cout, TrackingUtility::getTopFolderPath(), DQMStore::IBooker::setCurrentFolder(), AlCaHLTBitMon_QueryRunRegistry::string, TopFolderName_, trackingCertificationBooked_, TrackingLSCertification, trackingLSCertificationBooked_, TrackingLSMEsMap, and verbose_.

Referenced by dqmEndLuminosityBlock(), and resetTrackingCertificationMEsAtLumi().

194  {
195 
196  if (verbose_) std::cout << "[TrackingCertificationInfo::bookTrackingCertificationMEs] starting .. trackingCertificationBooked_: " << trackingCertificationBooked_ << std::endl;
197 
199 
200  ibooker_.cd();
201  std::string tracking_dir = "";
202  TrackingUtility::getTopFolderPath(ibooker_,igetter_, TopFolderName_, tracking_dir);
203 
204  if (!tracking_dir.empty() ) ibooker_.setCurrentFolder(tracking_dir+"/EventInfo");
205  else ibooker_.setCurrentFolder(TopFolderName_+"/EventInfo");
206 
207  TrackingLSCertification = ibooker_.bookFloat("CertificationSummary");
208 
209  if (!tracking_dir.empty() ) ibooker_.setCurrentFolder(TopFolderName_+"/EventInfo/CertificationContents");
210  else ibooker_.setCurrentFolder(TopFolderName_+"/EventInfo/CertificationContents");
211 
212  for (std::map<std::string, TrackingLSMEs>::iterator it = TrackingLSMEsMap.begin();
213  it != TrackingLSMEsMap.end(); it++) {
214  std::string meQTname = it->first;
215  if (verbose_) std::cout << "[TrackingCertificationInfo::bookStatus] meQTname: " << meQTname << std::endl;
216  it->second.TrackingFlag = ibooker_.bookFloat("Track"+meQTname);
217  if (verbose_) std::cout << "[TrackingCertificationInfo::bookStatus] " << it->first << " exists ? " << it->second.TrackingFlag << std::endl;
218  }
219 
221  ibooker_.cd();
222  }
223 
224  if (verbose_) std::cout << "[TrackingCertificationInfo::bookStatus] trackingCertificationBooked_: " << trackingCertificationBooked_ << std::endl;
225 }
std::map< std::string, TrackingLSMEs > TrackingLSMEsMap
void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:268
MonitorElement * bookFloat(Args &&...args)
Definition: DQMStore.h:105
static void getTopFolderPath(DQMStore::IBooker &ibooker, DQMStore::IGetter &igetter, std::string top_dir, std::string &path)
void TrackingCertificationInfo::dqmEndJob ( DQMStore::IBooker ibooker_,
DQMStore::IGetter igetter_ 
)
overrideprivatevirtual

EndJob.

Implements DQMEDHarvester.

Definition at line 244 of file TrackingCertificationInfo.cc.

References bookTrackingCertificationMEs(), gather_cfg::cout, fillDummyTrackingCertification(), fillTrackingCertificationMEs(), nFEDConnected_, and verbose_.

244  {
245 
246  if (verbose_) std::cout << "[TrackingCertificationInfo::dqmEndJob]" << std::endl;
247 
248  edm::LogInfo ("TrackingCertificationInfo") <<"TrackingCertificationInfo:: End Run";
249  bookTrackingCertificationMEs(ibooker_,igetter_);
250  fillDummyTrackingCertification(ibooker_,igetter_);
251 
252  if ( nFEDConnected_ > 0 ) fillTrackingCertificationMEs(ibooker_,igetter_);
253  else fillDummyTrackingCertification(ibooker_,igetter_);
254 
255  if (verbose_) std::cout << "[TrackingCertificationInfo::endRun] DONE" << std::endl;
256 
257 }
void fillDummyTrackingCertification(DQMStore::IBooker &ibooker_, DQMStore::IGetter &igetter_)
void fillTrackingCertificationMEs(DQMStore::IBooker &ibooker_, DQMStore::IGetter &igetter_)
void bookTrackingCertificationMEs(DQMStore::IBooker &ibooker_, DQMStore::IGetter &igetter_)
void TrackingCertificationInfo::dqmEndLuminosityBlock ( DQMStore::IBooker ibooker_,
DQMStore::IGetter igetter_,
edm::LuminosityBlock const &  lumiSeg,
edm::EventSetup const &  iSetup 
)
overrideprivatevirtual

End Of Luminosity.

Reimplemented from DQMEDHarvester.

Definition at line 231 of file TrackingCertificationInfo.cc.

References bookTrackingCertificationMEsAtLumi(), fillDummyTrackingCertificationAtLumi(), fillTrackingCertificationMEsAtLumi(), and nFEDConnected_.

231  {
232 
233  edm::LogInfo( "TrackingDaqInfo") << "TrackingDaqInfo::endLuminosityBlock";
234  bookTrackingCertificationMEsAtLumi(ibooker_,igetter_);
235  fillDummyTrackingCertificationAtLumi(ibooker_,igetter_);
236 
237  if ( nFEDConnected_ > 0 ) fillTrackingCertificationMEsAtLumi(ibooker_,igetter_);
238  else fillDummyTrackingCertificationAtLumi(ibooker_,igetter_);
239 }
void fillDummyTrackingCertificationAtLumi(DQMStore::IBooker &ibooker_, DQMStore::IGetter &igetter_)
void fillTrackingCertificationMEsAtLumi(DQMStore::IBooker &ibooker_, DQMStore::IGetter &igetter_)
void bookTrackingCertificationMEsAtLumi(DQMStore::IBooker &ibooker_, DQMStore::IGetter &igetter_)
void TrackingCertificationInfo::fillDummyTrackingCertification ( DQMStore::IBooker ibooker_,
DQMStore::IGetter igetter_ 
)
private

Definition at line 356 of file TrackingCertificationInfo.cc.

References MonitorElement::Fill(), MonitorElement::getNbinsX(), MonitorElement::getNbinsY(), resetTrackingCertificationMEs(), TrackingCertification, trackingCertificationBooked_, TrackingCertificationSummaryMap, and TrackingMEsMap.

Referenced by dqmEndJob().

356  {
357  resetTrackingCertificationMEs(ibooker_,igetter_);
360  for (std::map<std::string, TrackingMEs>::const_iterator it = TrackingMEsMap.begin();
361  it != TrackingMEsMap.end(); it++) {
362  it->second.TrackingFlag->Fill(-1.0);
363  }
364 
365  for (int xbin = 1; xbin < TrackingCertificationSummaryMap->getNbinsX()+1; xbin++ )
366  for (int ybin = 1; ybin < TrackingCertificationSummaryMap->getNbinsY()+1; ybin++ )
367  TrackingCertificationSummaryMap->Fill(xbin,ybin,-1);
368 
369 
370  }
371 }
void resetTrackingCertificationMEs(DQMStore::IBooker &ibooker_, DQMStore::IGetter &igetter_)
std::map< std::string, TrackingMEs > TrackingMEsMap
void Fill(long long x)
MonitorElement * TrackingCertificationSummaryMap
int getNbinsY() const
get # of bins in Y-axis
int getNbinsX() const
get # of bins in X-axis
void TrackingCertificationInfo::fillDummyTrackingCertificationAtLumi ( DQMStore::IBooker ibooker_,
DQMStore::IGetter igetter_ 
)
private

Definition at line 376 of file TrackingCertificationInfo.cc.

References MonitorElement::Fill(), resetTrackingCertificationMEsAtLumi(), TrackingLSCertification, trackingLSCertificationBooked_, and TrackingLSMEsMap.

Referenced by dqmEndLuminosityBlock().

376  {
377  resetTrackingCertificationMEsAtLumi(ibooker_,igetter_);
380  for (std::map<std::string, TrackingLSMEs>::const_iterator it = TrackingLSMEsMap.begin();
381  it != TrackingLSMEsMap.end(); it++) {
382  it->second.TrackingFlag->Fill(-1.0);
383  }
384 
385  }
386 }
std::map< std::string, TrackingLSMEs > TrackingLSMEsMap
void Fill(long long x)
void resetTrackingCertificationMEsAtLumi(DQMStore::IBooker &ibooker_, DQMStore::IGetter &igetter_)
void TrackingCertificationInfo::fillTrackingCertificationMEs ( DQMStore::IBooker ibooker_,
DQMStore::IGetter igetter_ 
)
private

Definition at line 261 of file TrackingCertificationInfo.cc.

References allPixelFEDConnected_, DQMStore::IBooker::cd(), checkPixelFEDs_, gather_cfg::cout, MonitorElement::DQM_KIND_REAL, MonitorElement::Fill(), DQMStore::IGetter::getContents(), MonitorElement::getFloatValue(), MonitorElement::getName(), MonitorElement::getTH2F(), TrackingUtility::getTopFolderPath(), MonitorElement::kind(), dataset::name, AlCaHLTBitMon_QueryRunRegistry::string, TopFolderName_, TrackingCertification, trackingCertificationBooked_, TrackingCertificationSummaryMap, TrackingMEsMap, heppy_batch::val, and verbose_.

Referenced by dqmEndJob().

261  {
263  // edm::LogError("TrackingCertificationInfo") << " TrackingCertificationInfo::fillTrackingCertificationMEs : MEs missing ";
264  return;
265  }
266 
267  ibooker_.cd();
268  std::string tracking_dir = "";
269  TrackingUtility::getTopFolderPath(ibooker_,igetter_, TopFolderName_, tracking_dir);
270  if (verbose_) std::cout << "[TrackingCertificationInfo::fillTrackingCertificationMEs] tracking_dir: " << tracking_dir << std::endl;
271  std::vector<MonitorElement*> all_mes = igetter_.getContents(tracking_dir+"/EventInfo/reportSummaryContents");
272  float fval = 1.0;
273 
274  if (verbose_) std::cout << "all_mes: " << all_mes.size() << std::endl;
275 
276  if ( checkPixelFEDs_ ) {
277  float val = 1.;
278  if ( allPixelFEDConnected_ ) val = 0.;
279  int xbin = 0;
280  for (std::map<std::string, TrackingMEs>::const_iterator it = TrackingMEsMap.begin();
281  it != TrackingMEsMap.end(); it++) {
282  std::string type = it->first;
283  if ( type == "pixel" ) {
284  it->second.TrackingFlag->Fill(val);
286  if (verbose_) std::cout << "[TrackingCertificationInfo::fillTrackingCertificationMEs] xbin: " << xbin << " val: " << val << std::endl;
287  th2d->SetBinContent(xbin+1,1,val);
288  }
289  xbin++;
290  }
291  fval = fminf(fval,val);
292  }
293 
294  int xbin = ( checkPixelFEDs_ ? 1 : 0);
295  for (std::vector<MonitorElement *>::const_iterator ime = all_mes.begin();
296  ime!= all_mes.end(); ime++) {
297  MonitorElement * me = (*ime);
298  if (!me) continue;
299  if (verbose_) std::cout<< "[TrackingCertificationInfo::fillTrackingCertificationMEs] me: " << me->getName() << std::endl;
300  if (me->kind() == MonitorElement::DQM_KIND_REAL) {
301  const std::string& name = me->getName();
302  float val = me->getFloatValue();
303 
304  for (std::map<std::string, TrackingMEs>::const_iterator it = TrackingMEsMap.begin();
305  it != TrackingMEsMap.end(); it++) {
306 
307  if (verbose_) std::cout << "[TrackingCertificationInfo::fillTrackingCertificationMEs] ME: " << it->first << " [" << it->second.TrackingFlag->getFullname() << "] flag: " << it->second.TrackingFlag->getFloatValue() << std::endl;
308 
309  std::string type = it->first;
310  if (name.find(type) != std::string::npos) {
311  if (verbose_) std::cout << "[TrackingCertificationInfo::fillTrackingCertificationMEs] type: " << type << " <---> name: " << name << std::endl;
312  it->second.TrackingFlag->Fill(val);
313  if (verbose_) std::cout << "[TrackingCertificationInfo::fillTrackingCertificationMEs] xbin: " << xbin << " val: " << val << std::endl;
315  th2d->SetBinContent(xbin+1,1,val);
316  xbin++;
317  break;
318  }
319  if (verbose_) std::cout << "[TrackingCertificationInfo::fillTrackingCertificationMEs] ME: " << it->first << " [" << it->second.TrackingFlag->getFullname() << "] flag: " << it->second.TrackingFlag->getFloatValue() << std::endl;
320 
321  }
322  fval = fminf(fval,val);
323  }
324  }
325  if (verbose_) std::cout << "[TrackingCertificationInfo::fillTrackingCertificationMEs] TrackingCertification: " << fval << std::endl;
326  TrackingCertification->Fill(fval);
327 }
type
Definition: HCALResponse.h:21
double getFloatValue() const
std::map< std::string, TrackingMEs > TrackingMEsMap
const std::string & getName() const
get name of ME
void Fill(long long x)
MonitorElement * TrackingCertificationSummaryMap
std::vector< MonitorElement * > getContents(Args &&...args)
Definition: DQMStore.h:192
TH2F * getTH2F() const
static void getTopFolderPath(DQMStore::IBooker &ibooker, DQMStore::IGetter &igetter, std::string top_dir, std::string &path)
Kind kind() const
Get the type of the monitor element.
void TrackingCertificationInfo::fillTrackingCertificationMEsAtLumi ( DQMStore::IBooker ibooker_,
DQMStore::IGetter igetter_ 
)
private

Definition at line 391 of file TrackingCertificationInfo.cc.

References DQMStore::IBooker::cd(), gather_cfg::cout, DEFINE_FWK_MODULE, MonitorElement::DQM_KIND_REAL, MonitorElement::Fill(), DQMStore::IGetter::get(), DQMStore::IGetter::getContents(), MonitorElement::getFloatValue(), MonitorElement::getName(), TrackingUtility::getTopFolderPath(), MonitorElement::kind(), dataset::name, MonitorElement::Reset(), resetTrackingCertificationMEsAtLumi(), AlCaHLTBitMon_QueryRunRegistry::string, TopFolderName_, TrackingLSCertification, trackingLSCertificationBooked_, TrackingLSMEsMap, heppy_batch::val, and verbose_.

Referenced by dqmEndLuminosityBlock().

391  {
392  if (verbose_) std::cout << "[TrackingCertificationInfo::fillTrackingCertificationMEsAtLumi] starting .." << std::endl;
394  return;
395  }
396  resetTrackingCertificationMEsAtLumi(ibooker_,igetter_);
397 
398  ibooker_.cd();
399  std::string tracking_dir = "";
400  TrackingUtility::getTopFolderPath(ibooker_,igetter_, TopFolderName_, tracking_dir);
401  if (verbose_) std::cout << "[TrackingCertificationInfo::fillTrackingCertificationMEsAtLumi] tracking_dir: " << tracking_dir << std::endl;
402 
403 
404  if (verbose_) std::cout << "[TrackingCertificationInfo::fillTrackingCertificationMEsAtLumi] tracking_dir: " << tracking_dir << std::endl;
405  std::vector<MonitorElement*> all_mes = igetter_.getContents(tracking_dir+"/EventInfo/reportSummaryContents");
406 
407  if (verbose_) std::cout << "all_mes: " << all_mes.size() << std::endl;
408 
409  for (std::vector<MonitorElement *>::const_iterator ime = all_mes.begin();
410  ime!= all_mes.end(); ime++) {
411  MonitorElement * me = (*ime);
412  if (!me) continue;
413  if (verbose_) std::cout << "[TrackingCertificationInfo::fillTrackingCertificationMEsAtLumi] me: " << me->getName() << std::endl;
414  if (me->kind() == MonitorElement::DQM_KIND_REAL) {
415  const std::string& name = me->getName();
416  float val = me->getFloatValue();
417  if (verbose_) std::cout << "[TrackingCertificationInfo::fillTrackingCertificationMEsAtLumi] val: " << val << std::endl;
418 
419  for (std::map<std::string, TrackingLSMEs>::const_iterator it = TrackingLSMEsMap.begin();
420  it != TrackingLSMEsMap.end(); it++) {
421 
422  if (verbose_) std::cout << "[TrackingCertificationInfo::fillTrackingCertificationMEsAtLumi] ME: " << it->first << " [" << it->second.TrackingFlag->getFullname() << "] flag: " << it->second.TrackingFlag->getFloatValue() << std::endl;
423 
424  std::string type = it->first;
425  if (verbose_) std::cout << "[TrackingCertificationInfo::fillTrackingCertificationMEsAtLumi] type: " << type << std::endl;
426  if (name.find(type) != std::string::npos) {
427  if (verbose_) std::cout << "[TrackingCertificationInfo::fillTrackingCertificationMEsAtLumi] type: " << type << " <---> name: " << name << std::endl;
428  it->second.TrackingFlag->Fill(val);
429  break;
430  }
431  if (verbose_) std::cout << "[TrackingCertificationInfo::fillTrackingCertificationMEsAtLumi] ME: " << it->first << " [" << it->second.TrackingFlag->getFullname() << "] flag: " << it->second.TrackingFlag->getFloatValue() << std::endl;
432  }
433  }
434  }
435 
436  float global_dqm_flag = 1.0;
437  std::string full_path = tracking_dir + "/EventInfo/reportSummary";
438  MonitorElement* me_dqm = igetter_.get(full_path);
439  if (me_dqm && me_dqm->kind() == MonitorElement::DQM_KIND_REAL) global_dqm_flag = me_dqm->getFloatValue();
440  if (verbose_) std::cout << "[TrackingCertificationInfo::fillTrackingCertificationMEsAtLumi] global_dqm_flag: " << global_dqm_flag << std::endl;
441 
443  TrackingLSCertification->Fill(global_dqm_flag);
444 }
std::map< std::string, TrackingLSMEs > TrackingLSMEsMap
type
Definition: HCALResponse.h:21
double getFloatValue() const
const std::string & getName() const
get name of ME
void Fill(long long x)
void Reset()
reset ME (ie. contents, errors, etc)
std::vector< MonitorElement * > getContents(Args &&...args)
Definition: DQMStore.h:192
MonitorElement * get(std::string const &path)
Definition: DQMStore.cc:303
void resetTrackingCertificationMEsAtLumi(DQMStore::IBooker &ibooker_, DQMStore::IGetter &igetter_)
static void getTopFolderPath(DQMStore::IBooker &ibooker, DQMStore::IGetter &igetter, std::string top_dir, std::string &path)
Kind kind() const
Get the type of the monitor element.
void TrackingCertificationInfo::resetTrackingCertificationMEs ( DQMStore::IBooker ibooker_,
DQMStore::IGetter igetter_ 
)
private

Definition at line 332 of file TrackingCertificationInfo.cc.

References bookTrackingCertificationMEs(), MonitorElement::Reset(), TrackingCertification, trackingCertificationBooked_, and TrackingMEsMap.

Referenced by fillDummyTrackingCertification().

332  {
335  for (std::map<std::string, TrackingMEs>::const_iterator it = TrackingMEsMap.begin();
336  it != TrackingMEsMap.end(); it++) {
337  it->second.TrackingFlag->Reset();
338  }
339 }
std::map< std::string, TrackingMEs > TrackingMEsMap
void bookTrackingCertificationMEs(DQMStore::IBooker &ibooker_, DQMStore::IGetter &igetter_)
void Reset()
reset ME (ie. contents, errors, etc)
void TrackingCertificationInfo::resetTrackingCertificationMEsAtLumi ( DQMStore::IBooker ibooker_,
DQMStore::IGetter igetter_ 
)
private

Definition at line 344 of file TrackingCertificationInfo.cc.

References bookTrackingCertificationMEsAtLumi(), MonitorElement::Reset(), TrackingLSCertification, trackingLSCertificationBooked_, and TrackingLSMEsMap.

Referenced by fillDummyTrackingCertificationAtLumi(), and fillTrackingCertificationMEsAtLumi().

344  {
347  for (std::map<std::string, TrackingLSMEs>::const_iterator it = TrackingLSMEsMap.begin();
348  it != TrackingLSMEsMap.end(); it++) {
349  it->second.TrackingFlag->Reset();
350  }
351 }
std::map< std::string, TrackingLSMEs > TrackingLSMEsMap
void Reset()
reset ME (ie. contents, errors, etc)
void bookTrackingCertificationMEsAtLumi(DQMStore::IBooker &ibooker_, DQMStore::IGetter &igetter_)

Member Data Documentation

bool TrackingCertificationInfo::allPixelFEDConnected_
private

Definition at line 99 of file TrackingCertificationInfo.h.

Referenced by beginRun(), and fillTrackingCertificationMEs().

bool TrackingCertificationInfo::checkPixelFEDs_
private
edm::ESHandle< SiStripDetCabling > TrackingCertificationInfo::detCabling_
private

Definition at line 93 of file TrackingCertificationInfo.h.

Referenced by beginRun().

unsigned long long TrackingCertificationInfo::m_cacheID_
private

Definition at line 105 of file TrackingCertificationInfo.h.

Referenced by beginRun().

int TrackingCertificationInfo::nFEDConnected_
private

Definition at line 98 of file TrackingCertificationInfo.h.

Referenced by beginRun(), dqmEndJob(), and dqmEndLuminosityBlock().

edm::ParameterSet TrackingCertificationInfo::pSet_
private

Definition at line 94 of file TrackingCertificationInfo.h.

Referenced by TrackingCertificationInfo().

std::vector<std::string> TrackingCertificationInfo::SubDetFolder
private

Definition at line 107 of file TrackingCertificationInfo.h.

Referenced by TrackingCertificationInfo().

std::string TrackingCertificationInfo::TopFolderName_
private
MonitorElement* TrackingCertificationInfo::TrackingCertification
private
bool TrackingCertificationInfo::trackingCertificationBooked_
private
MonitorElement* TrackingCertificationInfo::TrackingCertificationSummaryMap
private
MonitorElement* TrackingCertificationInfo::TrackingLSCertification
private
bool TrackingCertificationInfo::trackingLSCertificationBooked_
private
std::map<std::string, TrackingLSMEs> TrackingCertificationInfo::TrackingLSMEsMap
private
std::map<std::string, TrackingMEs> TrackingCertificationInfo::TrackingMEsMap
private
bool TrackingCertificationInfo::verbose_
private