1 #ifndef MEtoEDMFormat_h 2 #define MEtoEDMFormat_h 21 #include <TProfile2D.h> 22 #include <TObjString.h> 24 #include <THashList.h> 34 #define METOEDMFORMAT_DEBUG 0 74 THashList *l1 = (
const_cast<TAxis*
>(a1))->GetLabels();
75 THashList *l2 = (
const_cast<TAxis*
>(a2))->GetLabels();
83 if (l1->GetSize() != l2->GetSize() ) {
86 for (
int i = 1;
i <= a1->GetNbins(); ++
i) {
87 TString label1 = a1->GetBinLabel(
i);
88 TString label2 = a2->GetBinLabel(
i);
89 if (label1 != label2) {
98 const size_t nObjects = newMEtoEDMObject.size();
104 if (nObjects != nOldObjects) {
105 std::cout <<
"WARNING MEtoEDM::mergeProducts(): the lists of histograms to be merged have different sizes: new=" << nObjects <<
", old=" << nOldObjects << std::endl;
108 for (
unsigned int i = 0;
i < nObjects; ++
i) {
117 while (j < nOldObjects && (
MEtoEdmObject[j].name != name) ) ++j;
119 if (j >= nOldObjects) {
121 #if METOEDMFORMAT_DEBUG 122 std::cout <<
"WARNING MEtoEDM::mergeProducts(): adding new histogram '" << name <<
"'" << std::endl;
125 }
else if (
MEtoEdmObject[j].
object.CanExtendAllAxes() && newMEtoEDMObject[
i].
object.CanExtendAllAxes()) {
127 list.Add((TObject*)&newMEtoEDMObject[
i].
object);
129 std::cout <<
"ERROR MEtoEDM::mergeProducts(): merge failed for '" << name <<
"'" << std::endl;
133 if (
MEtoEdmObject[j].
object.GetNbinsX() == newMEtoEDMObject[
i].
object.GetNbinsX() &&
134 MEtoEdmObject[j].
object.GetXaxis()->GetXmin() == newMEtoEDMObject[
i].
object.GetXaxis()->GetXmin() &&
135 MEtoEdmObject[j].
object.GetXaxis()->GetXmax() == newMEtoEDMObject[
i].
object.GetXaxis()->GetXmax() &&
136 MEtoEdmObject[j].
object.GetNbinsY() == newMEtoEDMObject[
i].
object.GetNbinsY() &&
137 MEtoEdmObject[j].
object.GetYaxis()->GetXmin() == newMEtoEDMObject[
i].
object.GetYaxis()->GetXmin() &&
138 MEtoEdmObject[j].
object.GetYaxis()->GetXmax() == newMEtoEDMObject[
i].
object.GetYaxis()->GetXmax() &&
139 MEtoEdmObject[j].
object.GetNbinsZ() == newMEtoEDMObject[
i].
object.GetNbinsZ() &&
140 MEtoEdmObject[j].
object.GetZaxis()->GetXmin() == newMEtoEDMObject[
i].
object.GetZaxis()->GetXmin() &&
141 MEtoEdmObject[j].
object.GetZaxis()->GetXmax() == newMEtoEDMObject[
i].
object.GetZaxis()->GetXmax() &&
147 std::cout <<
"ERROR MEtoEDM::mergeProducts(): found histograms with different axis limits or different labels, '" << name <<
"' not merged" << std::endl;
148 #if METOEDMFORMAT_DEBUG 150 std::cout <<
MEtoEdmObject[j].object.GetNbinsX() <<
" " << newMEtoEDMObject[
i].object.GetNbinsX() << std::endl;
151 std::cout <<
MEtoEdmObject[j].object.GetXaxis()->GetXmin() <<
" " << newMEtoEDMObject[
i].object.GetXaxis()->GetXmin() << std::endl;
152 std::cout <<
MEtoEdmObject[j].object.GetXaxis()->GetXmax() <<
" " << newMEtoEDMObject[
i].object.GetXaxis()->GetXmax() << std::endl;
153 std::cout <<
MEtoEdmObject[j].object.GetNbinsY() <<
" " << newMEtoEDMObject[
i].object.GetNbinsY() << std::endl;
154 std::cout <<
MEtoEdmObject[j].object.GetYaxis()->GetXmin() <<
" " << newMEtoEDMObject[
i].object.GetYaxis()->GetXmin() << std::endl;
155 std::cout <<
MEtoEdmObject[j].object.GetYaxis()->GetXmax() <<
" " << newMEtoEDMObject[
i].object.GetYaxis()->GetXmax() << std::endl;
156 std::cout <<
MEtoEdmObject[j].object.GetNbinsZ() <<
" " << newMEtoEDMObject[
i].object.GetNbinsZ() << std::endl;
157 std::cout <<
MEtoEdmObject[j].object.GetZaxis()->GetXmin() <<
" " << newMEtoEDMObject[
i].object.GetZaxis()->GetXmin() << std::endl;
158 std::cout <<
MEtoEdmObject[j].object.GetZaxis()->GetXmax() <<
" " << newMEtoEDMObject[
i].object.GetZaxis()->GetXmax() << std::endl;
180 const size_t nObjects = newMEtoEDMObject.size();
186 if (nObjects != nOldObjects) {
187 std::cout <<
"WARNING MEtoEDM::mergeProducts(): the lists of histograms to be merged have different sizes: new=" << nObjects <<
", old=" << nOldObjects << std::endl;
190 for (
unsigned int i = 0;
i < nObjects; ++
i) {
199 while (j < nOldObjects && (
MEtoEdmObject[j].name != name) ) ++j;
201 if (j >= nOldObjects) {
203 #if METOEDMFORMAT_DEBUG 204 std::cout <<
"WARNING MEtoEDM::mergeProducts(): adding new histogram '" << name <<
"'" << std::endl;
217 const size_t nObjects = newMEtoEDMObject.size();
223 if (nObjects != nOldObjects) {
224 std::cout <<
"WARNING MEtoEDM::mergeProducts(): the lists of histograms to be merged have different sizes: new=" << nObjects <<
", old=" << nOldObjects << std::endl;
227 for (
unsigned int i = 0;
i < nObjects; ++
i) {
236 while (j < nOldObjects && (
MEtoEdmObject[j].name != name) ) ++j;
238 if (j >= nOldObjects) {
240 #if METOEDMFORMAT_DEBUG 241 std::cout <<
"WARNING MEtoEDM::mergeProducts(): adding new histogram '" << name <<
"'" << std::endl;
246 if (
MEtoEdmObject[j].name.find(
"EventInfo/processedEvents") != std::string::npos ) {
249 if (
MEtoEdmObject[j].name.find(
"EventInfo/iEvent") != std::string::npos ||
250 MEtoEdmObject[j].name.find(
"EventInfo/iLumiSection") != std::string::npos) {
265 const size_t nObjects = newMEtoEDMObject.size();
271 if (nObjects != nOldObjects) {
272 std::cout <<
"WARNING MEtoEDM::mergeProducts(): the lists of histograms to be merged have different sizes: new=" << nObjects <<
", old=" << nOldObjects << std::endl;
275 for (
unsigned int i = 0;
i < nObjects; ++
i) {
284 while (j < nOldObjects && (
MEtoEdmObject[j].name != name) ) ++j;
286 if (j >= nOldObjects) {
288 #if METOEDMFORMAT_DEBUG 289 std::cout <<
"WARNING MEtoEDM::mergeProducts(): adding new histogram '" << name <<
"'" << std::endl;
294 if (
MEtoEdmObject[j].name.find(
"EventInfo/processedEvents") != std::string::npos ) {
297 if (
MEtoEdmObject[j].name.find(
"EventInfo/iEvent") != std::string::npos ||
298 MEtoEdmObject[j].name.find(
"EventInfo/iLumiSection") != std::string::npos) {
313 const size_t nObjects = newMEtoEDMObject.size();
319 if (nObjects != nOldObjects) {
320 std::cout <<
"WARNING MEtoEDM::mergeProducts(): the lists of histograms to be merged have different sizes: new=" << nObjects <<
", old=" << nOldObjects << std::endl;
323 for (
unsigned int i = 0;
i < nObjects; ++
i) {
332 while (j < nOldObjects && (
MEtoEdmObject[j].name != name) ) ++j;
334 if (j >= nOldObjects) {
336 #if METOEDMFORMAT_DEBUG 337 std::cout <<
"WARNING MEtoEDM::mergeProducts(): adding new histogram '" << name <<
"'" << std::endl;
void swap(MEtoEDM< T > &iOther)
MEtoEDM(size_t reservedSize)
bool mergeProduct(const MEtoEDM< T > &newMEtoEDM)
Container::value_type value_type
const MEtoEdmObjectVector & getMEtoEdmObject() const
bool CheckBinLabels(const TAxis *a1, const TAxis *a2)
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