FWCore
Framework
src
ScheduleInfo.cc
Go to the documentation of this file.
1
// -*- C++ -*-
2
//
3
// Package: Framework
4
// Class : ScheduleInfo
5
//
6
// Implementation:
7
// [Notes on implementation]
8
//
9
// Original Author: Chris Jones
10
// Created: Thu Jul 15 19:40:14 CEST 2010
11
//
12
13
// system include files
14
#include <algorithm>
15
#include <iterator>
16
#include <functional>
17
18
// user include files
19
#include "
FWCore/Framework/interface/ScheduleInfo.h
"
20
#include "
FWCore/Framework/interface/Schedule.h
"
21
22
#include "
FWCore/ParameterSet/interface/Registry.h
"
23
24
using namespace
edm
;
25
//
26
// constants, enums and typedefs
27
//
28
29
//
30
// static data member definitions
31
//
32
33
//
34
// constructors and destructor
35
//
36
ScheduleInfo::ScheduleInfo
(
const
Schedule
* iSchedule) : schedule_(iSchedule) {}
37
38
// ScheduleInfo::ScheduleInfo(const ScheduleInfo& rhs)
39
// {
40
// // do actual copying here;
41
// }
42
43
ScheduleInfo::~ScheduleInfo
() {}
44
45
//
46
// assignment operators
47
//
48
// const ScheduleInfo& ScheduleInfo::operator=(const ScheduleInfo& rhs)
49
// {
50
// //An exception safe implementation is
51
// ScheduleInfo temp(rhs);
52
// swap(rhs);
53
//
54
// return *this;
55
// }
56
57
//
58
// member functions
59
//
60
61
//
62
// const member functions
63
//
64
void
ScheduleInfo::availableModuleLabels
(std::vector<std::string>& oLabelsToFill)
const
{
65
using
std::placeholders::_1;
66
std::vector<ModuleDescription const*> desc =
schedule_
->
getAllModuleDescriptions
();
67
68
oLabelsToFill.reserve(oLabelsToFill.size() + desc.size());
69
std::transform
(
70
desc.begin(), desc.end(), std::back_inserter(oLabelsToFill), std::bind(&
ModuleDescription::moduleLabel
, _1));
71
}
72
73
const
ParameterSet
*
ScheduleInfo::parametersForModule
(
const
std::string
& iLabel)
const
{
74
using
std::placeholders::_1;
75
std::vector<ModuleDescription const*> desc =
schedule_
->
getAllModuleDescriptions
();
76
77
std::vector<ModuleDescription const*>::iterator itFound =
78
std::find_if(desc.begin(),
79
desc.end(),
80
std::bind(std::equal_to<std::string>(), iLabel, std::bind(&
ModuleDescription::moduleLabel
, _1)));
81
if
(itFound == desc.end()) {
82
return
nullptr
;
83
}
84
return
pset::Registry::instance
()->
getMapped
((*itFound)->parameterSetID());
85
}
86
87
void
ScheduleInfo::availablePaths
(std::vector<std::string>& oLabelsToFill)
const
{
88
schedule_
->
availablePaths
(oLabelsToFill);
89
}
90
91
void
ScheduleInfo::modulesInPath
(
const
std::string
& iPathLabel, std::vector<std::string>& oLabelsToFill)
const
{
92
schedule_
->
modulesInPath
(iPathLabel, oLabelsToFill);
93
}
94
95
//
96
// static member functions
97
//
edm::pset::Registry::instance
static Registry * instance()
Definition:
Registry.cc:12
edm::ModuleDescription::moduleLabel
std::string const & moduleLabel() const
Definition:
ModuleDescription.h:43
edm::ScheduleInfo::modulesInPath
void modulesInPath(const std::string &iPathLabel, std::vector< std::string > &oLabelsToFill) const
add to oLabelsToFill in execution order the labels of all modules in path iPathLabel
Definition:
ScheduleInfo.cc:91
ScheduleInfo.h
edm::Schedule::modulesInPath
void modulesInPath(std::string const &iPathLabel, std::vector< std::string > &oLabelsToFill) const
adds to oLabelsToFill in execution order the labels of all modules in path iPathLabel
Definition:
Schedule.cc:1338
edm
HLT enums.
Definition:
AlignableModifier.h:19
edm::ScheduleInfo::availablePaths
void availablePaths(std::vector< std::string > &oLabelsToFill) const
adds to oLabelsToFill the labels for all paths in the process
Definition:
ScheduleInfo.cc:87
edm::Schedule::availablePaths
void availablePaths(std::vector< std::string > &oLabelsToFill) const
adds to oLabelsToFill the labels for all paths in the process
Definition:
Schedule.cc:1330
edm::Schedule
Definition:
Schedule.h:122
edm::ScheduleInfo::parametersForModule
const edm::ParameterSet * parametersForModule(const std::string &iLabel) const
Definition:
ScheduleInfo.cc:73
HcalDetIdTransform::transform
unsigned transform(const HcalDetId &id, unsigned transformCode)
Definition:
HcalDetIdTransform.cc:7
edm::ScheduleInfo::schedule_
const Schedule * schedule_
Definition:
ScheduleInfo.h:62
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition:
AlCaHLTBitMon_QueryRunRegistry.py:256
edm::ParameterSet
Definition:
ParameterSet.h:36
Schedule.h
Registry.h
edm::ScheduleInfo::availableModuleLabels
void availableModuleLabels(std::vector< std::string > &oLabelsToFill) const
adds to oLabelsToFill the labels for all modules used in the process
Definition:
ScheduleInfo.cc:64
edm::ScheduleInfo::ScheduleInfo
ScheduleInfo(const Schedule *)
Definition:
ScheduleInfo.cc:36
edm::ScheduleInfo::~ScheduleInfo
virtual ~ScheduleInfo()
Definition:
ScheduleInfo.cc:43
edm::Schedule::getAllModuleDescriptions
std::vector< ModuleDescription const * > getAllModuleDescriptions() const
Definition:
Schedule.cc:1311
edm::pset::Registry::getMapped
bool getMapped(key_type const &k, value_type &result) const
Definition:
Registry.cc:17
Generated for CMSSW Reference Manual by
1.8.16