46 outputBase_(iConfig.getParameter<
ParameterSet>(
"SiPixelStatusManagerParameters").getUntrackedParameter<
std::
string>(
"outputBase")),
47 aveDigiOcc_(iConfig.getParameter<
ParameterSet>(
"SiPixelStatusManagerParameters").getUntrackedParameter<
int>(
"aveDigiOcc", 20000)),
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()) {
99 for(
unsigned int i = 0;
i<badComponentList.size();
i++){
112 std::map<int, std::vector<int> > tmpStuckTBMs = it->second;
113 for(
std::map<
int, std::vector<int> >::iterator ilist = tmpStuckTBMs.begin(); ilist!=tmpStuckTBMs.end();ilist++){
115 int detid = ilist->first;
119 BadModule.
DetID = uint32_t(detid);
123 std::vector<uint32_t> BadRocList;
124 std::vector<int>
list = ilist->second;
126 for(
unsigned int i=0;
i<list.size();
i++){
130 BadRocList.push_back(uint32_t(iroc));
134 if(BadRocList.size()==16)
138 for(std::vector<uint32_t>::iterator iter = BadRocList.begin(); iter != BadRocList.end(); ++iter){
139 badrocs += 1 << *iter;
150 <<
"new tag requested for stuckTBM" << std::endl;
155 <<
"no new tag requested, appending IOV for stuckTBM" << std::endl;
183 <<
"Tag requested for prompt in low statistics IOV in the "<<
outputBase_<<
" harvester"<< std::endl;
188 <<
"Tag requested for other in low statistics IOV in the "<<
outputBase_<<
" harvester"<< std::endl;
206 std::map<int, std::vector<int> > tmpStuckTBMs = tmpSiPixelStatus.
getStuckTBMsRocs();
208 std::map<int, SiPixelModuleStatus> detectorStatus = tmpSiPixelStatus.
getDetectorStatus();
209 std::map<int, SiPixelModuleStatus>::iterator itModEnd = detectorStatus.end();
210 for (std::map<int, SiPixelModuleStatus>::iterator itMod = detectorStatus.begin(); itMod != itModEnd; ++itMod) {
215 int detid = itMod->first;
216 BadModulePCL.
DetID = uint32_t(detid);
217 BadModulePrompt.
DetID = uint32_t(detid); BadModuleOther.
DetID = uint32_t(detid);
225 std::vector<uint32_t> BadRocListPCL, BadRocListPrompt, BadRocListOther;
228 std::vector<int> listStuckTBM = tmpStuckTBMs[detid];
230 for (
int iroc = 0; iroc < modStatus.
nrocs(); ++iroc) {
232 unsigned long int rocOccupancy = modStatus.
digiOccROC(iroc);
235 if(rocOccupancy<1.
e-4*DetAverage){
237 BadRocListPCL.push_back(uint32_t(iroc));
238 std::vector<int>::iterator it =
std::find(listStuckTBM.begin(), listStuckTBM.end(),iroc);
243 BadRocListPrompt.push_back(uint32_t(iroc));
248 BadRocListOther.push_back(uint32_t(iroc));
253 if(BadRocListPCL.size()==16) BadModulePCL.
errorType = 0;
254 if(BadRocListPrompt.size()==16) BadModulePrompt.
errorType = 0;
255 if(BadRocListOther.size()==16) BadModuleOther.
errorType = 0;
257 short badrocsPCL = 0;
258 for(std::vector<uint32_t>::iterator iterPCL = BadRocListPCL.begin(); iterPCL != BadRocListPCL.end(); ++iterPCL){
259 badrocsPCL += 1 << *iterPCL;
263 BadModulePCL.
BadRocs = badrocsPCL;
267 short badrocsPrompt = 0;
268 for(std::vector<uint32_t>::iterator iterPrompt = BadRocListPrompt.begin(); iterPrompt != BadRocListPrompt.end(); ++iterPrompt){
269 badrocsPrompt += 1 << *iterPrompt;
272 if(badrocsPrompt!=0){
273 BadModulePrompt.
BadRocs = badrocsPrompt;
277 short badrocsOther = 0;
278 for(std::vector<uint32_t>::iterator iterOther = BadRocListOther.begin(); iterOther != BadRocListOther.end(); ++iterOther){
279 badrocsOther += 1 << *iterOther;
283 BadModuleOther.
BadRocs = badrocsOther;
294 <<
"new tag requested for prompt" << std::endl;
299 <<
"no new tag requested, appending IOV for prompt" << std::endl;
305 <<
"new tag requested for other" << std::endl;
310 <<
"no new tag requested, appending IOV for other" << std::endl;
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)
edm::LuminosityBlockNumber_t endLumiBlock_
bool IsRocBad(const uint32_t &detid, const short &rocNb) const
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
~SiPixelStatusHarvester() override
SiPixelStatusManager siPixelStatusManager_
void analyze(const edm::Event &, const edm::EventSetup &) override
LuminosityBlockNumber_t luminosityBlock() const
const std::map< edm::LuminosityBlockNumber_t, std::map< int, std::vector< int > > > & getStuckTBMsRocs()
std::map< int, std::vector< int > > getStuckTBMsRocs()
unsigned long long Time_t
void beginRun(const edm::Run &, const edm::EventSetup &) override
void endLuminosityBlock(const edm::LuminosityBlock &, const edm::EventSetup &) override
bool isNewTagRequest(const std::string &recordName)
const SiPixelQuality * badPixelInfo_
unsigned long int digiOccROC(int iroc)
return ROC status (= hits on ROC iroc)
std::string outTxtFileName_
void writeOne(T *payload, Time_t time, const std::string &recordName, bool withlogging=false)
std::map< edm::LuminosityBlockNumber_t, std::map< int, std::vector< int > > >::iterator stuckTBMsMap_iterator
const std::vector< disabledModuleType > getBadComponentList() const
std::map< int, SiPixelModuleStatus > getDetectorStatus()
void dumpToFile(std::string filename)
SiPixelStatusHarvester(const edm::ParameterSet &)
std::map< edm::LuminosityBlockNumber_t, SiPixelDetectorStatus >::iterator siPixelStatusMap_iterator
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