HARPO  5.1.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Static Public Attributes | Protected Attributes
HarpoConfig Class Reference

A class which keeps track of the entire configuration of the analysis. More...

#include <HarpoConfig.h>

Public Member Functions

 HarpoConfig ()
 Constructor which does basically nothing. More...
 
 HarpoConfig (int argc, char **argv, ULong64_t detmask=0x3)
 Real Constructor. More...
 
virtual ~HarpoConfig ()
 Destructor: More...
 
void Init ()
 
void ParseArgs (int argc, char **argv, ULong64_t detmask=0x3)
 Init Config data. More...
 
void SetInFile (char *fin, Int_t plane=0)
 Set Input file name for detector. More...
 
void SetOutFile (char *fout)
 Set Output root file name. More...
 
void SetHistFile (char *fcfg)
 Set Name of Histogram output file. More...
 
void SetAnalyses (char *fcfg)
 Set List of HarpoAnalyses to run. More...
 
void SetVerbose (Long64_t v=1)
 Set program verbosity level. More...
 
void SetMaxEvents (Long64_t nevt)
 Set Max Event for prosess. More...
 
void SetFromEvent (Long64_t nevt)
 Set First Event to process. More...
 
void SetToEvent (Long64_t nevt)
 Set Last Event number to process. More...
 
void SetNEvent (Long64_t nevt)
 Set Event number with we looking for. More...
 
void SetRunNo (Long64_t nrun)
 Set Run Number. More...
 
void SetSkipEvents (Long64_t skip)
 
Long64_t GetSkipEvents ()
 
void SetSplit (Long64_t split)
 
Long64_t GetSplit ()
 
TString * GetInFile (Int_t idet)
 Get Input file name for detector. More...
 
TString * GetOutFile ()
 Get Output root file name. More...
 
TString * GetHistFile ()
 Get Name of Histogram output file. More...
 
TString * GetAnalyses ()
 Get List of HarpoAnalyses. More...
 
TString * GetProgramName ()
 Get Program Name. More...
 
TString * GetWorkDir ()
 
TString * GetDataDir ()
 Get Top Data directory. More...
 
void SetDataDir (char *datadir)
 Get Top Data directory. More...
 
Long64_t GetVerbose ()
 Get program verbosity level. More...
 
Long64_t GetMaxEvents ()
 Get Max Event for prosess. More...
 
Long64_t GetFromEvent ()
 Get First Event to process. More...
 
Long64_t GetToEvent ()
 Get Last Event number to process. More...
 
Long64_t GetNEvent ()
 Get Event number with we looking for. More...
 
Long64_t GetRunNo ()
 Set Run Number. More...
 
Long64_t GetType ()
 Return global Harpo Reader type. More...
 
Long64_t GetDetRdrType (HarpoDetType nDet)
 Return type of reader impementation for given Harpo Detector. More...
 
void SetDetRdrType (HarpoDetType nDet, Long64_t rtype)
 Set type of reader impementation for given Harpo Detector. More...
 
Long64_t GetDet ()
 Get Detector Number for single detector readers. More...
 
HarpoDetSetGetDetSet ()
 Get set of active detectors. More...
 
TString * GetPedFile ()
 Get Pedestal file. More...
 
void SetPedFile (char *pfile)
 Set Pedestal File. More...
 
TString * GetDbUrl ()
 Get harpo database server URL. More...
 
void SetDbUrl (char *url)
 Set harpo database server URL. More...
 
HarpoPedMgrGetHarpoPedMgr ()
 Get pointer to Harpo Feminos pdestal manager. More...
 
void SetHarpoPedMgr (HarpoPedMgr *pm)
 Set Harpo Feminos pdestal manager. More...
 
Bool_t isWriterEnabled ()
 Check if Writer Enabled. More...
 
void SetWriterEnable (Bool_t enable=true)
 Set Writer Enabled Flag. More...
 
Bool_t ReadCfgFile ()
 
void print () const
 Read config file in libconfig format. More...
 
void help ()
 help More...
 
Bool_t SetCfgFile (const char *fcfg)
 Set Name of libconfig configuration file. More...
 
TString * GetCfgFile ()
 Get Name of libconfig configuration file. More...
 
Bool_t Exist (const char *path)
 
Int_t getSettingType (const char *path)
 Return paramener type as definef in libconfig.h++. More...
 
Bool_t Lookup (const char *path, Bool_t &val)
 Lookup function for scalar values. More...
 
Bool_t Lookup (const char *path, Long64_t &val)
 
Bool_t Lookup (const char *path, ULong64_t &val)
 
Bool_t Lookup (const char *path, Double_t &val)
 
Bool_t Lookup (const char *path, TString &val)
 
Bool_t Lookup (const char *path, TString *&val)
 
Int_t getSettingLength (const char *path)
 Function to deal with arrays or lists. More...
 
Bool_t LookupElem (const char *path, UInt_t index, Bool_t &val)
 
Bool_t LookupElem (const char *path, UInt_t index, Long64_t &val)
 
Bool_t LookupElem (const char *path, UInt_t index, ULong64_t &val)
 
Bool_t LookupElem (const char *path, UInt_t index, Double_t &val)
 
Bool_t LookupElem (const char *path, UInt_t index, TString &val)
 
Bool_t LookupElem (const char *path, UInt_t index, TString *&val)
 

Static Public Attributes

static hReaderType gHReaderType = hRawReader
 Reader Type. More...
 

Protected Attributes

Bool_t fWriterEnabled
 
Long64_t fSkipEvents
 Enabke/Disble Output Tree writer. More...
 
Long64_t fSplit
 Events to skeep. More...
 
Long64_t Verbose
 
Long64_t MaxEvents
 Verbose level. More...
 
Long64_t FromEvent
 Max number events to process. More...
 
Long64_t ToEvent
 Fist event for analyse. More...
 
Long64_t nEvent
 Last event for analyse. More...
 
Long64_t RunNo
 Event number to show/print etc. More...
 
Long64_t detmask
 Current run number. More...
 
Long64_t DetNo
 Detector mask (default 0x3) More...
 
Long64_t tDetRdr [gkNDetectors]
 Detector id (for dummy reader) More...
 
TString ** fInFile
 
TString * fOutFile
 Array of input row files. More...
 
TString * fHistFile
 Output file for root tries. More...
 
TString * fAnalyses
 Output file for histograms. More...
 
TString * fPedFile
 List of HarpoAnalyses to run. More...
 
TString * fDbUrl
 root file with feminos pedstals More...
 
TString * ProgramName
 db serevr url More...
 
TString * WorkDir
 
TString * DataDir
 
HarpoPedMgrfPedMgr
 
libconfig::Config * lcfg
 
TString * fCfgFile
 
Bool_t infiles
 Config file name. More...
 

Detailed Description

A class which keeps track of the entire configuration of the analysis.

The class is initialized by calling the Init() where a configuration file and opened and parsed. Subsequently, the user may ask for the values of the the configuration options or whether options were provided

Program interface: prog -c cfgfile OPTIONS [x_rawfile] [y_rawfile] ...

  1. - Command line options:
  1. -Configuration file: The must of opinins can be provided via config file. HarpoCondig loooking config file for global variables:

also it paresed variable in [config] sections. the varibles list :

Harpo Config has 3 parts

Addeeed gROOT ininialisation for applications which not use TApplication

IMPORTANT: For Alication which call TRint or TApplication HarpoConfig must be created after this calls !!!!

Definition at line 50 of file HarpoConfig.h.

Constructor & Destructor Documentation

HarpoConfig::HarpoConfig ( )

Constructor which does basically nothing.

db serevr url

Definition at line 176 of file HarpoConfig.cxx.

Here is the call graph for this function:

HarpoConfig::HarpoConfig ( int  argc,
char **  argv,
ULong64_t  detmask = 0x3 
)

Real Constructor.

db serevr url

Definition at line 217 of file HarpoConfig.cxx.

Here is the call graph for this function:

HarpoConfig::~HarpoConfig ( )
virtual

Destructor:

Definition at line 700 of file HarpoConfig.cxx.

Member Function Documentation

Bool_t HarpoConfigFile::Exist ( const char *  path)
inherited

Definition at line 80 of file HarpoConfigFile.cxx.

Here is the caller graph for this function:

TString* HarpoConfig::GetAnalyses ( )
inline

Get List of HarpoAnalyses.

Definition at line 102 of file HarpoConfig.h.

Here is the caller graph for this function:

TString* HarpoConfigFile::GetCfgFile ( )
inlineinherited

Get Name of libconfig configuration file.

Definition at line 37 of file HarpoConfigFile.h.

TString* HarpoConfig::GetDataDir ( )
inline

Get Top Data directory.

Definition at line 110 of file HarpoConfig.h.

TString* HarpoConfig::GetDbUrl ( )
inline

Get harpo database server URL.

Definition at line 153 of file HarpoConfig.h.

Here is the caller graph for this function:

Long64_t HarpoConfig::GetDet ( )
inline

Get Detector Number for single detector readers.

Definition at line 142 of file HarpoConfig.h.

Here is the caller graph for this function:

Long64_t HarpoConfig::GetDetRdrType ( HarpoDetType  nDet)

Return type of reader impementation for given Harpo Detector.

Definition at line 683 of file HarpoConfig.cxx.

Here is the caller graph for this function:

HarpoDetSet * HarpoConfig::GetDetSet ( )

Get set of active detectors.

Definition at line 278 of file HarpoConfig.cxx.

Here is the call graph for this function:

Long64_t HarpoConfig::GetFromEvent ( )
inline

Get First Event to process.

Definition at line 120 of file HarpoConfig.h.

Here is the caller graph for this function:

HarpoPedMgr* HarpoConfig::GetHarpoPedMgr ( )
inline

Get pointer to Harpo Feminos pdestal manager.

Definition at line 163 of file HarpoConfig.h.

Here is the caller graph for this function:

TString* HarpoConfig::GetHistFile ( )
inline

Get Name of Histogram output file.

Definition at line 100 of file HarpoConfig.h.

Here is the caller graph for this function:

TString* HarpoConfig::GetInFile ( Int_t  idet)
inline

Get Input file name for detector.

Definition at line 96 of file HarpoConfig.h.

Here is the caller graph for this function:

Long64_t HarpoConfig::GetMaxEvents ( )
inline

Get Max Event for prosess.

Definition at line 118 of file HarpoConfig.h.

Here is the caller graph for this function:

Long64_t HarpoConfig::GetNEvent ( )
inline

Get Event number with we looking for.

Definition at line 124 of file HarpoConfig.h.

Here is the caller graph for this function:

TString* HarpoConfig::GetOutFile ( )
inline

Get Output root file name.

Definition at line 98 of file HarpoConfig.h.

Here is the caller graph for this function:

TString* HarpoConfig::GetPedFile ( )
inline

Get Pedestal file.

Definition at line 148 of file HarpoConfig.h.

TString* HarpoConfig::GetProgramName ( )
inline

Get Program Name.

Definition at line 105 of file HarpoConfig.h.

Here is the caller graph for this function:

Long64_t HarpoConfig::GetRunNo ( )
inline

Set Run Number.

Definition at line 127 of file HarpoConfig.h.

Here is the caller graph for this function:

Int_t HarpoConfigFile::getSettingLength ( const char *  path)
inherited

Function to deal with arrays or lists.

Definition at line 164 of file HarpoConfigFile.cxx.

Here is the caller graph for this function:

Int_t HarpoConfigFile::getSettingType ( const char *  path)
inherited

Return paramener type as definef in libconfig.h++.

Definition at line 173 of file HarpoConfigFile.cxx.

Long64_t HarpoConfig::GetSkipEvents ( )
inline

Definition at line 90 of file HarpoConfig.h.

Here is the caller graph for this function:

Long64_t HarpoConfig::GetSplit ( )
inline

Definition at line 93 of file HarpoConfig.h.

Here is the caller graph for this function:

Long64_t HarpoConfig::GetToEvent ( )
inline

Get Last Event number to process.

Definition at line 122 of file HarpoConfig.h.

Here is the caller graph for this function:

Long64_t HarpoConfig::GetType ( )
inline

Return global Harpo Reader type.

Definition at line 130 of file HarpoConfig.h.

Long64_t HarpoConfig::GetVerbose ( )
inline

Get program verbosity level.

Definition at line 115 of file HarpoConfig.h.

Here is the caller graph for this function:

TString* HarpoConfig::GetWorkDir ( )
inline

Get Current working directory Return path to executaable or PWD

Definition at line 108 of file HarpoConfig.h.

void HarpoConfig::help ( )

help

Print Usage and exit.

Definition at line 141 of file HarpoConfig.cxx.

Here is the caller graph for this function:

void HarpoConfig::Init ( )
inline

Definition at line 63 of file HarpoConfig.h.

Here is the caller graph for this function:

Bool_t HarpoConfig::isWriterEnabled ( )
inline

Check if Writer Enabled.

Definition at line 168 of file HarpoConfig.h.

Here is the caller graph for this function:

Bool_t HarpoConfigFile::Lookup ( const char *  path,
Bool_t &  val 
)
inherited

Lookup function for scalar values.

Definition at line 85 of file HarpoConfigFile.cxx.

Here is the caller graph for this function:

Bool_t HarpoConfigFile::Lookup ( const char *  path,
Long64_t &  val 
)
inherited

Definition at line 94 of file HarpoConfigFile.cxx.

Bool_t HarpoConfigFile::Lookup ( const char *  path,
ULong64_t &  val 
)
inherited

Definition at line 113 of file HarpoConfigFile.cxx.

Bool_t HarpoConfigFile::Lookup ( const char *  path,
Double_t &  val 
)
inherited

Definition at line 132 of file HarpoConfigFile.cxx.

Bool_t HarpoConfigFile::Lookup ( const char *  path,
TString &  val 
)
inherited

Definition at line 141 of file HarpoConfigFile.cxx.

Bool_t HarpoConfigFile::Lookup ( const char *  path,
TString *&  val 
)
inherited

Definition at line 152 of file HarpoConfigFile.cxx.

Bool_t HarpoConfigFile::LookupElem ( const char *  path,
UInt_t  index,
Bool_t &  val 
)
inherited

Definition at line 182 of file HarpoConfigFile.cxx.

Here is the caller graph for this function:

Bool_t HarpoConfigFile::LookupElem ( const char *  path,
UInt_t  index,
Long64_t &  val 
)
inherited

Definition at line 192 of file HarpoConfigFile.cxx.

Bool_t HarpoConfigFile::LookupElem ( const char *  path,
UInt_t  index,
ULong64_t &  val 
)
inherited

Definition at line 202 of file HarpoConfigFile.cxx.

Bool_t HarpoConfigFile::LookupElem ( const char *  path,
UInt_t  index,
Double_t &  val 
)
inherited

Definition at line 212 of file HarpoConfigFile.cxx.

Bool_t HarpoConfigFile::LookupElem ( const char *  path,
UInt_t  index,
TString &  val 
)
inherited

Definition at line 222 of file HarpoConfigFile.cxx.

Bool_t HarpoConfigFile::LookupElem ( const char *  path,
UInt_t  index,
TString *&  val 
)
inherited

Definition at line 233 of file HarpoConfigFile.cxx.

void HarpoConfig::ParseArgs ( int  argc,
char **  argv,
ULong64_t  detmask = 0x3 
)

Init Config data.

Definition at line 283 of file HarpoConfig.cxx.

Here is the call graph for this function:

Here is the caller graph for this function:

void HarpoConfig::print ( ) const

Read config file in libconfig format.

Print all options to cout.

Definition at line 769 of file HarpoConfig.cxx.

Here is the call graph for this function:

Here is the caller graph for this function:

Bool_t HarpoConfig::ReadCfgFile ( )

Definition at line 547 of file HarpoConfig.cxx.

Here is the call graph for this function:

Here is the caller graph for this function:

void HarpoConfig::SetAnalyses ( char *  fcfg)

Set List of HarpoAnalyses to run.

Definition at line 736 of file HarpoConfig.cxx.

Bool_t HarpoConfigFile::SetCfgFile ( const char *  fcfg)
inherited

Set Name of libconfig configuration file.

Definition at line 63 of file HarpoConfigFile.cxx.

Here is the caller graph for this function:

void HarpoConfig::SetDataDir ( char *  datadir)

Get Top Data directory.

Definition at line 762 of file HarpoConfig.cxx.

void HarpoConfig::SetDbUrl ( char *  url)

Set harpo database server URL.

Definition at line 749 of file HarpoConfig.cxx.

Here is the caller graph for this function:

void HarpoConfig::SetDetRdrType ( HarpoDetType  nDet,
Long64_t  rtype 
)

Set type of reader impementation for given Harpo Detector.

Definition at line 692 of file HarpoConfig.cxx.

Here is the caller graph for this function:

void HarpoConfig::SetFromEvent ( Long64_t  nevt)
inline

Set First Event to process.

Definition at line 81 of file HarpoConfig.h.

Here is the caller graph for this function:

void HarpoConfig::SetHarpoPedMgr ( HarpoPedMgr pm)
inline

Set Harpo Feminos pdestal manager.

Definition at line 165 of file HarpoConfig.h.

void HarpoConfig::SetHistFile ( char *  fcfg)

Set Name of Histogram output file.

Definition at line 730 of file HarpoConfig.cxx.

Here is the caller graph for this function:

void HarpoConfig::SetInFile ( char *  fin,
Int_t  plane = 0 
)

Set Input file name for detector.

Definition at line 717 of file HarpoConfig.cxx.

Here is the call graph for this function:

Here is the caller graph for this function:

void HarpoConfig::SetMaxEvents ( Long64_t  nevt)
inline

Set Max Event for prosess.

Definition at line 79 of file HarpoConfig.h.

Here is the caller graph for this function:

void HarpoConfig::SetNEvent ( Long64_t  nevt)
inline

Set Event number with we looking for.

Definition at line 85 of file HarpoConfig.h.

Here is the caller graph for this function:

void HarpoConfig::SetOutFile ( char *  fout)

Set Output root file name.

Definition at line 724 of file HarpoConfig.cxx.

Here is the caller graph for this function:

void HarpoConfig::SetPedFile ( char *  pfile)

Set Pedestal File.

Definition at line 742 of file HarpoConfig.cxx.

Here is the caller graph for this function:

void HarpoConfig::SetRunNo ( Long64_t  nrun)
inline

Set Run Number.

Definition at line 87 of file HarpoConfig.h.

Here is the caller graph for this function:

void HarpoConfig::SetSkipEvents ( Long64_t  skip)
inline

Definition at line 89 of file HarpoConfig.h.

Here is the caller graph for this function:

void HarpoConfig::SetSplit ( Long64_t  split)
inline

Definition at line 92 of file HarpoConfig.h.

Here is the caller graph for this function:

void HarpoConfig::SetToEvent ( Long64_t  nevt)
inline

Set Last Event number to process.

Definition at line 83 of file HarpoConfig.h.

Here is the caller graph for this function:

void HarpoConfig::SetVerbose ( Long64_t  v = 1)
inline

Set program verbosity level.

Definition at line 76 of file HarpoConfig.h.

Here is the caller graph for this function:

void HarpoConfig::SetWriterEnable ( Bool_t  enable = true)
inline

Set Writer Enabled Flag.

Definition at line 170 of file HarpoConfig.h.

Here is the caller graph for this function:

Field Documentation

TString* HarpoConfig::DataDir
protected

Definition at line 210 of file HarpoConfig.h.

Long64_t HarpoConfig::detmask
protected

Current run number.

Definition at line 195 of file HarpoConfig.h.

Long64_t HarpoConfig::DetNo
protected

Detector mask (default 0x3)

Definition at line 196 of file HarpoConfig.h.

TString* HarpoConfig::fAnalyses
protected

Output file for histograms.

Definition at line 202 of file HarpoConfig.h.

TString* HarpoConfigFile::fCfgFile
protectedinherited

Definition at line 85 of file HarpoConfigFile.h.

TString* HarpoConfig::fDbUrl
protected

root file with feminos pedstals

Definition at line 205 of file HarpoConfig.h.

TString* HarpoConfig::fHistFile
protected

Output file for root tries.

Definition at line 201 of file HarpoConfig.h.

TString** HarpoConfig::fInFile
protected

Definition at line 199 of file HarpoConfig.h.

TString* HarpoConfig::fOutFile
protected

Array of input row files.

Definition at line 200 of file HarpoConfig.h.

TString* HarpoConfig::fPedFile
protected

List of HarpoAnalyses to run.

Definition at line 204 of file HarpoConfig.h.

HarpoPedMgr* HarpoConfig::fPedMgr
protected

Definition at line 212 of file HarpoConfig.h.

Long64_t HarpoConfig::FromEvent
protected

Max number events to process.

Definition at line 190 of file HarpoConfig.h.

Long64_t HarpoConfig::fSkipEvents
protected

Enabke/Disble Output Tree writer.

Definition at line 185 of file HarpoConfig.h.

Long64_t HarpoConfig::fSplit
protected

Events to skeep.

Definition at line 186 of file HarpoConfig.h.

Bool_t HarpoConfig::fWriterEnabled
protected

Definition at line 183 of file HarpoConfig.h.

hReaderType HarpoConfig::gHReaderType = hRawReader
static

Reader Type.

Definition at line 179 of file HarpoConfig.h.

Bool_t HarpoConfigFile::infiles
protectedinherited

Config file name.

Definition at line 86 of file HarpoConfigFile.h.

libconfig::Config* HarpoConfigFile::lcfg
protectedinherited

Definition at line 83 of file HarpoConfigFile.h.

Long64_t HarpoConfig::MaxEvents
protected

Verbose level.

Definition at line 189 of file HarpoConfig.h.

Long64_t HarpoConfig::nEvent
protected

Last event for analyse.

Definition at line 192 of file HarpoConfig.h.

TString* HarpoConfig::ProgramName
protected

db serevr url

Definition at line 208 of file HarpoConfig.h.

Long64_t HarpoConfig::RunNo
protected

Event number to show/print etc.

Definition at line 193 of file HarpoConfig.h.

Long64_t HarpoConfig::tDetRdr[gkNDetectors]
protected

Detector id (for dummy reader)

Definition at line 197 of file HarpoConfig.h.

Long64_t HarpoConfig::ToEvent
protected

Fist event for analyse.

Definition at line 191 of file HarpoConfig.h.

Long64_t HarpoConfig::Verbose
protected

Definition at line 188 of file HarpoConfig.h.

TString* HarpoConfig::WorkDir
protected

Definition at line 209 of file HarpoConfig.h.


The documentation for this class was generated from the following files: