39 JParser<> zap(
"Auxiliary program to merge time-over-threshold data.");
41 zap[
'f'] =
make_field(inputFile,
"input file (output from JCalibrateToT).");
47 catch(
const exception &error) {
48 FATAL(error.what() << endl);
52 gErrorIgnoreLevel = kError;
61 DEBUG(
"Processing " << *i << endl) ;
63 TFile
in(i->c_str(),
"read");
65 TIter iter(
in.GetListOfKeys());
67 for (TKey* key; (key = (TKey*) iter.Next()) != NULL; ) {
69 if (TString(key->GetName()).EndsWith(
_2SToT)) {
71 TH2* h2 =
dynamic_cast<TH2*
>(key->ReadObj());
73 map_type::iterator p = zmap.find(h2->GetName());
75 if (p == zmap.end()) {
77 DEBUG(
"Clone " << h2->GetName() << endl);
79 p = zmap.insert(make_pair(h2->GetName(), (TH2*) h2->Clone())).first;
83 DEBUG(
"Add " << h2->GetName() << endl);
90 for (map_type::iterator i = zmap.begin(); i != zmap.end(); ++i) {
91 i->second->SetDirectory(0);
101 for (map_type::iterator i = zmap.begin(); i != zmap.end(); ++i) {
103 if (i->first.EndsWith(
_2SToT)) {
105 TH2D* h2s = (TH2D*) i->second;
Utility class to parse command line options.
bool putObject(TDirectory *dir, const TObject &object)
Write object to ROOT directory.
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
then usage $script< input_file >< detector_file > fi set_variable OUTPUT_DIR set_variable SELECTOR JDAQTimesliceL1 set_variable DEBUG case set_variable DEBUG
void copy(const Head &from, JHead &to)
Copy header from from to to.
static const char *const _2SToT
Histogram naming.
then fatal Wrong number of arguments fi set_variable DETECTOR $argv[1] set_variable INPUT_FILE $argv[2] eval JPrintDetector a $DETECTOR O IDENTIFIER eval JPrintDetector a $DETECTOR O SUMMARY source JAcoustics sh $DETECTOR_ID CHECK_EXIT_CODE typeset A TRIPODS get_tripods $WORKDIR tripod txt TRIPODS for EMITTER in