# Proof lite performance

**URL:** <https://root-forum.cern.ch/t/proof-lite-performance/21012>\
**Category:** ROOT\
**Created:** [April 21, 2016, 2:13pm UTC](https://root-forum.cern.ch/t/proof-lite-performance/21012 "2016-04-21T14:13:25Z")\
**Posts on this page:** 1\
**Showing post:** 7

<div class="post-metadata">

**Author:** ![mgv4ce](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/m/8edcca/32.png) [@mgv4ce](https://root-forum.cern.ch/u/mgv4ce)\
**Post date:** [April 28, 2016, 5:34pm UTC](https://root-forum.cern.ch/t/proof-lite-performance/21012/7 "2016-04-28T17:34:02Z")

</div>

I found a thread that had sort of similar problems: [G++ standalone: TProof using TChain](https://root-forum.cern.ch/t/g-standalone-tproof-using-tchain/17733/1)

It seems that it is hard to call a TSelector object within compiled code. One needs the code-generation of root (via CINT or something).

So I adapted my code to use the call-by-filename method that seems easier. I have adapted my main program to be that below:

```auto
int main (int argc, char *argv[]) 
{
   const TString mode = argv[1];
   const TString channel = argv[2];
   const TString outFileName = argv[3];
   const TString inFileName = argv[4];

   TFile *inFile = TFile::Open(inFileName.Data());
   cout<<"-->Opened inFile : " << inFileName << endl;
   TChain *inTree = (TChain*)inFile->Get("usertree");
   TProof *proof = TProof::Open("");
   inTree->SetProof(proof);

   TStopwatch* loopTimer = new TStopwatch();
   subAnalyzerClass *s = new subAnalyzerClass();
   s->Begin(mode, channel, inTree);
   s->SlaveBegin();
   inTree->Process("subAnalyzerClass.C");
   s->SlaveTerminate();
   s->Terminate();
   loopTimer->Stop();
   cout<<"Time: "<<loopTimer->RealTime()<<" s\n";
   return 0;
}

```

The other methods are unchanged. Running this gives the following output:

```auto
-->Opened inFile : result.root
 +++ Starting PROOF-Lite with 4 workers +++
Opening connections to workers: OK (4 workers)                 
Setting up worker servers: OK (4 workers)                 
PROOF set to parallel mode (4 workers)
set the mode and channel
Beginning slave.
Slave begun.
Error: Symbol __BEGIN_DECLS#include is not defined in current scope /usr/include/sys/types.h:34:
Error: Symbol bits is not defined in current scope /usr/include/sys/types.h:34:
Error: Symbol types is not defined in current scope /usr/include/sys/types.h:34:
Error: Failed to evaluate types.h
Error: operator '/' divided by zero /usr/include/sys/types.h:34:
Error: Invalid type '#ifdef' in declaration of ' __USE_BSD#ifndef__ u_char_defined typedef __u_char u_char' /usr/include/sys/types.h:34:
Error: Symbol #ifdef __USE_BSD#ifndef__ u_char_defined typedef __u_char u_char is not defined in current scope /usr/include/sys/types.h:34:
***Interpreter error recovered***
Error in <TSelector::GetSelector>: The file subAnalyzerClass.C does not define a class named subAnalyzerClass.
reporting status for Process as: 1
-->successfully made the bush.
-->it has # of entries = 0
Time: 0.112967 s
```

How can I get CINT to process my macro here?

Many Thanks!  
Mike

---

_[View the full topic](https://root-forum.cern.ch/t/proof-lite-performance/21012)._
