26 outputBase_(iConfig.getParameter<
ParameterSet>(
"SiPixelStatusManagerParameters").getUntrackedParameter<
std::
string>(
"outputBase")),
27 aveDigiOcc_(iConfig.getParameter<
edm::
ParameterSet>(
"SiPixelStatusManagerParameters").getUntrackedParameter<
int>(
"aveDigiOcc")),
28 nLumi_(iConfig.getParameter<
edm::
ParameterSet>(
"SiPixelStatusManagerParameters").getUntrackedParameter<
int>(
"resetEveryNLumi")),
29 moduleName_(iConfig.getParameter<
ParameterSet>(
"SiPixelStatusManagerParameters").getUntrackedParameter<
std::
string>(
"moduleName")),
30 label_ (iConfig.getParameter<
ParameterSet>(
"SiPixelStatusManagerParameters").getUntrackedParameter<
std::
string>(
"label"))
75 if(siPixelStatusHandle.
isValid()) {
83 <<
" SiPixelDetectorStatus is not valid for run "<<iLumi.
run()<<
" lumi "<<iLumi.
luminosityBlock()<< std::endl;
100 int iterationLumi = 0;
107 if(iterationLumi%
nLumi_==0){
109 tmpSiPixelStatus = (*it);
113 if(iterationLumi%
nLumi_>0){
115 tmpSiPixelStatus.
setLSRange(
int(tmpLumi), (*it).getLSRange().second);
121 if(iterationLumi%
nLumi_==
nLumi_-1 || nextIt==lastStatus)
127 iterationLumi=iterationLumi+1;
146 (iterBeforeLastIOV->second).updateDetectorStatus(iterLastIOV->second);
147 (iterBeforeLastIOV->second).setLSRange((iterBeforeLastIOV->second).getLSRange().first, (iterLastIOV->second).getLSRange().second);
161 bool isNewIOV =
true;
168 tmpSiPixelStatus = (*it);
172 tmpSiPixelStatus.
setLSRange(
int(tmpLumi),(*it).getLSRange().second);
178 if(tmpSiPixelStatus.
perRocDigiOcc()<aveDigiOcc && nextIt!=lastStatus){
200 if((iterLastIOV->second).perRocDigiOcc()<aveDigiOcc){
204 (iterBeforeLastIOV->second).updateDetectorStatus(iterLastIOV->second);
205 (iterBeforeLastIOV->second).setLSRange((iterBeforeLastIOV->second).getLSRange().first, (iterLastIOV->second).getLSRange().second);
220 tmpSiPixelStatus.updateDetectorStatus((*it));
221 tmpSiPixelStatus.setLSRange(
int(tmpLumi),(*it).getLSRange().second);
228 LogInfo(
"SiPixelStatusManager")
229 <<
"Unrecognized payload outputBase parameter: " <<
outputBase_ 248 bool sameAsLastIOV =
true;
257 std::map<int,std::vector<int> >tmpBadRocLists = tmpFEDerror25.
getFEDerror25Rocs();
259 std::map<int, SiPixelModuleStatus>::iterator itModEnd = tmpFEDerror25.end();
260 for (std::map<int, SiPixelModuleStatus>::iterator itMod = tmpFEDerror25.begin(); itMod != itModEnd; ++itMod)
262 int detid = itMod->first;
265 sameAsLastIOV =
false;
270 if(sameAsLastIOV==
false){
274 previousLumi = tmpLumi;
275 sameAsLastIOV =
true;
void createBadComponents()
void updateDetectorStatus(SiPixelDetectorStatus newData)
bool getByToken(EDGetToken token, Handle< PROD > &result) const
unsigned long int digiOccDET()
edm::EDGetTokenT< SiPixelDetectorStatus > siPixelStatusToken_
std::map< int, std::vector< int > > getFEDerror25Rocs()
unsigned int LuminosityBlockNumber_t
virtual ~SiPixelStatusManager()
LuminosityBlockNumber_t luminosityBlock() const
std::vector< SiPixelDetectorStatus >::iterator siPixelStatusVtr_iterator
void setLSRange(int ls0, int ls1)
std::map< edm::LuminosityBlockNumber_t, std::map< int, std::vector< int > > > FEDerror25Map_
std::vector< SiPixelDetectorStatus > siPixelStatusVtr_
std::map< edm::LuminosityBlockNumber_t, SiPixelDetectorStatus > siPixelStatusMap_
std::pair< int, int > getLSRange()
std::map< edm::LuminosityBlockNumber_t, SiPixelDetectorStatus >::iterator siPixelStatusMap_iterator
static bool rankByLumi(SiPixelDetectorStatus status1, SiPixelDetectorStatus status2)
void readLumi(const edm::LuminosityBlock &)