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 MeanNumberOfCluster(0),
34 calibrationthreshold(iConfig.getUntrackedParameter<uint32_t>(
"CalibrationThreshold",10000))
42 edm::LogInfo(
"SiStripQualityHotStripIdentifierRoot") <<
" before opening file " <<
filename.c_str();
43 dqmStore_->open(
filename.c_str(),
false);
44 edm::LogInfo(
"SiStripQualityHotStripIdentifierRoot") <<
" after opening file ";
54 edm::LogInfo(
"SiStripQualityHotStripIdentifierRoot") <<
"SiStripQualityHotStripIdentifierRoot::getNewObject called"<<std::endl;
65 edm::LogInfo(
"SiStripQualityHotStripIdentifierRoot") <<
" [SiStripQualityHotStripIdentifierRoot::getNewObject] Total number of events is " <<
TotNumberOfEvents <<
". Calibration is launched." <<std::endl;
67 if (AlgoName==
"SiStripHotStripAlgorithmFromClusterOccupancy")
70 edm::LogInfo(
"SiStripQualityHotStripIdentifierRoot") <<
" [SiStripQualityHotStripIdentifierRoot::getNewObject] call to SiStripHotStripAlgorithmFromClusterOccupancy"<<std::endl;
86 edm::LogInfo(
"SiStripQualityHotStripIdentifierRoot") <<
" [SiStripQualityHotStripIdentifierRoot::getNewObject] copy SiStripObject in SiStripBadStrip"<<std::endl;
92 for(;rIter!=rIterEnd;++rIter){
94 if ( ! obj->
put(rIter->detid,range) )
95 edm::LogError(
"SiStripQualityHotStripIdentifierRoot")<<
"[SiStripQualityHotStripIdentifierRoot::getNewObject] detid already exists"<<std::endl;
97 edm::LogInfo(
"SiStripQualityHotStripIdentifierRoot") <<
" [SiStripQualityHotStripIdentifierRoot::getNewObject] " << ss.str() << std::endl;
99 else if (AlgoName==
"SiStripBadAPVAlgorithmFromClusterOccupancy")
102 edm::LogInfo(
"SiStripQualityHotStripIdentifierRoot") <<
" [SiStripQualityHotStripIdentifierRoot::getNewObject] call to SiStripBadAPVAlgorithmFromClusterOccupancy"<<std::endl;
120 edm::LogInfo(
"SiStripQualityHotStripIdentifierRoot") <<
" [SiStripQualityHotStripIdentifierRoot::getNewObject] copy SiStripObject in SiStripBadStrip"<<std::endl;
122 std::stringstream
ss;
126 for(;rIter!=rIterEnd;++rIter){
128 if ( ! obj->
put(rIter->detid,range) )
129 edm::LogError(
"SiStripQualityHotStripIdentifierRoot")<<
"[SiStripQualityHotStripIdentifierRoot::getNewObject] detid already exists"<<std::endl;
131 edm::LogInfo(
"SiStripQualityHotStripIdentifierRoot") <<
" [SiStripQualityHotStripIdentifierRoot::getNewObject] " << ss.str() << std::endl;
135 else if (AlgoName==
"SiStripBadAPVandHotStripAlgorithmFromClusterOccupancy")
138 edm::LogInfo(
"SiStripQualityHotStripIdentifierRoot") <<
" [SiStripQualityHotStripIdentifierRoot::getNewObject] call to SiStripBadAPVandHotStripAlgorithmFromClusterOccupancy"<<std::endl;
159 edm::LogInfo(
"SiStripQualityHotStripIdentifierRoot") <<
" [SiStripQualityHotStripIdentifierRoot::getNewObject] copy SiStripObject in SiStripBadStrip"<<std::endl;
161 std::stringstream
ss;
165 for(;rIter!=rIterEnd;++rIter){
167 if ( ! obj->
put(rIter->detid,range) )
168 edm::LogError(
"SiStripQualityHotStripIdentifierRoot")<<
"[SiStripQualityHotStripIdentifierRoot::getNewObject] detid already exists"<<std::endl;
170 edm::LogInfo(
"SiStripQualityHotStripIdentifierRoot") <<
" [SiStripQualityHotStripIdentifierRoot::getNewObject] " << ss.str() << std::endl;
174 edm::LogError(
"SiStripQualityHotStripIdentifierRoot") <<
" [SiStripQualityHotStripIdentifierRoot::getNewObject] call for a unknow HotStrip identification algoritm"<<std::endl;
176 std::vector<uint32_t>
a;
178 if ( ! obj->
put(0xFFFFFFFF,range) )
179 edm::LogError(
"SiStripQualityHotStripIdentifierRoot")<<
"[SiStripQualityHotStripIdentifierRoot::getNewObject] detid already exists"<<std::endl;
219 edm::LogInfo(
"SiStripQualityHotStripIdentifierRoot") <<
" [SiStripQualityHotStripIdentifierRoot::bookHistos] " <<
dirpath << std::endl;
223 edm::LogInfo(
"SiStripQualityHotStripIdentifierRoot") <<
" [SiStripQualityHotStripIdentifierRoot::bookHistos] vector size " << MEs.size()<< std::endl;
225 std::vector<MonitorElement*>::const_iterator
iter=MEs.begin();
226 std::vector<MonitorElement*>::const_iterator iterEnd=MEs.end();
229 bool gotNentries=
true;
232 edm::LogInfo(
"SiStripQualityHotStripIdentifierRoot")<<
"[SiStripQualityHotStripIdentifierRoot::bookHistos] gotNentries flag " << gotNentries
237 for (; iter!=iterEnd;++
iter) {
240 if (!gotNentries && strstr(me_name.c_str(),
"TotalNumberOfCluster__T")!=
NULL && strstr(me_name.c_str(),
"Profile")==
NULL ){
247 edm::LogInfo(
"SiStripQualityHotStripIdentifierRoot")<<
"[SiStripQualityHotStripIdentifierRoot::bookHistos] gotNentries flag " << gotNentries << std::endl;
253 unsigned int detid=0;
255 sprintf(title,
"%s",me_name.c_str());
256 char *ptr=strtok(title,
"__");
263 ptr=strtok(
NULL,
"_");
266 LogDebug(
"SiStripQualityHotStripIdentifierRoot") <<
" [SiStripQualityHotStripIdentifierRoot::bookHistos] detid " << detid<< std::endl;
271 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)
double MeanNumberOfCluster
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)