CMS 3D CMS Logo

Public Member Functions | Private Attributes

ApvFactoryService Class Reference

An interface class to set the parameter in ApvAnalysisFactory. More...

#include <ApvFactoryService.h>

List of all members.

Public Member Functions

 ApvFactoryService (const edm::ParameterSet &, edm::ActivityRegistry &)
ApvAnalysisFactory *const getApvFactory () const
int getEventInitNumber ()
void postProcessEvent (const edm::Event &ie, const edm::EventSetup &ies)
 ~ApvFactoryService ()

Private Attributes

ApvAnalysisFactoryapvFactory_
bool gotPed

Detailed Description

An interface class to set the parameter in ApvAnalysisFactory.

Definition at line 34 of file ApvFactoryService.h.


Constructor & Destructor Documentation

ApvFactoryService::ApvFactoryService ( const edm::ParameterSet pset,
edm::ActivityRegistry activity 
)

Constructor when using the "service" mode, which takes as an argument a ParameterSet (containing the database connection parameters).

Definition at line 18 of file ApvFactoryService.cc.

References apvFactory_, gather_cfg::cout, and edm::ParameterSet::getParameter().

                                                                      :
  apvFactory_()
{
 
  apvFactory_= new ApvAnalysisFactory(pset);
  std::cout << " Print pedalgo inside ApvFactoryService constructor " << pset.getParameter<string>("CalculatorAlgorithm") << std::endl;
//  activity.watchPostProcessEvent(this, &ApvFactoryService::postProcessEvent);

 
  
}
ApvFactoryService::~ApvFactoryService ( )

Default destructor.

Definition at line 33 of file ApvFactoryService.cc.

                                      {
}

Member Function Documentation

ApvAnalysisFactory *const ApvFactoryService::getApvFactory ( ) const

Definition at line 97 of file ApvFactoryService.cc.

References apvFactory_.

                                                                  {
 
return apvFactory_;

}
int ApvFactoryService::getEventInitNumber ( )

Definition at line 88 of file ApvFactoryService.cc.

                                          {
  return 0;
}
void ApvFactoryService::postProcessEvent ( const edm::Event ie,
const edm::EventSetup ies 
)

Definition at line 39 of file ApvFactoryService.cc.

References gotPed.

                                                                                    {

  if (gotPed) 
    return;

/*
  std::cout << "ApvFactoryService::post" << std::endl;

  edm::ESHandle<SiStripPedestals> ped;
  ies.get<SiStripPedestalsRcd>().get(ped);

  //apvFactory_->SetPed(ped);

  gotPed=true;

 
  std::vector<uint32_t> pdetid;
  ped->getDetIds(pdetid);
  edm::LogInfo("SiStripO2O") << " Peds Found " << pdetid.size() << " DetIds";

  // pedDB_=ped;
  
 for (size_t id=0;id<pdetid.size();id++){
    SiStripPedestals::Range range=ped->getRange(pdetid[id]);
   //   SiStripPedestals::Range range=pedDB_.getRange(pdetid[id]);
    int strip=0;
   
   edm::LogInfo("SiStripO2O")  << "PED detid " << pdetid[id] << " \t"
                            << " strip " << strip << " \t"
                            << ped->getPed   (strip,range)   << " \t" 
                            << ped->getLowTh (strip,range)   << " \t" 
                            << ped->getHighTh(strip,range)   << " \t" 
                            << std::endl;     

  } 
 
*/


}

Member Data Documentation

Class that holds addresses that uniquely identify a hardware component within the control system. Instance of struct that holds all DB connection parameters.

Definition at line 66 of file ApvFactoryService.h.

Referenced by ApvFactoryService(), and getApvFactory().

bool ApvFactoryService::gotPed [private]

Definition at line 68 of file ApvFactoryService.h.

Referenced by postProcessEvent().