66 bool isBadRun(
const unsigned int)
const;
81 std::vector<std::pair<unsigned int, unsigned int> >
m_badruns;
120 std::stringstream
ss;
122 edm::LogInfo(
"ConfigurationAtConstruction") << ss.str();
124 produces<APVCyclePhaseCollection, edm::InEvent>();
126 m_badruns.push_back(std::pair<unsigned int, unsigned int>(0, 131767));
127 m_badruns.push_back(std::pair<unsigned int, unsigned int>(193150, 193733));
156 LogDebug(
"SiStripConfObjectSummary") << summary.str();
158 _defpartnames = confObj->
get<std::vector<std::string> >(
"defaultPartitionNames");
159 _defphases = confObj->
get<std::vector<int> >(
"defaultPhases");
164 std::stringstream
ss;
170 LogDebug(
"UnreliableMissingL1TriggerScalers") <<
"In this run L1TriggerScalers is missing or unreliable for phase " 171 "determination: invlid phase will be returned";
191 long long orbitoffset = 0;
193 if (!l1ts->empty()) {
194 if ((*l1ts)[0].lastResync() != 0) {
224 phasechange = ((
long long)(orbitoffset * 3564)) % 70;
226 for (
unsigned int ipart = 0; ipart <
phases.size(); ++ipart) {
232 if (
phases.size() < partnames.size()) {
235 <<
" Inconsistent phases/partitions vector sizes: " <<
phases.size() <<
" " << partnames.size();
238 for (
unsigned int ipart = 0; ipart < partnames.size(); ++ipart) {
241 apvphases->get()[partnames[ipart]] =
phases[ipart];
250 for (std::vector<std::pair<unsigned int, unsigned int> >::const_iterator runpair =
m_badruns.begin();
253 if (run >= runpair->first && run <= runpair->
second)
266 ss <<
_defphases.size() <<
" default phases: ";
272 ss <<
" use ECO: " <<
_useEC0 << std::endl;
273 ss <<
" bad run: " <<
m_badRun << std::endl;
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
void printDebug(std::stringstream &ss, const TrackerTopology *trackerTopo) const
Prints the full list of parameters.
std::vector< std::string > _defpartnames
bool getByToken(EDGetToken token, Handle< PROD > &result) const
long long _lastOrbitCounter0
edm::ESWatcher< SiStripConfObjectRcd > m_eswatcher
void beginRun(const edm::Run &, const edm::EventSetup &) override
U second(std::pair< T, U > const &p)
#define DEFINE_FWK_MODULE(type)
void printConfiguration(std::stringstream &ss) const
~APVCyclePhaseProducerFromL1TS() override
bool isBadRun(const unsigned int) const
void produce(edm::Event &, const edm::EventSetup &) override
std::vector< int > phases
long long _lastTestEnable
std::vector< Level1TriggerScalers > Level1TriggerScalersCollection
valueType get(const std::string &name) const
bool check(const edm::EventSetup &iSetup)
std::vector< std::pair< unsigned int, unsigned int > > m_badruns
const std::string m_rcdLabel
long long _lastEventCounter0
APVCyclePhaseProducerFromL1TS(const edm::ParameterSet &)
std::vector< int > _defphases
T const * product() const
edm::EDGetTokenT< Level1TriggerScalersCollection > _l1tscollectionToken