33 , trackingCertificationBooked_(
false)
34 , trackingLSCertificationBooked_(
false)
36 , allPixelFEDConnected_(
true)
40 edm::LogInfo(
"TrackingCertificationInfo") <<
"TrackingCertificationInfo::Deleting TrackingCertificationInfo ";
44 if (
verbose_)
std::cout <<
"[TrackingCertificationInfo::TrackingCertificationInfo] TopFolderName_: " << TopFolderName_ << std::endl;
53 TrackingMEsMap.insert(std::pair<std::string, TrackingMEs>(QTname, tracking_mes));
56 std::vector<edm::ParameterSet> TrackingGlobalQualityMEs =
pSet_.
getParameter< std::vector<edm::ParameterSet> >(
"TrackingGlobalQualityPSets" );
57 for (
auto meQTset : TrackingGlobalQualityMEs ) {
62 if (
verbose_)
std::cout<<
"[TrackingQualityChecker::TrackingCertificationInfo] inserting " << QTname <<
" in TrackingMEsMap" << std::endl;
63 TrackingMEsMap.insert(std::pair<std::string, TrackingMEs>(QTname, tracking_mes));
68 std::vector<edm::ParameterSet> TrackingLSQualityMEs =
pSet_.
getParameter< std::vector<edm::ParameterSet> >(
"TrackingLSQualityMEs" );
69 for (
auto meQTset : TrackingLSQualityMEs ) {
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));
86 edm::LogInfo(
"TrackingCertificationInfo") <<
"TrackingCertificationInfo::Deleting TrackingCertificationInfo ";
100 if (
verbose_)
std::cout <<
"[TrackingCertificationInfo::beginRun] starting .." << std::endl;
102 edm::LogInfo (
"TrackingCertificationInfo") <<
"TrackingCertificationInfo:: Begining of Run";
110 int nPixelFEDConnected_ = 0;
115 const int siPixelFeds = (siPixelFedIdMax-siPixelFedIdMin+1);
118 if( eSetup.
find( recordKey ) != 0) {
125 std::vector<int> FedsInIds= sumFED->m_fed_in;
126 for (
auto fedID : FedsInIds ) {
127 if ( fedID >= siPixelFedIdMin && fedID <= siPixelFedIdMax ) {
129 ++nPixelFEDConnected_;
131 else if ( fedID >= siStripFedIdMin && fedID <= siStripFedIdMax )
155 if (tracking_dir.size() > 0 ) ibooker_.
setCurrentFolder(tracking_dir+
"/EventInfo");
161 hname =
"CertificationReportMap";
162 htitle =
"Tracking Certification Summary Map";
177 for (std::map<std::string, TrackingMEs>::iterator it = TrackingMEsMap.begin();
178 it != TrackingMEsMap.end(); it++) {
180 if (
verbose_)
std::cout <<
"[TrackingCertificationInfo::bookStatus] meQTname: " << meQTname << std::endl;
181 it->second.TrackingFlag = ibooker_.
bookFloat(
"Track"+meQTname);
182 if (
verbose_)
std::cout <<
"[TrackingCertificationInfo::bookStatus] " << it->first <<
" exists ? " << it->second.TrackingFlag << std::endl;
205 if (tracking_dir.size() > 0 ) ibooker_.
setCurrentFolder(tracking_dir+
"/EventInfo");
213 for (std::map<std::string, TrackingLSMEs>::iterator it =
TrackingLSMEsMap.begin();
216 if (
verbose_)
std::cout <<
"[TrackingCertificationInfo::bookStatus] meQTname: " << meQTname << std::endl;
217 it->second.TrackingFlag = ibooker_.
bookFloat(
"Track"+meQTname);
218 if (
verbose_)
std::cout <<
"[TrackingCertificationInfo::bookStatus] " << it->first <<
" exists ? " << it->second.TrackingFlag << std::endl;
234 edm::LogInfo(
"TrackingDaqInfo") <<
"TrackingDaqInfo::endLuminosityBlock";
247 if (
verbose_)
std::cout <<
"[TrackingCertificationInfo::dqmEndJob]" << std::endl;
249 edm::LogInfo (
"TrackingCertificationInfo") <<
"TrackingCertificationInfo:: End Run";
256 if (
verbose_)
std::cout <<
"[TrackingCertificationInfo::endRun] DONE" << std::endl;
271 if (
verbose_)
std::cout <<
"[TrackingCertificationInfo::fillTrackingCertificationMEs] tracking_dir: " << tracking_dir << std::endl;
272 std::vector<MonitorElement*> all_mes = igetter_.
getContents(tracking_dir+
"/EventInfo/reportSummaryContents");
281 for (std::map<std::string, TrackingMEs>::const_iterator it =
TrackingMEsMap.begin();
284 if ( type ==
"pixel" ) {
285 it->second.TrackingFlag->Fill(val);
287 if (
verbose_)
std::cout <<
"[TrackingCertificationInfo::fillTrackingCertificationMEs] xbin: " << xbin <<
" val: " << val << std::endl;
288 th2d->SetBinContent(xbin+1,1,val);
292 fval = fminf(fval,val);
296 for (std::vector<MonitorElement *>::const_iterator ime = all_mes.begin();
297 ime!= all_mes.end(); ime++) {
300 if (
verbose_)
std::cout<<
"[TrackingCertificationInfo::fillTrackingCertificationMEs] me: " << me->
getName() << std::endl;
305 for (std::map<std::string, TrackingMEs>::const_iterator it =
TrackingMEsMap.begin();
308 if (
verbose_)
std::cout <<
"[TrackingCertificationInfo::fillTrackingCertificationMEs] ME: " << it->first <<
" [" << it->second.TrackingFlag->getFullname() <<
"] flag: " << it->second.TrackingFlag->getFloatValue() << std::endl;
311 if (name.find(type) != std::string::npos) {
312 if (
verbose_)
std::cout <<
"[TrackingCertificationInfo::fillTrackingCertificationMEs] type: " << type <<
" <---> name: " << name << std::endl;
313 it->second.TrackingFlag->Fill(val);
314 if (
verbose_)
std::cout <<
"[TrackingCertificationInfo::fillTrackingCertificationMEs] xbin: " << xbin <<
" val: " << val << std::endl;
316 th2d->SetBinContent(xbin+1,1,val);
320 if (
verbose_)
std::cout <<
"[TrackingCertificationInfo::fillTrackingCertificationMEs] ME: " << it->first <<
" [" << it->second.TrackingFlag->getFullname() <<
"] flag: " << it->second.TrackingFlag->getFloatValue() << std::endl;
323 fval = fminf(fval,val);
326 if (
verbose_)
std::cout <<
"[TrackingCertificationInfo::fillTrackingCertificationMEs] TrackingCertification: " << fval << std::endl;
336 for (std::map<std::string, TrackingMEs>::const_iterator it =
TrackingMEsMap.begin();
338 it->second.TrackingFlag->Reset();
348 for (std::map<std::string, TrackingLSMEs>::const_iterator it =
TrackingLSMEsMap.begin();
350 it->second.TrackingFlag->Reset();
361 for (std::map<std::string, TrackingMEs>::const_iterator it =
TrackingMEsMap.begin();
363 it->second.TrackingFlag->Fill(-1.0);
381 for (std::map<std::string, TrackingLSMEs>::const_iterator it =
TrackingLSMEsMap.begin();
383 it->second.TrackingFlag->Fill(-1.0);
393 if (
verbose_)
std::cout <<
"[TrackingCertificationInfo::fillTrackingCertificationMEsAtLumi] starting .." << std::endl;
402 if (
verbose_)
std::cout <<
"[TrackingCertificationInfo::fillTrackingCertificationMEsAtLumi] tracking_dir: " << tracking_dir << std::endl;
405 if (
verbose_)
std::cout <<
"[TrackingCertificationInfo::fillTrackingCertificationMEsAtLumi] tracking_dir: " << tracking_dir << std::endl;
406 std::vector<MonitorElement*> all_mes = igetter_.
getContents(tracking_dir+
"/EventInfo/reportSummaryContents");
410 for (std::vector<MonitorElement *>::const_iterator ime = all_mes.begin();
411 ime!= all_mes.end(); ime++) {
414 if (
verbose_)
std::cout <<
"[TrackingCertificationInfo::fillTrackingCertificationMEsAtLumi] me: " << me->
getName() << std::endl;
418 if (
verbose_)
std::cout <<
"[TrackingCertificationInfo::fillTrackingCertificationMEsAtLumi] val: " << val << std::endl;
420 for (std::map<std::string, TrackingLSMEs>::const_iterator it =
TrackingLSMEsMap.begin();
423 if (
verbose_)
std::cout <<
"[TrackingCertificationInfo::fillTrackingCertificationMEsAtLumi] ME: " << it->first <<
" [" << it->second.TrackingFlag->getFullname() <<
"] flag: " << it->second.TrackingFlag->getFloatValue() << std::endl;
426 if (
verbose_)
std::cout <<
"[TrackingCertificationInfo::fillTrackingCertificationMEsAtLumi] type: " << type << std::endl;
427 if (name.find(type) != std::string::npos) {
428 if (
verbose_)
std::cout <<
"[TrackingCertificationInfo::fillTrackingCertificationMEsAtLumi] type: " << type <<
" <---> name: " << name << std::endl;
429 it->second.TrackingFlag->Fill(val);
432 if (
verbose_)
std::cout <<
"[TrackingCertificationInfo::fillTrackingCertificationMEsAtLumi] ME: " << it->first <<
" [" << it->second.TrackingFlag->getFullname() <<
"] flag: " << it->second.TrackingFlag->getFloatValue() << std::endl;
437 float global_dqm_flag = 1.0;
438 std::string full_path = tracking_dir +
"/EventInfo/reportSummary";
441 if (
verbose_)
std::cout <<
"[TrackingCertificationInfo::fillTrackingCertificationMEsAtLumi] global_dqm_flag: " << global_dqm_flag << std::endl;
std::map< std::string, TrackingLSMEs > TrackingLSMEsMap
std::vector< MonitorElement * > getContents(Args &&...args)
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
const std::string & getName(void) const
get name of ME
void beginRun(edm::Run const &run, edm::EventSetup const &eSetup)
Begin Run.
void dqmEndJob(DQMStore::IBooker &ibooker_, DQMStore::IGetter &igetter_)
EndJob.
void fillDummyTrackingCertification(DQMStore::IBooker &ibooker_, DQMStore::IGetter &igetter_)
void resetTrackingCertificationMEs(DQMStore::IBooker &ibooker_, DQMStore::IGetter &igetter_)
MonitorElement * get(const std::string &path)
#define DEFINE_FWK_MODULE(type)
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)
void fillTrackingCertificationMEs(DQMStore::IBooker &ibooker_, DQMStore::IGetter &igetter_)
TrackingCertificationInfo(const edm::ParameterSet &ps)
Constructor.
std::vector< std::string > SubDetFolder
void bookTrackingCertificationMEs(DQMStore::IBooker &ibooker_, DQMStore::IGetter &igetter_)
edm::ESHandle< SiStripDetCabling > detCabling_
unsigned long long m_cacheID_
const eventsetup::EventSetupRecord * find(const eventsetup::EventSetupRecordKey &) const
int getNbinsY(void) const
get # of bins in Y-axis
MonitorElement * TrackingCertificationSummaryMap
MonitorElement * TrackingLSCertification
void fillDummyTrackingCertificationAtLumi(DQMStore::IBooker &ibooker_, DQMStore::IGetter &igetter_)
void fillTrackingCertificationMEsAtLumi(DQMStore::IBooker &ibooker_, DQMStore::IGetter &igetter_)
bool trackingLSCertificationBooked_
double getFloatValue(void) const
void dqmEndLuminosityBlock(DQMStore::IBooker &ibooker_, DQMStore::IGetter &igetter_, edm::LuminosityBlock const &lumiSeg, edm::EventSetup const &iSetup)
End Of Luminosity.
Kind kind(void) const
Get the type of the monitor element.
MonitorElement * TrackingCertification
void resetTrackingCertificationMEsAtLumi(DQMStore::IBooker &ibooker_, DQMStore::IGetter &igetter_)
MonitorElement * TrackingFlag
void setCurrentFolder(const std::string &fullpath)
MonitorElement * book2D(Args &&...args)
bool allPixelFEDConnected_
MonitorElement * TrackingFlag
bool trackingCertificationBooked_
int getNbinsX(void) const
get # of bins in X-axis
std::string TopFolderName_
virtual ~TrackingCertificationInfo()
Destructor.
MonitorElement * bookFloat(Args &&...args)
volatile std::atomic< bool > shutdown_flag false
TH2F * getTH2F(void) const
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 Reset(void)
reset ME (ie. contents, errors, etc)
void bookTrackingCertificationMEsAtLumi(DQMStore::IBooker &ibooker_, DQMStore::IGetter &igetter_)
static HCTypeTag findType(char const *iTypeName)
find a type based on the types name, if not found will return default HCTypeTag