CMS 3D CMS Logo

List of all members | Classes | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | Friends
edm::ServiceRegistry Class Reference

#include <ServiceRegistry.h>

Classes

class  Operate
 

Public Member Functions

template<typename T >
Tget () const
 
template<typename T >
bool isAvailable () const
 
ServiceRegistry const & operator= (ServiceRegistry const &)=delete
 
ServiceToken presentToken () const
 
 ServiceRegistry (ServiceRegistry const &)=delete
 
virtual ~ServiceRegistry ()
 

Static Public Member Functions

template<typename T >
static ServiceToken createContaining (std::unique_ptr< T > iService)
 create a service token that holds the service defined by iService More...
 
template<typename T >
static ServiceToken createContaining (std::unique_ptr< T > iService, ServiceToken iToken, bool iOverrideIfServiceInToken)
 
template<typename T >
static ServiceToken createContaining (std::shared_ptr< serviceregistry::ServiceWrapper< T > > iWrapper)
 create a service token that holds the service held by iWrapper More...
 
template<typename T >
static ServiceToken createContaining (std::shared_ptr< serviceregistry::ServiceWrapper< T > > iWrapper, ServiceToken iToken, serviceregistry::ServiceLegacy iLegacy)
 
static ServiceToken createServicesFromConfig (std::unique_ptr< ParameterSet > params)
 
static ServiceToken createSet (std::vector< ParameterSet > &)
 
static ServiceToken createSet (std::vector< ParameterSet > &, ServiceToken, serviceregistry::ServiceLegacy, bool associate=true)
 
static ServiceRegistryinstance ()
 

Private Member Functions

 ServiceRegistry ()
 
ServiceToken setContext (ServiceToken const &iNewToken)
 
void unsetContext (ServiceToken const &iOldToken)
 

Private Attributes

std::shared_ptr< serviceregistry::ServicesManagermanager_
 

Friends

class edm::FwkImpl
 
int main (int argc, char *argv[])
 
class Operate
 

Detailed Description

Definition at line 39 of file ServiceRegistry.h.

Constructor & Destructor Documentation

◆ ServiceRegistry() [1/2]

edm::ServiceRegistry::ServiceRegistry ( ServiceRegistry const &  )
delete

◆ ~ServiceRegistry()

ServiceRegistry::~ServiceRegistry ( )
virtual

Definition at line 36 of file ServiceRegistry.cc.

36 {}

◆ ServiceRegistry() [2/2]

ServiceRegistry::ServiceRegistry ( )
private

Definition at line 30 of file ServiceRegistry.cc.

30 {}

Member Function Documentation

◆ createContaining() [1/4]

template<typename T >
static ServiceToken edm::ServiceRegistry::createContaining ( std::unique_ptr< T iService)
inlinestatic

create a service token that holds the service defined by iService

Definition at line 102 of file ServiceRegistry.h.

References DMR_cfg::config, eostools::move(), and wrapper.

Referenced by edm::ScheduleItems::addCPRandTNS(), main(), edm::PileUp::PileUp(), and edm::setupSiteLocalConfig().

102  {
103  std::vector<edm::ParameterSet> config;
104  auto manager = std::make_shared<serviceregistry::ServicesManager>(config);
105  auto wrapper = std::make_shared<serviceregistry::ServiceWrapper<T> >(std::move(iService));
106  manager->put(wrapper);
107  return manager;
108  }
dictionary config
Read in AllInOne config in JSON format.
Definition: DMR_cfg.py:21
def move(src, dest)
Definition: eostools.py:511
static HepMC::HEPEVT_Wrapper wrapper

◆ createContaining() [2/4]

template<typename T >
static ServiceToken edm::ServiceRegistry::createContaining ( std::unique_ptr< T iService,
ServiceToken  iToken,
bool  iOverrideIfServiceInToken 
)
inlinestatic

Definition at line 110 of file ServiceRegistry.h.

References DMR_cfg::config, edm::serviceregistry::kOverlapIsError, eostools::move(), and wrapper.

112  {
113  std::vector<edm::ParameterSet> config;
114  auto manager =
115  std::make_shared<serviceregistry::ServicesManager>(iToken, serviceregistry::kOverlapIsError, config);
116  auto wrapper = std::make_shared<serviceregistry::ServiceWrapper<T> >(std::move(iService));
117  manager->put(wrapper, iOverrideIfServiceInToken);
118  return manager;
119  }
dictionary config
Read in AllInOne config in JSON format.
Definition: DMR_cfg.py:21
def move(src, dest)
Definition: eostools.py:511
static HepMC::HEPEVT_Wrapper wrapper

◆ createContaining() [3/4]

template<typename T >
static ServiceToken edm::ServiceRegistry::createContaining ( std::shared_ptr< serviceregistry::ServiceWrapper< T > >  iWrapper)
inlinestatic

create a service token that holds the service held by iWrapper

Definition at line 122 of file ServiceRegistry.h.

References DMR_cfg::config.

122  {
123  std::vector<edm::ParameterSet> config;
124  auto manager = std::make_shared<serviceregistry::ServicesManager>(config);
125  manager->put(iWrapper);
126  return manager;
127  }
dictionary config
Read in AllInOne config in JSON format.
Definition: DMR_cfg.py:21

◆ createContaining() [4/4]

template<typename T >
static ServiceToken edm::ServiceRegistry::createContaining ( std::shared_ptr< serviceregistry::ServiceWrapper< T > >  iWrapper,
ServiceToken  iToken,
serviceregistry::ServiceLegacy  iLegacy 
)
inlinestatic

Definition at line 129 of file ServiceRegistry.h.

References DMR_cfg::config.

131  {
132  std::vector<edm::ParameterSet> config;
133  auto manager = std::make_shared<serviceregistry::ServicesManager>(iToken, iLegacy, config);
134  manager->put(iWrapper);
135  return manager;
136  }
dictionary config
Read in AllInOne config in JSON format.
Definition: DMR_cfg.py:21

◆ createServicesFromConfig()

ServiceToken ServiceRegistry::createServicesFromConfig ( std::unique_ptr< ParameterSet params)
static

Definition at line 69 of file ServiceRegistry.cc.

References createSet(), submitPVValidationJobs::params, and AlCaHLTBitMon_QueryRunRegistry::string.

69  {
70  auto serviceSets = params->popVParameterSet(std::string("services"));
71  //create the services
72  return ServiceToken(ServiceRegistry::createSet(serviceSets));
73  }
static ServiceToken createSet(std::vector< ParameterSet > &)

◆ createSet() [1/2]

ServiceToken ServiceRegistry::createSet ( std::vector< ParameterSet > &  iPS)
static

Definition at line 75 of file ServiceRegistry.cc.

Referenced by createServicesFromConfig(), edm::ScheduleItems::initServices(), and cond::Utilities::run().

75  {
76  using namespace serviceregistry;
77  auto returnValue = std::make_shared<ServicesManager>(iPS);
78  return ServiceToken(returnValue);
79  }

◆ createSet() [2/2]

ServiceToken ServiceRegistry::createSet ( std::vector< ParameterSet > &  iPS,
ServiceToken  iToken,
serviceregistry::ServiceLegacy  iLegacy,
bool  associate = true 
)
static

Definition at line 81 of file ServiceRegistry.cc.

84  {
85  using namespace serviceregistry;
86  auto returnValue = std::make_shared<ServicesManager>(iToken, iLegacy, iPS, associate);
87  return ServiceToken(returnValue);
88  }

◆ get()

template<typename T >
T& edm::ServiceRegistry::get ( ) const
inline

Definition at line 63 of file ServiceRegistry.h.

References symbols::demangled, manager_, Skims_PA_cff::name, edm::errors::NotFound, edm::Exception::throwThis(), and edm::typeDemangle().

Referenced by Options.Options::__getitem__(), betterConfigParser.BetterConfigParser::__updateDict(), submitPVValidationJobs.BetterConfigParser::__updateDict(), rrapi.RRApi::columns(), rrapi.RRApi::count(), rrapi.RRApi::data(), betterConfigParser.BetterConfigParser::getCompares(), betterConfigParser.BetterConfigParser::getGeneral(), betterConfigParser.BetterConfigParser::getResultingSection(), submitPVValidationJobs.BetterConfigParser::getResultingSection(), edm::EventProcessor::init(), edm::ScheduleItems::initSchedule(), rrapi.RRApi::report(), rrapi.RRApi::reports(), rrapi.RRApi::tables(), rrapi.RRApi::tags(), rrapi.RRApi::templates(), and rrapi.RRApi::workspaces().

63  {
64  if (nullptr == manager_.get()) {
65  auto demangled = typeDemangle(typeid(T).name());
67  "No ServiceRegistry has been set for this thread. Tried to get a Service ",
68  demangled.c_str());
69  }
70  return manager_->template get<T>();
71  }
static void throwThis(Code category, char const *message0="", char const *message1="", char const *message2="", char const *message3="", char const *message4="")
Definition: EDMException.cc:86
demangled
Definition: symbols.py:70
std::string typeDemangle(char const *mangledName)
long double T
std::shared_ptr< serviceregistry::ServicesManager > manager_

◆ instance()

ServiceRegistry & ServiceRegistry::instance ( )
static

◆ isAvailable()

template<typename T >
bool edm::ServiceRegistry::isAvailable ( ) const
inline

Definition at line 74 of file ServiceRegistry.h.

References symbols::demangled, manager_, Skims_PA_cff::name, edm::errors::NotFound, edm::Exception::throwThis(), and edm::typeDemangle().

74  {
75  if (nullptr == manager_.get()) {
76  auto demangled = typeDemangle(typeid(T).name());
78  "No ServiceRegistry has been set for this thread. Tried to ask availability of a Service ",
79  demangled.c_str());
80  }
81  return manager_->template isAvailable<T>();
82  }
static void throwThis(Code category, char const *message0="", char const *message1="", char const *message2="", char const *message3="", char const *message4="")
Definition: EDMException.cc:86
demangled
Definition: symbols.py:70
std::string typeDemangle(char const *mangledName)
long double T
std::shared_ptr< serviceregistry::ServicesManager > manager_

◆ operator=()

ServiceRegistry const& edm::ServiceRegistry::operator= ( ServiceRegistry const &  )
delete

◆ presentToken()

ServiceToken ServiceRegistry::presentToken ( ) const

◆ setContext()

ServiceToken ServiceRegistry::setContext ( ServiceToken const &  iNewToken)
private

Definition at line 52 of file ServiceRegistry.cc.

References edm::ServiceToken::manager_, and manager_.

52  {
53  ServiceToken returnValue(manager_);
54  manager_ = iNewToken.manager_;
55  return returnValue;
56  }
std::shared_ptr< serviceregistry::ServicesManager > manager_

◆ unsetContext()

void ServiceRegistry::unsetContext ( ServiceToken const &  iOldToken)
private

Definition at line 58 of file ServiceRegistry.cc.

References edm::ServiceToken::manager_, and manager_.

Referenced by edm::ServiceRegistry::Operate::~Operate().

58 { manager_ = iOldToken.manager_; }
std::shared_ptr< serviceregistry::ServicesManager > manager_

Friends And Related Function Documentation

◆ edm::FwkImpl

friend class edm::FwkImpl
friend

Definition at line 53 of file ServiceRegistry.h.

◆ main

int main ( int  argc,
char *  argv[] 
)
friend

===============================================================================================================================================================================================


variant2: for each run define phi-averaged A for normalization channel (Dref,16) and then, divide Rijk on it, i.e. get RRijk




















































































eta=27

eta=25

eta=23

eta=22

eta=21

eta=26

eta=24

eta=19

eta=17

eta=25

eta=23

eta=22

eta=21

eta=26

eta=24

eta=20

eta=19

eta=18

eta=27 L1=1

eta=25 L1=1

eta=23 L1=1

eta=22 L1=1

eta=21 L1=1

eta=29 L1=1

eta=26 L1=1

eta=24 L1=1

eta=20 L1=1

eta=19 L1=1

eta=18 L1=1

eta=17 L1=1

eta=28 L7=1

eta=27 L7=1

eta=25 L7=1

eta=23 L7=1

eta=22 L7=1

eta=21 L7=1

eta=26 L7=1

eta=24 L7=1

eta=20 L7=1

eta=19 L7=1

eta=18 L7=1

eta=17 L7=1

eta=27

eta=25

eta=23

eta=22

eta=21

eta=26

eta=24

eta=19

eta=17

eta=25

eta=23

eta=22

eta=21

eta=26

eta=24

eta=20

eta=19

eta=18

eta=27 L1=1

eta=25 L1=1

eta=23 L1=1

eta=22 L1=1

eta=21 L1=1

eta=26 L1=1

eta=24 L1=1

eta=20 L1=1

eta=19 L1=1

eta=18 L1=1

eta=17 L1=1

eta=28 L7=1

eta=27 L7=1

eta=25 L7=1

eta=23 L7=1

eta=22 L7=1

eta=21 L7=1

eta=26 L7=1

eta=24 L7=1

eta=20 L7=1

eta=19 L7=1

eta=18 L7=1

eta=17 L7=1

eta=27

eta=28

errA with average Amplitudes

errA with average Amplitudes

errA with average Amplitudes

errA with average Amplitudes

Summed Amplitude Plots:





Summed Amplitude Plots:

Summed Amplitude Plots:

Summed Amplitude Plots:

Summed Amplitude Plots:

Summed Amplitude Plots:

RBX:

errA with average Amplitudes

errA with average Amplitudes

errA with average Amplitudes

errA with average Amplitudes

Summed Amplitude Plots:





Summed Amplitude Plots:

Summed Amplitude Plots:

Summed Amplitude Plots:

Summed Amplitude Plots:

Summed Amplitude Plots:

RBX:

errA with average Amplitudes

errA with average Amplitudes

errA with average Amplitudes

errA with average Amplitudes

Summed Amplitude Plots:





Summed Amplitude Plots:

Summed Amplitude Plots:

Summed Amplitude Plots:

Summed Amplitude Plots:

Summed Amplitude Plots:

RBX:

Prepare maps of good/bad channels:

Prepare maps of good/bad channels:

Prepare maps of good/bad channels:

Prepare maps of good/bad channels:


CALO JETS


PF JETS

Definition at line 137 of file DMRmerge.cc.

137 { return exceptions<merge>(argc, argv); }

◆ Operate

friend class Operate
friend

Definition at line 55 of file ServiceRegistry.h.

Referenced by edm::setupSiteLocalConfig().

Member Data Documentation

◆ manager_

std::shared_ptr<serviceregistry::ServicesManager> edm::ServiceRegistry::manager_
private

Definition at line 146 of file ServiceRegistry.h.

Referenced by get(), isAvailable(), presentToken(), setContext(), and unsetContext().