32 INS.open(filename.c_str());
35 int detid(0), roc(0),
hits(0), nroc(0);
38 while (std::getline(INS, sline)) {
40 if (std::string::npos != sline.find(
"# SiPixelDetectorStatus START")) {
44 if (!readOK)
continue;
46 if (std::string::npos != sline.find(
"# SiPixelDetectorStatus END")) {
51 if (sline.find(
"# SiPixelDetectorStatus for LS") != std::string::npos) {
52 std::sscanf(sline.c_str(),
"# SiPixelDetectorStatus for LS %d .. %d", &
fLS0, &
fLS1);
55 if (sline.find(
"# SiPixelDetectorStatus for run") != std::string::npos) {
56 std::sscanf(sline.c_str(),
"# SiPixelDetectorStatus for run %d .. %d", &
fRun0, &
fRun1);
59 if (sline.find(
"# SiPixelDetectorStatus total hits = ") != std::string::npos) {
60 std::sscanf(sline.c_str(),
"# SiPixelDetectorStatus total hits = %ld", &
fDetHits);
64 std::sscanf(sline.c_str(),
"%d %d %d", &detid, &roc, &
hits);
65 if (roc > nroc) nroc = roc;
66 if (detid != oldDetId) {
94 std::ofstream OD(filename.c_str());
95 OD <<
"# SiPixelDetectorStatus START" << std::endl;
96 OD <<
"# SiPixelDetectorStatus for LS " <<
fLS0 <<
" .. " <<
fLS1 << std::endl;
97 OD <<
"# SiPixelDetectorStatus for run " <<
fRun0 <<
" .. " <<
fRun1 << std::endl;
98 OD <<
"# SiPixelDetectorStatus total hits = " <<
fDetHits << std::endl;
101 for (
int iroc = 0; iroc < it->second.nrocs(); ++iroc) {
102 for (
int idc = 0; idc < 26; ++idc) {
103 OD << Form(
"%10d %2d %3d", it->first, iroc,
int(it->second.getRoc(iroc)->digiOccROC())) << std::endl;
107 OD <<
"# SiPixelDetectorStatus END" << std::endl;
117 fModules.insert(std::make_pair(detid, a));
124 fModules.insert(std::make_pair(detid, a));
149 std::map<int, std::vector<int>> badRocLists_;
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;
193 return static_cast<int>(
fModules.size());
219 unsigned long int ave(0);
222 unsigned long int inc = it->second.digiOccMOD();
224 nrocs += it->second.nrocs();
226 return (1.0*ave)/nrocs;
237 unsigned long int inc = it->second.digiOccMOD();
238 sig += (fDetAverage - inc) * (fDetAverage - inc);
239 nrocs += it->second.nrocs();
242 double fDetSigma = sig/(nrocs - 1);
243 return TMath::Sqrt(fDetSigma);
250 for(std::map<int, SiPixelModuleStatus>::iterator it = newData.
begin(); it != newData.
end(); ++it) {
252 int detid = it->first;
void addModule(int detid, int nrocs)
void updateDetectorStatus(SiPixelDetectorStatus newData)
void updateModuleDIGI(int roc, unsigned int nhits)
combine new data to update(topup) module status
unsigned long int digiOccDET()
void fillFEDerror25(int detid, PixelFEDChannel ch)
double perRocDigiOccVar()
std::map< int, std::vector< int > > getFEDerror25Rocs()
void fillDIGI(int detid, int roc)
std::map< int, SiPixelModuleStatus > fModules
unsigned long int fDetHits
unsigned long int fNevents
void readFromFile(std::string filename)
std::map< int, SiPixelModuleStatus >::iterator end()
std::map< int, SiPixelModuleStatus >::iterator begin()
void dumpToFile(std::string filename)
unsigned long int getNevents()
SiPixelRocStatus * getRoc(int i)
get a ROC
SiPixelModuleStatus * getModule(int detid)
bool findModule(int detid)
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