14Int_t ProcFileElements::ProcFileElement::Compare(
const TObject *o)
 const 
   22   const ProcFileElements::ProcFileElement *
e =
 
   23      dynamic_cast<const ProcFileElements::ProcFileElement *
>(o);
 
   29   } 
else if (fFirst < e->
fFirst) {
 
   39Int_t ProcFileElements::ProcFileElement::Overlapping(ProcFileElement *
e)
 
   49   if (
fFirst == 0 && fLast == -1) {
 
   56         if (fLast < e->
fFirst - 1) {
 
   61            if (fLast == 
e->fFirst - 1) {
 
   73   } 
else if (
fFirst == 
e->fFirst) {
 
   75      if (
fFirst == fLast || 
e->fFirst == 
e->fLast) 
return 0;
 
  100   Warning(
"Overlapping", 
"should never be here!");
 
  105Int_t ProcFileElements::ProcFileElement::MergeElement(ProcFileElement *
e)
 
  111   if (Overlapping(
e) < 0) 
return -1;
 
  117   if (fLast == -1 || 
e->fLast == -1) {
 
  120      if (fLast < e->fLast) fLast = 
e->fLast;
 
  127void ProcFileElements::ProcFileElement::Print(
Option_t *)
 const 
  143      Error(
"Add", 
"could not create internal list!");
 
  148   ProcFileElements::ProcFileElement *ne =
 
  149      new ProcFileElements::ProcFileElement(fst, lst);
 
  152   TIter nxe(fElements);
 
  153   ProcFileElements::ProcFileElement *
e = 0;
 
  154   while ((
e = (ProcFileElements::ProcFileElement *)nxe())) {
 
  155      if (
e->MergeElement(ne) == 0) 
break;
 
  161      fElements->Remove(
e);
 
  174   ProcFileElements::ProcFileElement *ep = 0, *en = 0;
 
  175   TObjLink *olp = fElements->FirstLink(), *oln = 0;
 
  176   while (olp && (ep = (ProcFileElements::ProcFileElement *) olp->
GetObject())) {
 
  179         if ((en = (ProcFileElements::ProcFileElement *) oln->GetObject())) {
 
  180            if (ep->MergeElement(en) == 0) {
 
  181               fElements->Remove(en);
 
  191   if ((
e = (ProcFileElements::ProcFileElement *) fElements->First())) 
fFirst = 
e->fFirst;
 
  192   if ((
e = (ProcFileElements::ProcFileElement *) fElements->Last())) fLast = 
e->fLast;
 
  199void ProcFileElements::Print(
Option_t *)
 const 
  203   Printf(
"--- ProcFileElements ----------------------------------------");
 
  204   Printf(
" File: %s", fName.Data());
 
  205   Printf(
" # proc elements: %d", fElements ? fElements->GetSize() : 0);
 
  206   TIter nxe(fElements);
 
  207   ProcFileElements::ProcFileElement *
e = 0;
 
  208   while ((
e = (ProcFileElements::ProcFileElement *)nxe())) { 
e->Print(); }
 
  209   Printf(
" Raw overall range: [%lld, %lld]", 
fFirst, fLast);
 
  210   Printf(
"-------------------------------------------------------------");
 
  221   if (li->
GetSize() <= 0) 
return 0;
 
  225   ProcFileElements *pfe = 0;
 
  226   while ((pfe = (ProcFileElements *) nxo())) {
 
  227      if (strcmp(GetName(), pfe->GetName()))
 
  228         Warning(
"Merge", 
"merging objects of different name! ('%s' != '%s')",
 
  229                          GetName(),  pfe->GetName());
 
  230      TIter nxe(pfe->GetListOfElements());
 
  231      ProcFileElements::ProcFileElement *
e = 0;
 
  232      while ((
e = (ProcFileElements::ProcFileElement *)nxe())) {
 
Class to hold information about the processed elements of a file.
 
void Error(const char *location, const char *msgfmt,...)
Use this function in case an error occurred.
 
void Warning(const char *location, const char *msgfmt,...)
Use this function in warning situations.
 
void Printf(const char *fmt,...)
Formats a string in a circular formatting buffer and prints the string.
 
Collection abstract base class.
 
virtual Int_t GetSize() const
Return the capacity of the collection, i.e.
 
Wrapper around a TObject so it can be stored in a TList.
 
TObject * GetObject() const
 
Mother of all ROOT objects.
 
A sorted doubly linked list.
 
TMatrixT< Element > & Add(TMatrixT< Element > &target, Element scalar, const TMatrixT< Element > &source)
Modify addition: target += scalar * source.