CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Protected Member Functions | Private Attributes
SiStripPopConBadComponentsHandlerFromDQM Class Reference
Inheritance diagram for SiStripPopConBadComponentsHandlerFromDQM:
SiStripDQMPopConSourceHandler< SiStripBadStrip > popcon::PopConSourceHandler< SiStripBadStrip >

Public Types

typedef dqm::legacy::DQMStore DQMStore
 
typedef dqm::legacy::MonitorElement MonitorElement
 
- Public Types inherited from SiStripDQMPopConSourceHandler< SiStripBadStrip >
typedef dqm::legacy::DQMStore DQMStore
 
- Public Types inherited from popcon::PopConSourceHandler< SiStripBadStrip >
typedef std::vector< Triplet > Container
 
typedef std::vector< std::pair< SiStripBadStrip *, cond::Time_t > > OldContainer
 
typedef PopConSourceHandler< SiStripBadStripself
 
typedef cond::Summary Summary
 
typedef cond::Time_t Time_t
 
typedef SiStripBadStrip value_type
 

Public Member Functions

void dqmEndJob (DQMStore::IBooker &booker, DQMStore::IGetter &getter) override
 
SiStripBadStripgetObj () const override
 
void initES (const edm::EventSetup &) override
 
 SiStripPopConBadComponentsHandlerFromDQM (const edm::ParameterSet &iConfig)
 
 ~SiStripPopConBadComponentsHandlerFromDQM () override
 
- Public Member Functions inherited from SiStripDQMPopConSourceHandler< SiStripBadStrip >
virtual bool checkForCompatibility (const std::string &otherMetaData) const
 
void getNewObjects () override
 
std::string id () const override
 
 SiStripDQMPopConSourceHandler (const edm::ParameterSet &pset)
 
 ~SiStripDQMPopConSourceHandler () override
 
- Public Member Functions inherited from popcon::PopConSourceHandler< SiStripBadStrip >
void convertFromOld ()
 
SummarydummySummary (typename OldContainer::value_type const &) const
 
void initialize (const cond::persistency::Session &dbSession, cond::TagInfo_t const &tagInfo, cond::LogDBEntry_t const &logDBEntry)
 
Ref lastPayload () const
 
cond::LogDBEntry_t const & logDBEntry () const
 
std::pair< Container const *, std::string const > operator() (const cond::persistency::Session &session, cond::TagInfo_t const &tagInfo, cond::LogDBEntry_t const &logDBEntry) const
 
 PopConSourceHandler ()
 
Container const & returnData ()
 
void sort ()
 
cond::TagInfo_t const & tagInfo () const
 
std::string const & userTextLog () const
 
virtual ~PopConSourceHandler ()
 

Protected Member Functions

std::string getMetaDataString () const override
 
- Protected Member Functions inherited from SiStripDQMPopConSourceHandler< SiStripBadStrip >
uint32_t getRunNumber () const
 
- Protected Member Functions inherited from popcon::PopConSourceHandler< SiStripBadStrip >
int add (value_type *payload, Summary *summary, Time_t time)
 
cond::persistency::SessiondbSession () const
 

Private Attributes

edm::FileInPath fp_
 
SiStripBadStrip m_obj
 
const TrackerTopologytrackerTopo_
 

Additional Inherited Members

- Protected Attributes inherited from popcon::PopConSourceHandler< SiStripBadStrip >
OldContainer m_to_transfer
 
std::string m_userTextLog
 

Detailed Description

Definition at line 10 of file SiStripPopConBadComponentsDQM.cc.

Member Typedef Documentation

◆ DQMStore

Definition at line 13 of file SiStripPopConBadComponentsDQM.cc.

◆ MonitorElement

Definition at line 12 of file SiStripPopConBadComponentsDQM.cc.

Constructor & Destructor Documentation

◆ SiStripPopConBadComponentsHandlerFromDQM()

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

Definition at line 38 of file SiStripPopConBadComponentsDQM.cc.

41  "file", edm::FileInPath("CalibTracker/SiStripCommon/data/SiStripDetInfo.dat"))} {
42  edm::LogInfo("SiStripBadComponentsDQMService") << "[SiStripBadComponentsDQMService::SiStripBadComponentsDQMService]";
43 }

References edm::ParameterSet::getUntrackedParameter().

◆ ~SiStripPopConBadComponentsHandlerFromDQM()

SiStripPopConBadComponentsHandlerFromDQM::~SiStripPopConBadComponentsHandlerFromDQM ( )
override

Definition at line 45 of file SiStripPopConBadComponentsDQM.cc.

45  {
46  edm::LogInfo("SiStripBadComponentsDQMService") << "[SiStripBadComponentsDQMService::~SiStripBadComponentsDQMService]";
47 }

Member Function Documentation

◆ dqmEndJob()

void SiStripPopConBadComponentsHandlerFromDQM::dqmEndJob ( DQMStore::IBooker booker,
DQMStore::IGetter getter 
)
overridevirtual

Reimplemented from SiStripDQMPopConSourceHandler< SiStripBadStrip >.

Definition at line 80 of file SiStripPopConBadComponentsDQM.cc.

80  {
81  //*LOOP OVER THE LIST OF SUMMARY OBJECTS TO INSERT IN DB*//
82 
84 
86 
87  getter.cd();
88 
89  const std::string mechanicalview_dir = "MechanicalView";
90  if (!getter.dirExists(mechanicalview_dir))
91  return;
92 
93  const std::vector<std::string> subdet_folder = {"TIB", "TOB", "TEC/side_1", "TEC/side_2", "TID/side_1", "TID/side_2"};
94 
95  int nDetsTotal = 0;
96  int nDetsWithErrorTotal = 0;
97  for (const auto& im : subdet_folder) {
98  const std::string dname = mechanicalview_dir + "/" + im;
99  getter.cd();
100  if (!getter.dirExists(dname))
101  continue;
102  getter.cd(dname);
103 
104  std::vector<std::string> module_folders;
105  getModuleFolderList(getter, dname, module_folders);
106  int nDets = module_folders.size();
107 
108  int nDetsWithError = 0;
109  const std::string bad_module_folder = dname + "/" + "BadModuleList";
110  getter.cd();
111  if (getter.dirExists(bad_module_folder)) {
112  for (const MonitorElement* me : getter.getContents(bad_module_folder)) {
113  nDetsWithError++;
114  std::cout << me->getName() << " " << me->getIntValue() << std::endl;
115  uint32_t detId = std::stoul(me->getName());
116  short flag = me->getIntValue();
117 
118  std::vector<unsigned int> theSiStripVector;
119 
120  unsigned short firstBadStrip = 0, NconsecutiveBadStrips = 0;
121  unsigned int theBadStripRange;
122 
123  // for(std::vector<uint32_t>::const_iterator is=BadApvList_.begin(); is!=BadApvList_.end(); ++is){
124 
125  // firstBadStrip=(*is)*128;
126  NconsecutiveBadStrips = reader.getNumberOfApvsAndStripLength(detId).first * 128;
127 
128  theBadStripRange = m_obj.encode(firstBadStrip, NconsecutiveBadStrips, flag);
129 
130  LogDebug("SiStripBadComponentsDQMService") << "detid " << detId << " \t"
131  << ", flag " << flag << std::endl;
132 
133  theSiStripVector.push_back(theBadStripRange);
134  // }
135 
136  SiStripBadStrip::Range range(theSiStripVector.begin(), theSiStripVector.end());
137  if (!m_obj.put(detId, range)) {
138  edm::LogError("SiStripBadFiberBuilder")
139  << "[SiStripBadFiberBuilder::analyze] detid already exists" << std::endl;
140  }
141  }
142  }
143  nDetsTotal += nDets;
144  nDetsWithErrorTotal += nDetsWithError;
145  }
146  getter.cd();
147 }

References dqm::implementation::NavigatorBase::cd(), gather_cfg::cout, dqm::implementation::IGetter::dirExists(), RefreshWebPage::dname, SiStripBadStrip::encode(), RemoveAddSevLevel::flag, fp_, edm::FileInPath::fullPath(), dqm::implementation::IGetter::getContents(), LogDebug, m_obj, hlt_dqm_clientPB-live_cfg::me, SiStripBadStrip::put(), FastTimerService_cff::range, DQM::reader, and AlCaHLTBitMon_QueryRunRegistry::string.

◆ getMetaDataString()

std::string SiStripPopConBadComponentsHandlerFromDQM::getMetaDataString ( ) const
overrideprotectedvirtual

Reimplemented from SiStripDQMPopConSourceHandler< SiStripBadStrip >.

Definition at line 55 of file SiStripPopConBadComponentsDQM.cc.

55  {
56  std::stringstream ss;
57  ss << SiStripDQMPopConSourceHandler<SiStripBadStrip>::getMetaDataString();
59  return ss.str();
60 }

References getObj(), SiStripBadStrip::printSummary(), contentValuesCheck::ss, and trackerTopo_.

◆ getObj()

SiStripBadStrip * SiStripPopConBadComponentsHandlerFromDQM::getObj ( ) const
overridevirtual

Implements SiStripDQMPopConSourceHandler< SiStripBadStrip >.

Definition at line 149 of file SiStripPopConBadComponentsDQM.cc.

149 { return new SiStripBadStrip(m_obj); }

References m_obj.

Referenced by getMetaDataString().

◆ initES()

void SiStripPopConBadComponentsHandlerFromDQM::initES ( const edm::EventSetup setup)
overridevirtual

Member Data Documentation

◆ fp_

edm::FileInPath SiStripPopConBadComponentsHandlerFromDQM::fp_
private

Definition at line 26 of file SiStripPopConBadComponentsDQM.cc.

Referenced by dqmEndJob().

◆ m_obj

SiStripBadStrip SiStripPopConBadComponentsHandlerFromDQM::m_obj
private

Definition at line 27 of file SiStripPopConBadComponentsDQM.cc.

Referenced by dqmEndJob(), and getObj().

◆ trackerTopo_

const TrackerTopology* SiStripPopConBadComponentsHandlerFromDQM::trackerTopo_
private

Definition at line 28 of file SiStripPopConBadComponentsDQM.cc.

Referenced by getMetaDataString(), and initES().

edm::ESHandle::product
T const * product() const
Definition: ESHandle.h:86
FastTimerService_cff.range
range
Definition: FastTimerService_cff.py:34
SiStripDQMPopConSourceHandler< SiStripBadStrip >
SiStripPopConBadComponentsHandlerFromDQM::trackerTopo_
const TrackerTopology * trackerTopo_
Definition: SiStripPopConBadComponentsDQM.cc:28
gather_cfg.cout
cout
Definition: gather_cfg.py:144
edm::LogInfo
Definition: MessageLogger.h:254
dqm::legacy::MonitorElement
Definition: MonitorElement.h:461
edm::ParameterSet::getUntrackedParameter
T getUntrackedParameter(std::string const &, T const &) const
SiStripBadStrip::put
bool put(const uint32_t &detID, const InputVector &vect)
Definition: SiStripBadStrip.h:65
SiStripDetInfoFileReader
Definition: SiStripDetInfoFileReader.h:30
singleTopDQM_cfi.setup
setup
Definition: singleTopDQM_cfi.py:37
SiStripBadStrip
Definition: SiStripBadStrip.h:30
contentValuesCheck.ss
ss
Definition: contentValuesCheck.py:33
edm::FileInPath
Definition: FileInPath.h:64
SiStripBadStrip::Range
std::pair< ContainerIterator, ContainerIterator > Range
Definition: SiStripBadStrip.h:53
DQM.reader
reader
Definition: DQM.py:105
edm::ESHandle< TrackerTopology >
SiStripPopConBadComponentsHandlerFromDQM::getObj
SiStripBadStrip * getObj() const override
Definition: SiStripPopConBadComponentsDQM.cc:149
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
LogDebug
#define LogDebug(id)
Definition: MessageLogger.h:670
edm::LogError
Definition: MessageLogger.h:183
SiStripBadStrip::printSummary
void printSummary(std::stringstream &ss, const TrackerTopology *trackerTopo) const
Definition: SiStripBadStrip.cc:60
get
#define get
SiStripPopConBadComponentsHandlerFromDQM::fp_
edm::FileInPath fp_
Definition: SiStripPopConBadComponentsDQM.cc:26
RefreshWebPage.dname
dname
Definition: RefreshWebPage.py:56
SiStripPopConBadComponentsHandlerFromDQM::m_obj
SiStripBadStrip m_obj
Definition: SiStripPopConBadComponentsDQM.cc:27
TrackerTopologyRcd
Definition: TrackerTopologyRcd.h:10
hlt_dqm_clientPB-live_cfg.me
me
Definition: hlt_dqm_clientPB-live_cfg.py:61
SiStripBadStrip::encode
unsigned int encode(const unsigned short &first, const unsigned short &NconsecutiveBadStrips, const unsigned short &flag=0)
Definition: SiStripBadStrip.h:86
edm::FileInPath::fullPath
std::string fullPath() const
Definition: FileInPath.cc:163
RemoveAddSevLevel.flag
flag
Definition: RemoveAddSevLevel.py:116