21 static const int WILDCARD = -1;
22 static const char SEPARATOR =
'.';
23 static const std::string DEFAULT_ID =
"%";
35 return (((first == second)) ||
38 ((first.
getID() == WILDCARD || second.
getID() == WILDCARD) &&
39 (first.
getTDC() == WILDCARD || second.
getTDC() == WILDCARD)));
58 out <<
LEFT(12) << id;
60 for (
T i = __begin; i != __end; ++i) {
62 out <<
' ' <<
FIXED(7,3);
80 int main(
int argc,
char **argv)
92 const JPMTParameters& buffer = parameters.getDefaultPMTParameters();
95 JParser<> zap(
"Auxiliary program to print PMT parameters.");
104 catch(
const exception &error) {
105 FATAL(error.what() << endl);
111 if ((*i) != DEFAULT_ID) {
113 const size_t pos = i->find(SEPARATOR);
115 if (pos == string::npos) {
116 FATAL(
"Invalid PMT specifier " << *i << endl);
119 const JPMTIdentifier id(stoi(i->substr(0, pos)), stoi(i->substr(pos + 1)));
121 for (JPMTParametersMap::const_iterator ps = parameters.cbegin(); ps != parameters.cend(); ++ps) {
122 if (compare(ps->first,
id)) {
123 print(cout, *i, ps->second, keys.cbegin(), keys.cend());
129 print(cout, *i, parameters.getDefaultPMTParameters(), keys.cbegin(), keys.cend());
Utility class to parse command line options.
int main(int argc, char *argv[])
Utility class to parse parameter values.
*fatal Wrong number of arguments esac JCookie sh typeset Z DETECTOR typeset Z SOURCE_RUN typeset Z TARGET_RUN set_variable PARAMETERS_FILE $WORKDIR parameters
Empty structure for specification of parser element that is initialised (i.e. does not require input)...
Auxiliary data structure for floating point format specification.
JProperties getProperties(const JEquationParameters &equation=JPMTParameters::getEquationParameters())
Get properties of this class.
then echo The file $DIR KM3NeT_00000001_00000000 root already please rename or remove it first
#define MAKE_STRING(A)
Make string.
int getTDC() const
Get TDC.
std::ostream & write(std::ostream &out) const
Write the current parameter values.
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
do set_variable OUTPUT_DIRECTORY $WORKDIR T
int getID() const
Get identifier.
Auxiliary class for map of PMT parameters.
Auxiliary methods to convert data members or return values of member methods of a set of objects to a...
General purpose messaging.
Utility class to parse command line options.
Data structure for PMT parameters.
const array_type< JKey_t > & get_keys(const std::map< JKey_t, JValue_t, JComparator_t, JAllocator_t > &data)
Method to create array of keys of map.