CMS 3D CMS Logo

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::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) {}

Member Function Documentation

◆ add()

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

Definition at line 132 of file fastHadd.cc.

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  };

References DEBUG, and obj.

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

◆ fullname()

const std::string MicroME::fullname ( ) const
inline

Definition at line 143 of file fastHadd.cc.

143 { return dirname + '/' + objname; };

References dirname, and objname.

◆ operator<()

bool MicroME::operator< ( const MicroME rhs) const
inline

Definition at line 126 of file fastHadd.cc.

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  };

References change_name::diff, dirname, and objname.

Member Data Documentation

◆ dirname

const std::string MicroME::dirname

Definition at line 121 of file fastHadd.cc.

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

◆ flags

uint32_t MicroME::flags

Definition at line 124 of file fastHadd.cc.

◆ obj

TObject* MicroME::obj
mutable

Definition at line 119 of file fastHadd.cc.

Referenced by add().

◆ objname

const std::string MicroME::objname

Definition at line 122 of file fastHadd.cc.

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

MicroME
Definition: fastHadd.cc:115
change_name.diff
diff
Definition: change_name.py:13
MicroME::dirname
const std::string dirname
Definition: fastHadd.cc:121
EcalTangentSkim_cfg.o
o
Definition: EcalTangentSkim_cfg.py:42
DEBUG
#define DEBUG(x, msg)
Definition: fastHadd.cc:109
MicroME::objname
const std::string objname
Definition: fastHadd.cc:122
MicroME::flags
uint32_t flags
Definition: fastHadd.cc:124
DeadROC_duringRun.dir
dir
Definition: DeadROC_duringRun.py:23
MicroME::obj
TObject * obj
Definition: fastHadd.cc:119