1 #ifndef __JCALIBRATE_JTDC_t__
2 #define __JCALIBRATE_JTDC_t__
19 namespace JCALIBRATE {}
20 namespace JPP {
using namespace JCALIBRATE; }
25 namespace JCALIBRATE {
64 multimap_type::insert(value_type(value.first, pmt));
69 multimap_type::insert(value);
83 void insert(
const int id,
const int tdc)
85 this->
insert(value_type(
id, tdc));
102 if (range.first == range.second) {
103 range = multimap_type::equal_range(
WILD_CARD);
117 for (JTDC_t::const_iterator p = this->begin(); p != this->end(); ) {
119 JTDC_t::const_iterator q = p;
121 for ( ; q != this->end() && q->first == p->first; ++q) {}
125 JTDC_t::const_iterator i = p;
127 for ( ; i != q && i->second != pmt; ++i) {}
130 buffer.
insert(value_type(p->first, pmt));
149 for (const_iterator i = this->begin(); i != this->end(); ++i) {
186 JStringStream
is(in);
192 for (
int id, pmt; is >>
id >> pmt; ) {
193 tdc.
insert(JTDC_t::value_type(
id, pmt));
209 for (JTDC_t::const_iterator i = tdc.begin(); i != tdc.end(); ++i) {
210 out <<
' ' << i->first
std::multimap< int, int > multimap_type
friend std::istream & operator>>(std::istream &in, JTDC_t &tdc)
Read TDC constraints from input.
#define THROW(JException_t, A)
Marco for throwing exception with std::ostream compatible message.
Auxiliary class for TDC constraints.
friend std::ostream & operator<<(std::ostream &out, const JTDC_t &tdc)
Write TDC constraints to output.
z range($ZMAX-$ZMIN)< $MINIMAL_DZ." fi fi mv $WORKDIR/fit.root $MODULE_ROOT typeset -Z 4 STRING typeset -Z 2 FLOOR JPlot1D -f $
static JStat getFileStatus
Function object for file status.
void insert(const value_type &value)
Insert constraint.
std::pair< const_iterator, const_iterator > range_type
Type definition for range of TDC constraints of a given module identfier.
void reverse()
Reverse constraints.
Exception for accessing a value in a collection that is outside of its range.
KM3NeT DAQ constants, bit handling, etc.
static const int NUMBER_OF_PMTS
Total number of PMTs in module.
bool is_valid(const bool option=false) const
Check validity of TDC constrants.
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 typeset A TRIPODS get_tripods $WORKDIR tripod txt TRIPODS for EMITTER in
range_type equal_range(const int id)
Get range of constraints for given module.
void insert(const int id, const int tdc)
Insert constraint.