46 outputBase_(iConfig.getParameter<
ParameterSet>(
"SiPixelStatusManagerParameters").getUntrackedParameter<
std::
string>(
"outputBase")),
47 aveDigiOcc_(iConfig.getParameter<
ParameterSet>(
"SiPixelStatusManagerParameters").getUntrackedParameter<
int>(
"aveDigiOcc")),
48 nLumi_(iConfig.getParameter<
edm::
ParameterSet>(
"SiPixelStatusManagerParameters").getUntrackedParameter<
int>(
"resetEveryNLumi")),
49 moduleName_(iConfig.getParameter<
ParameterSet>(
"SiPixelStatusManagerParameters").getUntrackedParameter<
std::
string>(
"moduleName")),
50 label_(iConfig.getParameter<
ParameterSet>(
"SiPixelStatusManagerParameters").getUntrackedParameter<
std::
string>(
"label")),
51 siPixelStatusManager_(iConfig, consumesCollector()){
97 for(
unsigned int i = 0;
i<badComponentList.size();
i++){
106 std::map<edm::LuminosityBlockNumber_t, edm::LuminosityBlockNumber_t> finalIOV;
107 std::map<edm::LuminosityBlockNumber_t, edm::LuminosityBlockNumber_t> fedError25IOV;
108 std::map<edm::LuminosityBlockNumber_t, edm::LuminosityBlockNumber_t> pclIOV;
120 std::map<int, std::vector<int> > tmpFEDerror25 = it->second;
121 for(
std::map<
int, std::vector<int> >::iterator ilist = tmpFEDerror25.begin(); ilist!=tmpFEDerror25.end();ilist++){
123 int detid = ilist->first;
127 BadModule.
DetID = uint32_t(detid); BadModule_FEDerror25.
DetID = uint32_t(detid);
131 std::vector<uint32_t> BadRocList, BadRocList_FEDerror25;
132 std::vector<int>
list = ilist->second;
134 for(
unsigned int i=0;
i<list.size();
i++){
137 BadRocList_FEDerror25.push_back(uint32_t(iroc));
139 BadRocList.push_back(uint32_t(iroc));
145 if(BadRocList.size()==16)
149 for(std::vector<uint32_t>::iterator iter = BadRocList.begin(); iter != BadRocList.end(); ++iter){
150 badrocs += 1 << *iter;
159 if(BadRocList_FEDerror25.size()==16)
162 short badrocs_FEDerror25 = 0;
163 for(std::vector<uint32_t>::iterator iter = BadRocList_FEDerror25.begin(); iter != BadRocList_FEDerror25.end(); ++iter){
164 badrocs_FEDerror25 += 1 << *iter;
167 if(badrocs_FEDerror25!=0){
168 BadModule_FEDerror25.
BadRocs = badrocs_FEDerror25;
174 finalIOV[it->first] = it->first;
175 fedError25IOV[it->first] = it->first;
181 delete siPixelQuality;
182 delete siPixelQuality_FEDerror25;
188 finalIOV[it->first] = it->first;
189 pclIOV[it->first] = it->first;
193 std::map<edm::LuminosityBlockNumber_t, edm::LuminosityBlockNumber_t>::iterator itIOV;
194 for(itIOV=finalIOV.begin();itIOV!=finalIOV.end();itIOV++){
204 std::map<int, std::vector<int> > tmpFEDerror25 = FEDerror25Map[lumiStuckTBMs];
215 <<
"Tag requested for prompt in low statistics IOV in the "<<
outputBase_<<
" harvester"<< std::endl;
220 <<
"Tag requested for other in low statistics IOV in the "<<
outputBase_<<
" harvester"<< std::endl;
223 delete siPixelQualityDummy;
236 std::map<int, SiPixelModuleStatus> detectorStatus = tmpSiPixelStatus.
getDetectorStatus();
237 std::map<int, SiPixelModuleStatus>::iterator itModEnd = detectorStatus.end();
238 for (std::map<int, SiPixelModuleStatus>::iterator itMod = detectorStatus.begin(); itMod != itModEnd; ++itMod) {
243 int detid = itMod->first;
244 BadModulePCL.
DetID = uint32_t(detid);
245 BadModulePrompt.
DetID = uint32_t(detid); BadModuleOther.
DetID = uint32_t(detid);
253 std::vector<uint32_t> BadRocListPCL, BadRocListPrompt, BadRocListOther;
256 std::vector<int> listFEDerror25 = tmpFEDerror25[detid];
258 for (
int iroc = 0; iroc < modStatus.
nrocs(); ++iroc) {
260 unsigned int rocOccupancy = modStatus.
digiOccROC(iroc);
263 if(rocOccupancy<1.
e-4*DetAverage){
266 BadRocListPCL.push_back(uint32_t(iroc));
268 std::vector<int>::iterator it =
std::find(listFEDerror25.begin(), listFEDerror25.end(),iroc);
273 BadRocListPrompt.push_back(uint32_t(iroc));
278 BadRocListOther.push_back(uint32_t(iroc));
285 if(BadRocListPCL.size()==16) BadModulePCL.
errorType = 0;
286 if(BadRocListPrompt.size()==16) BadModulePrompt.
errorType = 0;
287 if(BadRocListOther.size()==16) BadModuleOther.
errorType = 0;
290 short badrocsPCL = 0;
291 for(std::vector<uint32_t>::iterator iterPCL = BadRocListPCL.begin(); iterPCL != BadRocListPCL.end(); ++iterPCL){
292 badrocsPCL += 1 << *iterPCL;
295 BadModulePCL.
BadRocs = badrocsPCL;
300 short badrocsPrompt = 0;
301 for(std::vector<uint32_t>::iterator iterPrompt = BadRocListPrompt.begin(); iterPrompt != BadRocListPrompt.end(); ++iterPrompt){
302 badrocsPrompt += 1 << *iterPrompt;
304 if(badrocsPrompt!=0){
305 BadModulePrompt.
BadRocs = badrocsPrompt;
310 short badrocsOther= 0;
311 for(std::vector<uint32_t>::iterator iterOther = BadRocListOther.begin(); iterOther != BadRocListOther.end(); ++iterOther){
312 badrocsOther += 1 << *iterOther;
315 BadModuleOther.
BadRocs = badrocsOther;
331 delete siPixelQualityPCL;
332 delete siPixelQualityPrompt;
333 delete siPixelQualityOther;
348 delete siPixelQualityDummy;
351 delete siPixelQualityPermBad;
374 std::map<edm::LuminosityBlockNumber_t, edm::LuminosityBlockNumber_t>::iterator itIOV;
375 for(itIOV=IOV.begin();itIOV!=IOV.end();itIOV++){
376 std::map<edm::LuminosityBlockNumber_t, edm::LuminosityBlockNumber_t>::iterator nextItIOV;
377 nextItIOV = itIOV; nextItIOV++;
379 if(nextItIOV!=IOV.end()){
380 if(pin>=itIOV->first && pin<nextItIOV->
first){
385 if(pin>=itIOV->first){
393 return (IOV.begin())->
first;
void addDisabledModule(disabledModuleType module)
T getUntrackedParameter(std::string const &, T const &) const
void beginLuminosityBlock(const edm::LuminosityBlock &, const edm::EventSetup &) override
#define DEFINE_FWK_MODULE(type)
const std::map< edm::LuminosityBlockNumber_t, std::map< int, std::vector< int > > > & getFEDerror25Rocs()
edm::LuminosityBlockNumber_t endLumiBlock_
bool IsRocBad(const uint32_t &detid, const short &rocNb) const
edm::LuminosityBlockNumber_t stepIOV(edm::LuminosityBlockNumber_t pin, std::map< edm::LuminosityBlockNumber_t, edm::LuminosityBlockNumber_t > IOV)
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
unsigned int LuminosityBlockNumber_t
~SiPixelStatusHarvester() override
SiPixelStatusManager siPixelStatusManager_
void analyze(const edm::Event &, const edm::EventSetup &) override
LuminosityBlockNumber_t luminosityBlock() const
unsigned long long Time_t
void beginRun(const edm::Run &, const edm::EventSetup &) override
void endLuminosityBlock(const edm::LuminosityBlock &, const edm::EventSetup &) override
const SiPixelQuality * badPixelInfo_
void writeOne(T *payload, Time_t time, const std::string &recordName, bool withlogging=false)
const std::vector< disabledModuleType > getBadComponentList() const
std::map< int, SiPixelModuleStatus > getDetectorStatus()
std::map< edm::LuminosityBlockNumber_t, std::map< int, std::vector< int > > >::iterator FEDerror25Map_iterator
SiPixelStatusHarvester(const edm::ParameterSet &)
std::map< edm::LuminosityBlockNumber_t, SiPixelDetectorStatus >::iterator siPixelStatusMap_iterator
unsigned int digiOccROC(int iroc)
return ROC status (= hits on ROC iroc)
void readLumi(const edm::LuminosityBlock &)
const std::map< edm::LuminosityBlockNumber_t, SiPixelDetectorStatus > & getBadComponents()
T const * product() const
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger list("!*","!HLTx*"if it matches 2 triggers or more) will accept the event if all the matching triggers are FAIL.It will reject the event if any of the triggers are PASS or EXCEPTION(this matches the behavior of"!*"before the partial wildcard feature was incorporated).Triggers which are in the READY state are completely ignored.(READY should never be returned since the trigger paths have been run
void endRun(const edm::Run &, const edm::EventSetup &) override