25 : outputBase_(iConfig.getParameter<
ParameterSet>(
"SiPixelStatusManagerParameters")
26 .getUntrackedParameter<
std::
string>(
"outputBase")),
27 aveDigiOcc_(iConfig.getParameter<
edm::
ParameterSet>(
"SiPixelStatusManagerParameters")
28 .getUntrackedParameter<
int>(
"aveDigiOcc")),
29 nLumi_(iConfig.getParameter<
edm::
ParameterSet>(
"SiPixelStatusManagerParameters")
30 .getUntrackedParameter<
int>(
"resetEveryNLumi")),
31 moduleName_(iConfig.getParameter<
ParameterSet>(
"SiPixelStatusManagerParameters")
32 .getUntrackedParameter<
std::
string>(
"moduleName")),
33 label_(iConfig.getParameter<
ParameterSet>(
"SiPixelStatusManagerParameters")
34 .getUntrackedParameter<
std::
string>(
"label")) {
76 if (siPixelStatusHandle.
isValid()) {
82 edm::LogWarning(
"SiPixelStatusManager") <<
" SiPixelDetectorStatus is not valid for run " << iLumi.
run() <<
" lumi " 98 int iterationLumi = 0;
104 if (iterationLumi %
nLumi_ == 0) {
106 tmpSiPixelStatus = (*it);
110 if (iterationLumi %
nLumi_ > 0) {
112 tmpSiPixelStatus.
setLSRange(
int(tmpLumi), (*it).getLSRange().second);
118 if (iterationLumi %
nLumi_ ==
nLumi_ - 1 || nextIt == lastStatus) {
123 iterationLumi = iterationLumi + 1;
141 (iterBeforeLastIOV->second).updateDetectorStatus(iterLastIOV->second);
142 (iterBeforeLastIOV->second)
143 .setLSRange((iterBeforeLastIOV->second).getLSRange().first, (iterLastIOV->second).getLSRange().second);
154 bool isNewIOV =
true;
159 tmpSiPixelStatus = (*it);
162 tmpSiPixelStatus.
setLSRange(
int(tmpLumi), (*it).getLSRange().second);
187 if ((iterLastIOV->second).perRocDigiOcc() <
aveDigiOcc) {
191 (iterBeforeLastIOV->second).updateDetectorStatus(iterLastIOV->second);
192 (iterBeforeLastIOV->second)
193 .setLSRange((iterBeforeLastIOV->second).getLSRange().first, (iterLastIOV->second).getLSRange().second);
205 tmpSiPixelStatus.updateDetectorStatus((*
it));
206 tmpSiPixelStatus.setLSRange(
int(tmpLumi), (*it).getLSRange().second);
212 LogInfo(
"SiPixelStatusManager") <<
"Unrecognized payload outputBase parameter: " <<
outputBase_ << endl;
226 bool sameAsLastIOV =
true;
235 std::map<int, std::vector<int> > tmpBadRocLists = tmpFEDerror25.
getFEDerror25Rocs();
237 std::map<int, SiPixelModuleStatus>::iterator itModEnd = tmpFEDerror25.end();
238 for (std::map<int, SiPixelModuleStatus>::iterator itMod = tmpFEDerror25.begin(); itMod != itModEnd; ++itMod) {
239 int detid = itMod->first;
241 if (tmpBadRocLists[detid] != (
FEDerror25Map_[previousLumi])[detid]) {
242 sameAsLastIOV =
false;
247 if (sameAsLastIOV ==
false) {
251 previousLumi = tmpLumi;
252 sameAsLastIOV =
true;
void createBadComponents()
void updateDetectorStatus(SiPixelDetectorStatus newData)
unsigned long int digiOccDET()
edm::EDGetTokenT< SiPixelDetectorStatus > siPixelStatusToken_
std::map< int, std::vector< int > > getFEDerror25Rocs()
unsigned int LuminosityBlockNumber_t
std::pair< int, int > getLSRange()
virtual ~SiPixelStatusManager()
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_
Log< level::Info, false > LogInfo
std::map< edm::LuminosityBlockNumber_t, SiPixelDetectorStatus > siPixelStatusMap_
bool getByToken(EDGetToken token, Handle< PROD > &result) const
static bool rankByLumi(SiPixelDetectorStatus status1, SiPixelDetectorStatus status2)
Log< level::Warning, false > LogWarning
void readLumi(const edm::LuminosityBlock &)
LuminosityBlockNumber_t luminosityBlock() const
std::map< edm::LuminosityBlockNumber_t, SiPixelDetectorStatus >::iterator siPixelStatusMap_iterator