Jpp
16.0.2
the software that should make you happy
Main Page
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
software
JDetector
software/JDetector/JModule.cc
Go to the documentation of this file.
1
#include <string>
2
#include <iostream>
3
#include <set>
4
5
#include "
JDetector/JDetector.hh
"
6
#include "
JDetector/JDetectorToolkit.hh
"
7
#include "
JDetector/JDetectorSupportkit.hh
"
8
#include "
JSupport/JMeta.hh
"
9
10
#include "
Jeep/JeepToolkit.hh
"
11
#include "
Jeep/JParser.hh
"
12
#include "
Jeep/JMessage.hh
"
13
14
/**
15
* \file
16
*
17
* Auxiliary program to generate detector file with set of modules.
18
*
19
* \author mdejong
20
*/
21
int
main
(
int
argc,
char
**argv)
22
{
23
using namespace
std;
24
using namespace
JPP;
25
26
string
outputFile
;
27
int
detectorID;
28
string
variant;
29
set<int>
moduleID;
30
int
debug
;
31
32
try
{
33
34
JParser<>
zap(
"Auxiliary program to generate detector files."
);
35
36
zap[
'o'
] =
make_field
(
outputFile
,
"detector file"
);
37
zap[
'D'
] =
make_field
(detectorID,
"detector identifier"
) = 1001;
38
zap[
'V'
] =
make_field
(variant,
"detector version"
) = getDetectorVersions<string>();
39
zap[
'M'
] =
make_field
(moduleID,
"list of module identifiers"
) =
JPARSER::initialised
();
40
zap[
'd'
] =
make_field
(
debug
) = 0;
41
42
zap(argc, argv);
43
}
44
catch
(
const
exception &error) {
45
FATAL
(error.what() << endl);
46
}
47
48
49
JDetector
detector
(detectorID, variant,
JDetectorHeader
());
50
51
detector.
comment
.
add
(
JMeta
(argc,argv));
52
53
for
(
const
auto
id
: moduleID) {
54
detector.push_back(getModule<JKM3NeT_t>(
id
));
55
}
56
57
try
{
58
store
(
outputFile
, detector);
59
}
60
catch
(
const
JException
& error) {
61
FATAL
(error);
62
}
63
64
return
0;
65
}
JSUPPORT::JMeta
Auxiliary class for ROOT I/O of application specific meta data.
Definition:
JMeta.hh:70
JPARSER::JParser
Utility class to parse command line options.
Definition:
JParser.hh:1500
JLANG::JException
General exception.
Definition:
JException.hh:23
main
int main(int argc, char *argv[])
Definition:
Main.cc:15
JDETECTOR::JDetector
Detector data structure.
Definition:
JDetector.hh:89
JPARSER::initialised
Empty structure for specification of parser element that is initialised (i.e. does not require input)...
Definition:
JParser.hh:66
outputFile
string outputFile
Definition:
JDAQTimesliceSelector.cc:37
JDetector.hh
Data structure for detector geometry and calibration.
JDETECTOR::JDetectorHeader
Data structure for detector header.
Definition:
JDetectorHeader.hh:38
JDetectorSupportkit.hh
Detector support kit.
make_field
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
Definition:
JParser.hh:1961
JeepToolkit.hh
Auxiliary methods for handling file names, type names and environment.
JDETECTOR::store
void store(const std::string &file_name, const JDetector &detector)
Store detector to output file.
Definition:
JDetectorToolkit.hh:571
JMeta.hh
ROOT I/O of application specific meta data.
debug
int debug
debug level
Definition:
JSirene.cc:63
JMessage.hh
General purpose messaging.
FATAL
#define FATAL(A)
Definition:
JMessage.hh:67
JParser.hh
Utility class to parse command line options.
JDetectorToolkit.hh
std::set< int >
JEEP::JComment::add
JComment & add(const std::string &comment)
Add comment.
Definition:
JComment.hh:100
detector
do set_variable DETECTOR_TXT $WORKDIR detector
Definition:
detector-XY:fit1d.sh:38
JDETECTOR::JDetector::comment
JComment comment
Definition:
JDetector.hh:489
Generated by
1.8.5