CMS 3D CMS Logo

EcalChannelStatusHandler.h
Go to the documentation of this file.
1 #ifndef ECAL_CHANNELSTATUS_HANDLER_H
2 #define ECAL_CHANNELSTATUS_HANDLER_H
3 
4 #include <typeinfo>
5 #include <vector>
6 #include <string>
7 #include <map>
8 #include <sstream>
9 #include <iostream>
10 #include <fstream>
11 #include <cmath>
12 #include <ctime>
13 #include "TTree.h"
14 #include "TFile.h"
15 
18 
29 
32 
37 
46 
50 
54 
57 
58 #include "TProfile2D.h"
59 
60 namespace edm {
61  class ParameterSet;
62  class Event;
63  class EventSetup;
64 } // namespace edm
65 
66 namespace popcon {
67 
68  class EcalChannelStatusHandler : public popcon::PopConSourceHandler<EcalChannelStatus> {
69  public:
71  ~EcalChannelStatusHandler() override;
72 
73  void getNewObjects() override;
75 
76  std::string id() const override { return m_name; }
78 
79  // checks on pedestals
86 
87  // check which laser sectors are on
88  void nBadLaserModules(std::map<EcalLogicID, MonLaserBlueDat> dataset_mon);
89 
90  // to mask channels reading from pedestal
91  void pedOnlineMasking();
92  void pedMasking();
93  void laserMasking();
94  void physicsMasking();
95 
96  // to read the daq configuration
97  void daqOut(const RunIOV &myRun);
98 
99  // real analysis
100  void pedAnalysis(std::map<EcalLogicID, MonPedestalsDat> dataset_mon,
101  std::map<EcalLogicID, MonCrystalConsistencyDat> wrongGain_mon);
102  void laserAnalysis(std::map<EcalLogicID, MonLaserBlueDat> dataset_mon);
103  void cosmicsAnalysis(std::map<EcalLogicID, MonPedestalsOnlineDat> pedestalO_mon,
104  std::map<EcalLogicID, MonCrystalConsistencyDat> wrongGain_mon,
105  std::map<EcalLogicID, MonLaserBlueDat> laser_mon,
106  std::map<EcalLogicID, MonOccupancyDat> occupancy_mon);
107 
108  private:
109  unsigned int m_firstRun;
110  unsigned int m_lastRun;
111 
120 
121  bool isGoodLaserEBSm[36][2];
122  bool isGoodLaserEESm[18][2];
123  bool isEBRef1[36][2];
124  bool isEBRef2[36][2];
125  bool isEERef1[18][2];
126  bool isEERef2[18][2];
127 
129 
130  std::ofstream *ResFileEB;
131  std::ofstream *ResFileEE;
132  std::ofstream *ResFileNewEB;
133  std::ofstream *ResFileNewEE;
134  std::ofstream *daqFile;
135  std::ofstream *daqFile2;
136 
137  std::map<DetId, float> maskedOnlinePedEB, maskedOnlinePedEE;
138  std::map<DetId, float> maskedPedEB, maskedPedEE;
139  std::map<DetId, float> maskedLaserEB, maskedLaserEE;
140  std::map<DetId, float> maskedPhysicsEB, maskedPhysicsEE;
141 
142  TProfile2D *newBadEB_;
143  TProfile2D *newBadEEP_;
144  TProfile2D *newBadEEM_;
145  };
146 } // namespace popcon
147 #endif
MonPNBlueDat.h
popcon::EcalChannelStatusHandler::maskedLaserEB
std::map< DetId, float > maskedLaserEB
Definition: EcalChannelStatusHandler.h:139
EcalCondDBInterface
Definition: EcalCondDBInterface.h:37
EcalElectronicsMapping
Definition: EcalElectronicsMapping.h:28
PopConSourceHandler.h
RunIOV
Definition: RunIOV.h:13
Handle.h
popcon::EcalChannelStatusHandler::m_lastRun
unsigned int m_lastRun
Definition: EcalChannelStatusHandler.h:110
popcon::EcalChannelStatusHandler::physicsMasking
void physicsMasking()
Definition: EcalChannelStatusHandler.cc:366
popcon::EcalChannelStatusHandler::daqFile2
std::ofstream * daqFile2
Definition: EcalChannelStatusHandler.h:135
EcalPedestals.h
MessageLogger.h
ESHandle.h
popcon::EcalChannelStatusHandler::m_sid
std::string m_sid
Definition: EcalChannelStatusHandler.h:115
MonTimingLaserBlueCrystalDat.h
popcon::EcalChannelStatusHandler::checkPedestalValueGain6
float checkPedestalValueGain6(EcalPedestals::Item *item)
Definition: EcalChannelStatusHandler.cc:76
popcon::EcalChannelStatusHandler::maskedPedEB
std::map< DetId, float > maskedPedEB
Definition: EcalChannelStatusHandler.h:138
edm
HLT enums.
Definition: AlignableModifier.h:19
EBDetId.h
EEDetId.h
popcon::EcalChannelStatusHandler::ResFileEB
std::ofstream * ResFileEB
Definition: EcalChannelStatusHandler.h:130
popcon::EcalChannelStatusHandler
Definition: EcalChannelStatusHandler.h:68
popcon::EcalChannelStatusHandler::~EcalChannelStatusHandler
~EcalChannelStatusHandler() override
Definition: EcalChannelStatusHandler.cc:64
popcon::EcalChannelStatusHandler::maskedPedEE
std::map< DetId, float > maskedPedEE
Definition: EcalChannelStatusHandler.h:138
EcalErrorMask.h
popcon::EcalChannelStatusHandler::maskedPhysicsEE
std::map< DetId, float > maskedPhysicsEE
Definition: EcalChannelStatusHandler.h:140
popcon::EcalChannelStatusHandler::isGoodLaserEBSm
bool isGoodLaserEBSm[36][2]
Definition: EcalChannelStatusHandler.h:121
popcon::EcalChannelStatusHandler::EcalChannelStatusHandler
EcalChannelStatusHandler(edm::ParameterSet const &)
Definition: EcalChannelStatusHandler.cc:47
popcon::EcalChannelStatusHandler::maskedLaserEE
std::map< DetId, float > maskedLaserEE
Definition: EcalChannelStatusHandler.h:139
MakerMacros.h
PoolDBOutputService.h
popcon::EcalChannelStatusHandler::m_pass
std::string m_pass
Definition: EcalChannelStatusHandler.h:117
popcon::EcalChannelStatusHandler::checkPedestalRMSGain12
float checkPedestalRMSGain12(EcalPedestals::Item *item)
Definition: EcalChannelStatusHandler.cc:88
RunCrystalErrorsDat.h
popcon::EcalChannelStatusHandler::m_firstRun
unsigned int m_firstRun
Definition: EcalChannelStatusHandler.h:109
Service.h
RunTTErrorsDat.h
EcalMappingRcd.h
popcon::EcalChannelStatusHandler::nBadLaserModules
void nBadLaserModules(std::map< EcalLogicID, MonLaserBlueDat > dataset_mon)
Definition: EcalChannelStatusHandler.cc:109
popcon::EcalChannelStatusHandler::isEBRef2
bool isEBRef2[36][2]
Definition: EcalChannelStatusHandler.h:124
Event
MonLaserBlueDat.h
popcon::EcalChannelStatusHandler::maskedOnlinePedEE
std::map< DetId, float > maskedOnlinePedEE
Definition: EcalChannelStatusHandler.h:137
popcon::EcalChannelStatusHandler::isEERef1
bool isEERef1[18][2]
Definition: EcalChannelStatusHandler.h:125
popcon::EcalChannelStatusHandler::ecalElectronicsMap_
EcalElectronicsMapping ecalElectronicsMap_
Definition: EcalChannelStatusHandler.h:128
popcon::EcalChannelStatusHandler::m_runtype
std::string m_runtype
Definition: EcalChannelStatusHandler.h:114
popcon::EcalChannelStatusHandler::laserMasking
void laserMasking()
Definition: EcalChannelStatusHandler.cc:331
popcon::EcalChannelStatusHandler::m_locationsource
std::string m_locationsource
Definition: EcalChannelStatusHandler.h:118
all_monitoring_types.h
popcon::EcalChannelStatusHandler::checkPedestalRMSGain1
float checkPedestalRMSGain1(EcalPedestals::Item *item)
Definition: EcalChannelStatusHandler.cc:100
edm::ParameterSet
Definition: ParameterSet.h:47
Timestamp.h
Event.h
ParameterSet
Definition: Functions.h:16
EcalCondObjectContainer::Item
T Item
Definition: EcalCondObjectContainer.h:15
popcon::EcalChannelStatusHandler::m_name
std::string m_name
Definition: EcalChannelStatusHandler.h:119
popcon::EcalChannelStatusHandler::newBadEEM_
TProfile2D * newBadEEM_
Definition: EcalChannelStatusHandler.h:144
popcon::EcalChannelStatusHandler::maskedOnlinePedEB
std::map< DetId, float > maskedOnlinePedEB
Definition: EcalChannelStatusHandler.h:137
popcon::EcalChannelStatusHandler::cosmicsAnalysis
void cosmicsAnalysis(std::map< EcalLogicID, MonPedestalsOnlineDat > pedestalO_mon, std::map< EcalLogicID, MonCrystalConsistencyDat > wrongGain_mon, std::map< EcalLogicID, MonLaserBlueDat > laser_mon, std::map< EcalLogicID, MonOccupancyDat > occupancy_mon)
Definition: EcalChannelStatusHandler.cc:819
EcalElectronicsMapping.h
popcon::EcalChannelStatusHandler::checkPedestalRMSGain6
float checkPedestalRMSGain6(EcalPedestals::Item *item)
Definition: EcalChannelStatusHandler.cc:94
popcon::EcalChannelStatusHandler::isEBRef1
bool isEBRef1[36][2]
Definition: EcalChannelStatusHandler.h:123
B2GTnPMonitor_cfi.item
item
Definition: B2GTnPMonitor_cfi.py:147
popcon::EcalChannelStatusHandler::daqFile
std::ofstream * daqFile
Definition: EcalChannelStatusHandler.h:134
all_od_types.h
popcon::PopConSourceHandler
Definition: PopConSourceHandler.h:30
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
popcon::EcalChannelStatusHandler::getNewObjects
void getNewObjects() override
Definition: EcalChannelStatusHandler.cc:1674
popcon::EcalChannelStatusHandler::setElectronicsMap
void setElectronicsMap(const EcalElectronicsMapping *)
Definition: EcalChannelStatusHandler.cc:2164
popcon::EcalChannelStatusHandler::m_user
std::string m_user
Definition: EcalChannelStatusHandler.h:116
popcon
Definition: Exception.h:6
popcon::EcalChannelStatusHandler::isGoodLaserEESm
bool isGoodLaserEESm[18][2]
Definition: EcalChannelStatusHandler.h:122
popcon::EcalChannelStatusHandler::id
std::string id() const override
Definition: EcalChannelStatusHandler.h:76
popcon::EcalChannelStatusHandler::ResFileNewEB
std::ofstream * ResFileNewEB
Definition: EcalChannelStatusHandler.h:132
popcon::EcalChannelStatusHandler::checkPedestalValueGain1
float checkPedestalValueGain1(EcalPedestals::Item *item)
Definition: EcalChannelStatusHandler.cc:82
popcon::EcalChannelStatusHandler::m_gentag
std::string m_gentag
Definition: EcalChannelStatusHandler.h:113
popcon::EcalChannelStatusHandler::laserAnalysis
void laserAnalysis(std::map< EcalLogicID, MonLaserBlueDat > dataset_mon)
Definition: EcalChannelStatusHandler.cc:689
popcon::EcalChannelStatusHandler::econn
EcalCondDBInterface * econn
Definition: EcalChannelStatusHandler.h:77
popcon::EcalChannelStatusHandler::newBadEB_
TProfile2D * newBadEB_
Definition: EcalChannelStatusHandler.h:142
popcon::EcalChannelStatusHandler::isEERef2
bool isEERef2[18][2]
Definition: EcalChannelStatusHandler.h:126
popcon::EcalChannelStatusHandler::pedMasking
void pedMasking()
Definition: EcalChannelStatusHandler.cc:290
ParameterSetfwd.h
EventSetup.h
popcon::EcalChannelStatusHandler::ResFileEE
std::ofstream * ResFileEE
Definition: EcalChannelStatusHandler.h:131
popcon::EcalChannelStatusHandler::pedAnalysis
void pedAnalysis(std::map< EcalLogicID, MonPedestalsDat > dataset_mon, std::map< EcalLogicID, MonCrystalConsistencyDat > wrongGain_mon)
Definition: EcalChannelStatusHandler.cc:511
popcon::EcalChannelStatusHandler::pedOnlineMasking
void pedOnlineMasking()
Definition: EcalChannelStatusHandler.cc:257
EcalPedestalsRcd.h
Oracle.h
popcon::EcalChannelStatusHandler::ResFileNewEE
std::ofstream * ResFileNewEE
Definition: EcalChannelStatusHandler.h:133
popcon::EcalChannelStatusHandler::m_location
std::string m_location
Definition: EcalChannelStatusHandler.h:112
EventSetup
ParameterSet.h
EventSetupRecordKey.h
EcalErrorDictionary.h
EcalCondDBInterface.h
EcalChannelStatus.h
popcon::EcalChannelStatusHandler::checkPedestalValueGain12
float checkPedestalValueGain12(EcalPedestals::Item *item)
Definition: EcalChannelStatusHandler.cc:70
EcalChannelStatusRcd.h
popcon::EcalChannelStatusHandler::maskedPhysicsEB
std::map< DetId, float > maskedPhysicsEB
Definition: EcalChannelStatusHandler.h:140
all_fe_config_types.h
popcon::EcalChannelStatusHandler::newBadEEP_
TProfile2D * newBadEEP_
Definition: EcalChannelStatusHandler.h:143
popcon::EcalChannelStatusHandler::daqOut
void daqOut(const RunIOV &myRun)
Definition: EcalChannelStatusHandler.cc:399