53 JParser<> zap(
"Program to monitor AHRS data.");
55 zap[
'f'] =
make_field(inputFile,
"output of JConvertDB -q ahrs");
56 zap[
'n'] =
make_field(numberOfEvents) = JLimit::max();
59 zap[
'c'] =
make_field(ahrsFile,
"output of JAHRSCalibration");
66 catch(
const exception &error) {
67 FATAL(error.what() << endl);
89 TH1D h0(
"h0", NULL, 100, 0.0, 5.0);
90 TH1D h1(
"h1", NULL, 100, 0.0, 5.0);
91 TH2D h2(
"h2", NULL, 100, 0.0, 5.0, 100, 0.0, 5.0);
92 TH1D hn(
"hn", NULL, 100, 0.0, 1.0e4);
94 TH2D* ha =
new TH2D(
"ha", NULL,
95 string.size(), -0.5,
string.size() - 0.5,
96 range.getUpperLimit(), 1 - 0.5,
range.getUpperLimit() + 0.5);
98 for (Int_t
i = 1;
i <= ha->GetXaxis()->GetNbins(); ++
i) {
101 for (Int_t
i = 1;
i <= ha->GetYaxis()->GetNbins(); ++
i) {
105 TH2D* hb = (TH2D*) ha->Clone(
"hb");
106 TH2D* hc = (TH2D*) ha->Clone(
"hc");
112 for (JDetector::const_iterator module =
detector.begin(); module !=
detector.end(); ++module) {
113 if (module->getFloor() != 0) {
114 data[module->getID()] = 0;
118 while (inputFile.hasNext()) {
120 STATUS(
"event: " << setw(10) << inputFile.getCounter() <<
'\r');
DEBUG(endl);
124 if (router.hasModule(parameters->
DOMID)) {
156 << setw(16) << parameters->
UNIXTIME <<
' '
157 << setw(4) << parameters->
DUID <<
' '
158 << setw(2) << parameters->
FLOORID <<
' '
172 for (map_type::const_iterator
i =
data.begin();
i !=
data.end(); ++
i) {
178 for (JDetector::const_iterator module =
detector.begin(); module !=
detector.end(); ++module) {
180 map_type::const_iterator p =
data.find(module->getID());
182 if (p !=
data.end()) {
183 cout <<
getLabel(module->getLocation()) <<
' ' << setw(8) << module->getID() <<
' ' << setw(6) << p->second << endl;
192 out << h0 << h1 << h2 << hn;
193 out << *ha << *hb << *hc;
201 for (map_type::const_iterator
i =
data.begin();
i !=
data.end(); ++
i) {
206 QAQC(
' ' <<
FIXED(8,3) << q1.getQuantile(*
i));
Utility class to parse command line options.
Q(UTCMax_s-UTCMin_s)-livetime_s
int getFloor() const
Get floor number.
std::string getLabel(const JLocation &location)
Get module label for monitoring and other applications.
bool is_valid(const json &js)
Check validity of JSon data.
Router for direct addressing of module data in detector data structure.
static const double H
Planck constant [eV s].
*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
#define MAKE_CSTRING(A)
Make C-string.
Auxiliary data structure for floating point format specification.
floor_range getRangeOfFloors(const JDetector &detector)
Get range of floors.
Auxiliary class for defining the range of iterations of objects.
Logical location of module.
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
int getIndex()
Get index for user I/O manipulation.
z range($ZMAX-$ZMIN)< $MINIMAL_DZ." fi fi typeset -Z 4 STRING typeset -Z 2 FLOOR JPlot1D -f $
int getString() const
Get string number.
void load(const std::string &file_name, JDetector &detector)
Load detector from input file.
Router for mapping of string identifier to index.
General purpose class for object reading from a list of file names.
#define QAQC(A)
QA/QC output macro.
Auxiliary class to map module identifier to AHRS calibration.
const JLimit & getLimit() const
Get limit.
std::map< int, range_type > map_type
do set_variable DETECTOR_TXT $WORKDIR detector
source $JPP_DIR setenv csh $JPP_DIR &dev null eval JShellParser o a A
int qaqc
QA/QC file descriptor.
long long int UNIXTIME
[ms]
Auxiliary data structure to check validity of AHRS data.
#define DEBUG(A)
Message macros.