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 <<
" which is bigger than "<<
calibrationthreshold<<
". Calibration is preparing to be launched." <<std::endl;
70 if (AlgoName==
"SiStripHotStripAlgorithmFromClusterOccupancy")
73 edm::LogInfo(
"SiStripQualityHotStripIdentifierRoot") <<
" [SiStripQualityHotStripIdentifierRoot::getNewObject] call to SiStripHotStripAlgorithmFromClusterOccupancy"<<std::endl;
89 edm::LogInfo(
"SiStripQualityHotStripIdentifierRoot") <<
" [SiStripQualityHotStripIdentifierRoot::getNewObject] copy SiStripObject in SiStripBadStrip"<<std::endl;
95 for(;rIter!=rIterEnd;++rIter){
97 if ( ! obj->
put(rIter->detid,range) )
98 edm::LogError(
"SiStripQualityHotStripIdentifierRoot")<<
"[SiStripQualityHotStripIdentifierRoot::getNewObject] detid already exists"<<std::endl;
100 edm::LogInfo(
"SiStripQualityHotStripIdentifierRoot") <<
" [SiStripQualityHotStripIdentifierRoot::getNewObject] " << ss.str() << std::endl;
102 else if (AlgoName==
"SiStripBadAPVAlgorithmFromClusterOccupancy")
105 edm::LogInfo(
"SiStripQualityHotStripIdentifierRoot") <<
" [SiStripQualityHotStripIdentifierRoot::getNewObject] call to SiStripBadAPVAlgorithmFromClusterOccupancy"<<std::endl;
123 edm::LogInfo(
"SiStripQualityHotStripIdentifierRoot") <<
" [SiStripQualityHotStripIdentifierRoot::getNewObject] copy SiStripObject in SiStripBadStrip"<<std::endl;
125 std::stringstream
ss;
129 for(;rIter!=rIterEnd;++rIter){
131 if ( ! obj->
put(rIter->detid,range) )
132 edm::LogError(
"SiStripQualityHotStripIdentifierRoot")<<
"[SiStripQualityHotStripIdentifierRoot::getNewObject] detid already exists"<<std::endl;
134 edm::LogInfo(
"SiStripQualityHotStripIdentifierRoot") <<
" [SiStripQualityHotStripIdentifierRoot::getNewObject] " << ss.str() << std::endl;
138 else if (AlgoName==
"SiStripBadAPVandHotStripAlgorithmFromClusterOccupancy")
141 edm::LogInfo(
"SiStripQualityHotStripIdentifierRoot") <<
" [SiStripQualityHotStripIdentifierRoot::getNewObject] call to SiStripBadAPVandHotStripAlgorithmFromClusterOccupancy"<<std::endl;
162 edm::LogInfo(
"SiStripQualityHotStripIdentifierRoot") <<
" [SiStripQualityHotStripIdentifierRoot::getNewObject] copy SiStripObject in SiStripBadStrip"<<std::endl;
164 std::stringstream
ss;
168 for(;rIter!=rIterEnd;++rIter){
170 if ( ! obj->
put(rIter->detid,range) )
171 edm::LogError(
"SiStripQualityHotStripIdentifierRoot")<<
"[SiStripQualityHotStripIdentifierRoot::getNewObject] detid already exists"<<std::endl;
173 edm::LogInfo(
"SiStripQualityHotStripIdentifierRoot") <<
" [SiStripQualityHotStripIdentifierRoot::getNewObject] " << ss.str() << std::endl;
177 edm::LogError(
"SiStripQualityHotStripIdentifierRoot") <<
" [SiStripQualityHotStripIdentifierRoot::getNewObject] call for a unknow HotStrip identification algoritm"<<std::endl;
179 std::vector<uint32_t>
a;
181 if ( ! obj->
put(0xFFFFFFFF,range) )
182 edm::LogError(
"SiStripQualityHotStripIdentifierRoot")<<
"[SiStripQualityHotStripIdentifierRoot::getNewObject] detid already exists"<<std::endl;
188 edm::LogWarning(
"SiStripQualityHotStripIdentifierRoot") <<
" [SiStripQualityHotStripIdentifierRoot::getNewObject] :: Empty Events :: " <<
"Mean Number of Cluster is " <<
MeanNumberOfCluster <<
" Calibration NOT launched" << std::endl;
194 edm::LogWarning(
"SiStripQualityHotStripIdentifierRoot") <<
" [SiStripQualityHotStripIdentifierRoot::getNewObject] :: Not Enough Events :: " <<
"Total number of events is " <<
TotNumberOfEvents <<
" Calibration NOT launched" << std::endl;
229 edm::LogInfo(
"SiStripQualityHotStripIdentifierRoot") <<
" [SiStripQualityHotStripIdentifierRoot::bookHistos] " <<
dirpath << std::endl;
233 edm::LogInfo(
"SiStripQualityHotStripIdentifierRoot") <<
" [SiStripQualityHotStripIdentifierRoot::bookHistos] vector size " << MEs.size()<< std::endl;
235 std::vector<MonitorElement*>::const_iterator iter=MEs.begin();
236 std::vector<MonitorElement*>::const_iterator iterEnd=MEs.end();
239 bool gotNentries=
true;
242 edm::LogInfo(
"SiStripQualityHotStripIdentifierRoot")<<
"[SiStripQualityHotStripIdentifierRoot::bookHistos] gotNentries flag " << gotNentries
248 for (; iter!=iterEnd;++iter) {
251 if (!gotNentries && strstr(me_name.c_str(),
"TotalNumberOfCluster__T")!=
NULL && strstr(me_name.c_str(),
"Profile")==
NULL ){
258 edm::LogInfo(
"SiStripQualityHotStripIdentifierRoot")<<
"[SiStripQualityHotStripIdentifierRoot::bookHistos] gotNentries flag " << gotNentries << std::endl;
263 edm::LogWarning(
"SiStripQualityHotStripIdentifierRoot") <<
" [SiStripQualityHotStripIdentifierRoot::bookHistos] :: Histogram with to check # of evemnts missing" <<std::endl;
266 for (; iter!=iterEnd;++iter) {
272 unsigned int detid=0;
274 sprintf(title,
"%s",me_name.c_str());
275 char *ptr=strtok(title,
"__");
282 ptr=strtok(
NULL,
"_");
285 LogDebug(
"SiStripQualityHotStripIdentifierRoot") <<
" [SiStripQualityHotStripIdentifierRoot::bookHistos] detid " << detid<< std::endl;
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)