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::map< Time_t, std::shared_ptr< SiStripBadStrip > > Container
 
typedef std::unique_ptr< SiStripBadStripRef
 
typedef PopConSourceHandler< SiStripBadStripself
 
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, edm::ConsumesCollector &&iC)
 
 ~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 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 ()
 
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 >
cond::persistency::SessiondbSession () const
 

Private Attributes

edm::FileInPath fp_
 
SiStripBadStrip m_obj
 
const TrackerTopologytrackerTopo_
 
edm::ESGetToken< TrackerTopology, TrackerTopologyRcdtTopoToken_
 

Additional Inherited Members

- Protected Attributes inherited from popcon::PopConSourceHandler< SiStripBadStrip >
Container m_iovs
 
std::vector< std::pair< SiStripBadStrip *, Time_t > > m_to_transfer
 
std::string m_userTextLog
 

Detailed Description

Definition at line 11 of file SiStripPopConBadComponentsDQM.cc.

Member Typedef Documentation

◆ DQMStore

Definition at line 14 of file SiStripPopConBadComponentsDQM.cc.

◆ MonitorElement

Definition at line 13 of file SiStripPopConBadComponentsDQM.cc.

Constructor & Destructor Documentation

◆ SiStripPopConBadComponentsHandlerFromDQM()

SiStripPopConBadComponentsHandlerFromDQM::SiStripPopConBadComponentsHandlerFromDQM ( const edm::ParameterSet iConfig,
edm::ConsumesCollector &&  iC 
)
explicit

Definition at line 38 of file SiStripPopConBadComponentsDQM.cc.

References edm::ParameterSet::getUntrackedParameter(), and SiStripDetInfoFileReader::kDefaultFile.

44  edm::LogInfo("SiStripBadComponentsDQMService") << "[SiStripBadComponentsDQMService::SiStripBadComponentsDQMService]";
45 }
edm::ESGetToken< TrackerTopology, TrackerTopologyRcd > tTopoToken_
T getUntrackedParameter(std::string const &, T const &) const
Log< level::Info, false > LogInfo
static constexpr char const *const kDefaultFile

◆ ~SiStripPopConBadComponentsHandlerFromDQM()

SiStripPopConBadComponentsHandlerFromDQM::~SiStripPopConBadComponentsHandlerFromDQM ( )
override

Definition at line 47 of file SiStripPopConBadComponentsDQM.cc.

47  {
48  edm::LogInfo("SiStripBadComponentsDQMService") << "[SiStripBadComponentsDQMService::~SiStripBadComponentsDQMService]";
49 }
Log< level::Info, false > LogInfo

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.

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, SiStripDetInfoFileReader::read(), and AlCaHLTBitMon_QueryRunRegistry::string.

80  {
81  //*LOOP OVER THE LIST OF SUMMARY OBJECTS TO INSERT IN DB*//
82 
84 
85  const auto detInfo = SiStripDetInfoFileReader::read(fp_.fullPath());
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  for (const auto& im : subdet_folder) {
96  const std::string dname = mechanicalview_dir + "/" + im;
97  getter.cd();
98  if (!getter.dirExists(dname))
99  continue;
100  getter.cd(dname);
101 
102  std::vector<std::string> module_folders;
103  getModuleFolderList(getter, dname, module_folders);
104 
105  const std::string bad_module_folder = dname + "/" + "BadModuleList";
106  getter.cd();
107  if (getter.dirExists(bad_module_folder)) {
108  for (const MonitorElement* me : getter.getContents(bad_module_folder)) {
109  std::cout << me->getName() << " " << me->getIntValue() << std::endl;
110  uint32_t detId = std::stoul(me->getName());
111  short flag = me->getIntValue();
112 
113  std::vector<unsigned int> theSiStripVector;
114 
115  unsigned short firstBadStrip = 0, NconsecutiveBadStrips = 0;
116  unsigned int theBadStripRange;
117 
118  // for(std::vector<uint32_t>::const_iterator is=BadApvList_.begin(); is!=BadApvList_.end(); ++is){
119 
120  // firstBadStrip=(*is)*128;
121  NconsecutiveBadStrips = detInfo.getNumberOfApvsAndStripLength(detId).first * 128;
122 
123  theBadStripRange = m_obj.encode(firstBadStrip, NconsecutiveBadStrips, flag);
124 
125  LogDebug("SiStripBadComponentsDQMService") << "detid " << detId << " \t"
126  << ", flag " << flag << std::endl;
127 
128  theSiStripVector.push_back(theBadStripRange);
129  // }
130 
131  SiStripBadStrip::Range range(theSiStripVector.begin(), theSiStripVector.end());
132  if (!m_obj.put(detId, range)) {
133  edm::LogError("SiStripBadFiberBuilder")
134  << "[SiStripBadFiberBuilder::analyze] detid already exists" << std::endl;
135  }
136  }
137  }
138  }
139  getter.cd();
140 }
std::string fullPath() const
Definition: FileInPath.cc:161
virtual bool dirExists(std::string const &path) const
Definition: DQMStore.cc:754
Log< level::Error, false > LogError
SiStripDetInfo read(std::string filePath)
std::pair< ContainerIterator, ContainerIterator > Range
bool put(const uint32_t &detID, const InputVector &vect)
unsigned int encode(const unsigned short &first, const unsigned short &NconsecutiveBadStrips, const unsigned short &flag=0)
virtual std::vector< dqm::harvesting::MonitorElement * > getContents(std::string const &path) const
Definition: DQMStore.cc:610
#define LogDebug(id)

◆ getMetaDataString()

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

Reimplemented from SiStripDQMPopConSourceHandler< SiStripBadStrip >.

Definition at line 55 of file SiStripPopConBadComponentsDQM.cc.

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

55  {
56  std::stringstream ss;
57  ss << SiStripDQMPopConSourceHandler<SiStripBadStrip>::getMetaDataString();
59  return ss.str();
60 }
void printSummary(std::stringstream &ss, const TrackerTopology *trackerTopo) const

◆ getObj()

SiStripBadStrip * SiStripPopConBadComponentsHandlerFromDQM::getObj ( ) const
overridevirtual

◆ initES()

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

Reimplemented from SiStripDQMPopConSourceHandler< SiStripBadStrip >.

Definition at line 51 of file SiStripPopConBadComponentsDQM.cc.

References singleTopDQM_cfi::setup, trackerTopo_, and tTopoToken_.

51  {
52  trackerTopo_ = &setup.getData(tTopoToken_);
53 }
edm::ESGetToken< TrackerTopology, TrackerTopologyRcd > tTopoToken_

Member Data Documentation

◆ fp_

edm::FileInPath SiStripPopConBadComponentsHandlerFromDQM::fp_
private

Definition at line 27 of file SiStripPopConBadComponentsDQM.cc.

Referenced by dqmEndJob().

◆ m_obj

SiStripBadStrip SiStripPopConBadComponentsHandlerFromDQM::m_obj
private

Definition at line 28 of file SiStripPopConBadComponentsDQM.cc.

Referenced by dqmEndJob(), and getObj().

◆ trackerTopo_

const TrackerTopology* SiStripPopConBadComponentsHandlerFromDQM::trackerTopo_
private

Definition at line 30 of file SiStripPopConBadComponentsDQM.cc.

Referenced by getMetaDataString(), and initES().

◆ tTopoToken_

edm::ESGetToken<TrackerTopology, TrackerTopologyRcd> SiStripPopConBadComponentsHandlerFromDQM::tTopoToken_
private

Definition at line 29 of file SiStripPopConBadComponentsDQM.cc.

Referenced by initES().