79 std::map<edm::EventNumber_t, long long>
_offsets;
110 produces<APVCyclePhaseCollection, edm::InEvent>();
137 edm::LogInfo(
"AbsoluteBXOffsetReset") <<
"Absolute BX offset map reset";
143 (*_hbx)->GetXaxis()->SetTitle(
"BX");
144 (*_hbx)->GetYaxis()->SetTitle(
"Events");
148 (*_hdbx)->GetXaxis()->SetTitle(
"#DeltaBX");
149 (*_hdbx)->GetYaxis()->SetTitle(
"Events");
153 (*_hdorbit)->GetXaxis()->SetTitle(
"#Deltaorbit");
154 (*_hdorbit)->GetYaxis()->SetTitle(
"Events");
159 edm::LogInfo(
"UnreliableMissingL1AcceptBunchCrossingCollection")
160 <<
"In this run L1AcceptBunchCrossingCollection is missing or unreliable: default phases will be used";
167 edm::LogInfo(
"L1AcceptBunchCrossingAbsoluteBXOffsetSummary") <<
"Absolute BX offset summary:";
195 for (L1AcceptBunchCrossingCollection::const_iterator l1abc = pIn->begin(); l1abc != pIn->end(); ++l1abc) {
196 if (l1abc->l1AcceptOffset() == 0) {
197 if (l1abc->eventType() != 0) {
198 orbitoffset = (
long long)iEvent.
orbitNumber() - (
long long)l1abc->orbitNumber();
203 (*_hbx)->Fill(l1abc->bunchCrossing());
205 (*_hdbx)->Fill(bxoffset);
207 (*_hdorbit)->Fill(orbitoffset);
210 edm::LogWarning(
"L1AcceptBunchCrossingNoType") <<
"L1AcceptBunchCrossing with no type found: ";
211 for (L1AcceptBunchCrossingCollection::const_iterator debu = pIn->begin(); debu != pIn->end(); ++debu) {
218 long long absbxoffset = orbitoffset * 3564 + bxoffset;
221 phasechange = (orbitoffset * 3564) % 70;
230 edm::LogInfo(
"L1AcceptBunchCrossingAbsoluteBXOffsetChanged")
231 <<
"Absolute BX offset changed from " <<
_curroffset <<
" to " << absbxoffset <<
" at orbit " 233 for (L1AcceptBunchCrossingCollection::const_iterator l1abc = pIn->begin(); l1abc != pIn->end(); ++l1abc) {
245 if (phases.size() < partnames.size()) {
248 <<
" Inconsistent phases/partitions vector sizes: " << phases.size() <<
" " << partnames.size();
251 for (
unsigned int ipart = 0; ipart < partnames.size(); ++ipart) {
252 if (phases[ipart] >= 0) {
253 apvphases->get()[partnames[ipart]] = (phases[ipart] + phasechange) % 70;
~APVCyclePhaseProducerFromL1ABC() override
EventNumber_t event() const
std::map< edm::EventNumber_t, long long > _offsets
RunHistogramManager m_rhm
const std::vector< std::string > _defpartnames
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
APVCyclePhaseProducerFromL1ABC(const edm::ParameterSet &)
bool getByToken(EDGetToken token, Handle< PROD > &result) const
void produce(edm::Event &, const edm::EventSetup &) override
int bunchCrossing() const
unsigned long long EventNumber_t
edm::EDGetTokenT< L1AcceptBunchCrossingCollection > _l1abccollectionToken
TH1F ** makeTH1F(const char *name, const char *title, const unsigned int nbinx, const double xmin, const double xmax)
#define DEFINE_FWK_MODULE(type)
void endRun(const edm::Run &, const edm::EventSetup &) override
ConsumesCollector consumesCollector()
Use a ConsumesCollector to gather consumes information from helper functions.
const unsigned int _firstgoodrun
std::vector< L1AcceptBunchCrossing > L1AcceptBunchCrossingCollection
void beginRun(const edm::Run &, const edm::EventSetup &) override
std::vector< int > phases
void beginRun(const edm::Run &iRun)
const int _orbitoffsetSOR
edm::EventNumber_t _curroffevent
EDGetTokenT< ProductType > mayConsume(edm::InputTag const &tag)
const std::vector< int > _defphases