daq-decode C++ API Reference

class I3DAQDecoderUtil
#include <I3DAQDecoderUtil.h>

This is a utility class that offers commonly needed functions to decode I3 DAQ data.

Public Functions

I3DAQDecoderUtil()

Default constructor.

virtual ~I3DAQDecoderUtil()

Destructor.

Public Static Functions

static void FillTrigger(I3Trigger &trig, double trigTime, double trigLength, int32_t trigType, int32_t trigConfId, int32_t trigSrcId)

Decodes POD from an I3 DAQ event and fills a trigger.

Parameters:
  • trig – The trigger.

  • trigTime – Time at which the trigger was issued (in I3Units).

  • trigLength – Duration of triggered readout window. (in I3Units)

  • trigType – Type of trigger (s. trigger payload).

  • trigConfId – Config ID of trigger (s. trigger payload).

  • trigSrcId – Source of the trigger (s. trigger payload).

static TriggerKey CreateTriggerKey(int32_t trigType, int32_t trigConfId, int32_t trigSrcId)

Decodes POD from an I3 DAQ event and creates a trigger key.

Parameters:
  • trigType – Type of trigger (s. trigger payload).

  • trigConfId – Config ID of trigger (s. trigger payload).

  • trigSrcId – Source of the trigger (s. trigger payload).

Returns:

The trigger key.

static I3TriggerHierarchy::iterator AddTrigger(I3TriggerHierarchy &triggers, I3TriggerHierarchy::iterator iter, const I3Trigger &trig)

Adds a trigger to a trigger hierarchy.

Parameters:
  • triggers – Trigger hierarchy.

  • iter – Parent trigger that ‘contains’ the given trigger among others (iter should be invalid (pass an I3TriggerHierarchy::iterator()), if there is no parent trigger existing).

  • trig – Trigger.

Returns:

Position to add a sibling-like trigger to.

Public Static Attributes

static const unsigned int MAX_ATWD_CHANNEL = 4u
static const unsigned int MAX_IN_ICE_OM_NUMBER = 60u
static const double RAW_TIME_COUNTS_TO_NS_CONVERSION_FACTOR = 0.1
static const int32_t SIMPLE_MULTIPLICITY_TRIG_TYPE = 0
static const int32_t CALIBRATION_TRIG_TYPE = 1
static const int32_t MIN_BIAS_TRIG_TYPE = 2
static const int32_t THROUGHPUT_TRIG_TYPE = 3
static const int32_t TWO_COINCIDENCE_TRIG_TYPE = 4
static const int32_t THREE_COINCIDENCE_TRIG_TYPE = 5
static const int32_t AMANDA_MULTIPLICITY_TRIG_TYPE = 6
static const int32_t TWR_M20_FRAG_BIT_TRIG_TYPE = 7
static const int32_t TWR_VOLUMEN_TRIG_BIT_TRIG_TYPE = 8
static const int32_t TWR_M18_TRIG_BIT_TRIG_TYPE = 9
static const int32_t TWR_M24_TRIG_BIT_TRIG_TYPE = 10
static const int32_t TWR_STRING_TRIG_BIT_TRIG_TYPE = 11
static const int32_t TWR_RANDOM_TRIG_BIT_TRIG_TYPE = 12
static const int32_t PHYSICS_MIN_BIAS_TRIG_TYPE = 13
static const int32_t CLUSTER_STRING_TRIG_TYPE = 14
static const int32_t TWR_T0_CAL_TRIG_BIT_TRIG_TYPE = 15
static const int32_t TWR_LASER_CAL_TRIG_BIT_TRIG_TYPE = 16
static const int32_t MULTIPLICITY_STRING_TRIG_TYPE = 17
static const int32_t CYLINDER_VOLUME_TRIG_TYPE = 21
static const int32_t SLOW_PARTICLE_TRIG_TYPE = 22
static const int32_t SLOW_PARTICLE2_TRIG_TYPE = 24
static const int32_t FAINT_PARTICLE_TRIG_TYPE = 33
static const int32_t FIXED_RATE_TRIG_TYPE = 23
static const int32_t MERGED_TRIG_TYPE = -1
static const int32_t IN_ICE_TRIG_ID = 4000
static const int32_t ICE_TOP_TRIG_ID = 5000
static const int32_t AMANDA_TRIG_ID = 10000
static const int32_t GLOBAL_TRIG_ID = 6000
static const int32_t NO_CONFIGURATION = -1
static const int32_t DOM_TRIGGER_TYPE_MASK = 0x03
static const uint32_t DOM_TRIGGER_TYPE_FSB = 0x00
static const int32_t DOM_TRIGGER_MODE_MASK = 0x1f
static const uint32_t DOM_TRIGGER_MODE_FSB = 0x03

Private Functions

SET_LOGGER ("I3DAQDecoderUtil")
class I3DAQEventDecoder

Abstract base class that defines an interface for a decoder that decodes the I3 DAQ event byte stream and fills dataclasses structures.

Public Functions

I3DAQEventDecoder()

Default constructor.

virtual ~I3DAQEventDecoder() = 0

Destructor.

virtual I3Time FillEvent(I3Frame &frame, const std::vector<char> &data) const = 0

Decodes a DAQ event byte stream and fills dataclasses structures.

Parameters:
  • frame – Container for the created dataclasses structures.

  • data – DAQ event byte stream.

Returns:

The time of the event.

Private Functions

I3DAQEventDecoder(const I3DAQEventDecoder&)
I3DAQEventDecoder &operator=(const I3DAQEventDecoder&)
SET_LOGGER ("I3DAQEventDecoder")
class I3DAQFile
#include <I3DAQFile.h>

Wrapper class to read data from binary I3 DAQ files.

Public Functions

I3DAQFile()

Default constructor.

explicit I3DAQFile(const std::string &name)

Constructor.

It will open a binary I3 DAQ file.

Parameters:

name – Name of the binary I3 DAQ file.

virtual ~I3DAQFile()

Destructor.

void Open(const std::string &name)

Opens a binary I3 DAQ file.

Parameters:

name – Name of the binary I3 DAQ file.

const std::string &GetName() const

Returns the name of the current binary I3 DAQ file.

Returns:

The name.

const std::vector<char> &GetHeader() const

Returns the header data of the current binary I3 DAQ file.

Returns:

The header data.

const std::vector<char> &GetHeader()
bool GetEvent(std::vector<char> &buffer)

Returns the next event data.

Parameters:

buffer – The event data.

Returns:

False, if there is no event left in the current binary I3 DAQ file.

Private Functions

void Open()
I3DAQFile(const I3DAQFile&)
I3DAQFile &operator=(const I3DAQFile&)
SET_LOGGER ("I3DAQFile")

Private Members

std::string name_
boost::shared_ptr<boost::iostreams::filtering_istream> ifs_
bool valid_
std::vector<char> dummy_
class I3FrameBufferDecode : public I3ConditionalModule

Decodes event data from I3 DAQ.

I3FrameBufferDecode supports two parameter:

  • BufferID (the ID of the buffer to decode in the frame (default value is “I3DAQData”)) and

  • ExceptionID (this boolean indicates any exception that is thrown during decoding (default value is I3DAQDecodeException)).

Public Functions

I3FrameBufferDecode(const I3Context &context)
virtual ~I3FrameBufferDecode()
void Configure()
void DAQ(I3FramePtr frame)

Private Functions

I3FrameBufferDecode(const I3FrameBufferDecode&)
I3FrameBufferDecode &operator=(const I3FrameBufferDecode&)
SET_LOGGER ("I3FrameBufferDecode")

Private Members

std::string bufferID_
std::string exceptionID_
std::string decoderService_
I3DAQEventDecoderPtr decoder_
class I3FrameBufferDump : public I3ConditionalModule

Dump event data from I3 DAQ into a file.

I3FrameBufferDump supports two parameter:

  • BufferID (the ID of the buffer to dump into the outputfile (default value is “I3DAQData”)) and

  • (the name of the outputfile to create (default value is “”)).

Public Functions

I3FrameBufferDump(const I3Context &context)
virtual ~I3FrameBufferDump()
void Configure()
void DAQ(I3FramePtr frame)
void Finish()

Private Functions

I3FrameBufferDump(const I3FrameBufferDump&)
I3FrameBufferDump &operator=(const I3FrameBufferDump&)
SET_LOGGER ("I3FrameBufferDump")

Private Members

std::string outfile_
std::string frameBufferName_
boost::shared_ptr<std::ofstream> fout_
namespace std

STL namespace.

file I3DAQDecoderUtil.cxx
#include <dataclasses/TriggerKey.h>

Implementation of I3DAQDecoderUtil class.

(c) 2005 the IceCube Collaboration $Id$

Version

$Revision$

Date

$Date$

Author

tschmidt

file I3DAQDecoderUtil.h
#include <stdint.h>
#include <icetray/I3Logging.h>
#include <dataclasses/TriggerKey.h>
#include <dataclasses/physics/I3TriggerHierarchy.h>

Definition of I3DAQDecoderUtil class

(c) 2005 the IceCube Collaboration $Id$

Version

$Revision$

Date

$Date$

Author

tschmidt

file I3DAQEventDecoder.cxx

copyright (C) 2004 the icecube collaboration $Id$

Version

$Revision$

Date

$Date$

Author

tschmidt

file I3DAQEventDecoder.h
#include <vector>
#include <icetray/I3Logging.h>
#include <icetray/I3DefaultName.h>
#include <icetray/I3FrameObject.h>

copyright (C) 2004 the icecube collaboration $Id$

Version

$Revision$

Date

$Date$

Author

tschmidt

Functions

I3_POINTER_TYPEDEFS(I3DAQEventDecoder)
I3_DEFAULT_NAME(I3DAQEventDecoder)
file I3DAQFile.cxx
#include <stdint.h>
#include <netinet/in.h>
#include <time.h>
#include <boost/filesystem/operations.hpp>
#include <boost/filesystem/path.hpp>
#include <boost/iostreams/device/file.hpp>
#include <boost/iostreams/filter/gzip.hpp>
#include “boost/algorithm/string.hpp”

implementation of the I3DAQFile class

copyright (C) 2004 the icecube collaboration $Id$

Version

$Revision$

Date

$Date$

Author

tschmidt

file I3DAQFile.h
#include <string>
#include <vector>
#include <boost/shared_ptr.hpp>
#include <boost/iostreams/filtering_stream.hpp>
#include <icetray/I3Logging.h>
#include <icetray/I3FrameObject.h>

definition of the I3DAQFile class

copyright (C) 2004 the icecube collaboration $Id$

Version

$Revision$

Date

$Date$

Author

tschmidt

Functions

I3_POINTER_TYPEDEFS(I3DAQFile)

pointer type to insulate users from memory management

file I3FrameBufferDecode.cxx
#include <exception>
#include <icetray/I3Context.h>
#include <icetray/I3DefaultName.h>
#include <icetray/I3Bool.h>
#include <dataclasses/I3Time.h>
#include <dataclasses/I3Vector.h>

copyright (C) 2004 the icecube collaboration

Rcs

I3FrameBufferDecode.cxx 94949 2012-11-04 16:40:30Z nwhitehorn

Version

Rcs

94949

Date

Rcs

2012-11-04 17:40:30 +0100 (So, 04 Nov 2012)

Author

tschmidt

Functions

I3_MODULE(I3FrameBufferDecode)
file I3FrameBufferDecode.h
#include <string>
#include <icetray/I3Frame.h>
#include <icetray/I3Logging.h>
#include <icetray/I3ConditionalModule.h>

copyright (C) 2004 the icecube collaboration $Id$

Version

$Revision$

Date

$Date$

Author

tschmidt

file I3FrameBufferDump.cxx
#include <dataclasses/I3Vector.h>
#include <icetray/I3Frame.h>

copyright (C) 2004 the icecube collaboration $Id$

Version

$Revision$

Date

$Date$

Author

tschmidt

Functions

I3_MODULE(I3FrameBufferDump)
file I3FrameBufferDump.h
#include <fstream>
#include <string>
#include <icetray/I3ConditionalModule.h>
#include <icetray/I3Frame.h>
#include <icetray/I3Logging.h>

copyright (C) 2004 the icecube collaboration $Id$

Version

$Revision$

Date

$Date$

Author

tschmidt

dir daq-decode
dir daq-decode
dir daq-decode
dir icetray
dir private
dir public