CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
BranchType.cc
Go to the documentation of this file.
2 #include <iostream>
3 
4 namespace edm {
5  std::ostream&
6  operator<<(std::ostream& os, BranchType const& branchType) {
7  os << BranchTypeToString(branchType);
8  return os;
9  }
10  namespace {
11 
12  // Suffixes
13  std::string const metaData = "MetaData";
14  std::string const auxiliary = "Auxiliary";
15  std::string const aux = "Aux"; // backward compatibility
16  std::string const productStatus = "ProductStatus";
17  std::string const branchEntryInfo = "BranchEntryInfo"; // backward compatibility
18  std::string const productProvenance = "ProductProvenance";
19 
20  // Prefixes
21  std::string const run = "Run";
22  std::string const lumi = "LuminosityBlock";
23  std::string const event = "Event";
24 
25  // Trees, branches, indices
26  std::string const runs = run + 's';
27  std::string const lumis = lumi + 's';
28  std::string const events = event + 's';
29 
30  std::string const runMeta = run + metaData;
31  std::string const lumiMeta = lumi + metaData;
32  std::string const eventMeta = event + metaData;
33 
34  std::string const runInfo = run + "StatusInformation"; // backward compatibility
35  std::string const lumiInfo = lumi + "StatusInformation"; // backward compatibility
36  std::string const eventInfo = event + "StatusInformation"; // backward compatibility
37 
38  std::string const runAuxiliary = run + auxiliary;
39  std::string const lumiAuxiliary = lumi + auxiliary;
40  std::string const eventAuxiliary = event + auxiliary;
41 
42  std::string const runProductStatus = run + productStatus; // backward compatibility
43  std::string const lumiProductStatus = lumi + productStatus; // backward compatibility
44  std::string const eventProductStatus = event + productStatus; // backward compatibility
45 
46  std::string const runEventEntryInfo = run + branchEntryInfo; // backward compatibility
47  std::string const lumiEventEntryInfo = lumi + branchEntryInfo; // backward compatibility
48  std::string const eventEventEntryInfo = event + branchEntryInfo; // backward compatibility
49 
50  std::string const runProductProvenance = run + productProvenance;
51  std::string const lumiProductProvenance = lumi + productProvenance;
52  std::string const eventProductProvenance = event + productProvenance;
53 
54 
55  std::string const majorIndex = ".id_.run_";
56  std::string const runMajorIndex = runAuxiliary + majorIndex;
57  std::string const lumiMajorIndex = lumiAuxiliary + majorIndex;
58  std::string const eventMajorIndex = eventAuxiliary + majorIndex;
59 
60  std::string const runMinorIndex; // empty
61  std::string const lumiMinorIndex = lumiAuxiliary + ".id_.luminosityBlock_";
62  std::string const eventMinorIndex = eventAuxiliary + ".id_.event_";
63 
64  std::string const runAux = run + aux;
65  std::string const lumiAux = lumi + aux;
66  std::string const eventAux = event + aux;
67 
68  std::string const entryDescriptionTree = "EntryDescription";
69  std::string const entryDescriptionIDBranch = "Hash";
70  std::string const entryDescriptionBranch = "Description";
71 
72  std::string const parentageTree = "Parentage";
73  std::string const parentageBranch = "Description";
74 
75  std::string const metaDataTree = "MetaData";
76  std::string const productRegistry = "ProductRegistry";
77  std::string const productDependencies = "ProductDependencies";
78  std::string const parameterSetMap = "ParameterSetMap";
79  std::string const moduleDescriptionMap = "ModuleDescriptionMap"; // Obsolete
80  std::string const processHistoryMap = "ProcessHistoryMap"; // Obsolete
81  std::string const processHistory = "ProcessHistory";
82  std::string const processConfiguration = "ProcessConfiguration";
83  std::string const branchIDLists = "BranchIDLists";
84  std::string const fileFormatVersion = "FileFormatVersion";
85  std::string const fileIdentifier = "FileIdentifier";
86  std::string const fileIndex = "FileIndex";
87  std::string const indexIntoFile = "IndexIntoFile";
88  std::string const eventHistory = "EventHistory";
89  std::string const eventBranchMapper = "EventBranchMapper";
90 
91  std::string const eventSelections = "EventSelections";
92  std::string const branchListIndexes = "BranchListIndexes";
93 
94  std::string const parameterSetsTree = "ParameterSets";
95  std::string const idToParameterSetBlobsBranch = "IdToParameterSetsBlobs";
96  }
97 
98  std::string const& BranchTypeToString(BranchType const& branchType) {
99  return ((branchType == InEvent) ? event : ((branchType == InRun) ? run : lumi));
100  }
101 
102  std::string const& BranchTypeToProductTreeName(BranchType const& branchType) {
103  return ((branchType == InEvent) ? events : ((branchType == InRun) ? runs : lumis));
104  }
105 
107  return ((branchType == InEvent) ? eventMeta : ((branchType == InRun) ? runMeta : lumiMeta));
108  }
109 
110  std::string const& BranchTypeToInfoTreeName(BranchType const& branchType) { // backward compatibility
111  return ((branchType == InEvent) ? eventInfo : ((branchType == InRun) ? runInfo : lumiInfo)); // backward compatibility
112  } // backward compatibility
113 
115  return ((branchType == InEvent) ? eventAuxiliary : ((branchType == InRun) ? runAuxiliary : lumiAuxiliary));
116  }
117 
118  std::string const& BranchTypeToAuxBranchName(BranchType const& branchType) { // backward compatibility
119  return ((branchType == InEvent) ? eventAux : ((branchType == InRun) ? runAux : lumiAux)); // backward compatibility
120  } // backward compatibility
121 
122  std::string const& BranchTypeToProductStatusBranchName(BranchType const& branchType) { // backward compatibility
123  return ((branchType == InEvent) ? eventProductStatus : ((branchType == InRun) ? runProductStatus : lumiProductStatus)); // backward compatibility
124  } // backward compatibility
125 
127  return ((branchType == InEvent) ? eventEventEntryInfo : ((branchType == InRun) ? runEventEntryInfo : lumiEventEntryInfo));
128  }
129 
131  return ((branchType == InEvent) ? eventProductProvenance : ((branchType == InRun) ? runProductProvenance : lumiProductProvenance));
132  }
133 
134  std::string const& BranchTypeToMajorIndexName(BranchType const& branchType) {
135  return ((branchType == InEvent) ? eventMajorIndex : ((branchType == InRun) ? runMajorIndex : lumiMajorIndex));
136  }
137 
138  std::string const& BranchTypeToMinorIndexName(BranchType const& branchType) {
139  return ((branchType == InEvent) ? eventMinorIndex : ((branchType == InRun) ? runMinorIndex : lumiMinorIndex));
140  }
141 
142  namespace poolNames {
143 
144  // EntryDescription tree (1 entry per recorded distinct value of EntryDescription)
145  std::string const& entryDescriptionTreeName() {
146  return entryDescriptionTree;
147  }
148 
149  std::string const& entryDescriptionIDBranchName() {
150  return entryDescriptionIDBranch;
151  }
152 
153  std::string const& entryDescriptionBranchName() {
154  return entryDescriptionBranch;
155  }
156 
157  // EntryDescription tree (1 entry per recorded distinct value of EntryDescription)
158  std::string const& parentageTreeName() {
159  return parentageTree;
160  }
161 
162  std::string const& parentageBranchName() {
163  return parentageBranch;
164  }
165 
166  // MetaData Tree (1 entry per file)
167  std::string const& metaDataTreeName() {
168  return metaDataTree;
169  }
170 
171  // Branch on MetaData Tree
172  std::string const& productDescriptionBranchName() {
173  return productRegistry;
174  }
175 
176  // Branch on MetaData Tree
177  std::string const& productDependenciesBranchName() {
178  return productDependencies;
179  }
180 
181  // Branch on MetaData Tree
182  std::string const& parameterSetMapBranchName() {
183  return parameterSetMap;
184  }
185 
186  // Branch on MetaData Tree // Obsolete
187  std::string const& moduleDescriptionMapBranchName() {
188  return moduleDescriptionMap;
189  }
190 
191  // Branch on MetaData Tree // Obsolete
192  std::string const& processHistoryMapBranchName() {
193  return processHistoryMap;
194  }
195 
196  // Branch on MetaData Tree
197  std::string const& processHistoryBranchName() {
198  return processHistory;
199  }
200 
201  // Branch on MetaData Tree
202  std::string const& processConfigurationBranchName() {
203  return processConfiguration;
204  }
205 
206  // Branch on MetaData Tree
207  std::string const& branchIDListBranchName() {
208  return branchIDLists;
209  }
210 
211  // Branch on MetaData Tree
212  std::string const& fileFormatVersionBranchName() {
213  return fileFormatVersion;
214  }
215 
216  // Branch on MetaData Tree
217  std::string const& fileIdentifierBranchName() {
218  return fileIdentifier;
219  }
220 
221  // Branch on MetaData Tree
222  std::string const& fileIndexBranchName() {
223  return fileIndex;
224  }
225 
226  // Branch on MetaData Tree
227  std::string const& indexIntoFileBranchName() {
228  return indexIntoFile;
229  }
230 
231  // Branch on Event History Tree
232  std::string const& eventHistoryBranchName() {
233  return eventHistory;
234  }
235 
236  // Branches on Events Tree
237  std::string const& eventSelectionsBranchName() {
238  return eventSelections;
239  }
240 
241  std::string const& branchListIndexesBranchName() {
242  return branchListIndexes;
243  }
244 
245  std::string const& parameterSetsTreeName() {
246  return parameterSetsTree;
247  }
248  // Branch on ParameterSets Tree
249  std::string const& idToParameterSetBlobsBranchName() {
250  return idToParameterSetBlobsBranch;
251  }
252 
253 
254  std::string const& eventTreeName() {
255  return events;
256  }
257 
258  std::string const& eventMetaDataTreeName() {
259  return eventMeta;
260  }
261 
262  std::string const& eventHistoryTreeName() {
263  return eventHistory;
264  }
265  std::string const& luminosityBlockTreeName() {
266  return lumis;
267  }
268  std::string const& runTreeName() {
269  return runs;
270  }
271  }
272 }
std::string const & BranchTypeToMajorIndexName(BranchType const &branchType)
Definition: BranchType.cc:134
std::string const & idToParameterSetBlobsBranchName()
Definition: BranchType.cc:249
std::string const & BranchTypeToMetaDataTreeName(BranchType const &branchType)
Definition: BranchType.cc:106
std::string const & BranchTypeToAuxiliaryBranchName(BranchType const &branchType)
Definition: BranchType.cc:114
std::string const & parentageTreeName()
Definition: BranchType.cc:158
std::string const & entryDescriptionBranchName()
Definition: BranchType.cc:153
list lumiInfo
Definition: pileupCalc.py:262
tuple lumi
Definition: fjr2json.py:35
std::string const & fileFormatVersionBranchName()
Definition: BranchType.cc:212
std::string const & eventSelectionsBranchName()
Definition: BranchType.cc:237
std::string const & luminosityBlockTreeName()
Definition: BranchType.cc:265
BranchType
Definition: BranchType.h:11
std::string const & parameterSetsTreeName()
Definition: BranchType.cc:245
tuple runs
Definition: gather_cfg.py:87
std::string const & processHistoryMapBranchName()
Definition: BranchType.cc:192
std::string const & fileIndexBranchName()
Definition: BranchType.cc:222
std::string const & entryDescriptionTreeName()
Definition: BranchType.cc:145
std::string const & indexIntoFileBranchName()
Definition: BranchType.cc:227
std::string const & eventHistoryBranchName()
Definition: BranchType.cc:232
std::string const & BranchTypeToMinorIndexName(BranchType const &branchType)
Definition: BranchType.cc:138
std::string const & BranchTypeToBranchEntryInfoBranchName(BranchType const &branchType)
Definition: BranchType.cc:126
std::string const & metaDataTreeName()
Definition: BranchType.cc:167
std::string const & BranchTypeToProductTreeName(BranchType const &branchType)
Definition: BranchType.cc:102
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger but the state exists so we define the behavior If all triggers are the negative crieriion will lead to accepting the event(this again matches the behavior of"!*"before the partial wildcard feature was incorporated).The per-event"cost"of each negative criterion with multiple relevant triggers is about the same as!*was in the past
std::string const & runTreeName()
Definition: BranchType.cc:268
std::string const & parameterSetMapBranchName()
Definition: BranchType.cc:182
std::string const & processHistoryBranchName()
Definition: BranchType.cc:197
std::string const & BranchTypeToProductStatusBranchName(BranchType const &branchType)
Definition: BranchType.cc:122
std::string const & BranchTypeToInfoTreeName(BranchType const &branchType)
Definition: BranchType.cc:110
std::string const & eventMetaDataTreeName()
Definition: BranchType.cc:258
std::string const & parentageBranchName()
Definition: BranchType.cc:162
std::string const & BranchTypeToString(BranchType const &branchType)
Definition: BranchType.cc:98
std::string const & productDescriptionBranchName()
Definition: BranchType.cc:172
std::string const & processConfigurationBranchName()
Definition: BranchType.cc:202
tuple events
Definition: patZpeak.py:19
std::string const & BranchTypeToProductProvenanceBranchName(BranchType const &BranchType)
Definition: BranchType.cc:130
std::string const & productDependenciesBranchName()
Definition: BranchType.cc:177
std::string const & eventTreeName()
Definition: BranchType.cc:254
std::string const & BranchTypeToAuxBranchName(BranchType const &branchType)
Definition: BranchType.cc:118
std::string const & entryDescriptionIDBranchName()
Definition: BranchType.cc:149
std::string const & branchIDListBranchName()
Definition: BranchType.cc:207
std::string const & branchListIndexesBranchName()
Definition: BranchType.cc:241
std::string const & eventHistoryTreeName()
Definition: BranchType.cc:262
std::ostream & operator<<(std::ostream &ost, const HLTGlobalStatus &hlt)
Formatted printout of trigger tbale.
std::string const & fileIdentifierBranchName()
Definition: BranchType.cc:217
std::string const & moduleDescriptionMapBranchName()
Definition: BranchType.cc:187