1 #ifndef MEtoEDMFormat_h
2 #define MEtoEDMFormat_h
23 #include <TProfile2D.h>
24 #include <TObjString.h>
73 const size_t nObjects = newMEtoEDMObject.size();
79 if (nObjects != nOldObjects) {
80 std::cout <<
"WARNING MEtoEDM::mergeProducts(): the lists of histograms to be merged have different sizes: new=" << nObjects <<
", old=" << nOldObjects << std::endl;
83 for (
unsigned int i = 0;
i < nObjects; ++
i) {
94 if (j >= nOldObjects) {
97 std::cout <<
"WARNING MEtoEDM::mergeProducts(): adding new histogram '" << name <<
"'" << std::endl;
100 }
else if (
MEtoEdmObject[j].
object.TestBit(TH1::kCanRebin) ==
true && newMEtoEDMObject[
i].
object.TestBit(TH1::kCanRebin) ==
true) {
102 list.Add((TObject*)&newMEtoEDMObject[
i].
object);
104 std::cout <<
"ERROR MEtoEDM::mergeProducts(): merge failed for '" << name <<
"'" << std::endl;
108 if (
MEtoEdmObject[j].
object.GetNbinsX() == newMEtoEDMObject[
i].
object.GetNbinsX() &&
109 MEtoEdmObject[j].
object.GetXaxis()->GetXmin() == newMEtoEDMObject[
i].
object.GetXaxis()->GetXmin() &&
110 MEtoEdmObject[j].
object.GetXaxis()->GetXmax() == newMEtoEDMObject[
i].
object.GetXaxis()->GetXmax() &&
111 MEtoEdmObject[j].
object.GetNbinsY() == newMEtoEDMObject[
i].
object.GetNbinsY() &&
112 MEtoEdmObject[j].
object.GetYaxis()->GetXmin() == newMEtoEDMObject[
i].
object.GetYaxis()->GetXmin() &&
113 MEtoEdmObject[j].
object.GetYaxis()->GetXmax() == newMEtoEDMObject[
i].
object.GetYaxis()->GetXmax() &&
114 MEtoEdmObject[j].
object.GetNbinsZ() == newMEtoEDMObject[
i].
object.GetNbinsZ() &&
115 MEtoEdmObject[j].
object.GetZaxis()->GetXmin() == newMEtoEDMObject[
i].
object.GetZaxis()->GetXmin() &&
116 MEtoEdmObject[j].
object.GetZaxis()->GetXmax() == newMEtoEDMObject[
i].
object.GetZaxis()->GetXmax()) {
119 std::cout <<
"ERROR MEtoEDM::mergeProducts(): found histograms with different axis limits, '" << name <<
"' not merged" << std::endl;
123 std::cout <<
MEtoEdmObject[
j].object.GetXaxis()->GetXmin() <<
" " << newMEtoEDMObject[
i].object.GetXaxis()->GetXmin() << std::endl;
124 std::cout <<
MEtoEdmObject[
j].object.GetXaxis()->GetXmax() <<
" " << newMEtoEDMObject[
i].object.GetXaxis()->GetXmax() << std::endl;
126 std::cout <<
MEtoEdmObject[
j].object.GetYaxis()->GetXmin() <<
" " << newMEtoEDMObject[
i].object.GetYaxis()->GetXmin() << std::endl;
127 std::cout <<
MEtoEdmObject[
j].object.GetYaxis()->GetXmax() <<
" " << newMEtoEDMObject[
i].object.GetYaxis()->GetXmax() << std::endl;
129 std::cout <<
MEtoEdmObject[
j].object.GetZaxis()->GetXmin() <<
" " << newMEtoEDMObject[
i].object.GetZaxis()->GetXmin() << std::endl;
130 std::cout <<
MEtoEdmObject[
j].object.GetZaxis()->GetXmax() <<
" " << newMEtoEDMObject[
i].object.GetZaxis()->GetXmax() << std::endl;
152 const size_t nObjects = newMEtoEDMObject.size();
155 const size_t nOldObjects = MEtoEdmObject.size();
158 if (nObjects != nOldObjects) {
159 std::cout <<
"WARNING MEtoEDM::mergeProducts(): the lists of histograms to be merged have different sizes: new=" << nObjects <<
", old=" << nOldObjects << std::endl;
162 for (
unsigned int i = 0;
i < nObjects; ++
i) {
167 if (
i < nOldObjects && (MEtoEdmObject[
i].name == name)) {
171 while (j < nOldObjects && (MEtoEdmObject[j].name != name) ) ++
j;
173 if (j >= nOldObjects) {
176 std::cout <<
"WARNING MEtoEDM::mergeProducts(): adding new histogram '" << name <<
"'" << std::endl;
178 MEtoEdmObject.push_back(newMEtoEDMObject[
i]);
189 const size_t nObjects = newMEtoEDMObject.size();
192 const size_t nOldObjects = MEtoEdmObject.size();
195 if (nObjects != nOldObjects) {
196 std::cout <<
"WARNING MEtoEDM::mergeProducts(): the lists of histograms to be merged have different sizes: new=" << nObjects <<
", old=" << nOldObjects << std::endl;
199 for (
unsigned int i = 0;
i < nObjects; ++
i) {
204 if (
i < nOldObjects && (MEtoEdmObject[
i].name == name)) {
208 while (j < nOldObjects && (MEtoEdmObject[j].name != name) ) ++
j;
210 if (j >= nOldObjects) {
213 std::cout <<
"WARNING MEtoEDM::mergeProducts(): adding new histogram '" << name <<
"'" << std::endl;
215 MEtoEdmObject.push_back(newMEtoEDMObject[
i]);
218 if ( MEtoEdmObject[j].name.find(
"EventInfo/processedEvents") != std::string::npos ) {
219 MEtoEdmObject[
j].object += (newMEtoEDMObject[
i].object);
221 if ( MEtoEdmObject[j].name.find(
"EventInfo/iEvent") != std::string::npos ||
222 MEtoEdmObject[
j].name.find(
"EventInfo/iLumiSection") != std::string::npos) {
223 if (MEtoEdmObject[j].
object < newMEtoEDMObject[
i].
object) {
224 MEtoEdmObject[
j].object = (newMEtoEDMObject[
i].object);
237 const size_t nObjects = newMEtoEDMObject.size();
240 const size_t nOldObjects = MEtoEdmObject.size();
243 if (nObjects != nOldObjects) {
244 std::cout <<
"WARNING MEtoEDM::mergeProducts(): the lists of histograms to be merged have different sizes: new=" << nObjects <<
", old=" << nOldObjects << std::endl;
247 for (
unsigned int i = 0;
i < nObjects; ++
i) {
252 if (
i < nOldObjects && (MEtoEdmObject[
i].name == name)) {
256 while (j < nOldObjects && (MEtoEdmObject[j].name != name) ) ++
j;
258 if (j >= nOldObjects) {
261 std::cout <<
"WARNING MEtoEDM::mergeProducts(): adding new histogram '" << name <<
"'" << std::endl;
263 MEtoEdmObject.push_back(newMEtoEDMObject[
i]);
266 if ( MEtoEdmObject[j].name.find(
"EventInfo/processedEvents") != std::string::npos ) {
267 MEtoEdmObject[
j].object += (newMEtoEDMObject[
i].object);
269 if ( MEtoEdmObject[j].name.find(
"EventInfo/iEvent") != std::string::npos ||
270 MEtoEdmObject[
j].name.find(
"EventInfo/iLumiSection") != std::string::npos) {
271 if (MEtoEdmObject[j].
object < newMEtoEDMObject[
i].
object) {
272 MEtoEdmObject[
j].object = (newMEtoEDMObject[
i].object);
285 const size_t nObjects = newMEtoEDMObject.size();
288 const size_t nOldObjects = MEtoEdmObject.size();
291 if (nObjects != nOldObjects) {
292 std::cout <<
"WARNING MEtoEDM::mergeProducts(): the lists of histograms to be merged have different sizes: new=" << nObjects <<
", old=" << nOldObjects << std::endl;
295 for (
unsigned int i = 0;
i < nObjects; ++
i) {
300 if (
i < nOldObjects && (MEtoEdmObject[
i].name == name)) {
304 while (j < nOldObjects && (MEtoEdmObject[j].name != name) ) ++
j;
306 if (j >= nOldObjects) {
309 std::cout <<
"WARNING MEtoEDM::mergeProducts(): adding new histogram '" << name <<
"'" << std::endl;
311 MEtoEdmObject.push_back(newMEtoEDMObject[
i]);
void swap(MEtoEDM< T > &iOther)
MEtoEDM(size_t reservedSize)
bool mergeProduct(const MEtoEDM< T > &newMEtoEDM)
Container::value_type value_type
const MEtoEdmObjectVector & getMEtoEdmObject() const
std::vector< MEtoEDMObject > MEtoEdmObjectVector
std::vector< uint32_t > TagList
void putMEtoEdmObject(const std::string &name, const TagList &tags, const T &object)
MEtoEdmObjectVector MEtoEdmObject
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 list("!*","!HLTx*"if it matches 2 triggers or more) will accept the event if all the matching triggers are FAIL.It will reject the event if any of the triggers are PASS or EXCEPTION(this matches the behavior of"!*"before the partial wildcard feature was incorporated).Triggers which are in the READY state are completely ignored.(READY should never be returned since the trigger paths have been run