34 std::cout <<
" *** Ecal Barrel Generic Monitor ***" << std::endl;
51 if ( fixedRunNumber_ ) {
78 std::cout <<
" debug switch is ON" << std::endl;
82 std::cout <<
" debug switch is OFF" << std::endl;
95 if ( enableCleanup_ ) {
97 std::cout <<
" enableCleanup switch is ON" << std::endl;
101 std::cout <<
" enableCleanup switch is OFF" << std::endl;
116 for (
int i = 0;
i < 2;
i++) {
122 for (
int i = 0;
i < 36;
i++) {
134 if (
debug_ )
std::cout <<
"EcalBarrelMonitorModule: beginJob" << std::endl;
153 if (
debug_ )
std::cout <<
"EcalBarrelMonitorModule: beginRun" << std::endl;
161 if (
debug_ )
std::cout <<
"EcalBarrelMonitorModule: endRun" << std::endl;
177 for (
int i = 0;
i < 2;
i++) {
186 for (
int i = 0;
i < 18;
i++) {
248 for (
int i = 0;
i < 36;
i++) {
255 for (
int i = 0;
i < 36;
i++) {
262 for (
int i = 0;
i < 36;
i++) {
269 for (
int i = 0;
i < 36;
i++) {
275 for (
int i = 0;
i < 36;
i++) {
315 for (
int i = 0;
i < 2;
i++) {
332 for (
int i = 0;
i < 36;
i++) {
375 LogDebug(
"EcalBarrelMonitorModule") <<
"processing event " <<
ievt_;
385 if ( dcchs->size() == 0 ) {
386 LogDebug(
"EcalBarrelMonitorModule") <<
"EcalRawDataCollection is empty";
417 if ( evtType_ < 0 || evtType_ > 22 )
evtType_ = -1;
422 LogDebug(
"EcalBarrelMonitorModule") <<
"event: " <<
ievt_ <<
" DCC headers collection size: " << nebc;
426 if ( evtType_ < 0 || evtType_ > 22 )
evtType_ = -1;
429 edm::LogWarning(
"EcalBarrelMonitorModule") <<
"EcalRawDataCollection not available";
459 int nebd = digis->size();
460 LogDebug(
"EcalBarrelMonitorModule") <<
"event " <<
ievt_ <<
" digi collection size " << nebd;
478 for (
int i = 0;
i < 36;
i++) {
488 edm::LogWarning(
"EcalBarrelMonitorModule") <<
"EBDigiCollection not available";
496 int nebh = hits->size();
497 LogDebug(
"EcalBarrelMonitorModule") <<
"event " <<
ievt_ <<
" hits collection size " << nebh;
510 int ie = (ic-1)/20 + 1;
511 int ip = (ic-1)%20 + 1;
517 float xie = ie - 0.5;
518 float xip = ip - 0.5;
520 float xval = hitItr->energy();
532 for (
int i = 0;
i < 36;
i++) {
542 edm::LogWarning(
"EcalBarrelMonitorModule") <<
"EcalRecHitCollection not available";
566 LogDebug(
"EcalBarrelMonitorModule") <<
"event " <<
ievt_ <<
" TP digi collection size " << nebtpd;
571 for (
int i = 0;
i < 36;
i++) {
581 edm::LogWarning(
"EcalBarrelMonitorModule") <<
"EcalTrigPrimDigiCollection not available";
T getParameter(std::string const &) const
EventNumber_t event() const
T getUntrackedParameter(std::string const &, T const &) const
const std::string & getName(void) const
get name of ME
MonitorElement * meStatus_
edm::EDGetTokenT< EBDigiCollection > EBDigiCollection_
boost::transform_iterator< IterHelp, boost::counting_iterator< int > > const_iterator
void cleanup(void)
Cleanup.
edm::EDGetTokenT< EcalRawDataCollection > EcalRawDataCollection_
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
void rmdir(const std::string &fullpath)
MonitorElement * meEvtType_
edm::EDGetTokenT< EcalTrigPrimDigiCollection > EcalTrigPrimDigiCollection_
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Some "id" conversions.
static std::string sEB(const unsigned ism)
std::vector< EcalDCCHeaderBlock >::const_iterator const_iterator
void setBinLabel(int bin, const std::string &label, int axis=1)
set bin label for x, y or z axis (axis=1, 2, 3 respectively)
MonitorElement * meRunType_
MonitorElement * meEBhits_[2]
MonitorElement * meEBdigis_[2]
void tag(MonitorElement *me, unsigned int myTag)
void removeElement(const std::string &name)
void analyze(const edm::Event &e, const edm::EventSetup &c)
Analyze.
MonitorElement * meEBtpdigis_[2]
MonitorElement * bookProfile(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, const char *option="s")
MonitorElement * get(const std::string &path) const
get ME from full pathname (e.g. "my/long/dir/my_histo")
void beginRun(const edm::Run &r, const edm::EventSetup &c)
BeginRun.
int ic() const
get ECAL/crystal number inside SM
virtual ~EcalBarrelMonitorModule()
Destructor.
EcalBarrelMonitorModule(const edm::ParameterSet &ps)
Constructor.
edm::EDGetTokenT< EcalRecHitCollection > EcalRecHitCollection_
static void initGeometry(const edm::EventSetup &setup, bool verbose=false)
MonitorElement * meEBDCC_
MonitorElement * meEvent_[36]
static std::atomic< unsigned int > counter
static unsigned iSM(const unsigned ism, const EcalSubdetector subdet)
static EcalSubdetector subDet(const EBDetId &id)
MonitorElement * bookInt(const char *name)
Book int.
MonitorElement * book2D(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY)
Book 2D histogram.
int ism(int ieta, int iphi)
void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
void Reset(void)
reset ME (ie. contents, errors, etc)
void endRun(const edm::Run &r, const edm::EventSetup &c)
EndRun.
void setCurrentFolder(const std::string &fullpath)