14Int_t ProcFileElements::ProcFileElement::Compare(
const TObject *o)
const
22 const ProcFileElements::ProcFileElement *
e =
23 dynamic_cast<const ProcFileElements::ProcFileElement *
>(o);
49 if (
fFirst == 0 && fLast == -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!");
117 if (fLast == -1 ||
e->fLast == -1) {
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);
153 ProcFileElements::ProcFileElement *
e =
nullptr;
154 while ((
e = (ProcFileElements::ProcFileElement *)
nxe())) {
155 if (
e->MergeElement(
ne) == 0)
break;
161 fElements->Remove(
e);
174 ProcFileElements::ProcFileElement *
ep =
nullptr, *
en =
nullptr;
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);
207 ProcFileElements::ProcFileElement *
e =
nullptr;
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;
228 Warning(
"Merge",
"merging objects of different name! ('%s' != '%s')",
229 GetName(),
pfe->GetName());
231 ProcFileElements::ProcFileElement *
e =
nullptr;
232 while ((
e = (ProcFileElements::ProcFileElement *)
nxe())) {
Class to hold information about the processed elements of a file.
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
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.
Wrapper around a TObject so it can be stored in a TList.
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.