38 INS.open(filename.c_str());
41 int detid(0), roc(0), dc(0),
hits(0), nroc(0);
44 while (getline(INS, sline)) {
46 if (string::npos != sline.find(
"# SiPixelDetectorStatus START")) {
50 if (!readOK)
continue;
52 if (string::npos != sline.find(
"# SiPixelDetectorStatus END")) {
57 if (sline.find(
"# SiPixelDetectorStatus for LS") != string::npos) {
58 sscanf(sline.c_str(),
"# SiPixelDetectorStatus for LS %d .. %d", &
fLS0, &
fLS1);
61 if (sline.find(
"# SiPixelDetectorStatus for run") != string::npos) {
62 sscanf(sline.c_str(),
"# SiPixelDetectorStatus for run %d .. %d", &
fRun0, &
fRun1);
65 if (sline.find(
"# SiPixelDetectorStatus total hits = ") != string::npos) {
66 sscanf(sline.c_str(),
"# SiPixelDetectorStatus total hits = %ld", &
fDetHits);
70 sscanf(sline.c_str(),
"%d %d %d %d", &detid, &roc, &dc, &
hits);
71 if (roc > nroc) nroc = roc;
72 if (detid != oldDetId) {
100 ofstream OD(filename.c_str());
101 OD <<
"# SiPixelDetectorStatus START" << endl;
102 OD <<
"# SiPixelDetectorStatus for LS " <<
fLS0 <<
" .. " <<
fLS1 << endl;
103 OD <<
"# SiPixelDetectorStatus for run " <<
fRun0 <<
" .. " <<
fRun1 << endl;
104 OD <<
"# SiPixelDetectorStatus total hits = " <<
fDetHits << endl;
105 map<int, SiPixelModuleStatus>::iterator itEnd =
end();
106 for (map<int, SiPixelModuleStatus>::iterator it =
begin(); it != itEnd; ++it) {
107 for (
int iroc = 0; iroc < it->second.nrocs(); ++iroc) {
108 for (
int idc = 0; idc < 26; ++idc) {
109 OD << Form(
"%10d %2d %2d %3d", it->first, iroc, idc,
int(it->second.getRoc(iroc)->digiOccDC(idc))) << endl;
113 OD <<
"# SiPixelDetectorStatus END" << endl;
122 fModules.insert(make_pair(detid, a));
126 fModules.insert(make_pair(detid, a));
140 fModules[detid].fillStuckTBM(ch,time);
148 std::map<int, std::vector<int>> badRocLists_;
150 std::map<int, SiPixelModuleStatus>::iterator itModEnd =
end();
151 for (std::map<int, SiPixelModuleStatus>::iterator itMod =
begin(); itMod != itModEnd; ++itMod) {
153 int detid = itMod->first;
155 std::vector<int>
list;
157 for (
int iroc = 0; iroc < modStatus.
nrocs(); ++iroc) {
161 list.push_back(iroc);
163 badRocLists_[detid]=
list;
188 return static_cast<int>(
fModules.size());
213 unsigned long int ave(0), sig(0);
215 map<int, SiPixelModuleStatus>::iterator itEnd =
end();
216 for (map<int, SiPixelModuleStatus>::iterator it =
begin(); it != itEnd; ++it) {
217 unsigned long int inc = it->second.digiOccMOD();
219 nrocs += it->second.nrocs();
223 for (map<int, SiPixelModuleStatus>::iterator it =
begin(); it != itEnd; ++it) {
224 unsigned long int inc = it->second.digiOccMOD();
237 std::map<int, SiPixelModuleStatus>::iterator itEnd = newData.
end();
238 for (map<int, SiPixelModuleStatus>::iterator it = newData.
begin(); it != itEnd; ++it) {
240 int detid = it->first;
257 std::map<int, SiPixelModuleStatus>::iterator itEnd =
end();
258 for (map<int, SiPixelModuleStatus>::iterator it =
begin(); it != itEnd; ++it) {
260 int detid = it->first;
void addModule(int detid, int nrocs)
void updateDetectorStatus(SiPixelDetectorStatus newData)
unsigned long int digiOccDET()
std::map< int, SiPixelModuleStatus > fModules
std::map< int, std::vector< int > > getStuckTBMsRocs()
std::map< int, SiPixelModuleStatus >::iterator begin()
unsigned long int fDetHits
unsigned long int fNevents
void readFromFile(std::string filename)
static type combine(const A &_1, const B &_2)
SiPixelDetectorStatus combineDetectorStatus(SiPixelDetectorStatus newData)
std::map< int, SiPixelModuleStatus >::iterator end()
void updateModuleDIGI(int roc, int dc, unsigned long int nhits)
combine new data to update(topup) module status
void dumpToFile(std::string filename)
unsigned long int getNevents()
void fillStuckTBM(int detid, PixelFEDChannel ch, std::time_t time)
SiPixelRocStatus * getRoc(int i)
get a ROC
void updateModuleStatus(SiPixelModuleStatus newData)
SiPixelModuleStatus * getModule(int detid)
bool findModule(int detid)
void fillDIGI(int detid, int roc, int idc)
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