void 
 SleepingProducer::produce(edm::Event& iEvent) {
   //printf("Producer %s\n",label().c_str());
   int sum=0;
   for(std::vector<const Getter*>::iterator it = m_getters.begin(), itEnd=m_getters.end();
       it != itEnd;
       ++it) {
     sum +=iEvent.get(*it);
     //printf("%s got %s with value %i\n",label().c_str(), (*it)->label().c_str(), iEvent.get((*it)));
   }
   wait(iEvent);
   iEvent.put(this,"",static_cast<int>(sum));
 }
Exemplo n.º 2
0
 bool 
 SleepingPassFilter::filter(const edm::Event& iEvent) {
   //printf("Producer %s\n",label().c_str());
   int sum=0;
   for(std::vector<const Getter*>::iterator it = m_getters.begin(), itEnd=m_getters.end();
       it != itEnd;
       ++it) {
     sum +=iEvent.get(*it);
     //printf("%s got %s with value %i\n",label().c_str(), (*it)->label().c_str(), iEvent.get((*it)));
   }
   wait(iEvent);
   return true;
 }
 bool 
 EventTimesPassFilterBase::filter(const edm::Event& iEvent) {
   //printf("Producer %s\n",label().c_str());
   int sum=0;
   for(std::vector<const Getter*>::iterator it = m_getters.begin(), itEnd=m_getters.end();
       it != itEnd;
       ++it) {
     sum +=iEvent.get(*it);
     //printf("%s got %s with value %i\n",label().c_str(), (*it)->label().c_str(), iEvent.get((*it)));
   }
   unsigned long index = iEvent.index() % m_eventTimes.size();
   
   wait(m_eventTimes[index]);
   return true;
 }