Newer
Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
#ifndef NPOPTIONMANAGER_HH
#define NPOPTIONMANAGER_HH
/*****************************************************************************
* Copyright (C) 2009-2010 this file is part of the NPTool Project *
* *
* For the licensing terms see $NPTOOL/Licence/NPTool_Licence *
* For the list of contributors see $NPTOOL/Licence/Contributors *
*****************************************************************************/
/*****************************************************************************
* Original Author: A. MATTA contact address: matta@ipno.in2p3.fr *
* *
* Creation Date : 21/07/09 *
* Last update : *
*---------------------------------------------------------------------------*
* Decription: This class is a singleton class which deals with input *
* arguments of the different NPTool programm (NPS and NPA) *
*---------------------------------------------------------------------------*
* Comment: The singleton form allow users to call the object from anywhere *
* in the code *
* *
* *
*****************************************************************************/
// STL headers
#include <iostream>
#include <string>
using namespace std;
class NPOptionManager
{
public:
// The analysis class is designed to be a singleton (i.e. only one instance
// can exist). A member function called Instance is defined, which allows
// the user to get a pointer to the existing instance or to create it if
// it does not yet exist:
// (see the constructor for an explanation of the arguments)
static NPOptionManager* getInstance(int argc=0,char** argv=NULL);
// The analysis class instance can be deleted by calling the Destroy
// method (NOTE: The class destructor is protected, and can thus not be
// called directly):
static void Destroy();
protected:
// Constructor (protected)
NPOptionManager(int argc,char** argv);
// Destructor (protected)
~NPOptionManager() {};
// Prevent copying
NPOptionManager(const NPOptionManager& only);
const NPOptionManager& operator=(const NPOptionManager& only);
private:
// The static instance of the NPOptionManager class:
static NPOptionManager* instance;
private:
void DisplayHelp();
public:
string GetReactionFilePath() { return fReactionFileName ; } ;
string GetDetectorFilePath() { return fDetectorFileName ; } ;
string GetRunToReadFilePath() { return fRunToReadFileName ; } ;
string GetCalibrationFilePath() { return fCalibrationFileName ; } ;
string GetOutputFilePath() { return fOutputFileName ; } ;
bool GetDisableAllBranchOption() { return fDisableAllBranchOption ; } ;
string fReactionFileName ;
string fDetectorFileName ;
string fRunToReadFileName ;
string fCalibrationFileName ;
string fOutputFileName ;
bool fDisableAllBranchOption ;