1 |
bendavid |
1.1 |
#ifndef HLTcore_HLTConfigProvider_h
|
2 |
|
|
#define HLTcore_HLTConfigProvider_h
|
3 |
|
|
|
4 |
|
|
/** \class HLTConfigProvider
|
5 |
|
|
*
|
6 |
|
|
*
|
7 |
|
|
* This class provides access routines to get hold of the HLT Configuration
|
8 |
|
|
*
|
9 |
bendavid |
1.2 |
* $Date: 2009/12/15 00:45:49 $
|
10 |
|
|
* $Revision: 1.1 $
|
11 |
bendavid |
1.1 |
*
|
12 |
|
|
* \author Martin Grunewald
|
13 |
|
|
*
|
14 |
|
|
*/
|
15 |
|
|
|
16 |
|
|
#include "FWCore/ParameterSet/interface/Registry.h"
|
17 |
|
|
#include "FWCore/ParameterSet/interface/ParameterSet.h"
|
18 |
|
|
|
19 |
|
|
#include<string>
|
20 |
|
|
#include<vector>
|
21 |
|
|
|
22 |
|
|
//
|
23 |
|
|
// class declaration
|
24 |
|
|
//
|
25 |
|
|
namespace mitedm {
|
26 |
|
|
|
27 |
|
|
class HLTConfigProvider {
|
28 |
|
|
|
29 |
|
|
public:
|
30 |
|
|
|
31 |
|
|
/// init everytime the HLT config changes (eg, beginRun)
|
32 |
|
|
bool init(const edm::ParameterSetID &psetid);
|
33 |
|
|
|
34 |
|
|
|
35 |
|
|
/// dump config aspects to cout
|
36 |
|
|
void dump(const std::string& what) const;
|
37 |
|
|
|
38 |
|
|
/// accessors
|
39 |
|
|
|
40 |
|
|
/// number of trigger paths in trigger table
|
41 |
|
|
unsigned int size() const;
|
42 |
|
|
/// number of modules on a specific trigger path
|
43 |
|
|
unsigned int size(unsigned int trigger) const;
|
44 |
|
|
unsigned int size(const std::string& trigger) const;
|
45 |
|
|
|
46 |
|
|
/// HLT ConfDB table name
|
47 |
|
|
const std::string& tableName() const;
|
48 |
|
|
|
49 |
|
|
/// names of trigger paths
|
50 |
|
|
const std::vector<std::string>& triggerNames() const;
|
51 |
|
|
const std::string& triggerName(unsigned int triggerIndex) const;
|
52 |
|
|
/// slot position of trigger path in trigger table (0 - size-1)
|
53 |
|
|
unsigned int triggerIndex(const std::string& triggerName) const;
|
54 |
|
|
|
55 |
|
|
/// label(s) of module(s) on a trigger path
|
56 |
|
|
const std::vector<std::string>& moduleLabels(unsigned int trigger) const;
|
57 |
|
|
const std::vector<std::string>& moduleLabels(const std::string& trigger) const;
|
58 |
|
|
const std::string& moduleLabel(unsigned int trigger, unsigned int module) const;
|
59 |
|
|
const std::string& moduleLabel(const std::string& trigger, unsigned int module) const;
|
60 |
|
|
|
61 |
|
|
/// slot position of module on trigger path (0 - size-1)
|
62 |
|
|
unsigned int moduleIndex(unsigned int trigger, const std::string& module) const;
|
63 |
|
|
unsigned int moduleIndex(const std::string& trigger, const std::string& module) const;
|
64 |
|
|
|
65 |
|
|
/// C++ class name of module
|
66 |
|
|
const std::string moduleType(const std::string& module) const;
|
67 |
|
|
|
68 |
|
|
/// ParameterSet of module
|
69 |
|
|
const edm::ParameterSet modulePSet(const std::string& module) const;
|
70 |
|
|
|
71 |
|
|
|
72 |
|
|
/// c'tor
|
73 |
|
|
HLTConfigProvider():
|
74 |
|
|
processName_(""), registry_(), ProcessPSet_(),
|
75 |
|
|
tableName_(), triggerNames_(), moduleLabels_(),
|
76 |
|
|
triggerIndex_(), moduleIndex_(),
|
77 |
|
|
pathNames_(), endpathNames_() { }
|
78 |
|
|
|
79 |
|
|
private:
|
80 |
|
|
|
81 |
|
|
std::string processName_;
|
82 |
|
|
|
83 |
|
|
const edm::pset::Registry * registry_;
|
84 |
|
|
|
85 |
|
|
edm::ParameterSet ProcessPSet_;
|
86 |
|
|
|
87 |
|
|
std::string tableName_;
|
88 |
|
|
std::vector<std::string> triggerNames_;
|
89 |
|
|
std::vector<std::vector<std::string> > moduleLabels_;
|
90 |
|
|
|
91 |
|
|
std::map<std::string,unsigned int> triggerIndex_;
|
92 |
|
|
std::vector<std::map<std::string,unsigned int> > moduleIndex_;
|
93 |
|
|
|
94 |
|
|
std::vector<std::string> pathNames_;
|
95 |
|
|
std::vector<std::string> endpathNames_;
|
96 |
|
|
|
97 |
|
|
};
|
98 |
|
|
}
|
99 |
|
|
#endif
|