67 bool isBadRun(
const unsigned int)
const;
82 std::vector<std::pair<unsigned int, unsigned int> >
m_badruns;
121 std::stringstream ss;
123 edm::LogInfo(
"ConfigurationAtConstruction") << ss.str();
126 produces<APVCyclePhaseCollection,edm::InEvent>();
128 m_badruns.push_back(std::pair<unsigned int, unsigned int>(0,131767));
129 m_badruns.push_back(std::pair<unsigned int, unsigned int>(193150,193733));
166 LogDebug(
"SiStripConfObjectSummary") << summary.str();
168 _defpartnames = confObj->
get<std::vector<std::string> >(
"defaultPartitionNames");
169 _defphases = confObj->
get<std::vector<int> >(
"defaultPhases");
174 std::stringstream ss;
182 LogDebug(
"UnreliableMissingL1TriggerScalers") <<
183 "In this run L1TriggerScalers is missing or unreliable for phase determination: invlid phase will be returned";
209 long long orbitoffset = 0;
213 if((*l1ts)[0].lastResync()!=0) {
243 phasechange = ((
long long)(orbitoffset*3564))%70;
245 for(
unsigned int ipart=0;ipart<
phases.size();++ipart) {
253 if(
phases.size() < partnames.size() ) {
255 throw cms::Exception(
"InvalidAPVCyclePhases") <<
" Inconsistent phases/partitions vector sizes: " 260 for(
unsigned int ipart=0;ipart<partnames.size();++ipart) {
263 apvphases->get()[partnames[ipart]] =
phases[ipart];
276 for(std::vector<std::pair<unsigned int, unsigned int> >::const_iterator runpair =
m_badruns.begin();runpair!=
m_badruns.end();++runpair) {
277 if( run >= runpair->first && run <= runpair->
second)
return true;
292 ss <<
_defphases.size() <<
" default phases: ";
298 ss <<
" use ECO: " <<
_useEC0 << std::endl;
299 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
#define DEFINE_FWK_MODULE(type)
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)
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