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"))),
28 filename(iConfig.getUntrackedParameter<std::string>(
"rootFilename",
"CondDB_TKCC_20X_v3_hlt_50822.root")),
29 dirpath(iConfig.getUntrackedParameter<std::string>(
"rootDirPath",
"")),
30 calibrationthreshold(iConfig.getUntrackedParameter<uint32_t>(
"CalibrationThreshold",10000))
38 edm::LogInfo(
"SiStripQualityHotStripIdentifierRoot") <<
" before opening file " <<
filename.c_str();
39 dqmStore_->open(
filename.c_str(),
false);
40 edm::LogInfo(
"SiStripQualityHotStripIdentifierRoot") <<
" after opening file ";
50 edm::LogInfo(
"SiStripQualityHotStripIdentifierRoot") <<
"SiStripQualityHotStripIdentifierRoot::getNewObject called"<<std::endl;
55 std::string AlgoName = parameters.
getParameter<std::string>(
"AlgoName");
61 edm::LogInfo(
"SiStripQualityHotStripIdentifierRoot") <<
" [SiStripQualityHotStripIdentifierRoot::getNewObject] Total number of events is " <<
TotNumberOfEvents <<
". Calibration is launched." <<std::endl;
63 if (AlgoName==
"SiStripHotStripAlgorithmFromClusterOccupancy")
66 edm::LogInfo(
"SiStripQualityHotStripIdentifierRoot") <<
" [SiStripQualityHotStripIdentifierRoot::getNewObject] call to SiStripHotStripAlgorithmFromClusterOccupancy"<<std::endl;
82 edm::LogInfo(
"SiStripQualityHotStripIdentifierRoot") <<
" [SiStripQualityHotStripIdentifierRoot::getNewObject] copy SiStripObject in SiStripBadStrip"<<std::endl;
88 for(;rIter!=rIterEnd;++rIter){
90 if ( ! obj->
put(rIter->detid,range) )
91 edm::LogError(
"SiStripQualityHotStripIdentifierRoot")<<
"[SiStripQualityHotStripIdentifierRoot::getNewObject] detid already exists"<<std::endl;
93 edm::LogInfo(
"SiStripQualityHotStripIdentifierRoot") <<
" [SiStripQualityHotStripIdentifierRoot::getNewObject] " << ss.str() << std::endl;
95 else if (AlgoName==
"SiStripBadAPVAlgorithmFromClusterOccupancy")
98 edm::LogInfo(
"SiStripQualityHotStripIdentifierRoot") <<
" [SiStripQualityHotStripIdentifierRoot::getNewObject] call to SiStripBadAPVAlgorithmFromClusterOccupancy"<<std::endl;
116 edm::LogInfo(
"SiStripQualityHotStripIdentifierRoot") <<
" [SiStripQualityHotStripIdentifierRoot::getNewObject] copy SiStripObject in SiStripBadStrip"<<std::endl;
118 std::stringstream ss;
122 for(;rIter!=rIterEnd;++rIter){
124 if ( ! obj->
put(rIter->detid,range) )
125 edm::LogError(
"SiStripQualityHotStripIdentifierRoot")<<
"[SiStripQualityHotStripIdentifierRoot::getNewObject] detid already exists"<<std::endl;
127 edm::LogInfo(
"SiStripQualityHotStripIdentifierRoot") <<
" [SiStripQualityHotStripIdentifierRoot::getNewObject] " << ss.str() << std::endl;
131 else if (AlgoName==
"SiStripBadAPVandHotStripAlgorithmFromClusterOccupancy")
134 edm::LogInfo(
"SiStripQualityHotStripIdentifierRoot") <<
" [SiStripQualityHotStripIdentifierRoot::getNewObject] call to SiStripBadAPVandHotStripAlgorithmFromClusterOccupancy"<<std::endl;
155 edm::LogInfo(
"SiStripQualityHotStripIdentifierRoot") <<
" [SiStripQualityHotStripIdentifierRoot::getNewObject] copy SiStripObject in SiStripBadStrip"<<std::endl;
157 std::stringstream ss;
161 for(;rIter!=rIterEnd;++rIter){
163 if ( ! obj->
put(rIter->detid,range) )
164 edm::LogError(
"SiStripQualityHotStripIdentifierRoot")<<
"[SiStripQualityHotStripIdentifierRoot::getNewObject] detid already exists"<<std::endl;
166 edm::LogInfo(
"SiStripQualityHotStripIdentifierRoot") <<
" [SiStripQualityHotStripIdentifierRoot::getNewObject] " << ss.str() << std::endl;
170 edm::LogError(
"SiStripQualityHotStripIdentifierRoot") <<
" [SiStripQualityHotStripIdentifierRoot::getNewObject] call for a unknow HotStrip identification algoritm"<<std::endl;
172 std::vector<uint32_t>
a;
174 if ( ! obj->
put(0xFFFFFFFF,range) )
175 edm::LogError(
"SiStripQualityHotStripIdentifierRoot")<<
"[SiStripQualityHotStripIdentifierRoot::getNewObject] detid already exists"<<std::endl;
180 edm::LogInfo(
"SiStripQualityHotStripIdentifierRoot") <<
" [SiStripQualityHotStripIdentifierRoot::getNewObject] Total number of events is " <<
TotNumberOfEvents <<
", wich is below the threshold (" <<
calibrationthreshold <<
"). Calibration will NOT be launched." <<std::endl;
210 edm::LogInfo(
"SiStripQualityHotStripIdentifierRoot") <<
" [SiStripQualityHotStripIdentifierRoot::bookHistos] " <<
dirpath << std::endl;
214 edm::LogInfo(
"SiStripQualityHotStripIdentifierRoot") <<
" [SiStripQualityHotStripIdentifierRoot::bookHistos] vector size " << MEs.size()<< std::endl;
216 std::vector<MonitorElement*>::const_iterator iter=MEs.begin();
217 std::vector<MonitorElement*>::const_iterator iterEnd=MEs.end();
220 bool gotNentries=
true;
223 edm::LogInfo(
"SiStripQualityHotStripIdentifierRoot")<<
"[SiStripQualityHotStripIdentifierRoot::bookHistos] gotNentries flag " << gotNentries
226 <<
" OccupancyHisto" << parameters.
getUntrackedParameter<std::string>(
"OccupancyHisto") << std::endl;
228 for (; iter!=iterEnd;++iter) {
229 std::string me_name = (*iter)->getName();
231 if (!gotNentries && strstr(me_name.c_str(),
"TotalNumberOfCluster__T")!=
NULL && strstr(me_name.c_str(),
"Profile")==
NULL ){
237 edm::LogInfo(
"SiStripQualityHotStripIdentifierRoot")<<
"[SiStripQualityHotStripIdentifierRoot::bookHistos] gotNentries flag " << gotNentries << std::endl;
243 unsigned int detid=0;
245 sprintf(title,
"%s",me_name.c_str());
246 char *ptr=strtok(title,
"__");
253 ptr=strtok(
NULL,
"_");
256 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)
tuple SiStripDetInfoFileReader
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_
tuple obj
Example code starts here #.
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
void setAbsoluteOccupancyThreshold(long double occupancy)
void setNumberOfEvents(double Nevents)
void setProbabilityThreshold(long double prob)
const edm::ParameterSet conf_
void setTrackerGeometry(const TrackerGeometry *tkgeom)
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)