67 bool isBadRun(
const unsigned int)
const;
82 std::vector<std::pair<unsigned int, unsigned int> >
m_badruns;
113 _useEC0(iConfig.getUntrackedParameter<bool>(
"useEC0",
false)),
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));
163 LogDebug(
"SiStripConfObjectSummary") << summary.str();
165 _defpartnames = confObj->
get<std::vector<std::string> >(
"defaultPartitionNames");
166 _defphases = confObj->
get<std::vector<int> >(
"defaultPhases");
171 std::stringstream ss;
179 LogDebug(
"UnreliableMissingL1TriggerScalers") <<
180 "In this run L1TriggerScalers is missing or unreliable for phase determination: invlid phase will be returned";
206 long long orbitoffset = 0;
210 if((*l1ts)[0].lastResync()!=0) {
240 phasechange = ((
long long)(orbitoffset*3564))%70;
242 for(
unsigned int ipart=0;ipart<
phases.size();++ipart) {
250 if(
phases.size() < partnames.size() ) {
252 throw cms::Exception(
"InvalidAPVCyclePhases") <<
" Inconsistent phases/partitions vector sizes: " 257 for(
unsigned int ipart=0;ipart<partnames.size();++ipart) {
260 apvphases->get()[partnames[ipart]] =
phases[ipart];
273 for(std::vector<std::pair<unsigned int, unsigned int> >::const_iterator runpair =
m_badruns.begin();runpair!=
m_badruns.end();++runpair) {
274 if( run >= runpair->first && run <= runpair->
second)
return true;
289 ss <<
_defphases.size() <<
" default phases: ";
295 ss <<
" use ECO: " <<
_useEC0 << std::endl;
296 ss <<
" bad run: " <<
m_badRun << std::endl;
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
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
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
virtual void beginRun(const edm::Run &, const edm::EventSetup &) override
U second(std::pair< T, U > const &p)
void printConfiguration(std::stringstream &ss) const
bool isBadRun(const unsigned int) const
virtual void produce(edm::Event &, const edm::EventSetup &) override
std::vector< int > phases
long long _lastTestEnable
void printDebug(std::stringstream &ss) const
Prints the full list of parameters.
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
~APVCyclePhaseProducerFromL1TS()
edm::EDGetTokenT< Level1TriggerScalersCollection > _l1tscollectionToken