22 if(verbose_)
cout <<
"L1TLTC: constructor...." << endl;
33 if ( outputFile_.size() != 0 ) {
34 cout <<
"L1T Monitoring histograms will be saved to " << outputFile_.c_str() << endl;
44 dbe->setCurrentFolder(
"L1T/L1TLTC");
65 dbe->
rmdir(
"L1T/L1TLTC");
72 h1 = dbe->
book1D(
"Bunch",
"Bunch Number", 100, -0.5, 5000.) ;
73 h2 = dbe->
book1D(
"Orbit",
"Orbit Number", 100, -0.5, 100000. ) ;
74 h3 = dbe->
book1D(
"Triggers",
"Triggers", 8, -0.5, 7.5 ) ;
79 n_inhibit = dbe->
bookInt(
"n_inhibit");
82 gps_time = dbe->
bookInt(
"gps_time");
89 if(verbose_)
cout <<
"L1TLTC: end job...." << endl;
90 LogInfo(
"EndJob") <<
"analyzed " << nev_ <<
" events";
92 if ( outputFile_.size() != 0 && dbe ) dbe->save(outputFile_);
100 if(verbose_)
cout <<
"L1TLTC: analyze...." << endl;
105 edm::LogInfo(
"DataNotFound") <<
"can't find LTCDigiCollection ";
109 for( LTCDigiCollection::const_iterator digiItr = digis->begin() ;
110 digiItr != digis->end() ;
113 h1->Fill( digiItr->bunchNumber() ) ;
114 h2->Fill( digiItr->orbitNumber() ) ;
116 for(
int i = 0 ;
i < 6 ; ++
i ) {
117 h3->Fill(
i, ( digiItr->HasTriggered(
i ) ? 1 : 0 ) ) ;
120 h3->Fill( 6, digiItr->ramTrigger() ) ;
121 h3->Fill( 7, digiItr->vmeTrigger() ) ;
123 unsigned int setbits = digiItr->externTriggerMask();
125 if ( digiItr->ramTrigger() ) {
126 setbits |= (0x1UL<<7);
128 if ( digiItr->vmeTrigger() ) {
129 setbits |= (0x1UL<<8);
131 for (
int i = 0;
i < 8; ++
i ) {
132 if ( setbits & (0x1UL<<
i) ) {
133 for (
int j =
i;
j < 8; ++
j ) {
134 if ( setbits & (0x1UL<<
j) ) {
142 n_inhibit->Fill(digiItr->triggerInhibitNumber());
143 run ->Fill(digiItr->runNumber());
144 event ->Fill(digiItr->eventNumber());
145 gps_time ->Fill(digiItr->bstGpsTime());
T getUntrackedParameter(std::string const &, T const &) const
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
void rmdir(const std::string &fullpath)
void analyze(const edm::Event &e, const edm::EventSetup &c)
bool getByType(Handle< PROD > &result) const
L1TLTC(const edm::ParameterSet &ps)
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.
void setCurrentFolder(const std::string &fullpath)