#include <DataFormats/Histograms/interface/MEtoEDMFormat.h>
Public Types | |
typedef std::vector < MEtoEDMObject > | MEtoEdmObjectVector |
typedef std::vector< uint32_t > | TagList |
Public Member Functions | |
const MEtoEdmObjectVector & | getMEtoEdmObject () const |
template<> | |
bool | mergeProduct (const MEtoEDM< TString > &newMEtoEDM) |
template<> | |
bool | mergeProduct (const MEtoEDM< int > &newMEtoEDM) |
template<> | |
bool | mergeProduct (const MEtoEDM< double > &newMEtoEDM) |
bool | mergeProduct (const MEtoEDM< T > &newMEtoEDM) |
MEtoEDM () | |
void | putMEtoEdmObject (const std::vector< std::string > &name, const std::vector< TagList > &tags, const std::vector< T > &object, const std::vector< std::string > &release, const std::vector< int > &run, const std::vector< std::string > &datatier) |
virtual | ~MEtoEDM () |
Private Attributes | |
MEtoEdmObjectVector | MEtoEdmObject |
Classes | |
struct | MEtoEDMObject |
Definition at line 31 of file MEtoEDMFormat.h.
typedef std::vector<MEtoEDMObject> MEtoEDM< T >::MEtoEdmObjectVector |
Definition at line 49 of file MEtoEDMFormat.h.
Definition at line 37 of file MEtoEDMFormat.h.
const MEtoEdmObjectVector& MEtoEDM< T >::getMEtoEdmObject | ( | ) | const [inline] |
Definition at line 69 of file MEtoEDMFormat.h.
References MEtoEDM< T >::MEtoEdmObject.
Referenced by MEtoEDM< T >::mergeProduct().
00070 { return MEtoEdmObject; }
Definition at line 114 of file MEtoEDMFormat.h.
References MEtoEDM< T >::getMEtoEdmObject(), i, MEtoEDM< T >::MEtoEdmObject, and name.
00115 { 00116 const MEtoEdmObjectVector &newMEtoEDMObject = 00117 newMEtoEDM.getMEtoEdmObject(); 00118 for (unsigned int i = 0; i < MEtoEdmObject.size(); ++i) { 00119 if ( MEtoEdmObject[i].name.find("EventInfo/processedEvents") != std::string::npos ) { 00120 MEtoEdmObject[i].object += (newMEtoEDMObject[i].object); 00121 } 00122 if ( MEtoEdmObject[i].name.find("EventInfo/iEvent") != std::string::npos || 00123 MEtoEdmObject[i].name.find("EventInfo/iLumiSection") != std::string::npos) { 00124 if (MEtoEdmObject[i].object < newMEtoEDMObject[i].object) 00125 MEtoEdmObject[i].object = (newMEtoEDMObject[i].object); 00126 } 00127 00128 } 00129 return true; 00130 }
Definition at line 72 of file MEtoEDMFormat.h.
References GenMuonPlsPt100GeV_cfg::cout, lat::endl(), MEtoEDM< T >::getMEtoEdmObject(), i, j, MEtoEDM< T >::MEtoEdmObject, name, and tmp.
00072 { 00073 const MEtoEdmObjectVector &newMEtoEDMObject = 00074 newMEtoEDM.getMEtoEdmObject(); 00075 bool warn = false; 00076 std::vector<bool> tmp(newMEtoEDMObject.size(), false); 00077 for (unsigned int i = 0; i < MEtoEdmObject.size(); ++i) { 00078 unsigned int j = 0; 00079 while (j < newMEtoEDMObject.size() && 00080 (strcmp(MEtoEdmObject[i].name.c_str(), 00081 newMEtoEDMObject[j].name.c_str()) != 0)) ++j; 00082 if (j < newMEtoEDMObject.size()) { 00083 MEtoEdmObject[i].object.Add(&newMEtoEDMObject[j].object); 00084 tmp[j] = true; 00085 } else { 00086 warn = true; 00087 } 00088 } 00089 for (unsigned int j = 0; j < newMEtoEDMObject.size(); ++j) { 00090 if (!tmp[j]) { 00091 warn = true; 00092 MEtoEdmObject.push_back(newMEtoEDMObject[j]); 00093 } 00094 } 00095 if (warn) { 00096 std::cout << "WARNING: problem found in MEtoEDM::mergeProducts()" << std::endl; 00097 } 00098 return true; 00099 }
void MEtoEDM< T >::putMEtoEdmObject | ( | const std::vector< std::string > & | name, | |
const std::vector< TagList > & | tags, | |||
const std::vector< T > & | object, | |||
const std::vector< std::string > & | release, | |||
const std::vector< int > & | run, | |||
const std::vector< std::string > & | datatier | |||
) | [inline] |
Definition at line 51 of file MEtoEDMFormat.h.
References i, and MEtoEDM< T >::MEtoEdmObject.
00057 { 00058 MEtoEdmObject.resize(name.size()); 00059 for (unsigned int i = 0; i < name.size(); ++i) { 00060 MEtoEdmObject[i].name = name[i]; 00061 MEtoEdmObject[i].tags = tags[i]; 00062 MEtoEdmObject[i].object = object[i]; 00063 MEtoEdmObject[i].release = release[i]; 00064 MEtoEdmObject[i].run = run[i]; 00065 MEtoEdmObject[i].datatier = datatier[i]; 00066 } 00067 }
MEtoEdmObjectVector MEtoEDM< T >::MEtoEdmObject [private] |
Definition at line 103 of file MEtoEDMFormat.h.
Referenced by MEtoEDM< T >::getMEtoEdmObject(), MEtoEDM< T >::mergeProduct(), and MEtoEDM< T >::putMEtoEdmObject().