CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups 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 115 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 116 of file fastHadd.cc.

117  : obj(o), dirname(dir), objname(obj), flags(flags) {}
const std::string dirname
Definition: fastHadd.cc:121
TObject * obj
Definition: fastHadd.cc:119
const std::string objname
Definition: fastHadd.cc:122
uint32_t flags
Definition: fastHadd.cc:124

Member Function Documentation

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

Definition at line 132 of file fastHadd.cc.

References DEBUG, and obj.

Referenced by addFile(), counter.Counter::register(), SequenceTypes.Task::remove(), and SequenceTypes.Task::replace().

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

Definition at line 143 of file fastHadd.cc.

References dirname, and objname.

143 { return dirname + '/' + objname; };
const std::string dirname
Definition: fastHadd.cc:121
const std::string objname
Definition: fastHadd.cc:122
bool MicroME::operator< ( const MicroME rhs) const
inline

Definition at line 126 of file fastHadd.cc.

References change_name::diff, dirname, and objname.

126  {
127  const MicroME &lhs = *this;
128  int diff = lhs.dirname.compare(rhs.dirname);
129  return (diff < 0 ? true : diff == 0 ? lhs.objname < rhs.objname : false);
130  };
const std::string dirname
Definition: fastHadd.cc:121
const std::string objname
Definition: fastHadd.cc:122

Member Data Documentation

const std::string MicroME::dirname

Definition at line 121 of file fastHadd.cc.

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

uint32_t MicroME::flags

Definition at line 124 of file fastHadd.cc.

TObject* MicroME::obj
mutable

Definition at line 119 of file fastHadd.cc.

Referenced by add().

const std::string MicroME::objname

Definition at line 122 of file fastHadd.cc.

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