FEDRA emulsion software from the OPERA Collaboration
emrec.cpp File Reference
#include <iostream>
#include "EdbLog.h"
#include "EdbScanProc.h"
#include "EdbProcPars.h"
Include dependency graph for emrec.cpp:

Functions

TEnv cenv ("emrec")
 
int main (int argc, char *argv[])
 
void print_help_message ()
 
void process ()
 

Variables

bool do_set = 0
 
EdbID idset
 
const char * outdir = ".."
 

Function Documentation

◆ cenv()

TEnv cenv ( "emrec"  )

◆ main()

int main ( int  argc,
char *  argv[] 
)
57 {
58  if (argc < 2) { print_help_message(); return 0; }
59 
60  for(int i=1; i<argc; i++ ) {
61  char *key = argv[i];
62  if(!strncmp(key,"-set=",5))
63  {
64  if(strlen(key)>5) idset.Set(key+5); do_set=true;
65  }
66  else if(!strncmp(key,"-v=",3))
67  {
68  if(strlen(key)>3) gEDBDEBUGLEVEL = atoi(key+3);
69  }
70  else if(!strncmp(key,"-o=",3))
71  {
72  if(strlen(key)>3) outdir=key+3;
73  }
74  }
75 
76  cenv.ReadFile("emrec.rootrc" ,kEnvLocal);
77  cenv.SetValue("emrec.outdir", outdir);
78 
79  if(do_set) process();
80 
81  cenv.WriteFile("emrec.save.rootrc");
82 
83  return 0;
84 }
bool Set(const char *id_string)
Definition: EdbID.cxx:17
void process()
Definition: emrec.cpp:40
TEnv cenv("emrec")
void print_help_message()
Definition: emrec.cpp:9
bool do_set
Definition: emrec.cpp:36
EdbID idset
Definition: emrec.cpp:35
const char * outdir
Definition: emrec.cpp:37
gEDBDEBUGLEVEL
Definition: energy.C:7

◆ print_help_message()

void print_help_message ( )
10 {
11  cout<< "\n Complete reconstruction of one volume \n";
12  cout<< "\t a) preliminary operations:\n";
13  cout<< "\t checks, linking, alignment, tracking and corrections search\n";
14  cout<< "\t b) final operations:\n";
15  cout<< "\t tracking with microtracks, predictions search\n";
16  cout<< "\t vertexing and decay search\n";
17 
18  cout<< "\nUsage: \n\t emrec -set=ID [-v=DEBUG -o=DATA_DIRECTORY] \n";
19  cout<< "\t\t ID - id of the data piece or dataset formed as BRICK.PLATE.MAJOR.MINOR \n";
20  cout<< "\t\t DEBUG - verbosity level: 0-print nothing, 1-errors only, 2-normal, 3-print all messages\n";
21 
22  cout<< "\nExample: \n";
23  cout<< "\t emrec -set=4554.10.1.0 -v=2 -o/scratch/BRICKS \n";
24 
25  cout<< "\n If the data location directory is not explicitly defined\n";
26  cout<< " the current directory assumed to be the brick directory \n";
27 
28  cout<< "\n If the parameters file (link.rootrc) is not presented - the default \n";
29  cout<< " parameters are used. After the execution them will be saved into emrec.save.rootrc\n";
30  cout<<endl;
31 }

◆ process()

void process ( )
41 {
44 
45  Log(1,"emrec::process","Setting linking definitions via: EdbProcPars::SetLinkDef(cenv);");
47 
48  Log(1,"emrec::process","Do the linking of the ScanProc instance via sproc.LinkSetNewTest(*ss, cenv);");
50 
52 
53 }
bool Log(int level, const char *location, const char *fmt,...)
Definition: EdbLog.cxx:75
static void SetLinkDef(TEnv &cenv)
Definition: EdbScanProc.h:12
void MakeLinkSetSummary(EdbID id, const char *fileformat="pdf")
Definition: EdbScanProc.cxx:2976
void LinkSetNewTest(EdbScanSet &sc, TEnv &cenv, Int_t ix=-1, Int_t iy=-1)
Definition: EdbScanProc.cxx:3345
EdbScanSet * ReadScanSet(EdbID id)
Definition: EdbScanProc.cxx:1521
Definition: EdbScanSet.h:11
EdbScanProc * sproc
Definition: comptonmap.cpp:29
ss
Definition: energy.C:62

Variable Documentation

◆ do_set

bool do_set = 0

◆ idset

EdbID idset

◆ outdir

const char* outdir = ".."