test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Public Attributes
MicroME Struct Reference

Public Member Functions

void add (TObject *obj_to_add) const
 
const std::string fullname () const
 
 MicroME (TObject *o, const std::string dir, const std::string obj, uint32_t flags=0)
 
bool operator< (const MicroME &rhs) const
 

Public Attributes

const std::string dirname
 
uint32_t flags
 
TObject * obj
 
const std::string objname
 

Detailed Description

Definition at line 113 of file fastHadd.cc.

Constructor & Destructor Documentation

MicroME::MicroME ( TObject *  o,
const std::string  dir,
const std::string  obj,
uint32_t  flags = 0 
)
inline

Definition at line 114 of file fastHadd.cc.

119  : obj(o), dirname(dir), objname(obj), flags(flags) {}
const std::string dirname
Definition: fastHadd.cc:123
TObject * obj
Definition: fastHadd.cc:121
const std::string objname
Definition: fastHadd.cc:124
uint32_t flags
Definition: fastHadd.cc:126
dbl *** dir
Definition: mlp_gen.cc:35

Member Function Documentation

void MicroME::add ( TObject *  obj_to_add) const
inline

Definition at line 135 of file fastHadd.cc.

References DEBUG, and obj.

Referenced by addFile(), and counter.Counter::register().

135  {
136  DEBUG(1, "Merging: " << obj->GetName() <<
137  " << " << obj_to_add->GetName() << std::endl);
138 
139  if (dynamic_cast<TH1 *>(obj) && dynamic_cast<TH1 *>(obj_to_add)) {
140  dynamic_cast<TH1 *>(obj)->Add(dynamic_cast<TH1 *>(obj_to_add));
141  } else if (dynamic_cast<TObjString *>(obj) && dynamic_cast<TObjString *>(obj_to_add)) {
142 
143 
144  } else {
145  DEBUG(1, "Cannot merge (different types): " << obj->GetName() <<
146  " << " << obj_to_add->GetName() << std::endl);
147  }
148  };
TObject * obj
Definition: fastHadd.cc:121
#define DEBUG(x, msg)
Definition: fastHadd.cc:109
const std::string MicroME::fullname ( ) const
inline

Definition at line 150 of file fastHadd.cc.

References dirname, and objname.

150  {
151  return dirname + '/' + objname;
152  };
const std::string dirname
Definition: fastHadd.cc:123
const std::string objname
Definition: fastHadd.cc:124
bool MicroME::operator< ( const MicroME rhs) const
inline

Definition at line 128 of file fastHadd.cc.

References mps_update::diff, dirname, and objname.

128  {
129  const MicroME &lhs = *this;
130  int diff = lhs.dirname.compare(rhs.dirname);
131  return (diff < 0 ? true
132  : diff == 0 ? lhs.objname < rhs.objname : false);
133  };
const std::string dirname
Definition: fastHadd.cc:123
list diff
Definition: mps_update.py:85
const std::string objname
Definition: fastHadd.cc:124

Member Data Documentation

const std::string MicroME::dirname

Definition at line 123 of file fastHadd.cc.

Referenced by fullname(), and operator<().

uint32_t MicroME::flags

Definition at line 126 of file fastHadd.cc.

TObject* MicroME::obj
mutable

Definition at line 121 of file fastHadd.cc.

Referenced by add().

const std::string MicroME::objname

Definition at line 124 of file fastHadd.cc.

Referenced by fullname(), and operator<().