CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
ApvFactoryService Class Reference

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

#include <ApvFactoryService.h>

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 32 of file ApvFactoryService.h.

Constructor & Destructor Documentation

◆ ApvFactoryService()

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 16 of file ApvFactoryService.cc.

References apvFactory_, gather_cfg::cout, and muonDTDigis_cfi::pset.

16  : apvFactory_() {
18  std::cout << " Print pedalgo inside ApvFactoryService constructor "
19  << pset.getParameter<string>("CalculatorAlgorithm") << std::endl;
20  // activity.watchPostProcessEvent(this, &ApvFactoryService::postProcessEvent);
21 }
ApvAnalysisFactory * apvFactory_

◆ ~ApvFactoryService()

ApvFactoryService::~ApvFactoryService ( )

Default destructor.

Definition at line 25 of file ApvFactoryService.cc.

25 {}

Member Function Documentation

◆ getApvFactory()

ApvAnalysisFactory *const ApvFactoryService::getApvFactory ( ) const

Definition at line 79 of file ApvFactoryService.cc.

References apvFactory_.

79 { return apvFactory_; }
ApvAnalysisFactory * apvFactory_

◆ getEventInitNumber()

int ApvFactoryService::getEventInitNumber ( )

Definition at line 73 of file ApvFactoryService.cc.

73 { return 0; }

◆ postProcessEvent()

void ApvFactoryService::postProcessEvent ( const edm::Event ie,
const edm::EventSetup ies 
)

Definition at line 29 of file ApvFactoryService.cc.

References gotPed.

29  {
30  if (gotPed)
31  return;
32 
33  /*
34  std::cout << "ApvFactoryService::post" << std::endl;
35 
36  edm::ESHandle<SiStripPedestals> ped;
37  ies.get<SiStripPedestalsRcd>().get(ped);
38 
39  //apvFactory_->SetPed(ped);
40 
41  gotPed=true;
42 
43 
44  std::vector<uint32_t> pdetid;
45  ped->getDetIds(pdetid);
46  edm::LogInfo("SiStripO2O") << " Peds Found " << pdetid.size() << " DetIds";
47 
48  // pedDB_=ped;
49 
50  for (size_t id=0;id<pdetid.size();id++){
51  SiStripPedestals::Range range=ped->getRange(pdetid[id]);
52  // SiStripPedestals::Range range=pedDB_.getRange(pdetid[id]);
53  int strip=0;
54 
55  edm::LogInfo("SiStripO2O") << "PED detid " << pdetid[id] << " \t"
56  << " strip " << strip << " \t"
57  << ped->getPed (strip,range) << " \t"
58  << ped->getLowTh (strip,range) << " \t"
59  << ped->getHighTh(strip,range) << " \t"
60  << std::endl;
61 
62  }
63 
64 */
65 }

Member Data Documentation

◆ apvFactory_

ApvAnalysisFactory* ApvFactoryService::apvFactory_
private

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 59 of file ApvFactoryService.h.

Referenced by ApvFactoryService(), and getApvFactory().

◆ gotPed

bool ApvFactoryService::gotPed
private

Definition at line 61 of file ApvFactoryService.h.

Referenced by postProcessEvent().