24 dataLabel_(iConfig.getUntrackedParameter<std::
string>(
"dataLabel",
"")),
25 UseInputDB_(iConfig.getUntrackedParameter<bool>(
"UseInputDB",
false)),
27 fp_(iConfig.getUntrackedParameter<edm::
FileInPath>(
"file",edm::
FileInPath(
"CalibTracker/SiStripCommon/data/SiStripDetInfo.dat"))),
30 filename(iConfig.getUntrackedParameter<std::
string>(
"rootFilename",
"CondDB_TKCC_20X_v3_hlt_50822.root")),
31 dirpath(iConfig.getUntrackedParameter<std::
string>(
"rootDirPath",
"")),
33 calibrationthreshold(iConfig.getUntrackedParameter<uint32_t>(
"CalibrationThreshold",10000))
41 edm::LogInfo(
"SiStripQualityHotStripIdentifierRoot") <<
" before opening file " <<
filename.c_str();
42 dqmStore_->open(
filename.c_str(),
false);
43 edm::LogInfo(
"SiStripQualityHotStripIdentifierRoot") <<
" after opening file ";
53 edm::LogInfo(
"SiStripQualityHotStripIdentifierRoot") <<
"SiStripQualityHotStripIdentifierRoot::getNewObject called"<<std::endl;
64 edm::LogInfo(
"SiStripQualityHotStripIdentifierRoot") <<
" [SiStripQualityHotStripIdentifierRoot::getNewObject] Total number of events is " <<
TotNumberOfEvents <<
". Calibration is launched." <<std::endl;
66 if (AlgoName==
"SiStripHotStripAlgorithmFromClusterOccupancy")
69 edm::LogInfo(
"SiStripQualityHotStripIdentifierRoot") <<
" [SiStripQualityHotStripIdentifierRoot::getNewObject] call to SiStripHotStripAlgorithmFromClusterOccupancy"<<std::endl;
85 edm::LogInfo(
"SiStripQualityHotStripIdentifierRoot") <<
" [SiStripQualityHotStripIdentifierRoot::getNewObject] copy SiStripObject in SiStripBadStrip"<<std::endl;
91 for(;rIter!=rIterEnd;++rIter){
93 if ( ! obj->
put(rIter->detid,range) )
94 edm::LogError(
"SiStripQualityHotStripIdentifierRoot")<<
"[SiStripQualityHotStripIdentifierRoot::getNewObject] detid already exists"<<std::endl;
96 edm::LogInfo(
"SiStripQualityHotStripIdentifierRoot") <<
" [SiStripQualityHotStripIdentifierRoot::getNewObject] " << ss.str() << std::endl;
98 else if (AlgoName==
"SiStripBadAPVAlgorithmFromClusterOccupancy")
101 edm::LogInfo(
"SiStripQualityHotStripIdentifierRoot") <<
" [SiStripQualityHotStripIdentifierRoot::getNewObject] call to SiStripBadAPVAlgorithmFromClusterOccupancy"<<std::endl;
119 edm::LogInfo(
"SiStripQualityHotStripIdentifierRoot") <<
" [SiStripQualityHotStripIdentifierRoot::getNewObject] copy SiStripObject in SiStripBadStrip"<<std::endl;
121 std::stringstream
ss;
125 for(;rIter!=rIterEnd;++rIter){
127 if ( ! obj->
put(rIter->detid,range) )
128 edm::LogError(
"SiStripQualityHotStripIdentifierRoot")<<
"[SiStripQualityHotStripIdentifierRoot::getNewObject] detid already exists"<<std::endl;
130 edm::LogInfo(
"SiStripQualityHotStripIdentifierRoot") <<
" [SiStripQualityHotStripIdentifierRoot::getNewObject] " << ss.str() << std::endl;
134 else if (AlgoName==
"SiStripBadAPVandHotStripAlgorithmFromClusterOccupancy")
137 edm::LogInfo(
"SiStripQualityHotStripIdentifierRoot") <<
" [SiStripQualityHotStripIdentifierRoot::getNewObject] call to SiStripBadAPVandHotStripAlgorithmFromClusterOccupancy"<<std::endl;
158 edm::LogInfo(
"SiStripQualityHotStripIdentifierRoot") <<
" [SiStripQualityHotStripIdentifierRoot::getNewObject] copy SiStripObject in SiStripBadStrip"<<std::endl;
160 std::stringstream
ss;
164 for(;rIter!=rIterEnd;++rIter){
166 if ( ! obj->
put(rIter->detid,range) )
167 edm::LogError(
"SiStripQualityHotStripIdentifierRoot")<<
"[SiStripQualityHotStripIdentifierRoot::getNewObject] detid already exists"<<std::endl;
169 edm::LogInfo(
"SiStripQualityHotStripIdentifierRoot") <<
" [SiStripQualityHotStripIdentifierRoot::getNewObject] " << ss.str() << std::endl;
173 edm::LogError(
"SiStripQualityHotStripIdentifierRoot") <<
" [SiStripQualityHotStripIdentifierRoot::getNewObject] call for a unknow HotStrip identification algoritm"<<std::endl;
175 std::vector<uint32_t>
a;
177 if ( ! obj->
put(0xFFFFFFFF,range) )
178 edm::LogError(
"SiStripQualityHotStripIdentifierRoot")<<
"[SiStripQualityHotStripIdentifierRoot::getNewObject] detid already exists"<<std::endl;
218 edm::LogInfo(
"SiStripQualityHotStripIdentifierRoot") <<
" [SiStripQualityHotStripIdentifierRoot::bookHistos] " <<
dirpath << std::endl;
222 edm::LogInfo(
"SiStripQualityHotStripIdentifierRoot") <<
" [SiStripQualityHotStripIdentifierRoot::bookHistos] vector size " << MEs.size()<< std::endl;
224 std::vector<MonitorElement*>::const_iterator
iter=MEs.begin();
225 std::vector<MonitorElement*>::const_iterator iterEnd=MEs.end();
228 bool gotNentries=
true;
231 edm::LogInfo(
"SiStripQualityHotStripIdentifierRoot")<<
"[SiStripQualityHotStripIdentifierRoot::bookHistos] gotNentries flag " << gotNentries
236 for (; iter!=iterEnd;++
iter) {
239 if (!gotNentries && strstr(me_name.c_str(),
"TotalNumberOfCluster__T")!=
NULL && strstr(me_name.c_str(),
"Profile")==
NULL ){
245 edm::LogInfo(
"SiStripQualityHotStripIdentifierRoot")<<
"[SiStripQualityHotStripIdentifierRoot::bookHistos] gotNentries flag " << gotNentries << std::endl;
251 unsigned int detid=0;
253 sprintf(title,
"%s",me_name.c_str());
254 char *ptr=strtok(title,
"__");
261 ptr=strtok(
NULL,
"_");
264 LogDebug(
"SiStripQualityHotStripIdentifierRoot") <<
" [SiStripQualityHotStripIdentifierRoot::bookHistos] detid " << detid<< std::endl;
269 if(!gotNentries)
edm::LogWarning(
"MissingNumberOfEvents") <<
"Missing histogram to get the number of events";
void setProbabilityThreshold(long double prob)
void setAbsoluteLowThreshold(long double absolute_low)
T getParameter(std::string const &) const
~SiStripQualityHotStripIdentifierRoot()
T getUntrackedParameter(std::string const &, T const &) const
void setOutputFileName(std::string OutputFileName, bool WriteOutputFile)
edm::ESHandle< SiStripQuality > SiStripQuality_
void extractBadStrips(SiStripQuality *, HistoMap &, edm::ESHandle< SiStripQuality > &)
SiStripQualityHotStripIdentifierRoot(const edm::ParameterSet &)
SiStrip::QualityHistosMap ClusterPositionHistoMap
void algoBeginRun(const edm::Run &, const edm::EventSetup &)
void setNumberIterations(int number_iterations)
SiStripBadAPVandHotStripAlgorithmFromClusterOccupancy * theIdentifier3
void setOutputFileName(std::string OutputFileName, bool WriteOutputFile, std::string DQMOutfileName, bool WriteDQMHistograms)
void setAbsoluteOccupancyThreshold(long double absolute_occupancy)
void setAbsoluteLowThreshold(long double absolute_low)
void setNumberOfEvents(double Nevents)
void setTrackerGeometry(const TrackerGeometry *tkgeom)
SiStripDetInfoFileReader * reader
void setHighOccupancyThreshold(long double high_occupancy)
Registry::const_iterator RegistryIterator
void setLowOccupancyThreshold(long double low_occupancy)
uint32_t calibrationthreshold
std::vector< MonitorElement * > getAllContents(const std::string &path, uint32_t runNumber=0, uint32_t lumi=0) const
unsigned long long m_cacheID_
const TrackerTopology * tTopo
RegistryIterator getRegistryVectorEnd() const
SiStripHotStripAlgorithmFromClusterOccupancy * theIdentifier
void setLowOccupancyThreshold(long double low_occupancy)
void setMinNumEntries(unsigned short m)
void setOccupancyThreshold(long double occupancy)
void setTrackerGeometry(const TrackerGeometry *tkgeom)
ContainerIterator getDataVectorBegin() const
tuple SiStripDetInfoFileReader
void setAbsoluteOccupancyThreshold(long double occupancy)
void setNumberOfEvents(double Nevents)
void setProbabilityThreshold(long double prob)
const edm::ParameterSet conf_
void setTrackerGeometry(const TrackerGeometry *tkgeom)
T const * product() const
void setNumberIterations(int number_iterations)
void setOutputFileName(std::string OutputFileName, bool WriteOutputFile)
RegistryIterator getRegistryVectorBegin() const
void setDoStore(const bool doStore)
When set to false the payload will not be written to the db.
void setMinNumEntries(unsigned short m)
std::pair< ContainerIterator, ContainerIterator > Range
const TrackerGeometry * _tracker
void extractBadAPVs(SiStripQuality *, HistoMap &, edm::ESHandle< SiStripQuality > &)
SiStripBadAPVAlgorithmFromClusterOccupancy * theIdentifier2
void extractBadAPVSandStrips(SiStripQuality *, HistoMap &, edm::ESHandle< SiStripQuality > &)
volatile std::atomic< bool > shutdown_flag false
std::string fullPath() const
bool put(const uint32_t &detID, const InputVector &vect)
void setNumberOfEvents(double Nevents)
void setHighOccupancyThreshold(long double high_occupancy)
edm::ESHandle< TrackerGeometry > theTrackerGeom
SiStripBadStrip * getNewObject()
void setMinNumEntriesPerStrip(unsigned short m)
void setMinNumEntriesPerStrip(unsigned short m)