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"))
79 if(siPixelStatusHandle.
isValid()) {
87 <<
" SiPixelDetectorStatus is not valid for run "<<iLumi.
run()<<
" lumi "<<iLumi.
luminosityBlock()<< std::endl;
104 int iterationLumi = 0;
111 if(iterationLumi%
nLumi_==0){
113 tmpSiPixelStatus = (*it);
117 if(iterationLumi%
nLumi_>0){
119 tmpSiPixelStatus.
setLSRange(
int(tmpLumi), (*it).getLSRange().second);
125 if(iterationLumi%
nLumi_==
nLumi_-1 || nextIt==lastStatus)
131 iterationLumi=iterationLumi+1;
150 (iterBeforeLastIOV->second).updateDetectorStatus(iterLastIOV->second);
151 (iterBeforeLastIOV->second).setLSRange((iterBeforeLastIOV->second).getLSRange().first, (iterLastIOV->second).getLSRange().second);
165 bool isNewIOV =
true;
172 tmpSiPixelStatus = (*it);
176 tmpSiPixelStatus.
setLSRange(
int(tmpLumi),(*it).getLSRange().second);
182 if(tmpSiPixelStatus.
perRocDigiOcc()<aveDigiOcc && nextIt!=lastStatus){
204 if((iterLastIOV->second).perRocDigiOcc()<aveDigiOcc){
208 (iterBeforeLastIOV->second).updateDetectorStatus(iterLastIOV->second);
209 (iterBeforeLastIOV->second).setLSRange((iterBeforeLastIOV->second).getLSRange().first, (iterLastIOV->second).getLSRange().second);
224 tmpSiPixelStatus.updateDetectorStatus((*it));
225 tmpSiPixelStatus.setLSRange(
int(tmpLumi),(*it).getLSRange().second);
232 LogInfo(
"SiPixelStatusManager")
233 <<
"Unrecognized payload outputBase parameter: " <<
outputBase_ 252 bool sameAsLastIOV =
true;
261 std::map<int,std::vector<int> >tmpBadRocLists = tmpFEDerror25.
getFEDerror25Rocs();
263 std::map<int, SiPixelModuleStatus>::iterator itModEnd = tmpFEDerror25.end();
264 for (std::map<int, SiPixelModuleStatus>::iterator itMod = tmpFEDerror25.begin(); itMod != itModEnd; ++itMod)
266 int detid = itMod->first;
269 sameAsLastIOV =
false;
274 if(sameAsLastIOV==
false){
278 previousLumi = tmpLumi;
279 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 &)