17 NumberOfFeds_ =FEDRange_.second - FEDRange_.first +1;
20 for(
int i=0;
i!=40;
i++) FEDs_[
i] = 0;
31 if(0 != iSetup.
find( recordKey ) ) {
36 vector<int> FedsInIds= sumFED->m_fed_in;
43 for(
unsigned int fedItr=0;fedItr<FedsInIds.size(); ++fedItr) {
44 int fedID=FedsInIds[fedItr];
47 if(fedID>=FEDRange_.first && fedID<=FEDRange_.second){
49 if(fedID>=0 && fedID<=31) ++FedCountBarrel;
50 else if(fedID>=32 && fedID<=39) ++FedCountEndcap;
55 if(FedCountBarrel<=32){
56 FedCountBarrel = 0; FedCountEndcap = 0; FedCount = 0; NumberOfFeds_ = 40;
57 for(
int i=0;
i!=40;
i++){
58 if(
i<=31 && FEDs_[
i]>0) FedCountBarrel++;
59 if(
i>=32 && FEDs_[
i]>0) FedCountEndcap++;
60 if(FEDs_[
i]>0) FedCount++;
65 Fraction_->Fill( FedCount/NumberOfFeds_);
67 FractionBarrel_->Fill( FedCountBarrel/32.);
69 FractionEndcap_->Fill( FedCountEndcap/8.);
72 FractionBarrel_->Fill(-1);
73 FractionEndcap_->Fill(-1);
78 FractionBarrel_->Fill(-1);
79 FractionEndcap_->Fill(-1);
86 if(0 != iSetup.
find( recordKey ) ) {
91 vector<int> FedsInIds= sumFED->m_fed_in;
98 for(
unsigned int fedItr=0;fedItr<FedsInIds.size(); ++fedItr) {
99 int fedID=FedsInIds[fedItr];
102 if(fedID>=FEDRange_.first && fedID<=FEDRange_.second){
104 if(fedID>=0 && fedID<=31) ++FedCountBarrel;
105 else if(fedID>=32 && fedID<=39) ++FedCountEndcap;
109 if(FedCountBarrel>32){
110 FedCountBarrel = nFEDsBarrel_;
111 FedCountEndcap = nFEDsEndcap_;
112 FedCount = FedCountBarrel + FedCountEndcap;
117 if(FedCountBarrel<=32){
118 FedCountBarrel = 0; FedCountEndcap = 0; FedCount = 0; NumberOfFeds_ = 40;
119 for(
int i=0;
i!=40;
i++){
120 if(
i<=31 && FEDs_[
i]>0) FedCountBarrel++;
121 if(
i>=32 && FEDs_[
i]>0) FedCountEndcap++;
122 if(FEDs_[
i]>0) FedCount++;
127 Fraction_->Fill( FedCount/NumberOfFeds_);
129 FractionBarrel_->Fill( FedCountBarrel/32.);
131 FractionEndcap_->Fill( FedCountEndcap/8.);
134 FractionBarrel_->Fill(-1);
135 FractionEndcap_->Fill(-1);
140 FractionBarrel_->Fill(-1);
141 FractionEndcap_->Fill(-1);
168 if(NEvents_>=1 && NEvents_<=100){
173 edm::LogInfo(
"SiPixelDaqInfo") << daqSource_ <<
" is empty!";
177 nFEDsBarrel_ = 0; nFEDsEndcap_ = 0;
178 for(
int i = 0;
i != 40;
i++){
T getUntrackedParameter(std::string const &, T const &) const
virtual void beginLuminosityBlock(const edm::LuminosityBlock &, const edm::EventSetup &)
virtual void analyze(const edm::Event &, const edm::EventSetup &)
virtual void endLuminosityBlock(const edm::LuminosityBlock &, const edm::EventSetup &)
size_t size() const
Lenght of the data buffer in bytes.
MonitorElement * bookFloat(const char *name)
Book float.
const eventsetup::EventSetupRecord * find(const eventsetup::EventSetupRecordKey &) const
const FEDRawData & FEDData(int fedid) const
retrieve data for fed
SiPixelDaqInfo(const edm::ParameterSet &)
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
virtual void endRun(const edm::Run &, const edm::EventSetup &)
void setCurrentFolder(const std::string &fullpath)
static HCTypeTag findType(char const *iTypeName)
find a type based on the types name, if not found will return default HCTypeTag