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",
"")),
32 calibrationthreshold(iConfig.getUntrackedParameter<uint32_t>(
"CalibrationThreshold",10000))
40 edm::LogInfo(
"SiStripQualityHotStripIdentifierRoot") <<
" before opening file " <<
filename.c_str();
41 dqmStore_->open(
filename.c_str(),
false);
42 edm::LogInfo(
"SiStripQualityHotStripIdentifierRoot") <<
" after opening file ";
52 edm::LogInfo(
"SiStripQualityHotStripIdentifierRoot") <<
"SiStripQualityHotStripIdentifierRoot::getNewObject called"<<std::endl;
63 edm::LogInfo(
"SiStripQualityHotStripIdentifierRoot") <<
" [SiStripQualityHotStripIdentifierRoot::getNewObject] Total number of events is " <<
TotNumberOfEvents <<
". Calibration is launched." <<std::endl;
65 if (AlgoName==
"SiStripHotStripAlgorithmFromClusterOccupancy")
68 edm::LogInfo(
"SiStripQualityHotStripIdentifierRoot") <<
" [SiStripQualityHotStripIdentifierRoot::getNewObject] call to SiStripHotStripAlgorithmFromClusterOccupancy"<<std::endl;
84 edm::LogInfo(
"SiStripQualityHotStripIdentifierRoot") <<
" [SiStripQualityHotStripIdentifierRoot::getNewObject] copy SiStripObject in SiStripBadStrip"<<std::endl;
90 for(;rIter!=rIterEnd;++rIter){
92 if ( ! obj->
put(rIter->detid,range) )
93 edm::LogError(
"SiStripQualityHotStripIdentifierRoot")<<
"[SiStripQualityHotStripIdentifierRoot::getNewObject] detid already exists"<<std::endl;
95 edm::LogInfo(
"SiStripQualityHotStripIdentifierRoot") <<
" [SiStripQualityHotStripIdentifierRoot::getNewObject] " << ss.str() << std::endl;
97 else if (AlgoName==
"SiStripBadAPVAlgorithmFromClusterOccupancy")
100 edm::LogInfo(
"SiStripQualityHotStripIdentifierRoot") <<
" [SiStripQualityHotStripIdentifierRoot::getNewObject] call to SiStripBadAPVAlgorithmFromClusterOccupancy"<<std::endl;
118 edm::LogInfo(
"SiStripQualityHotStripIdentifierRoot") <<
" [SiStripQualityHotStripIdentifierRoot::getNewObject] copy SiStripObject in SiStripBadStrip"<<std::endl;
120 std::stringstream ss;
124 for(;rIter!=rIterEnd;++rIter){
126 if ( ! obj->
put(rIter->detid,range) )
127 edm::LogError(
"SiStripQualityHotStripIdentifierRoot")<<
"[SiStripQualityHotStripIdentifierRoot::getNewObject] detid already exists"<<std::endl;
129 edm::LogInfo(
"SiStripQualityHotStripIdentifierRoot") <<
" [SiStripQualityHotStripIdentifierRoot::getNewObject] " << ss.str() << std::endl;
133 else if (AlgoName==
"SiStripBadAPVandHotStripAlgorithmFromClusterOccupancy")
136 edm::LogInfo(
"SiStripQualityHotStripIdentifierRoot") <<
" [SiStripQualityHotStripIdentifierRoot::getNewObject] call to SiStripBadAPVandHotStripAlgorithmFromClusterOccupancy"<<std::endl;
157 edm::LogInfo(
"SiStripQualityHotStripIdentifierRoot") <<
" [SiStripQualityHotStripIdentifierRoot::getNewObject] copy SiStripObject in SiStripBadStrip"<<std::endl;
159 std::stringstream ss;
163 for(;rIter!=rIterEnd;++rIter){
165 if ( ! obj->
put(rIter->detid,range) )
166 edm::LogError(
"SiStripQualityHotStripIdentifierRoot")<<
"[SiStripQualityHotStripIdentifierRoot::getNewObject] detid already exists"<<std::endl;
168 edm::LogInfo(
"SiStripQualityHotStripIdentifierRoot") <<
" [SiStripQualityHotStripIdentifierRoot::getNewObject] " << ss.str() << std::endl;
172 edm::LogError(
"SiStripQualityHotStripIdentifierRoot") <<
" [SiStripQualityHotStripIdentifierRoot::getNewObject] call for a unknow HotStrip identification algoritm"<<std::endl;
174 std::vector<uint32_t>
a;
176 if ( ! obj->
put(0xFFFFFFFF,range) )
177 edm::LogError(
"SiStripQualityHotStripIdentifierRoot")<<
"[SiStripQualityHotStripIdentifierRoot::getNewObject] detid already exists"<<std::endl;
182 edm::LogInfo(
"SiStripQualityHotStripIdentifierRoot") <<
" [SiStripQualityHotStripIdentifierRoot::getNewObject] Total number of events is " <<
TotNumberOfEvents <<
", wich is below the threshold (" <<
calibrationthreshold <<
"). Calibration will NOT be launched." <<std::endl;
217 edm::LogInfo(
"SiStripQualityHotStripIdentifierRoot") <<
" [SiStripQualityHotStripIdentifierRoot::bookHistos] " <<
dirpath << std::endl;
221 edm::LogInfo(
"SiStripQualityHotStripIdentifierRoot") <<
" [SiStripQualityHotStripIdentifierRoot::bookHistos] vector size " << MEs.size()<< std::endl;
223 std::vector<MonitorElement*>::const_iterator iter=MEs.begin();
224 std::vector<MonitorElement*>::const_iterator iterEnd=MEs.end();
227 bool gotNentries=
true;
230 edm::LogInfo(
"SiStripQualityHotStripIdentifierRoot")<<
"[SiStripQualityHotStripIdentifierRoot::bookHistos] gotNentries flag " << gotNentries
235 for (; iter!=iterEnd;++iter) {
238 if (!gotNentries && strstr(me_name.c_str(),
"TotalNumberOfCluster__T")!=
NULL && strstr(me_name.c_str(),
"Profile")==
NULL ){
244 edm::LogInfo(
"SiStripQualityHotStripIdentifierRoot")<<
"[SiStripQualityHotStripIdentifierRoot::bookHistos] gotNentries flag " << gotNentries << std::endl;
250 unsigned int detid=0;
252 sprintf(title,
"%s",me_name.c_str());
253 char *ptr=strtok(title,
"__");
260 ptr=strtok(
NULL,
"_");
263 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)
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) 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 > &)
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)