17 NumberOfFeds_ =FEDRange_.second - FEDRange_.first +1;
20 for(
int i=0;
i!=40;
i++) FEDs_[
i] = 0;
23 daqSourceToken_ = consumes<FEDRawDataCollection>(ps.
getUntrackedParameter<
string>(
"daqSource",
"source"));
33 if(0 != iSetup.
find( recordKey ) ) {
38 vector<int> FedsInIds= sumFED->m_fed_in;
45 for(
unsigned int fedItr=0;fedItr<FedsInIds.size(); ++fedItr) {
46 int fedID=FedsInIds[fedItr];
49 if(fedID>=FEDRange_.first && fedID<=FEDRange_.second){
51 if(fedID>=0 && fedID<=31) ++FedCountBarrel;
52 else if(fedID>=32 && fedID<=39) ++FedCountEndcap;
57 if(FedCountBarrel<=32){
58 FedCountBarrel = 0; FedCountEndcap = 0; FedCount = 0; NumberOfFeds_ = 40;
59 for(
int i=0;
i!=40;
i++){
60 if(
i<=31 && FEDs_[
i]>0) FedCountBarrel++;
61 if(
i>=32 && FEDs_[
i]>0) FedCountEndcap++;
62 if(FEDs_[
i]>0) FedCount++;
67 Fraction_->Fill( FedCount/NumberOfFeds_);
69 FractionBarrel_->Fill( FedCountBarrel/32.);
71 FractionEndcap_->Fill( FedCountEndcap/8.);
74 FractionBarrel_->Fill(-1);
75 FractionEndcap_->Fill(-1);
80 FractionBarrel_->Fill(-1);
81 FractionEndcap_->Fill(-1);
88 if(0 != iSetup.
find( recordKey ) ) {
93 vector<int> FedsInIds= sumFED->m_fed_in;
100 for(
unsigned int fedItr=0;fedItr<FedsInIds.size(); ++fedItr) {
101 int fedID=FedsInIds[fedItr];
104 if(fedID>=FEDRange_.first && fedID<=FEDRange_.second){
106 if(fedID>=0 && fedID<=31) ++FedCountBarrel;
107 else if(fedID>=32 && fedID<=39) ++FedCountEndcap;
111 if(FedCountBarrel>32){
112 FedCountBarrel = nFEDsBarrel_;
113 FedCountEndcap = nFEDsEndcap_;
114 FedCount = FedCountBarrel + FedCountEndcap;
119 if(FedCountBarrel<=32){
120 FedCountBarrel = 0; FedCountEndcap = 0; FedCount = 0; NumberOfFeds_ = 40;
121 for(
int i=0;
i!=40;
i++){
122 if(
i<=31 && FEDs_[
i]>0) FedCountBarrel++;
123 if(
i>=32 && FEDs_[
i]>0) FedCountEndcap++;
124 if(FEDs_[
i]>0) FedCount++;
129 Fraction_->Fill( FedCount/NumberOfFeds_);
131 FractionBarrel_->Fill( FedCountBarrel/32.);
133 FractionEndcap_->Fill( FedCountEndcap/8.);
136 FractionBarrel_->Fill(-1);
137 FractionEndcap_->Fill(-1);
142 FractionBarrel_->Fill(-1);
143 FractionEndcap_->Fill(-1);
170 if(NEvents_>=1 && NEvents_<=100){
173 iEvent.
getByToken(daqSourceToken_, rawDataHandle);
175 edm::LogInfo(
"SiPixelDaqInfo") << daqSource_ <<
" is empty!";
179 nFEDsBarrel_ = 0; nFEDsEndcap_ = 0;
180 for(
int i = 0;
i != 40;
i++){
T getUntrackedParameter(std::string const &, T const &) const
virtual void beginLuminosityBlock(const edm::LuminosityBlock &, const edm::EventSetup &)
bool getByToken(EDGetToken token, Handle< PROD > &result) const
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 &)
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