#include "QFramework/TQCompiledCut.h"
#include "QFramework/TQCutFactory.h"
#include "TObjArray.h"
#include "TObjString.h"
#include "TFormula.h"
#include "QFramework/TQUtils.h"
#include "QFramework/TQStringUtils.h"
#include "QFramework/TQIterator.h"
#include "QFramework/TQLibrary.h"

#include <iostream>
#include <fstream>
#include <sstream>
#include <cstdlib>

////////////////////////////////////////////////////////////////////////////////////////////////
//
// TQCutFactory
//
// This is a legacy class that should no longer be used. Its
// functionality has been added to the TQCut class itself.
//
////////////////////////////////////////////////////////////////////////////////////////////////

ClassImp(TQCutFactory)


//______________________________________________________________________________________________

TQCutFactory::TQCutFactory() : TObject() {
  fCuts = new TList();
  fTreeObservableTemplates = 0;
}


//______________________________________________________________________________________________

void TQCutFactory::addCut(TString definition) {
  fCuts->AddLast(new TObjString(definition));
}

//______________________________________________________________________________________________

TString TQCutFactory::findCut(TString name) {

  TString * cutName = new TString();
  TString * baseCutName = new TString();
  TString * cutExpr = new TString();
  TString * weightExpr = new TString();
  TString * cutName2 = new TString();
  TString * baseCutName2= new TString();
  TString * cutExpr2 = new TString();
  TString * weightExpr2 = new TString();

  TIterator * itr = fCuts->MakeIterator(false);
  TObject * obj;
  TString cutDef = "";
  while ((obj = itr->Next())) {
    TString tmpExp = ((TObjString*)obj)->String();

    //Parsing the cut expression
    (*cutName)=""; (*baseCutName)="";
    TQCompiledCut::parseCutDefinition(tmpExp, cutName, baseCutName, cutExpr, weightExpr);

    // cout << " considering " << (*cutName) << endl;
    if ((*cutName) == name) {
      cutDef = tmpExp;
      break;
    }
  }

  delete itr;

  delete cutName ;
  delete baseCutName ;
  delete cutExpr ;
  delete weightExpr ;
  delete cutName2 ;
  delete baseCutName2 ;
  delete cutExpr2 ;
  delete weightExpr2 ;

  return cutDef;
}

//______________________________________________________________________________________________

TString TQCutFactory::removeCut(TString name) {

  TString * cutName = new TString();
  TString * baseCutName = new TString();
  TString * cutExpr = new TString();
  TString * weightExpr = new TString();
  TString * cutName2 = new TString();
  TString * baseCutName2= new TString();
  TString * cutExpr2 = new TString();
  TString * weightExpr2 = new TString();

  TIterator * itr = fCuts->MakeIterator(false);
  TObject * obj;
  TString cutDef = "";
  bool found = false;
  while ((obj = itr->Next())) {
    cutDef = ((TObjString*)obj)->String();

    //Parsing the cut expression
    (*cutName)=""; (*baseCutName)="";
    TQCompiledCut::parseCutDefinition(cutDef, cutName, baseCutName, cutExpr, weightExpr);

    // cout << " considering " << (*cutName) << endl;
    if ((*cutName) == name) {

      found = true;
      // cout << "Removing " << (*cutName) << endl;
      fCuts->Remove(obj);

      //Checking whether any other cut depends on this one
      bool hasDependence=false;
      TIterator * itr2 = fCuts->MakeIterator(false);
      TObject * obj2;
      while (!hasDependence && (obj2 = itr2->Next())) {
        TString cutDef2 = ((TObjString*)obj2)->String();
        //Parsing the cut expression
        TQCompiledCut::parseCutDefinition(cutDef2, cutName2, baseCutName2, cutExpr2, weightExpr2);
        if ((*baseCutName2)==(*cutName)) {
          hasDependence=true;
          // cout << "\tCut " << (*cutName2) << " is orphaned" << endl;
        }
      }
      delete itr2;
    }
    if (found) break;
  }
  delete itr;

  delete cutName ;
  delete baseCutName ;
  delete cutExpr ;
  delete weightExpr ;
  delete cutName2 ;
  delete baseCutName2 ;
  delete cutExpr2 ;
  delete weightExpr2 ;

  return cutDef;
}


//______________________________________________________________________________________________

void TQCutFactory::setTreeObservableTemplates(TList * treeObservableTemplates) {
  WARNclass("this functionality is deprecated. please use 'TQObservable::addObservable(myObservable,name)' instead");
  fTreeObservableTemplates = treeObservableTemplates;
  TQObservableIterator itr(fTreeObservableTemplates);
  while(itr.hasNext()){
    TQObservable* obs = itr.readNext();
    if(obs) TQObservable::addObservable(obs);
  }
}

//______________________________________________________________________________________________

void TQCutFactory::print() {
  for (int icut = 0; icut < fCuts->GetEntries(); ++icut) {
    std::cout << ((TObjString*) fCuts->At(icut))->GetString() << std::endl;
  }
}


//______________________________________________________________________________________________

void TQCutFactory::orderCutDefs() {

  TList * outputCuts = new TList(); //Will contain the ordered list of cut definitions
 
  TString * cutName = new TString();
  TString * baseCutName = new TString();
  TString * cutExpr = new TString();
  TString * weightExpr = new TString();
  TString * cutName2 = new TString();
  TString * baseCutName2= new TString();
  TString * cutExpr2 = new TString();
  TString * weightExpr2 = new TString();

  while (fCuts->GetSize()>0) {
    TIterator * itr = fCuts->MakeIterator(false);
    TObject * obj;
    while ((obj = itr->Next())) {
      TString cutDef = ((TObjString*)obj)->String();
      //Parsing the cut expression
      (*cutName)=""; (*baseCutName)="";
      TQCompiledCut::parseCutDefinition(cutDef, cutName, baseCutName, cutExpr, weightExpr);

      //Checking whether any other cut depends on this one
      bool hasDependence=false;
      TIterator * itr2 = fCuts->MakeIterator(false);
      TObject * obj2;
      while (!hasDependence && (obj2 = itr2->Next())) {
        TString cutDef2 = ((TObjString*)obj2)->String();
        //Parsing the cut expression
        TQCompiledCut::parseCutDefinition(cutDef2, cutName2, baseCutName2, cutExpr2, weightExpr2);
        if ((*baseCutName2)==(*cutName))
          hasDependence=true;
      }
      if (!hasDependence) {
        outputCuts->AddFirst(new TObjString(cutDef));
        fCuts->Remove(obj);
      }
      delete itr2;
    }
    delete itr;
  }
  delete cutName ;
  delete baseCutName ;
  delete cutExpr ;
  delete weightExpr ;
  delete cutName2 ;
  delete baseCutName2 ;
  delete cutExpr2 ;
  delete weightExpr2 ;


  //Replace the input list with the ordered one
  delete fCuts;
  fCuts = outputCuts; 
}

//______________________________________________________________________________________________

TQCompiledCut * TQCutFactory::compileCutsWithoutEvaluation() {

  TQIterator itr(fCuts);
  TQCompiledCut * baseCut = 0;
  while(itr.hasNext()){
    TObjString* obj = dynamic_cast<TObjString*>(itr.readNext());
    if(!obj) continue;
    TString cutDefCompiled = obj->String();
 
    if (baseCut) {
      baseCut->addCut(cutDefCompiled);
    } else { 
      baseCut = TQCompiledCut::createCut(cutDefCompiled);
    }
  }

  return baseCut;

}


//______________________________________________________________________________________________

TQCompiledCut * TQCutFactory::compileCuts(TString parameter) {

  TQIterator itr(fCuts);
  TQCompiledCut * baseCut = 0;
  while(itr.hasNext()){
    TObjString* obj = dynamic_cast<TObjString*>(itr.readNext());
    if(!obj) continue;
    TString cutDefCompiled = evaluate(obj->String(), parameter);
 
    if (baseCut) {
      baseCut->addCut(cutDefCompiled);
    } else { 
      baseCut = TQCompiledCut::createCut(cutDefCompiled);
    }
  }

  return baseCut;

}


//______________________________________________________________________________________________

TString TQCutFactory::evaluateSubExpression(const TString& input_, const TString& parameter) {

  TString input(input_);
  TString resultExpression("");

  /* -- evaluate sub expressions recursively -- */

  while (!input.IsNull()) {

    Ssiz_t pos = input.Index("{");

    if (pos == kNPOS) {

      resultExpression.Append(input);
      input.Remove(0);

    } else if (pos == 0) {

      int depth = 1;
      while (depth > 0 && ++pos < input.Length()) {
        char ch = input(pos);
        if (ch == '{') { depth++; }
        if (ch == '}') { depth--; }
      }

      TString subInput(input(1, pos - 1));
      input.Remove(0, pos + 1);

      TString subExpression(TQStringUtils::trim(evaluate(subInput, parameter)));
      resultExpression.Append(subExpression);

    } else {

      TString subInput = input(0, pos);
      resultExpression.Append(subInput);
      input.Remove(0, pos);

    }

  }
 
  return resultExpression;
 
}


//______________________________________________________________________________________________

TString TQCutFactory::evaluate(const TString& input_, const TString& parameter) {
  TString result = evaluateSubExpression(input_, parameter);

  /* -- replace parameter -- */
 
  TList * tokens = TQStringUtils::tokenize(parameter, ",", true, "", "''");

  result.ReplaceAll("'", "\"");

  for (int iPar = 0; iPar < tokens->GetEntries(); iPar++) {

    TString * key = new TString();
    TString * value = new TString();

    if (TQUtils::parseAssignment(((TObjString*)tokens->At(iPar))->String(), key, value)) {

      key->ToUpper();
      value->ReplaceAll("'", "\"");
 
      result.ReplaceAll(TString::Format("$%s", key->Data()), *value);

    }

    delete key;
    delete value;

  }

  /* delete the token list again */
  tokens->Delete();
  delete tokens;


  /* -- evaluate this expression -- */

  Ssiz_t posIf = result.Index("?");

  if (posIf == kNPOS) {
 
    return TQStringUtils::trim(result);

  } else {

    /* extract the formula from the "if expression" */
    TString ifExpr = result(0, posIf);

    TFormula * formula = new TFormula("", ifExpr);

    /* extract the "then-else expression" ... */
    TString thenElseExpr = result(posIf + 1, result.Length());
 
    /* ... and split it into "then" and "else expression" */
    TString thenExpr, elseExpr;
    Ssiz_t posElse = thenElseExpr.Index(":");
    if (posElse == kNPOS) {
      thenExpr = thenElseExpr;
    } else {
      thenExpr = thenElseExpr(0, posElse);
      elseExpr = thenElseExpr(posElse + 1, thenElseExpr.Length());
    }

    /* let the formula decide which expression to return */
    if (formula->Eval(0.)) {
      delete formula;
      return TQStringUtils::trim(thenExpr);
    } else {
      delete formula;
      return TQStringUtils::trim(elseExpr);
    }

  }

}


//______________________________________________________________________________________________

TQCutFactory::~TQCutFactory() {
  delete fCuts;
}

//______________________________________________________________________________________________

bool TQCutFactory::isEmpty() {
  return (this->fCuts->GetEntries() < 1);
}


 TQCutFactory.cxx:1
 TQCutFactory.cxx:2
 TQCutFactory.cxx:3
 TQCutFactory.cxx:4
 TQCutFactory.cxx:5
 TQCutFactory.cxx:6
 TQCutFactory.cxx:7
 TQCutFactory.cxx:8
 TQCutFactory.cxx:9
 TQCutFactory.cxx:10
 TQCutFactory.cxx:11
 TQCutFactory.cxx:12
 TQCutFactory.cxx:13
 TQCutFactory.cxx:14
 TQCutFactory.cxx:15
 TQCutFactory.cxx:16
 TQCutFactory.cxx:17
 TQCutFactory.cxx:18
 TQCutFactory.cxx:19
 TQCutFactory.cxx:20
 TQCutFactory.cxx:21
 TQCutFactory.cxx:22
 TQCutFactory.cxx:23
 TQCutFactory.cxx:24
 TQCutFactory.cxx:25
 TQCutFactory.cxx:26
 TQCutFactory.cxx:27
 TQCutFactory.cxx:28
 TQCutFactory.cxx:29
 TQCutFactory.cxx:30
 TQCutFactory.cxx:31
 TQCutFactory.cxx:32
 TQCutFactory.cxx:33
 TQCutFactory.cxx:34
 TQCutFactory.cxx:35
 TQCutFactory.cxx:36
 TQCutFactory.cxx:37
 TQCutFactory.cxx:38
 TQCutFactory.cxx:39
 TQCutFactory.cxx:40
 TQCutFactory.cxx:41
 TQCutFactory.cxx:42
 TQCutFactory.cxx:43
 TQCutFactory.cxx:44
 TQCutFactory.cxx:45
 TQCutFactory.cxx:46
 TQCutFactory.cxx:47
 TQCutFactory.cxx:48
 TQCutFactory.cxx:49
 TQCutFactory.cxx:50
 TQCutFactory.cxx:51
 TQCutFactory.cxx:52
 TQCutFactory.cxx:53
 TQCutFactory.cxx:54
 TQCutFactory.cxx:55
 TQCutFactory.cxx:56
 TQCutFactory.cxx:57
 TQCutFactory.cxx:58
 TQCutFactory.cxx:59
 TQCutFactory.cxx:60
 TQCutFactory.cxx:61
 TQCutFactory.cxx:62
 TQCutFactory.cxx:63
 TQCutFactory.cxx:64
 TQCutFactory.cxx:65
 TQCutFactory.cxx:66
 TQCutFactory.cxx:67
 TQCutFactory.cxx:68
 TQCutFactory.cxx:69
 TQCutFactory.cxx:70
 TQCutFactory.cxx:71
 TQCutFactory.cxx:72
 TQCutFactory.cxx:73
 TQCutFactory.cxx:74
 TQCutFactory.cxx:75
 TQCutFactory.cxx:76
 TQCutFactory.cxx:77
 TQCutFactory.cxx:78
 TQCutFactory.cxx:79
 TQCutFactory.cxx:80
 TQCutFactory.cxx:81
 TQCutFactory.cxx:82
 TQCutFactory.cxx:83
 TQCutFactory.cxx:84
 TQCutFactory.cxx:85
 TQCutFactory.cxx:86
 TQCutFactory.cxx:87
 TQCutFactory.cxx:88
 TQCutFactory.cxx:89
 TQCutFactory.cxx:90
 TQCutFactory.cxx:91
 TQCutFactory.cxx:92
 TQCutFactory.cxx:93
 TQCutFactory.cxx:94
 TQCutFactory.cxx:95
 TQCutFactory.cxx:96
 TQCutFactory.cxx:97
 TQCutFactory.cxx:98
 TQCutFactory.cxx:99
 TQCutFactory.cxx:100
 TQCutFactory.cxx:101
 TQCutFactory.cxx:102
 TQCutFactory.cxx:103
 TQCutFactory.cxx:104
 TQCutFactory.cxx:105
 TQCutFactory.cxx:106
 TQCutFactory.cxx:107
 TQCutFactory.cxx:108
 TQCutFactory.cxx:109
 TQCutFactory.cxx:110
 TQCutFactory.cxx:111
 TQCutFactory.cxx:112
 TQCutFactory.cxx:113
 TQCutFactory.cxx:114
 TQCutFactory.cxx:115
 TQCutFactory.cxx:116
 TQCutFactory.cxx:117
 TQCutFactory.cxx:118
 TQCutFactory.cxx:119
 TQCutFactory.cxx:120
 TQCutFactory.cxx:121
 TQCutFactory.cxx:122
 TQCutFactory.cxx:123
 TQCutFactory.cxx:124
 TQCutFactory.cxx:125
 TQCutFactory.cxx:126
 TQCutFactory.cxx:127
 TQCutFactory.cxx:128
 TQCutFactory.cxx:129
 TQCutFactory.cxx:130
 TQCutFactory.cxx:131
 TQCutFactory.cxx:132
 TQCutFactory.cxx:133
 TQCutFactory.cxx:134
 TQCutFactory.cxx:135
 TQCutFactory.cxx:136
 TQCutFactory.cxx:137
 TQCutFactory.cxx:138
 TQCutFactory.cxx:139
 TQCutFactory.cxx:140
 TQCutFactory.cxx:141
 TQCutFactory.cxx:142
 TQCutFactory.cxx:143
 TQCutFactory.cxx:144
 TQCutFactory.cxx:145
 TQCutFactory.cxx:146
 TQCutFactory.cxx:147
 TQCutFactory.cxx:148
 TQCutFactory.cxx:149
 TQCutFactory.cxx:150
 TQCutFactory.cxx:151
 TQCutFactory.cxx:152
 TQCutFactory.cxx:153
 TQCutFactory.cxx:154
 TQCutFactory.cxx:155
 TQCutFactory.cxx:156
 TQCutFactory.cxx:157
 TQCutFactory.cxx:158
 TQCutFactory.cxx:159
 TQCutFactory.cxx:160
 TQCutFactory.cxx:161
 TQCutFactory.cxx:162
 TQCutFactory.cxx:163
 TQCutFactory.cxx:164
 TQCutFactory.cxx:165
 TQCutFactory.cxx:166
 TQCutFactory.cxx:167
 TQCutFactory.cxx:168
 TQCutFactory.cxx:169
 TQCutFactory.cxx:170
 TQCutFactory.cxx:171
 TQCutFactory.cxx:172
 TQCutFactory.cxx:173
 TQCutFactory.cxx:174
 TQCutFactory.cxx:175
 TQCutFactory.cxx:176
 TQCutFactory.cxx:177
 TQCutFactory.cxx:178
 TQCutFactory.cxx:179
 TQCutFactory.cxx:180
 TQCutFactory.cxx:181
 TQCutFactory.cxx:182
 TQCutFactory.cxx:183
 TQCutFactory.cxx:184
 TQCutFactory.cxx:185
 TQCutFactory.cxx:186
 TQCutFactory.cxx:187
 TQCutFactory.cxx:188
 TQCutFactory.cxx:189
 TQCutFactory.cxx:190
 TQCutFactory.cxx:191
 TQCutFactory.cxx:192
 TQCutFactory.cxx:193
 TQCutFactory.cxx:194
 TQCutFactory.cxx:195
 TQCutFactory.cxx:196
 TQCutFactory.cxx:197
 TQCutFactory.cxx:198
 TQCutFactory.cxx:199
 TQCutFactory.cxx:200
 TQCutFactory.cxx:201
 TQCutFactory.cxx:202
 TQCutFactory.cxx:203
 TQCutFactory.cxx:204
 TQCutFactory.cxx:205
 TQCutFactory.cxx:206
 TQCutFactory.cxx:207
 TQCutFactory.cxx:208
 TQCutFactory.cxx:209
 TQCutFactory.cxx:210
 TQCutFactory.cxx:211
 TQCutFactory.cxx:212
 TQCutFactory.cxx:213
 TQCutFactory.cxx:214
 TQCutFactory.cxx:215
 TQCutFactory.cxx:216
 TQCutFactory.cxx:217
 TQCutFactory.cxx:218
 TQCutFactory.cxx:219
 TQCutFactory.cxx:220
 TQCutFactory.cxx:221
 TQCutFactory.cxx:222
 TQCutFactory.cxx:223
 TQCutFactory.cxx:224
 TQCutFactory.cxx:225
 TQCutFactory.cxx:226
 TQCutFactory.cxx:227
 TQCutFactory.cxx:228
 TQCutFactory.cxx:229
 TQCutFactory.cxx:230
 TQCutFactory.cxx:231
 TQCutFactory.cxx:232
 TQCutFactory.cxx:233
 TQCutFactory.cxx:234
 TQCutFactory.cxx:235
 TQCutFactory.cxx:236
 TQCutFactory.cxx:237
 TQCutFactory.cxx:238
 TQCutFactory.cxx:239
 TQCutFactory.cxx:240
 TQCutFactory.cxx:241
 TQCutFactory.cxx:242
 TQCutFactory.cxx:243
 TQCutFactory.cxx:244
 TQCutFactory.cxx:245
 TQCutFactory.cxx:246
 TQCutFactory.cxx:247
 TQCutFactory.cxx:248
 TQCutFactory.cxx:249
 TQCutFactory.cxx:250
 TQCutFactory.cxx:251
 TQCutFactory.cxx:252
 TQCutFactory.cxx:253
 TQCutFactory.cxx:254
 TQCutFactory.cxx:255
 TQCutFactory.cxx:256
 TQCutFactory.cxx:257
 TQCutFactory.cxx:258
 TQCutFactory.cxx:259
 TQCutFactory.cxx:260
 TQCutFactory.cxx:261
 TQCutFactory.cxx:262
 TQCutFactory.cxx:263
 TQCutFactory.cxx:264
 TQCutFactory.cxx:265
 TQCutFactory.cxx:266
 TQCutFactory.cxx:267
 TQCutFactory.cxx:268
 TQCutFactory.cxx:269
 TQCutFactory.cxx:270
 TQCutFactory.cxx:271
 TQCutFactory.cxx:272
 TQCutFactory.cxx:273
 TQCutFactory.cxx:274
 TQCutFactory.cxx:275
 TQCutFactory.cxx:276
 TQCutFactory.cxx:277
 TQCutFactory.cxx:278
 TQCutFactory.cxx:279
 TQCutFactory.cxx:280
 TQCutFactory.cxx:281
 TQCutFactory.cxx:282
 TQCutFactory.cxx:283
 TQCutFactory.cxx:284
 TQCutFactory.cxx:285
 TQCutFactory.cxx:286
 TQCutFactory.cxx:287
 TQCutFactory.cxx:288
 TQCutFactory.cxx:289
 TQCutFactory.cxx:290
 TQCutFactory.cxx:291
 TQCutFactory.cxx:292
 TQCutFactory.cxx:293
 TQCutFactory.cxx:294
 TQCutFactory.cxx:295
 TQCutFactory.cxx:296
 TQCutFactory.cxx:297
 TQCutFactory.cxx:298
 TQCutFactory.cxx:299
 TQCutFactory.cxx:300
 TQCutFactory.cxx:301
 TQCutFactory.cxx:302
 TQCutFactory.cxx:303
 TQCutFactory.cxx:304
 TQCutFactory.cxx:305
 TQCutFactory.cxx:306
 TQCutFactory.cxx:307
 TQCutFactory.cxx:308
 TQCutFactory.cxx:309
 TQCutFactory.cxx:310
 TQCutFactory.cxx:311
 TQCutFactory.cxx:312
 TQCutFactory.cxx:313
 TQCutFactory.cxx:314
 TQCutFactory.cxx:315
 TQCutFactory.cxx:316
 TQCutFactory.cxx:317
 TQCutFactory.cxx:318
 TQCutFactory.cxx:319
 TQCutFactory.cxx:320
 TQCutFactory.cxx:321
 TQCutFactory.cxx:322
 TQCutFactory.cxx:323
 TQCutFactory.cxx:324
 TQCutFactory.cxx:325
 TQCutFactory.cxx:326
 TQCutFactory.cxx:327
 TQCutFactory.cxx:328
 TQCutFactory.cxx:329
 TQCutFactory.cxx:330
 TQCutFactory.cxx:331
 TQCutFactory.cxx:332
 TQCutFactory.cxx:333
 TQCutFactory.cxx:334
 TQCutFactory.cxx:335
 TQCutFactory.cxx:336
 TQCutFactory.cxx:337
 TQCutFactory.cxx:338
 TQCutFactory.cxx:339
 TQCutFactory.cxx:340
 TQCutFactory.cxx:341
 TQCutFactory.cxx:342
 TQCutFactory.cxx:343
 TQCutFactory.cxx:344
 TQCutFactory.cxx:345
 TQCutFactory.cxx:346
 TQCutFactory.cxx:347
 TQCutFactory.cxx:348
 TQCutFactory.cxx:349
 TQCutFactory.cxx:350
 TQCutFactory.cxx:351
 TQCutFactory.cxx:352
 TQCutFactory.cxx:353
 TQCutFactory.cxx:354
 TQCutFactory.cxx:355
 TQCutFactory.cxx:356
 TQCutFactory.cxx:357
 TQCutFactory.cxx:358
 TQCutFactory.cxx:359
 TQCutFactory.cxx:360
 TQCutFactory.cxx:361
 TQCutFactory.cxx:362
 TQCutFactory.cxx:363
 TQCutFactory.cxx:364
 TQCutFactory.cxx:365
 TQCutFactory.cxx:366
 TQCutFactory.cxx:367
 TQCutFactory.cxx:368
 TQCutFactory.cxx:369
 TQCutFactory.cxx:370
 TQCutFactory.cxx:371
 TQCutFactory.cxx:372
 TQCutFactory.cxx:373
 TQCutFactory.cxx:374
 TQCutFactory.cxx:375
 TQCutFactory.cxx:376
 TQCutFactory.cxx:377
 TQCutFactory.cxx:378
 TQCutFactory.cxx:379
 TQCutFactory.cxx:380
 TQCutFactory.cxx:381
 TQCutFactory.cxx:382
 TQCutFactory.cxx:383
 TQCutFactory.cxx:384
 TQCutFactory.cxx:385
 TQCutFactory.cxx:386
 TQCutFactory.cxx:387
 TQCutFactory.cxx:388
 TQCutFactory.cxx:389
 TQCutFactory.cxx:390
 TQCutFactory.cxx:391
 TQCutFactory.cxx:392
 TQCutFactory.cxx:393
 TQCutFactory.cxx:394
 TQCutFactory.cxx:395
 TQCutFactory.cxx:396
 TQCutFactory.cxx:397
 TQCutFactory.cxx:398
 TQCutFactory.cxx:399
 TQCutFactory.cxx:400
 TQCutFactory.cxx:401
 TQCutFactory.cxx:402
 TQCutFactory.cxx:403
 TQCutFactory.cxx:404
 TQCutFactory.cxx:405
 TQCutFactory.cxx:406
 TQCutFactory.cxx:407
 TQCutFactory.cxx:408
 TQCutFactory.cxx:409
 TQCutFactory.cxx:410
 TQCutFactory.cxx:411